1 ; Checks if widening instructions works for SVE
3 ; RUN: opt -cost-model -analyze -mtriple=aarch64--linux-gnu -mattr=+sve < %s | FileCheck %s
5 define <vscale x 4 x i32> @widening(<vscale x 16 x i8> %in, <vscale x 4 x i16> %in2) {
7 ; CHECK-LABEL: 'widening':
8 ; 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>
9 ; 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>
10 ; 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
11 ; CHECK-NEXT: Cost Model: Found an estimated cost of {{[0-9]+}} for instruction: ret <vscale x 4 x i32> %in.add
13 %in.bc = bitcast <vscale x 16 x i8> %in to <vscale x 4 x i32>
14 %in2.ext = zext <vscale x 4 x i16> %in2 to <vscale x 4 x i32>
15 %in.add = add <vscale x 4 x i32> %in.bc, %in2.ext
16 ret <vscale x 4 x i32> %in.add