140069286SPhilip Reames; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py 21d40fefbSLuke Lau; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -S -mtriple=riscv64 -mattr=+v,+f,+d,+zvfh,+zvfbfmin | FileCheck %s --check-prefixes=CHECK,ZVFH 31d40fefbSLuke Lau; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -S -mtriple=riscv64 -mattr=+v,+f,+d,+zvfhmin,+zvfbfmin | FileCheck %s --check-prefixes=CHECK,ZVFHMIN 440069286SPhilip Reames 540069286SPhilip Reamesdefine void @sqrt() { 640069286SPhilip Reames; CHECK-LABEL: 'sqrt' 7*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call bfloat @llvm.sqrt.bf16(bfloat poison) 8*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %2 = call <2 x bfloat> @llvm.sqrt.v2bf16(<2 x bfloat> poison) 9*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %3 = call <4 x bfloat> @llvm.sqrt.v4bf16(<4 x bfloat> poison) 10*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %4 = call <8 x bfloat> @llvm.sqrt.v8bf16(<8 x bfloat> poison) 11*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %5 = call <16 x bfloat> @llvm.sqrt.v16bf16(<16 x bfloat> poison) 12*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %6 = call <32 x bfloat> @llvm.sqrt.v32bf16(<32 x bfloat> poison) 13*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %7 = call <vscale x 2 x bfloat> @llvm.sqrt.nxv2bf16(<vscale x 2 x bfloat> poison) 14*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %8 = call <vscale x 4 x bfloat> @llvm.sqrt.nxv4bf16(<vscale x 4 x bfloat> poison) 15*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %9 = call <vscale x 8 x bfloat> @llvm.sqrt.nxv8bf16(<vscale x 8 x bfloat> poison) 16*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %10 = call <vscale x 16 x bfloat> @llvm.sqrt.nxv16bf16(<vscale x 16 x bfloat> poison) 17*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %11 = call <vscale x 32 x bfloat> @llvm.sqrt.nxv32bf16(<vscale x 32 x bfloat> poison) 18*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = call float @llvm.sqrt.f32(float poison) 19*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %13 = call <2 x float> @llvm.sqrt.v2f32(<2 x float> poison) 20*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = call <4 x float> @llvm.sqrt.v4f32(<4 x float> poison) 21*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %15 = call <8 x float> @llvm.sqrt.v8f32(<8 x float> poison) 22*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %16 = call <16 x float> @llvm.sqrt.v16f32(<16 x float> poison) 23*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = call <vscale x 1 x float> @llvm.sqrt.nxv1f32(<vscale x 1 x float> poison) 24*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %18 = call <vscale x 2 x float> @llvm.sqrt.nxv2f32(<vscale x 2 x float> poison) 25*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %19 = call <vscale x 4 x float> @llvm.sqrt.nxv4f32(<vscale x 4 x float> poison) 26*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %20 = call <vscale x 8 x float> @llvm.sqrt.nxv8f32(<vscale x 8 x float> poison) 27*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %21 = call <vscale x 16 x float> @llvm.sqrt.nxv16f32(<vscale x 16 x float> poison) 28*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %22 = call double @llvm.sqrt.f64(double poison) 29*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %23 = call <2 x double> @llvm.sqrt.v2f64(<2 x double> poison) 30*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %24 = call <4 x double> @llvm.sqrt.v4f64(<4 x double> poison) 31*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %25 = call <8 x double> @llvm.sqrt.v8f64(<8 x double> poison) 32*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %26 = call <16 x double> @llvm.sqrt.v16f64(<16 x double> poison) 33*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %27 = call <vscale x 1 x double> @llvm.sqrt.nxv1f64(<vscale x 1 x double> poison) 34*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %28 = call <vscale x 2 x double> @llvm.sqrt.nxv2f64(<vscale x 2 x double> poison) 35*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %29 = call <vscale x 4 x double> @llvm.sqrt.nxv4f64(<vscale x 4 x double> poison) 36*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %30 = call <vscale x 8 x double> @llvm.sqrt.nxv8f64(<vscale x 8 x double> poison) 370a5d52a7SSergey Kachkov; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void 3840069286SPhilip Reames; 39*98e5962bSLiqinWeng call bfloat @llvm.sqrt.bf16(bfloat poison) 40*98e5962bSLiqinWeng call <2 x bfloat> @llvm.sqrt.v2bf16(<2 x bfloat> poison) 41*98e5962bSLiqinWeng call <4 x bfloat> @llvm.sqrt.v4bf16(<4 x bfloat> poison) 42*98e5962bSLiqinWeng call <8 x bfloat> @llvm.sqrt.v8bf16(<8 x bfloat> poison) 43*98e5962bSLiqinWeng call <16 x bfloat> @llvm.sqrt.v16bf16(<16 x bfloat> poison) 44*98e5962bSLiqinWeng call <32 x bfloat> @llvm.sqrt.v32bf16(<32 x bfloat> poison) 45*98e5962bSLiqinWeng call <vscale x 2 x bfloat> @llvm.sqrt.nxv2bf16(<vscale x 2 x bfloat> poison) 46*98e5962bSLiqinWeng call <vscale x 4 x bfloat> @llvm.sqrt.nxv4bf16(<vscale x 4 x bfloat> poison) 47*98e5962bSLiqinWeng call <vscale x 8 x bfloat> @llvm.sqrt.nxv8bf16(<vscale x 8 x bfloat> poison) 48*98e5962bSLiqinWeng call <vscale x 16 x bfloat> @llvm.sqrt.nxv16bf16(<vscale x 16 x bfloat> poison) 49*98e5962bSLiqinWeng call <vscale x 32 x bfloat> @llvm.sqrt.nxv32bf16(<vscale x 32 x bfloat> poison) 50*98e5962bSLiqinWeng call float @llvm.sqrt.f32(float poison) 51*98e5962bSLiqinWeng call <2 x float> @llvm.sqrt.v2f32(<2 x float> poison) 52*98e5962bSLiqinWeng call <4 x float> @llvm.sqrt.v4f32(<4 x float> poison) 53*98e5962bSLiqinWeng call <8 x float> @llvm.sqrt.v8f32(<8 x float> poison) 54*98e5962bSLiqinWeng call <16 x float> @llvm.sqrt.v16f32(<16 x float> poison) 55*98e5962bSLiqinWeng call <vscale x 1 x float> @llvm.sqrt.nxv1f32(<vscale x 1 x float> poison) 56*98e5962bSLiqinWeng call <vscale x 2 x float> @llvm.sqrt.nxv2f32(<vscale x 2 x float> poison) 57*98e5962bSLiqinWeng call <vscale x 4 x float> @llvm.sqrt.nxv4f32(<vscale x 4 x float> poison) 58*98e5962bSLiqinWeng call <vscale x 8 x float> @llvm.sqrt.nxv8f32(<vscale x 8 x float> poison) 59*98e5962bSLiqinWeng call <vscale x 16 x float> @llvm.sqrt.nxv16f32(<vscale x 16 x float> poison) 60*98e5962bSLiqinWeng call double @llvm.sqrt.f64(double poison) 61*98e5962bSLiqinWeng call <2 x double> @llvm.sqrt.v2f64(<2 x double> poison) 62*98e5962bSLiqinWeng call <4 x double> @llvm.sqrt.v4f64(<4 x double> poison) 63*98e5962bSLiqinWeng call <8 x double> @llvm.sqrt.v8f64(<8 x double> poison) 64*98e5962bSLiqinWeng call <16 x double> @llvm.sqrt.v16f64(<16 x double> poison) 65*98e5962bSLiqinWeng call <vscale x 1 x double> @llvm.sqrt.nxv1f64(<vscale x 1 x double> poison) 66*98e5962bSLiqinWeng call <vscale x 2 x double> @llvm.sqrt.nxv2f64(<vscale x 2 x double> poison) 67*98e5962bSLiqinWeng call <vscale x 4 x double> @llvm.sqrt.nxv4f64(<vscale x 4 x double> poison) 68*98e5962bSLiqinWeng call <vscale x 8 x double> @llvm.sqrt.nxv8f64(<vscale x 8 x double> poison) 6940069286SPhilip Reames ret void 7040069286SPhilip Reames} 7140069286SPhilip Reames 721d40fefbSLuke Laudefine void @sqrt_f16() { 73*98e5962bSLiqinWeng; ZVFH-LABEL: 'sqrt_f16' 74*98e5962bSLiqinWeng; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call half @llvm.sqrt.f16(half poison) 75*98e5962bSLiqinWeng; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = call <2 x half> @llvm.sqrt.v2f16(<2 x half> poison) 76*98e5962bSLiqinWeng; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = call <4 x half> @llvm.sqrt.v4f16(<4 x half> poison) 77*98e5962bSLiqinWeng; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = call <8 x half> @llvm.sqrt.v8f16(<8 x half> poison) 78*98e5962bSLiqinWeng; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = call <16 x half> @llvm.sqrt.v16f16(<16 x half> poison) 79*98e5962bSLiqinWeng; ZVFH-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %6 = call <32 x half> @llvm.sqrt.v32f16(<32 x half> poison) 80*98e5962bSLiqinWeng; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call <vscale x 2 x half> @llvm.sqrt.nxv2f16(<vscale x 2 x half> poison) 81*98e5962bSLiqinWeng; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call <vscale x 4 x half> @llvm.sqrt.nxv4f16(<vscale x 4 x half> poison) 82*98e5962bSLiqinWeng; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = call <vscale x 8 x half> @llvm.sqrt.nxv8f16(<vscale x 8 x half> poison) 83*98e5962bSLiqinWeng; ZVFH-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %10 = call <vscale x 16 x half> @llvm.sqrt.nxv16f16(<vscale x 16 x half> poison) 84*98e5962bSLiqinWeng; ZVFH-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %11 = call <vscale x 32 x half> @llvm.sqrt.nxv32f16(<vscale x 32 x half> poison) 85*98e5962bSLiqinWeng; ZVFH-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void 861d40fefbSLuke Lau; 87*98e5962bSLiqinWeng; ZVFHMIN-LABEL: 'sqrt_f16' 88*98e5962bSLiqinWeng; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call half @llvm.sqrt.f16(half poison) 89*98e5962bSLiqinWeng; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %2 = call <2 x half> @llvm.sqrt.v2f16(<2 x half> poison) 90*98e5962bSLiqinWeng; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %3 = call <4 x half> @llvm.sqrt.v4f16(<4 x half> poison) 91*98e5962bSLiqinWeng; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %4 = call <8 x half> @llvm.sqrt.v8f16(<8 x half> poison) 92*98e5962bSLiqinWeng; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %5 = call <16 x half> @llvm.sqrt.v16f16(<16 x half> poison) 93*98e5962bSLiqinWeng; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %6 = call <32 x half> @llvm.sqrt.v32f16(<32 x half> poison) 94*98e5962bSLiqinWeng; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %7 = call <vscale x 2 x half> @llvm.sqrt.nxv2f16(<vscale x 2 x half> poison) 95*98e5962bSLiqinWeng; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %8 = call <vscale x 4 x half> @llvm.sqrt.nxv4f16(<vscale x 4 x half> poison) 96*98e5962bSLiqinWeng; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %9 = call <vscale x 8 x half> @llvm.sqrt.nxv8f16(<vscale x 8 x half> poison) 97*98e5962bSLiqinWeng; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %10 = call <vscale x 16 x half> @llvm.sqrt.nxv16f16(<vscale x 16 x half> poison) 98*98e5962bSLiqinWeng; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %11 = call <vscale x 32 x half> @llvm.sqrt.nxv32f16(<vscale x 32 x half> poison) 99*98e5962bSLiqinWeng; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void 100*98e5962bSLiqinWeng; 101*98e5962bSLiqinWeng call half @llvm.sqrt.f16(half poison) 102*98e5962bSLiqinWeng call <2 x half> @llvm.sqrt.v2f16(<2 x half> poison) 103*98e5962bSLiqinWeng call <4 x half> @llvm.sqrt.v4f16(<4 x half> poison) 104*98e5962bSLiqinWeng call <8 x half> @llvm.sqrt.v8f16(<8 x half> poison) 105*98e5962bSLiqinWeng call <16 x half> @llvm.sqrt.v16f16(<16 x half> poison) 106*98e5962bSLiqinWeng call <32 x half> @llvm.sqrt.v32f16(<32 x half> poison) 107*98e5962bSLiqinWeng call <vscale x 2 x half> @llvm.sqrt.nxv2f16(<vscale x 2 x half> poison) 108*98e5962bSLiqinWeng call <vscale x 4 x half> @llvm.sqrt.nxv4f16(<vscale x 4 x half> poison) 109*98e5962bSLiqinWeng call <vscale x 8 x half> @llvm.sqrt.nxv8f16(<vscale x 8 x half> poison) 110*98e5962bSLiqinWeng call <vscale x 16 x half> @llvm.sqrt.nxv16f16(<vscale x 16 x half> poison) 111*98e5962bSLiqinWeng call <vscale x 32 x half> @llvm.sqrt.nxv32f16(<vscale x 32 x half> poison) 1121d40fefbSLuke Lau ret void 1131d40fefbSLuke Lau} 11440069286SPhilip Reames 11540069286SPhilip Reamesdefine void @pow() { 11640069286SPhilip Reames; CHECK-LABEL: 'pow' 1171d40fefbSLuke Lau; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call bfloat @llvm.pow.bf16(bfloat undef, bfloat undef) 1181d40fefbSLuke Lau; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %2 = call <2 x bfloat> @llvm.pow.v2bf16(<2 x bfloat> undef, <2 x bfloat> undef) 1191d40fefbSLuke Lau; CHECK-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %3 = call <4 x bfloat> @llvm.pow.v4bf16(<4 x bfloat> undef, <4 x bfloat> undef) 1201d40fefbSLuke Lau; CHECK-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %4 = call <8 x bfloat> @llvm.pow.v8bf16(<8 x bfloat> undef, <8 x bfloat> undef) 1211d40fefbSLuke Lau; CHECK-NEXT: Cost Model: Found an estimated cost of 191 for instruction: %5 = call <16 x bfloat> @llvm.pow.v16bf16(<16 x bfloat> undef, <16 x bfloat> undef) 1222b6b7f66SLuke Lau; CHECK-NEXT: Cost Model: Invalid cost for instruction: %6 = call <vscale x 1 x bfloat> @llvm.pow.nxv1bf16(<vscale x 1 x bfloat> undef, <vscale x 1 x bfloat> undef) 1232b6b7f66SLuke Lau; CHECK-NEXT: Cost Model: Invalid cost for instruction: %7 = call <vscale x 2 x bfloat> @llvm.pow.nxv2bf16(<vscale x 2 x bfloat> undef, <vscale x 2 x bfloat> undef) 1242b6b7f66SLuke Lau; CHECK-NEXT: Cost Model: Invalid cost for instruction: %8 = call <vscale x 4 x bfloat> @llvm.pow.nxv4bf16(<vscale x 4 x bfloat> undef, <vscale x 4 x bfloat> undef) 1252b6b7f66SLuke Lau; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call <vscale x 8 x bfloat> @llvm.pow.nxv8bf16(<vscale x 8 x bfloat> undef, <vscale x 8 x bfloat> undef) 1262b6b7f66SLuke Lau; CHECK-NEXT: Cost Model: Invalid cost for instruction: %10 = call <vscale x 16 x bfloat> @llvm.pow.nxv16bf16(<vscale x 16 x bfloat> undef, <vscale x 16 x bfloat> undef) 1271d40fefbSLuke Lau; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %11 = call float @llvm.pow.f32(float undef, float undef) 1281d40fefbSLuke Lau; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %12 = call <2 x float> @llvm.pow.v2f32(<2 x float> undef, <2 x float> undef) 1291d40fefbSLuke Lau; CHECK-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %13 = call <4 x float> @llvm.pow.v4f32(<4 x float> undef, <4 x float> undef) 1301d40fefbSLuke Lau; CHECK-NEXT: Cost Model: Found an estimated cost of 95 for instruction: %14 = call <8 x float> @llvm.pow.v8f32(<8 x float> undef, <8 x float> undef) 1311d40fefbSLuke Lau; CHECK-NEXT: Cost Model: Found an estimated cost of 191 for instruction: %15 = call <16 x float> @llvm.pow.v16f32(<16 x float> undef, <16 x float> undef) 1321d40fefbSLuke Lau; CHECK-NEXT: Cost Model: Invalid cost for instruction: %16 = call <vscale x 1 x float> @llvm.pow.nxv1f32(<vscale x 1 x float> undef, <vscale x 1 x float> undef) 1331d40fefbSLuke Lau; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call <vscale x 2 x float> @llvm.pow.nxv2f32(<vscale x 2 x float> undef, <vscale x 2 x float> undef) 1341d40fefbSLuke Lau; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call <vscale x 4 x float> @llvm.pow.nxv4f32(<vscale x 4 x float> undef, <vscale x 4 x float> undef) 1351d40fefbSLuke Lau; CHECK-NEXT: Cost Model: Invalid cost for instruction: %19 = call <vscale x 8 x float> @llvm.pow.nxv8f32(<vscale x 8 x float> undef, <vscale x 8 x float> undef) 1361d40fefbSLuke Lau; CHECK-NEXT: Cost Model: Invalid cost for instruction: %20 = call <vscale x 16 x float> @llvm.pow.nxv16f32(<vscale x 16 x float> undef, <vscale x 16 x float> undef) 1371d40fefbSLuke Lau; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %21 = call double @llvm.pow.f64(double undef, double undef) 1381d40fefbSLuke Lau; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %22 = call <2 x double> @llvm.pow.v2f64(<2 x double> undef, <2 x double> undef) 1391d40fefbSLuke Lau; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %23 = call <4 x double> @llvm.pow.v4f64(<4 x double> undef, <4 x double> undef) 1401d40fefbSLuke Lau; CHECK-NEXT: Cost Model: Found an estimated cost of 95 for instruction: %24 = call <8 x double> @llvm.pow.v8f64(<8 x double> undef, <8 x double> undef) 1411d40fefbSLuke Lau; CHECK-NEXT: Cost Model: Found an estimated cost of 191 for instruction: %25 = call <16 x double> @llvm.pow.v16f64(<16 x double> undef, <16 x double> undef) 1421d40fefbSLuke Lau; CHECK-NEXT: Cost Model: Invalid cost for instruction: %26 = call <vscale x 1 x double> @llvm.pow.nxv1f64(<vscale x 1 x double> undef, <vscale x 1 x double> undef) 1431d40fefbSLuke Lau; CHECK-NEXT: Cost Model: Invalid cost for instruction: %27 = call <vscale x 2 x double> @llvm.pow.nxv2f64(<vscale x 2 x double> undef, <vscale x 2 x double> undef) 1441d40fefbSLuke Lau; CHECK-NEXT: Cost Model: Invalid cost for instruction: %28 = call <vscale x 4 x double> @llvm.pow.nxv4f64(<vscale x 4 x double> undef, <vscale x 4 x double> undef) 1451d40fefbSLuke Lau; CHECK-NEXT: Cost Model: Invalid cost for instruction: %29 = call <vscale x 8 x double> @llvm.pow.nxv8f64(<vscale x 8 x double> undef, <vscale x 8 x double> undef) 1460a5d52a7SSergey Kachkov; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void 14740069286SPhilip Reames; 1481d40fefbSLuke Lau call bfloat @llvm.pow.bf16(bfloat undef, bfloat undef) 1491d40fefbSLuke Lau call <2 x bfloat> @llvm.pow.v2bf16(<2 x bfloat> undef, <2 x bfloat> undef) 1501d40fefbSLuke Lau call <4 x bfloat> @llvm.pow.v4bf16(<4 x bfloat> undef, <4 x bfloat> undef) 1511d40fefbSLuke Lau call <8 x bfloat> @llvm.pow.v8bf16(<8 x bfloat> undef, <8 x bfloat> undef) 1521d40fefbSLuke Lau call <16 x bfloat> @llvm.pow.v16bf16(<16 x bfloat> undef, <16 x bfloat> undef) 153c3edeaa6SLiqinWeng call <vscale x 1 x bfloat> @llvm.pow.nxv1bf16(<vscale x 1 x bfloat> undef, <vscale x 1 x bfloat> undef) 154c3edeaa6SLiqinWeng call <vscale x 2 x bfloat> @llvm.pow.nxv2bf16(<vscale x 2 x bfloat> undef, <vscale x 2 x bfloat> undef) 155c3edeaa6SLiqinWeng call <vscale x 4 x bfloat> @llvm.pow.nxv4bf16(<vscale x 4 x bfloat> undef, <vscale x 4 x bfloat> undef) 156c3edeaa6SLiqinWeng call <vscale x 8 x bfloat> @llvm.pow.nxv8bf16(<vscale x 8 x bfloat> undef, <vscale x 8 x bfloat> undef) 157c3edeaa6SLiqinWeng call <vscale x 16 x bfloat> @llvm.pow.nxv16bf16(<vscale x 16 x bfloat> undef, <vscale x 16 x bfloat> undef) 15840069286SPhilip Reames call float @llvm.pow.f32(float undef, float undef) 15940069286SPhilip Reames call <2 x float> @llvm.pow.v2f32(<2 x float> undef, <2 x float> undef) 16040069286SPhilip Reames call <4 x float> @llvm.pow.v4f32(<4 x float> undef, <4 x float> undef) 16140069286SPhilip Reames call <8 x float> @llvm.pow.v8f32(<8 x float> undef, <8 x float> undef) 16240069286SPhilip Reames call <16 x float> @llvm.pow.v16f32(<16 x float> undef, <16 x float> undef) 163c3edeaa6SLiqinWeng call <vscale x 1 x float> @llvm.pow.nxv1f32(<vscale x 1 x float> undef, <vscale x 1 x float> undef) 164c3edeaa6SLiqinWeng call <vscale x 2 x float> @llvm.pow.nxv2f32(<vscale x 2 x float> undef, <vscale x 2 x float> undef) 165c3edeaa6SLiqinWeng call <vscale x 4 x float> @llvm.pow.nxv4f32(<vscale x 4 x float> undef, <vscale x 4 x float> undef) 166c3edeaa6SLiqinWeng call <vscale x 8 x float> @llvm.pow.nxv8f32(<vscale x 8 x float> undef, <vscale x 8 x float> undef) 167c3edeaa6SLiqinWeng call <vscale x 16 x float> @llvm.pow.nxv16f32(<vscale x 16 x float> undef, <vscale x 16 x float> undef) 16840069286SPhilip Reames call double @llvm.pow.f64(double undef, double undef) 16940069286SPhilip Reames call <2 x double> @llvm.pow.v2f64(<2 x double> undef, <2 x double> undef) 17040069286SPhilip Reames call <4 x double> @llvm.pow.v4f64(<4 x double> undef, <4 x double> undef) 17140069286SPhilip Reames call <8 x double> @llvm.pow.v8f64(<8 x double> undef, <8 x double> undef) 17240069286SPhilip Reames call <16 x double> @llvm.pow.v16f64(<16 x double> undef, <16 x double> undef) 173c3edeaa6SLiqinWeng call <vscale x 1 x double> @llvm.pow.nxv1f64(<vscale x 1 x double> undef, <vscale x 1 x double> undef) 174c3edeaa6SLiqinWeng call <vscale x 2 x double> @llvm.pow.nxv2f64(<vscale x 2 x double> undef, <vscale x 2 x double> undef) 175c3edeaa6SLiqinWeng call <vscale x 4 x double> @llvm.pow.nxv4f64(<vscale x 4 x double> undef, <vscale x 4 x double> undef) 176c3edeaa6SLiqinWeng call <vscale x 8 x double> @llvm.pow.nxv8f64(<vscale x 8 x double> undef, <vscale x 8 x double> undef) 17740069286SPhilip Reames ret void 17840069286SPhilip Reames} 17940069286SPhilip Reames 1801d40fefbSLuke Laudefine void @pow_f16() { 1811d40fefbSLuke Lau; ZVFH-LABEL: 'pow_f16' 1821d40fefbSLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call half @llvm.pow.f16(half undef, half undef) 1831d40fefbSLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %2 = call <2 x half> @llvm.pow.v2f16(<2 x half> undef, <2 x half> undef) 1841d40fefbSLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %3 = call <4 x half> @llvm.pow.v4f16(<4 x half> undef, <4 x half> undef) 1851d40fefbSLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %4 = call <8 x half> @llvm.pow.v8f16(<8 x half> undef, <8 x half> undef) 1861d40fefbSLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %5 = call <16 x half> @llvm.pow.v16f16(<16 x half> undef, <16 x half> undef) 1871d40fefbSLuke Lau; ZVFH-NEXT: Cost Model: Invalid cost for instruction: %6 = call <vscale x 1 x half> @llvm.pow.nxv1f16(<vscale x 1 x half> undef, <vscale x 1 x half> undef) 1881d40fefbSLuke Lau; ZVFH-NEXT: Cost Model: Invalid cost for instruction: %7 = call <vscale x 2 x half> @llvm.pow.nxv2f16(<vscale x 2 x half> undef, <vscale x 2 x half> undef) 1891d40fefbSLuke Lau; ZVFH-NEXT: Cost Model: Invalid cost for instruction: %8 = call <vscale x 4 x half> @llvm.pow.nxv4f16(<vscale x 4 x half> undef, <vscale x 4 x half> undef) 1901d40fefbSLuke Lau; ZVFH-NEXT: Cost Model: Invalid cost for instruction: %9 = call <vscale x 8 x half> @llvm.pow.nxv8f16(<vscale x 8 x half> undef, <vscale x 8 x half> undef) 1911d40fefbSLuke Lau; ZVFH-NEXT: Cost Model: Invalid cost for instruction: %10 = call <vscale x 16 x half> @llvm.pow.nxv16f16(<vscale x 16 x half> undef, <vscale x 16 x half> undef) 1921d40fefbSLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void 1931d40fefbSLuke Lau; 1941d40fefbSLuke Lau; ZVFHMIN-LABEL: 'pow_f16' 1951d40fefbSLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call half @llvm.pow.f16(half undef, half undef) 1961d40fefbSLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %2 = call <2 x half> @llvm.pow.v2f16(<2 x half> undef, <2 x half> undef) 1971d40fefbSLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %3 = call <4 x half> @llvm.pow.v4f16(<4 x half> undef, <4 x half> undef) 1981d40fefbSLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %4 = call <8 x half> @llvm.pow.v8f16(<8 x half> undef, <8 x half> undef) 1991d40fefbSLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 191 for instruction: %5 = call <16 x half> @llvm.pow.v16f16(<16 x half> undef, <16 x half> undef) 2002b6b7f66SLuke Lau; ZVFHMIN-NEXT: Cost Model: Invalid cost for instruction: %6 = call <vscale x 1 x half> @llvm.pow.nxv1f16(<vscale x 1 x half> undef, <vscale x 1 x half> undef) 2012b6b7f66SLuke Lau; ZVFHMIN-NEXT: Cost Model: Invalid cost for instruction: %7 = call <vscale x 2 x half> @llvm.pow.nxv2f16(<vscale x 2 x half> undef, <vscale x 2 x half> undef) 2022b6b7f66SLuke Lau; ZVFHMIN-NEXT: Cost Model: Invalid cost for instruction: %8 = call <vscale x 4 x half> @llvm.pow.nxv4f16(<vscale x 4 x half> undef, <vscale x 4 x half> undef) 2032b6b7f66SLuke Lau; ZVFHMIN-NEXT: Cost Model: Invalid cost for instruction: %9 = call <vscale x 8 x half> @llvm.pow.nxv8f16(<vscale x 8 x half> undef, <vscale x 8 x half> undef) 2042b6b7f66SLuke Lau; ZVFHMIN-NEXT: Cost Model: Invalid cost for instruction: %10 = call <vscale x 16 x half> @llvm.pow.nxv16f16(<vscale x 16 x half> undef, <vscale x 16 x half> undef) 2051d40fefbSLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void 2061d40fefbSLuke Lau; 2071d40fefbSLuke Lau call half @llvm.pow.f16(half undef, half undef) 2081d40fefbSLuke Lau call <2 x half> @llvm.pow.v2f16(<2 x half> undef, <2 x half> undef) 2091d40fefbSLuke Lau call <4 x half> @llvm.pow.v4f16(<4 x half> undef, <4 x half> undef) 2101d40fefbSLuke Lau call <8 x half> @llvm.pow.v8f16(<8 x half> undef, <8 x half> undef) 2111d40fefbSLuke Lau call <16 x half> @llvm.pow.v16f16(<16 x half> undef, <16 x half> undef) 212c3edeaa6SLiqinWeng call <vscale x 1 x half> @llvm.pow.nxv1f16(<vscale x 1 x half> undef, <vscale x 1 x half> undef) 213c3edeaa6SLiqinWeng call <vscale x 2 x half> @llvm.pow.nxv2f16(<vscale x 2 x half> undef, <vscale x 2 x half> undef) 214c3edeaa6SLiqinWeng call <vscale x 4 x half> @llvm.pow.nxv4f16(<vscale x 4 x half> undef, <vscale x 4 x half> undef) 215c3edeaa6SLiqinWeng call <vscale x 8 x half> @llvm.pow.nxv8f16(<vscale x 8 x half> undef, <vscale x 8 x half> undef) 216c3edeaa6SLiqinWeng call <vscale x 16 x half> @llvm.pow.nxv16f16(<vscale x 16 x half> undef, <vscale x 16 x half> undef) 2171d40fefbSLuke Lau ret void 2181d40fefbSLuke Lau} 219