[SLP] Add cost model for `llvm.powi.*` intrinsics (REAPPLIED)
[llvm-project.git] / llvm / test / Analysis / CostModel / AArch64 / sve-widening-instruction.ll
blobdc8b0ad953dafe6e7b2982d1ca7026dcafc3c657
1 ; Checks if widening instructions works for SVE
3 ; RUN: opt  -passes='print<cost-model>' 2>&1 -disable-output -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