1; Checks if widening instructions works for SVE 2 3; RUN: opt -cost-model -analyze -mtriple=aarch64--linux-gnu -mattr=+sve < %s 2>%t | FileCheck %s 4; RUN: FileCheck --check-prefix=WARN --allow-empty %s <%t 5 6; If this check fails please read test/CodeGen/AArch64/README for instructions on how to resolve it. 7; WARN-NOT: warning 8 9define <vscale x 4 x i32> @widening(<vscale x 16 x i8> %in, <vscale x 4 x i16> %in2) { 10 11; CHECK-LABEL: 'widening': 12; CHECK: Cost Model: Found an estimated cost of {{[0-9]+}} for instruction: %in.bc = bitcast <vscale x 16 x i8> %in to <vscale x 4 x i32> 13; CHECK-NEXT: Cost Model: Found an estimated cost of {{[0-9]+}} for instruction: %in2.ext = zext <vscale x 4 x i16> %in2 to <vscale x 4 x i32> 14; CHECK-NEXT: Cost Model: Found an estimated cost of {{[0-9]+}} for instruction: %in.add = add <vscale x 4 x i32> %in.bc, %in2.ext 15; CHECK-NEXT: Cost Model: Found an estimated cost of {{[0-9]+}} for instruction: ret <vscale x 4 x i32> %in.add 16 17 %in.bc = bitcast <vscale x 16 x i8> %in to <vscale x 4 x i32> 18 %in2.ext = zext <vscale x 4 x i16> %in2 to <vscale x 4 x i32> 19 %in.add = add <vscale x 4 x i32> %in.bc, %in2.ext 20 ret <vscale x 4 x i32> %in.add 21} 22