140069286SPhilip Reames; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py 2eb3f1aecSLiqinWeng; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -S -mtriple=riscv64 -mattr=+v,+f,+d,+zfh,+zvfh,+zvfbfmin | FileCheck %s --check-prefixes=CHECK,ZVFH 3eb3f1aecSLiqinWeng; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -S -mtriple=riscv64 -mattr=+v,+f,+d,+zfh,+zvfhmin,+zvfbfmin | FileCheck %s --check-prefixes=CHECK,ZVFHMIN 440069286SPhilip Reames 540069286SPhilip Reamesdefine void @fabs() { 640069286SPhilip Reames; CHECK-LABEL: 'fabs' 7*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call bfloat @llvm.fabs.bf16(bfloat poison) 8*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %2 = call <2 x bfloat> @llvm.fabs.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.fabs.v4bf16(<4 x bfloat> poison) 10*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %4 = call <8 x bfloat> @llvm.fabs.v8bf16(<8 x bfloat> poison) 11*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %5 = call <16 x bfloat> @llvm.fabs.v16bf16(<16 x bfloat> poison) 12*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %6 = call <vscale x 2 x bfloat> @llvm.fabs.nxv2bf16(<vscale x 2 x bfloat> poison) 13*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %7 = call <vscale x 4 x bfloat> @llvm.fabs.nxv4bf16(<vscale x 4 x bfloat> poison) 14*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %8 = call <vscale x 8 x bfloat> @llvm.fabs.nxv8bf16(<vscale x 8 x bfloat> poison) 15*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %9 = call <vscale x 16 x bfloat> @llvm.fabs.nxv16bf16(<vscale x 16 x bfloat> poison) 16*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call float @llvm.fabs.f32(float poison) 17*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = call <2 x float> @llvm.fabs.v2f32(<2 x float> poison) 18*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = call <4 x float> @llvm.fabs.v4f32(<4 x float> poison) 19*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %13 = call <8 x float> @llvm.fabs.v8f32(<8 x float> poison) 20*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %14 = call <16 x float> @llvm.fabs.v16f32(<16 x float> poison) 21*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = call <vscale x 1 x float> @llvm.fabs.nxv1f32(<vscale x 1 x float> poison) 22*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = call <vscale x 2 x float> @llvm.fabs.nxv2f32(<vscale x 2 x float> poison) 23*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %17 = call <vscale x 4 x float> @llvm.fabs.nxv4f32(<vscale x 4 x float> poison) 24*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %18 = call <vscale x 8 x float> @llvm.fabs.nxv8f32(<vscale x 8 x float> poison) 25*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %19 = call <vscale x 16 x float> @llvm.fabs.nxv16f32(<vscale x 16 x float> poison) 26*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %20 = call double @llvm.fabs.f64(double poison) 27*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %21 = call <2 x double> @llvm.fabs.v2f64(<2 x double> poison) 28*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %22 = call <4 x double> @llvm.fabs.v4f64(<4 x double> poison) 29*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %23 = call <8 x double> @llvm.fabs.v8f64(<8 x double> poison) 30*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %24 = call <16 x double> @llvm.fabs.v16f64(<16 x double> poison) 31*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %25 = call <vscale x 1 x double> @llvm.fabs.nxv1f64(<vscale x 1 x double> poison) 32*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %26 = call <vscale x 2 x double> @llvm.fabs.nxv2f64(<vscale x 2 x double> poison) 33*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %27 = call <vscale x 4 x double> @llvm.fabs.nxv4f64(<vscale x 4 x double> poison) 34*98e5962bSLiqinWeng; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %28 = call <vscale x 8 x double> @llvm.fabs.nxv8f64(<vscale x 8 x double> poison) 350a5d52a7SSergey Kachkov; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void 3640069286SPhilip Reames; 37*98e5962bSLiqinWeng call bfloat @llvm.fabs.bf16(bfloat poison) 38*98e5962bSLiqinWeng call <2 x bfloat> @llvm.fabs.v2bf16(<2 x bfloat> poison) 39*98e5962bSLiqinWeng call <4 x bfloat> @llvm.fabs.v4bf16(<4 x bfloat> poison) 40*98e5962bSLiqinWeng call <8 x bfloat> @llvm.fabs.v8bf16(<8 x bfloat> poison) 41*98e5962bSLiqinWeng call <16 x bfloat> @llvm.fabs.v16f16(<16 x bfloat> poison) 42*98e5962bSLiqinWeng call <vscale x 2 x bfloat> @llvm.fabs.nxv2bf16(<vscale x 2 x bfloat> poison) 43*98e5962bSLiqinWeng call <vscale x 4 x bfloat> @llvm.fabs.nxv4bf16(<vscale x 4 x bfloat> poison) 44*98e5962bSLiqinWeng call <vscale x 8 x bfloat> @llvm.fabs.nxv8bf16(<vscale x 8 x bfloat> poison) 45*98e5962bSLiqinWeng call <vscale x 16 x bfloat> @llvm.fabs.nxv16f16(<vscale x 16 x bfloat> poison) 46*98e5962bSLiqinWeng call float @llvm.fabs.f32(float poison) 47*98e5962bSLiqinWeng call <2 x float> @llvm.fabs.v2f32(<2 x float> poison) 48*98e5962bSLiqinWeng call <4 x float> @llvm.fabs.v4f32(<4 x float> poison) 49*98e5962bSLiqinWeng call <8 x float> @llvm.fabs.v8f32(<8 x float> poison) 50*98e5962bSLiqinWeng call <16 x float> @llvm.fabs.v16f32(<16 x float> poison) 51*98e5962bSLiqinWeng call <vscale x 1 x float> @llvm.fabs.nxv1f32(<vscale x 1 x float> poison) 52*98e5962bSLiqinWeng call <vscale x 2 x float> @llvm.fabs.nxv2f32(<vscale x 2 x float> poison) 53*98e5962bSLiqinWeng call <vscale x 4 x float> @llvm.fabs.nxv4f32(<vscale x 4 x float> poison) 54*98e5962bSLiqinWeng call <vscale x 8 x float> @llvm.fabs.nxv8f32(<vscale x 8 x float> poison) 55*98e5962bSLiqinWeng call <vscale x 16 x float> @llvm.fabs.nxv16f32(<vscale x 16 x float> poison) 56*98e5962bSLiqinWeng call double @llvm.fabs.f64(double poison) 57*98e5962bSLiqinWeng call <2 x double> @llvm.fabs.v2f64(<2 x double> poison) 58*98e5962bSLiqinWeng call <4 x double> @llvm.fabs.v4f64(<4 x double> poison) 59*98e5962bSLiqinWeng call <8 x double> @llvm.fabs.v8f64(<8 x double> poison) 60*98e5962bSLiqinWeng call <16 x double> @llvm.fabs.v16f64(<16 x double> poison) 61*98e5962bSLiqinWeng call <vscale x 1 x double> @llvm.fabs.nxv1f64(<vscale x 1 x double> poison) 62*98e5962bSLiqinWeng call <vscale x 2 x double> @llvm.fabs.nxv2f64(<vscale x 2 x double> poison) 63*98e5962bSLiqinWeng call <vscale x 4 x double> @llvm.fabs.nxv4f64(<vscale x 4 x double> poison) 64*98e5962bSLiqinWeng call <vscale x 8 x double> @llvm.fabs.nxv8f64(<vscale x 8 x double> poison) 6540069286SPhilip Reames ret void 6640069286SPhilip Reames} 6740069286SPhilip Reames 6889c10e27SLuke Laudefine void @fabs_f16() { 69*98e5962bSLiqinWeng; ZVFH-LABEL: 'fabs_f16' 70*98e5962bSLiqinWeng; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call half @llvm.fabs.f16(half poison) 71*98e5962bSLiqinWeng; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = call <2 x half> @llvm.fabs.v2f16(<2 x half> poison) 72*98e5962bSLiqinWeng; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = call <4 x half> @llvm.fabs.v4f16(<4 x half> poison) 73*98e5962bSLiqinWeng; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = call <8 x half> @llvm.fabs.v8f16(<8 x half> poison) 74*98e5962bSLiqinWeng; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = call <16 x half> @llvm.fabs.v16f16(<16 x half> poison) 75*98e5962bSLiqinWeng; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call <vscale x 2 x half> @llvm.fabs.nxv2f16(<vscale x 2 x half> poison) 76*98e5962bSLiqinWeng; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call <vscale x 4 x half> @llvm.fabs.nxv4f16(<vscale x 4 x half> poison) 77*98e5962bSLiqinWeng; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = call <vscale x 8 x half> @llvm.fabs.nxv8f16(<vscale x 8 x half> poison) 78*98e5962bSLiqinWeng; ZVFH-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %9 = call <vscale x 16 x half> @llvm.fabs.nxv16f16(<vscale x 16 x half> poison) 79*98e5962bSLiqinWeng; ZVFH-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void 8089c10e27SLuke Lau; 81*98e5962bSLiqinWeng; ZVFHMIN-LABEL: 'fabs_f16' 82*98e5962bSLiqinWeng; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call half @llvm.fabs.f16(half poison) 83*98e5962bSLiqinWeng; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %2 = call <2 x half> @llvm.fabs.v2f16(<2 x half> poison) 84*98e5962bSLiqinWeng; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %3 = call <4 x half> @llvm.fabs.v4f16(<4 x half> poison) 85*98e5962bSLiqinWeng; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %4 = call <8 x half> @llvm.fabs.v8f16(<8 x half> poison) 86*98e5962bSLiqinWeng; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %5 = call <16 x half> @llvm.fabs.v16f16(<16 x half> poison) 87*98e5962bSLiqinWeng; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %6 = call <vscale x 2 x half> @llvm.fabs.nxv2f16(<vscale x 2 x half> poison) 88*98e5962bSLiqinWeng; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %7 = call <vscale x 4 x half> @llvm.fabs.nxv4f16(<vscale x 4 x half> poison) 89*98e5962bSLiqinWeng; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %8 = call <vscale x 8 x half> @llvm.fabs.nxv8f16(<vscale x 8 x half> poison) 90*98e5962bSLiqinWeng; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %9 = call <vscale x 16 x half> @llvm.fabs.nxv16f16(<vscale x 16 x half> poison) 91*98e5962bSLiqinWeng; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void 92*98e5962bSLiqinWeng; 93*98e5962bSLiqinWeng call half @llvm.fabs.f16(half poison) 94*98e5962bSLiqinWeng call <2 x half> @llvm.fabs.v2f16(<2 x half> poison) 95*98e5962bSLiqinWeng call <4 x half> @llvm.fabs.v4f16(<4 x half> poison) 96*98e5962bSLiqinWeng call <8 x half> @llvm.fabs.v8f16(<8 x half> poison) 97*98e5962bSLiqinWeng call <16 x half> @llvm.fabs.v16f16(<16 x half> poison) 98*98e5962bSLiqinWeng call <vscale x 2 x half> @llvm.fabs.nxv2f16(<vscale x 2 x half> poison) 99*98e5962bSLiqinWeng call <vscale x 4 x half> @llvm.fabs.nxv4f16(<vscale x 4 x half> poison) 100*98e5962bSLiqinWeng call <vscale x 8 x half> @llvm.fabs.nxv8f16(<vscale x 8 x half> poison) 101*98e5962bSLiqinWeng call <vscale x 16 x half> @llvm.fabs.nxv16f16(<vscale x 16 x half> poison) 10289c10e27SLuke Lau ret void 10389c10e27SLuke Lau} 10489c10e27SLuke Lau 10540069286SPhilip Reamesdefine void @minnum() { 10640069286SPhilip Reames; CHECK-LABEL: 'minnum' 10740069286SPhilip Reames; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call float @llvm.minnum.f32(float undef, float undef) 10840069286SPhilip Reames; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = call <2 x float> @llvm.minnum.v2f32(<2 x float> undef, <2 x float> undef) 10940069286SPhilip Reames; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = call <4 x float> @llvm.minnum.v4f32(<4 x float> undef, <4 x float> undef) 11040069286SPhilip Reames; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = call <8 x float> @llvm.minnum.v8f32(<8 x float> undef, <8 x float> undef) 11140069286SPhilip Reames; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = call <16 x float> @llvm.minnum.v16f32(<16 x float> undef, <16 x float> undef) 11202045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call <vscale x 1 x float> @llvm.minnum.nxv1f32(<vscale x 1 x float> undef, <vscale x 1 x float> undef) 11302045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call <vscale x 2 x float> @llvm.minnum.nxv2f32(<vscale x 2 x float> undef, <vscale x 2 x float> undef) 11402045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call <vscale x 4 x float> @llvm.minnum.nxv4f32(<vscale x 4 x float> undef, <vscale x 4 x float> undef) 11502045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call <vscale x 8 x float> @llvm.minnum.nxv8f32(<vscale x 8 x float> undef, <vscale x 8 x float> undef) 11602045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call <vscale x 16 x float> @llvm.minnum.nxv16f32(<vscale x 16 x float> undef, <vscale x 16 x float> undef) 11702045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = call double @llvm.minnum.f64(double undef, double undef) 11802045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %12 = call <2 x double> @llvm.minnum.v2f64(<2 x double> undef, <2 x double> undef) 11902045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %13 = call <4 x double> @llvm.minnum.v4f64(<4 x double> undef, <4 x double> undef) 12002045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %14 = call <8 x double> @llvm.minnum.v8f64(<8 x double> undef, <8 x double> undef) 12102045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %15 = call <16 x double> @llvm.minnum.v16f64(<16 x double> undef, <16 x double> undef) 12202045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = call <vscale x 1 x double> @llvm.minnum.nxv1f64(<vscale x 1 x double> undef, <vscale x 1 x double> undef) 12302045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = call <vscale x 2 x double> @llvm.minnum.nxv2f64(<vscale x 2 x double> undef, <vscale x 2 x double> undef) 12402045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %18 = call <vscale x 4 x double> @llvm.minnum.nxv4f64(<vscale x 4 x double> undef, <vscale x 4 x double> undef) 12502045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = call <vscale x 8 x double> @llvm.minnum.nxv8f64(<vscale x 8 x double> undef, <vscale x 8 x double> undef) 1260a5d52a7SSergey Kachkov; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void 12740069286SPhilip Reames; 12840069286SPhilip Reames call float @llvm.minnum.f32(float undef, float undef) 12940069286SPhilip Reames call <2 x float> @llvm.minnum.v2f32(<2 x float> undef, <2 x float> undef) 13040069286SPhilip Reames call <4 x float> @llvm.minnum.v4f32(<4 x float> undef, <4 x float> undef) 13140069286SPhilip Reames call <8 x float> @llvm.minnum.v8f32(<8 x float> undef, <8 x float> undef) 13240069286SPhilip Reames call <16 x float> @llvm.minnum.v16f32(<16 x float> undef, <16 x float> undef) 133c3edeaa6SLiqinWeng call <vscale x 1 x float> @llvm.minnum.nxv1f32(<vscale x 1 x float> undef, <vscale x 1 x float> undef) 134c3edeaa6SLiqinWeng call <vscale x 2 x float> @llvm.minnum.nxv2f32(<vscale x 2 x float> undef, <vscale x 2 x float> undef) 135c3edeaa6SLiqinWeng call <vscale x 4 x float> @llvm.minnum.nxv4f32(<vscale x 4 x float> undef, <vscale x 4 x float> undef) 136c3edeaa6SLiqinWeng call <vscale x 8 x float> @llvm.minnum.nxv8f32(<vscale x 8 x float> undef, <vscale x 8 x float> undef) 137c3edeaa6SLiqinWeng call <vscale x 16 x float> @llvm.minnum.nxv16f32(<vscale x 16 x float> undef, <vscale x 16 x float> undef) 13840069286SPhilip Reames call double @llvm.minnum.f64(double undef, double undef) 13940069286SPhilip Reames call <2 x double> @llvm.minnum.v2f64(<2 x double> undef, <2 x double> undef) 14040069286SPhilip Reames call <4 x double> @llvm.minnum.v4f64(<4 x double> undef, <4 x double> undef) 14140069286SPhilip Reames call <8 x double> @llvm.minnum.v8f64(<8 x double> undef, <8 x double> undef) 14240069286SPhilip Reames call <16 x double> @llvm.minnum.v16f64(<16 x double> undef, <16 x double> undef) 143c3edeaa6SLiqinWeng call <vscale x 1 x double> @llvm.minnum.nxv1f64(<vscale x 1 x double> undef, <vscale x 1 x double> undef) 144c3edeaa6SLiqinWeng call <vscale x 2 x double> @llvm.minnum.nxv2f64(<vscale x 2 x double> undef, <vscale x 2 x double> undef) 145c3edeaa6SLiqinWeng call <vscale x 4 x double> @llvm.minnum.nxv4f64(<vscale x 4 x double> undef, <vscale x 4 x double> undef) 146c3edeaa6SLiqinWeng call <vscale x 8 x double> @llvm.minnum.nxv8f64(<vscale x 8 x double> undef, <vscale x 8 x double> undef) 14740069286SPhilip Reames ret void 14840069286SPhilip Reames} 14940069286SPhilip Reames 15089c10e27SLuke Laudefine void @minnum_f16() { 15189c10e27SLuke Lau; ZVFH-LABEL: 'minnum_f16' 15289c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call half @llvm.minnum.f16(half undef, half undef) 15389c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = call <2 x half> @llvm.minnum.v2f16(<2 x half> undef, <2 x half> undef) 15489c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = call <4 x half> @llvm.minnum.v4f16(<4 x half> undef, <4 x half> undef) 15589c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = call <8 x half> @llvm.minnum.v8f16(<8 x half> undef, <8 x half> undef) 15689c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = call <16 x half> @llvm.minnum.v16f16(<16 x half> undef, <16 x half> undef) 15789c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call <vscale x 1 x half> @llvm.minnum.nxv1f16(<vscale x 1 x half> undef, <vscale x 1 x half> undef) 15889c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call <vscale x 2 x half> @llvm.minnum.nxv2f16(<vscale x 2 x half> undef, <vscale x 2 x half> undef) 15989c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call <vscale x 4 x half> @llvm.minnum.nxv4f16(<vscale x 4 x half> undef, <vscale x 4 x half> undef) 16089c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call <vscale x 8 x half> @llvm.minnum.nxv8f16(<vscale x 8 x half> undef, <vscale x 8 x half> undef) 16189c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call <vscale x 16 x half> @llvm.minnum.nxv16f16(<vscale x 16 x half> undef, <vscale x 16 x half> undef) 16289c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void 16389c10e27SLuke Lau; 16489c10e27SLuke Lau; ZVFHMIN-LABEL: 'minnum_f16' 16589c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call half @llvm.minnum.f16(half undef, half undef) 16689c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = call <2 x half> @llvm.minnum.v2f16(<2 x half> undef, <2 x half> undef) 16789c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = call <4 x half> @llvm.minnum.v4f16(<4 x half> undef, <4 x half> undef) 16889c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = call <8 x half> @llvm.minnum.v8f16(<8 x half> undef, <8 x half> undef) 16989c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = call <16 x half> @llvm.minnum.v16f16(<16 x half> undef, <16 x half> undef) 17089c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call <vscale x 1 x half> @llvm.minnum.nxv1f16(<vscale x 1 x half> undef, <vscale x 1 x half> undef) 17189c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call <vscale x 2 x half> @llvm.minnum.nxv2f16(<vscale x 2 x half> undef, <vscale x 2 x half> undef) 17289c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call <vscale x 4 x half> @llvm.minnum.nxv4f16(<vscale x 4 x half> undef, <vscale x 4 x half> undef) 17389c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call <vscale x 8 x half> @llvm.minnum.nxv8f16(<vscale x 8 x half> undef, <vscale x 8 x half> undef) 17489c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call <vscale x 16 x half> @llvm.minnum.nxv16f16(<vscale x 16 x half> undef, <vscale x 16 x half> undef) 17589c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void 17689c10e27SLuke Lau; 17789c10e27SLuke Lau call half @llvm.minnum.f16(half undef, half undef) 17889c10e27SLuke Lau call <2 x half> @llvm.minnum.v2f16(<2 x half> undef, <2 x half> undef) 17989c10e27SLuke Lau call <4 x half> @llvm.minnum.v4f16(<4 x half> undef, <4 x half> undef) 18089c10e27SLuke Lau call <8 x half> @llvm.minnum.v8f16(<8 x half> undef, <8 x half> undef) 18189c10e27SLuke Lau call <16 x half> @llvm.minnum.v16f16(<16 x half> undef, <16 x half> undef) 182c3edeaa6SLiqinWeng call <vscale x 1 x half> @llvm.minnum.nxv1f16(<vscale x 1 x half> undef, <vscale x 1 x half> undef) 183c3edeaa6SLiqinWeng call <vscale x 2 x half> @llvm.minnum.nxv2f16(<vscale x 2 x half> undef, <vscale x 2 x half> undef) 184c3edeaa6SLiqinWeng call <vscale x 4 x half> @llvm.minnum.nxv4f16(<vscale x 4 x half> undef, <vscale x 4 x half> undef) 185c3edeaa6SLiqinWeng call <vscale x 8 x half> @llvm.minnum.nxv8f16(<vscale x 8 x half> undef, <vscale x 8 x half> undef) 186c3edeaa6SLiqinWeng call <vscale x 16 x half> @llvm.minnum.nxv16f16(<vscale x 16 x half> undef, <vscale x 16 x half> undef) 18789c10e27SLuke Lau ret void 18889c10e27SLuke Lau} 18989c10e27SLuke Lau 19040069286SPhilip Reamesdefine void @maxnum() { 19140069286SPhilip Reames; CHECK-LABEL: 'maxnum' 19240069286SPhilip Reames; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call float @llvm.maxnum.f32(float undef, float undef) 19340069286SPhilip Reames; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = call <2 x float> @llvm.maxnum.v2f32(<2 x float> undef, <2 x float> undef) 19440069286SPhilip Reames; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = call <4 x float> @llvm.maxnum.v4f32(<4 x float> undef, <4 x float> undef) 19540069286SPhilip Reames; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = call <8 x float> @llvm.maxnum.v8f32(<8 x float> undef, <8 x float> undef) 19640069286SPhilip Reames; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = call <16 x float> @llvm.maxnum.v16f32(<16 x float> undef, <16 x float> undef) 19702045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call <vscale x 1 x float> @llvm.maxnum.nxv1f32(<vscale x 1 x float> undef, <vscale x 1 x float> undef) 19802045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call <vscale x 2 x float> @llvm.maxnum.nxv2f32(<vscale x 2 x float> undef, <vscale x 2 x float> undef) 19902045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call <vscale x 4 x float> @llvm.maxnum.nxv4f32(<vscale x 4 x float> undef, <vscale x 4 x float> undef) 20002045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call <vscale x 8 x float> @llvm.maxnum.nxv8f32(<vscale x 8 x float> undef, <vscale x 8 x float> undef) 20102045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call <vscale x 16 x float> @llvm.maxnum.nxv16f32(<vscale x 16 x float> undef, <vscale x 16 x float> undef) 20202045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = call double @llvm.maxnum.f64(double undef, double undef) 20302045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %12 = call <2 x double> @llvm.maxnum.v2f64(<2 x double> undef, <2 x double> undef) 20402045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %13 = call <4 x double> @llvm.maxnum.v4f64(<4 x double> undef, <4 x double> undef) 20502045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %14 = call <8 x double> @llvm.maxnum.v8f64(<8 x double> undef, <8 x double> undef) 20602045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %15 = call <16 x double> @llvm.maxnum.v16f64(<16 x double> undef, <16 x double> undef) 20702045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = call <vscale x 1 x double> @llvm.maxnum.nxv1f64(<vscale x 1 x double> undef, <vscale x 1 x double> undef) 20802045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = call <vscale x 2 x double> @llvm.maxnum.nxv2f64(<vscale x 2 x double> undef, <vscale x 2 x double> undef) 20902045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %18 = call <vscale x 4 x double> @llvm.maxnum.nxv4f64(<vscale x 4 x double> undef, <vscale x 4 x double> undef) 21002045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = call <vscale x 8 x double> @llvm.maxnum.nxv8f64(<vscale x 8 x double> undef, <vscale x 8 x double> undef) 2110a5d52a7SSergey Kachkov; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void 21240069286SPhilip Reames; 21340069286SPhilip Reames call float @llvm.maxnum.f32(float undef, float undef) 21440069286SPhilip Reames call <2 x float> @llvm.maxnum.v2f32(<2 x float> undef, <2 x float> undef) 21540069286SPhilip Reames call <4 x float> @llvm.maxnum.v4f32(<4 x float> undef, <4 x float> undef) 21640069286SPhilip Reames call <8 x float> @llvm.maxnum.v8f32(<8 x float> undef, <8 x float> undef) 21740069286SPhilip Reames call <16 x float> @llvm.maxnum.v16f32(<16 x float> undef, <16 x float> undef) 218c3edeaa6SLiqinWeng call <vscale x 1 x float> @llvm.maxnum.nxv1f32(<vscale x 1 x float> undef, <vscale x 1 x float> undef) 219c3edeaa6SLiqinWeng call <vscale x 2 x float> @llvm.maxnum.nxv2f32(<vscale x 2 x float> undef, <vscale x 2 x float> undef) 220c3edeaa6SLiqinWeng call <vscale x 4 x float> @llvm.maxnum.nxv4f32(<vscale x 4 x float> undef, <vscale x 4 x float> undef) 221c3edeaa6SLiqinWeng call <vscale x 8 x float> @llvm.maxnum.nxv8f32(<vscale x 8 x float> undef, <vscale x 8 x float> undef) 222c3edeaa6SLiqinWeng call <vscale x 16 x float> @llvm.maxnum.nxv16f32(<vscale x 16 x float> undef, <vscale x 16 x float> undef) 22340069286SPhilip Reames call double @llvm.maxnum.f64(double undef, double undef) 22440069286SPhilip Reames call <2 x double> @llvm.maxnum.v2f64(<2 x double> undef, <2 x double> undef) 22540069286SPhilip Reames call <4 x double> @llvm.maxnum.v4f64(<4 x double> undef, <4 x double> undef) 22640069286SPhilip Reames call <8 x double> @llvm.maxnum.v8f64(<8 x double> undef, <8 x double> undef) 22740069286SPhilip Reames call <16 x double> @llvm.maxnum.v16f64(<16 x double> undef, <16 x double> undef) 228c3edeaa6SLiqinWeng call <vscale x 1 x double> @llvm.maxnum.nxv1f64(<vscale x 1 x double> undef, <vscale x 1 x double> undef) 229c3edeaa6SLiqinWeng call <vscale x 2 x double> @llvm.maxnum.nxv2f64(<vscale x 2 x double> undef, <vscale x 2 x double> undef) 230c3edeaa6SLiqinWeng call <vscale x 4 x double> @llvm.maxnum.nxv4f64(<vscale x 4 x double> undef, <vscale x 4 x double> undef) 231c3edeaa6SLiqinWeng call <vscale x 8 x double> @llvm.maxnum.nxv8f64(<vscale x 8 x double> undef, <vscale x 8 x double> undef) 23240069286SPhilip Reames ret void 23340069286SPhilip Reames} 23440069286SPhilip Reames 23589c10e27SLuke Laudefine void @maxnum_f16() { 23689c10e27SLuke Lau; ZVFH-LABEL: 'maxnum_f16' 23789c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call half @llvm.maxnum.f16(half undef, half undef) 23889c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = call <2 x half> @llvm.maxnum.v2f16(<2 x half> undef, <2 x half> undef) 23989c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = call <4 x half> @llvm.maxnum.v4f16(<4 x half> undef, <4 x half> undef) 24089c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = call <8 x half> @llvm.maxnum.v8f16(<8 x half> undef, <8 x half> undef) 24189c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = call <16 x half> @llvm.maxnum.v16f16(<16 x half> undef, <16 x half> undef) 24289c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call <vscale x 1 x half> @llvm.maxnum.nxv1f16(<vscale x 1 x half> undef, <vscale x 1 x half> undef) 24389c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call <vscale x 2 x half> @llvm.maxnum.nxv2f16(<vscale x 2 x half> undef, <vscale x 2 x half> undef) 24489c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call <vscale x 4 x half> @llvm.maxnum.nxv4f16(<vscale x 4 x half> undef, <vscale x 4 x half> undef) 24589c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call <vscale x 8 x half> @llvm.maxnum.nxv8f16(<vscale x 8 x half> undef, <vscale x 8 x half> undef) 24689c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call <vscale x 16 x half> @llvm.maxnum.nxv16f16(<vscale x 16 x half> undef, <vscale x 16 x half> undef) 24789c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void 24889c10e27SLuke Lau; 24989c10e27SLuke Lau; ZVFHMIN-LABEL: 'maxnum_f16' 25089c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call half @llvm.maxnum.f16(half undef, half undef) 25189c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = call <2 x half> @llvm.maxnum.v2f16(<2 x half> undef, <2 x half> undef) 25289c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = call <4 x half> @llvm.maxnum.v4f16(<4 x half> undef, <4 x half> undef) 25389c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = call <8 x half> @llvm.maxnum.v8f16(<8 x half> undef, <8 x half> undef) 25489c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = call <16 x half> @llvm.maxnum.v16f16(<16 x half> undef, <16 x half> undef) 25589c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call <vscale x 1 x half> @llvm.maxnum.nxv1f16(<vscale x 1 x half> undef, <vscale x 1 x half> undef) 25689c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call <vscale x 2 x half> @llvm.maxnum.nxv2f16(<vscale x 2 x half> undef, <vscale x 2 x half> undef) 25789c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call <vscale x 4 x half> @llvm.maxnum.nxv4f16(<vscale x 4 x half> undef, <vscale x 4 x half> undef) 25889c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call <vscale x 8 x half> @llvm.maxnum.nxv8f16(<vscale x 8 x half> undef, <vscale x 8 x half> undef) 25989c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call <vscale x 16 x half> @llvm.maxnum.nxv16f16(<vscale x 16 x half> undef, <vscale x 16 x half> undef) 26089c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void 26189c10e27SLuke Lau; 26289c10e27SLuke Lau call half @llvm.maxnum.f16(half undef, half undef) 26389c10e27SLuke Lau call <2 x half> @llvm.maxnum.v2f16(<2 x half> undef, <2 x half> undef) 26489c10e27SLuke Lau call <4 x half> @llvm.maxnum.v4f16(<4 x half> undef, <4 x half> undef) 26589c10e27SLuke Lau call <8 x half> @llvm.maxnum.v8f16(<8 x half> undef, <8 x half> undef) 26689c10e27SLuke Lau call <16 x half> @llvm.maxnum.v16f16(<16 x half> undef, <16 x half> undef) 267c3edeaa6SLiqinWeng call <vscale x 1 x half> @llvm.maxnum.nxv1f16(<vscale x 1 x half> undef, <vscale x 1 x half> undef) 268c3edeaa6SLiqinWeng call <vscale x 2 x half> @llvm.maxnum.nxv2f16(<vscale x 2 x half> undef, <vscale x 2 x half> undef) 269c3edeaa6SLiqinWeng call <vscale x 4 x half> @llvm.maxnum.nxv4f16(<vscale x 4 x half> undef, <vscale x 4 x half> undef) 270c3edeaa6SLiqinWeng call <vscale x 8 x half> @llvm.maxnum.nxv8f16(<vscale x 8 x half> undef, <vscale x 8 x half> undef) 271c3edeaa6SLiqinWeng call <vscale x 16 x half> @llvm.maxnum.nxv16f16(<vscale x 16 x half> undef, <vscale x 16 x half> undef) 27289c10e27SLuke Lau ret void 27389c10e27SLuke Lau} 27489c10e27SLuke Lau 27540069286SPhilip Reamesdefine void @minimum() { 27640069286SPhilip Reames; CHECK-LABEL: 'minimum' 27749429783SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = call float @llvm.minimum.f32(float undef, float undef) 27881425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = call <2 x float> @llvm.minimum.v2f32(<2 x float> undef, <2 x float> undef) 27981425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = call <4 x float> @llvm.minimum.v4f32(<4 x float> undef, <4 x float> undef) 28081425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = call <8 x float> @llvm.minimum.v8f32(<8 x float> undef, <8 x float> undef) 28181425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = call <16 x float> @llvm.minimum.v16f32(<16 x float> undef, <16 x float> undef) 28281425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = call <vscale x 1 x float> @llvm.minimum.nxv1f32(<vscale x 1 x float> undef, <vscale x 1 x float> undef) 28381425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = call <vscale x 2 x float> @llvm.minimum.nxv2f32(<vscale x 2 x float> undef, <vscale x 2 x float> undef) 28481425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = call <vscale x 4 x float> @llvm.minimum.nxv4f32(<vscale x 4 x float> undef, <vscale x 4 x float> undef) 28581425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = call <vscale x 8 x float> @llvm.minimum.nxv8f32(<vscale x 8 x float> undef, <vscale x 8 x float> undef) 28681425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %10 = call <vscale x 16 x float> @llvm.minimum.nxv16f32(<vscale x 16 x float> undef, <vscale x 16 x float> undef) 28749429783SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %11 = call double @llvm.minimum.f64(double undef, double undef) 28881425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %12 = call <2 x double> @llvm.minimum.v2f64(<2 x double> undef, <2 x double> undef) 28981425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %13 = call <4 x double> @llvm.minimum.v4f64(<4 x double> undef, <4 x double> undef) 29081425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %14 = call <8 x double> @llvm.minimum.v8f64(<8 x double> undef, <8 x double> undef) 29181425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %15 = call <16 x double> @llvm.minimum.v16f64(<16 x double> undef, <16 x double> undef) 29281425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %16 = call <vscale x 1 x double> @llvm.minimum.nxv1f64(<vscale x 1 x double> undef, <vscale x 1 x double> undef) 29381425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %17 = call <vscale x 2 x double> @llvm.minimum.nxv2f64(<vscale x 2 x double> undef, <vscale x 2 x double> undef) 29481425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %18 = call <vscale x 4 x double> @llvm.minimum.nxv4f64(<vscale x 4 x double> undef, <vscale x 4 x double> undef) 29581425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %19 = call <vscale x 8 x double> @llvm.minimum.nxv8f64(<vscale x 8 x double> undef, <vscale x 8 x double> undef) 2960a5d52a7SSergey Kachkov; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void 29740069286SPhilip Reames; 29840069286SPhilip Reames call float @llvm.minimum.f32(float undef, float undef) 29940069286SPhilip Reames call <2 x float> @llvm.minimum.v2f32(<2 x float> undef, <2 x float> undef) 30040069286SPhilip Reames call <4 x float> @llvm.minimum.v4f32(<4 x float> undef, <4 x float> undef) 30140069286SPhilip Reames call <8 x float> @llvm.minimum.v8f32(<8 x float> undef, <8 x float> undef) 30240069286SPhilip Reames call <16 x float> @llvm.minimum.v16f32(<16 x float> undef, <16 x float> undef) 303c3edeaa6SLiqinWeng call <vscale x 1 x float> @llvm.minimum.nxv1f32(<vscale x 1 x float> undef, <vscale x 1 x float> undef) 304c3edeaa6SLiqinWeng call <vscale x 2 x float> @llvm.minimum.nxv2f32(<vscale x 2 x float> undef, <vscale x 2 x float> undef) 305c3edeaa6SLiqinWeng call <vscale x 4 x float> @llvm.minimum.nxv4f32(<vscale x 4 x float> undef, <vscale x 4 x float> undef) 306c3edeaa6SLiqinWeng call <vscale x 8 x float> @llvm.minimum.nxv8f32(<vscale x 8 x float> undef, <vscale x 8 x float> undef) 307c3edeaa6SLiqinWeng call <vscale x 16 x float> @llvm.minimum.nxv16f32(<vscale x 16 x float> undef, <vscale x 16 x float> undef) 30840069286SPhilip Reames call double @llvm.minimum.f64(double undef, double undef) 30940069286SPhilip Reames call <2 x double> @llvm.minimum.v2f64(<2 x double> undef, <2 x double> undef) 31040069286SPhilip Reames call <4 x double> @llvm.minimum.v4f64(<4 x double> undef, <4 x double> undef) 31140069286SPhilip Reames call <8 x double> @llvm.minimum.v8f64(<8 x double> undef, <8 x double> undef) 31240069286SPhilip Reames call <16 x double> @llvm.minimum.v16f64(<16 x double> undef, <16 x double> undef) 313c3edeaa6SLiqinWeng call <vscale x 1 x double> @llvm.minimum.nxv1f64(<vscale x 1 x double> undef, <vscale x 1 x double> undef) 314c3edeaa6SLiqinWeng call <vscale x 2 x double> @llvm.minimum.nxv2f64(<vscale x 2 x double> undef, <vscale x 2 x double> undef) 315c3edeaa6SLiqinWeng call <vscale x 4 x double> @llvm.minimum.nxv4f64(<vscale x 4 x double> undef, <vscale x 4 x double> undef) 316c3edeaa6SLiqinWeng call <vscale x 8 x double> @llvm.minimum.nxv8f64(<vscale x 8 x double> undef, <vscale x 8 x double> undef) 31740069286SPhilip Reames ret void 31840069286SPhilip Reames} 31940069286SPhilip Reames 32089c10e27SLuke Laudefine void @minimum_f16() { 32189c10e27SLuke Lau; ZVFH-LABEL: 'minimum_f16' 32289c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = call half @llvm.minimum.f16(half undef, half undef) 32389c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = call <2 x half> @llvm.minimum.v2f16(<2 x half> undef, <2 x half> undef) 32489c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = call <4 x half> @llvm.minimum.v4f16(<4 x half> undef, <4 x half> undef) 32589c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = call <8 x half> @llvm.minimum.v8f16(<8 x half> undef, <8 x half> undef) 32689c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = call <16 x half> @llvm.minimum.v16f16(<16 x half> undef, <16 x half> undef) 32789c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = call <vscale x 1 x half> @llvm.minimum.nxv1f16(<vscale x 1 x half> undef, <vscale x 1 x half> undef) 32889c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = call <vscale x 2 x half> @llvm.minimum.nxv2f16(<vscale x 2 x half> undef, <vscale x 2 x half> undef) 32989c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = call <vscale x 4 x half> @llvm.minimum.nxv4f16(<vscale x 4 x half> undef, <vscale x 4 x half> undef) 33089c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = call <vscale x 8 x half> @llvm.minimum.nxv8f16(<vscale x 8 x half> undef, <vscale x 8 x half> undef) 33189c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %10 = call <vscale x 16 x half> @llvm.minimum.nxv16f16(<vscale x 16 x half> undef, <vscale x 16 x half> undef) 33289c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void 33389c10e27SLuke Lau; 33489c10e27SLuke Lau; ZVFHMIN-LABEL: 'minimum_f16' 33589c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = call half @llvm.minimum.f16(half undef, half undef) 33689c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = call <2 x half> @llvm.minimum.v2f16(<2 x half> undef, <2 x half> undef) 33789c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = call <4 x half> @llvm.minimum.v4f16(<4 x half> undef, <4 x half> undef) 33889c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = call <8 x half> @llvm.minimum.v8f16(<8 x half> undef, <8 x half> undef) 33989c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = call <16 x half> @llvm.minimum.v16f16(<16 x half> undef, <16 x half> undef) 34089c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call <vscale x 1 x half> @llvm.minimum.nxv1f16(<vscale x 1 x half> undef, <vscale x 1 x half> undef) 34189c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call <vscale x 2 x half> @llvm.minimum.nxv2f16(<vscale x 2 x half> undef, <vscale x 2 x half> undef) 34289c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call <vscale x 4 x half> @llvm.minimum.nxv4f16(<vscale x 4 x half> undef, <vscale x 4 x half> undef) 34389c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call <vscale x 8 x half> @llvm.minimum.nxv8f16(<vscale x 8 x half> undef, <vscale x 8 x half> undef) 34489c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call <vscale x 16 x half> @llvm.minimum.nxv16f16(<vscale x 16 x half> undef, <vscale x 16 x half> undef) 34589c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void 34689c10e27SLuke Lau; 34789c10e27SLuke Lau call half @llvm.minimum.f16(half undef, half undef) 34889c10e27SLuke Lau call <2 x half> @llvm.minimum.v2f16(<2 x half> undef, <2 x half> undef) 34989c10e27SLuke Lau call <4 x half> @llvm.minimum.v4f16(<4 x half> undef, <4 x half> undef) 35089c10e27SLuke Lau call <8 x half> @llvm.minimum.v8f16(<8 x half> undef, <8 x half> undef) 35189c10e27SLuke Lau call <16 x half> @llvm.minimum.v16f16(<16 x half> undef, <16 x half> undef) 352c3edeaa6SLiqinWeng call <vscale x 1 x half> @llvm.minimum.nxv1f16(<vscale x 1 x half> undef, <vscale x 1 x half> undef) 353c3edeaa6SLiqinWeng call <vscale x 2 x half> @llvm.minimum.nxv2f16(<vscale x 2 x half> undef, <vscale x 2 x half> undef) 354c3edeaa6SLiqinWeng call <vscale x 4 x half> @llvm.minimum.nxv4f16(<vscale x 4 x half> undef, <vscale x 4 x half> undef) 355c3edeaa6SLiqinWeng call <vscale x 8 x half> @llvm.minimum.nxv8f16(<vscale x 8 x half> undef, <vscale x 8 x half> undef) 356c3edeaa6SLiqinWeng call <vscale x 16 x half> @llvm.minimum.nxv16f16(<vscale x 16 x half> undef, <vscale x 16 x half> undef) 35789c10e27SLuke Lau ret void 35889c10e27SLuke Lau} 35989c10e27SLuke Lau 36040069286SPhilip Reamesdefine void @maximum() { 36140069286SPhilip Reames; CHECK-LABEL: 'maximum' 36249429783SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = call float @llvm.maximum.f32(float undef, float undef) 36381425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = call <2 x float> @llvm.maximum.v2f32(<2 x float> undef, <2 x float> undef) 36481425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = call <4 x float> @llvm.maximum.v4f32(<4 x float> undef, <4 x float> undef) 36581425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = call <8 x float> @llvm.maximum.v8f32(<8 x float> undef, <8 x float> undef) 36681425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = call <16 x float> @llvm.maximum.v16f32(<16 x float> undef, <16 x float> undef) 36781425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = call <vscale x 1 x float> @llvm.maximum.nxv1f32(<vscale x 1 x float> undef, <vscale x 1 x float> undef) 36881425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = call <vscale x 2 x float> @llvm.maximum.nxv2f32(<vscale x 2 x float> undef, <vscale x 2 x float> undef) 36981425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = call <vscale x 4 x float> @llvm.maximum.nxv4f32(<vscale x 4 x float> undef, <vscale x 4 x float> undef) 37081425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = call <vscale x 8 x float> @llvm.maximum.nxv8f32(<vscale x 8 x float> undef, <vscale x 8 x float> undef) 37181425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %10 = call <vscale x 16 x float> @llvm.maximum.nxv16f32(<vscale x 16 x float> undef, <vscale x 16 x float> undef) 37249429783SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %11 = call double @llvm.maximum.f64(double undef, double undef) 37381425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %12 = call <2 x double> @llvm.maximum.v2f64(<2 x double> undef, <2 x double> undef) 37481425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %13 = call <4 x double> @llvm.maximum.v4f64(<4 x double> undef, <4 x double> undef) 37581425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %14 = call <8 x double> @llvm.maximum.v8f64(<8 x double> undef, <8 x double> undef) 37681425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %15 = call <16 x double> @llvm.maximum.v16f64(<16 x double> undef, <16 x double> undef) 37781425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %16 = call <vscale x 1 x double> @llvm.maximum.nxv1f64(<vscale x 1 x double> undef, <vscale x 1 x double> undef) 37881425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %17 = call <vscale x 2 x double> @llvm.maximum.nxv2f64(<vscale x 2 x double> undef, <vscale x 2 x double> undef) 37981425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %18 = call <vscale x 4 x double> @llvm.maximum.nxv4f64(<vscale x 4 x double> undef, <vscale x 4 x double> undef) 38081425019SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %19 = call <vscale x 8 x double> @llvm.maximum.nxv8f64(<vscale x 8 x double> undef, <vscale x 8 x double> undef) 3810a5d52a7SSergey Kachkov; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void 38240069286SPhilip Reames; 38340069286SPhilip Reames call float @llvm.maximum.f32(float undef, float undef) 38440069286SPhilip Reames call <2 x float> @llvm.maximum.v2f32(<2 x float> undef, <2 x float> undef) 38540069286SPhilip Reames call <4 x float> @llvm.maximum.v4f32(<4 x float> undef, <4 x float> undef) 38640069286SPhilip Reames call <8 x float> @llvm.maximum.v8f32(<8 x float> undef, <8 x float> undef) 38740069286SPhilip Reames call <16 x float> @llvm.maximum.v16f32(<16 x float> undef, <16 x float> undef) 388c3edeaa6SLiqinWeng call <vscale x 1 x float> @llvm.maximum.nxv1f32(<vscale x 1 x float> undef, <vscale x 1 x float> undef) 389c3edeaa6SLiqinWeng call <vscale x 2 x float> @llvm.maximum.nxv2f32(<vscale x 2 x float> undef, <vscale x 2 x float> undef) 390c3edeaa6SLiqinWeng call <vscale x 4 x float> @llvm.maximum.nxv4f32(<vscale x 4 x float> undef, <vscale x 4 x float> undef) 391c3edeaa6SLiqinWeng call <vscale x 8 x float> @llvm.maximum.nxv8f32(<vscale x 8 x float> undef, <vscale x 8 x float> undef) 392c3edeaa6SLiqinWeng call <vscale x 16 x float> @llvm.maximum.nxv16f32(<vscale x 16 x float> undef, <vscale x 16 x float> undef) 39340069286SPhilip Reames call double @llvm.maximum.f64(double undef, double undef) 39440069286SPhilip Reames call <2 x double> @llvm.maximum.v2f64(<2 x double> undef, <2 x double> undef) 39540069286SPhilip Reames call <4 x double> @llvm.maximum.v4f64(<4 x double> undef, <4 x double> undef) 39640069286SPhilip Reames call <8 x double> @llvm.maximum.v8f64(<8 x double> undef, <8 x double> undef) 39740069286SPhilip Reames call <16 x double> @llvm.maximum.v16f64(<16 x double> undef, <16 x double> undef) 398c3edeaa6SLiqinWeng call <vscale x 1 x double> @llvm.maximum.nxv1f64(<vscale x 1 x double> undef, <vscale x 1 x double> undef) 399c3edeaa6SLiqinWeng call <vscale x 2 x double> @llvm.maximum.nxv2f64(<vscale x 2 x double> undef, <vscale x 2 x double> undef) 400c3edeaa6SLiqinWeng call <vscale x 4 x double> @llvm.maximum.nxv4f64(<vscale x 4 x double> undef, <vscale x 4 x double> undef) 401c3edeaa6SLiqinWeng call <vscale x 8 x double> @llvm.maximum.nxv8f64(<vscale x 8 x double> undef, <vscale x 8 x double> undef) 40240069286SPhilip Reames ret void 40340069286SPhilip Reames} 40440069286SPhilip Reames 40589c10e27SLuke Laudefine void @maximum_f16() { 40689c10e27SLuke Lau; ZVFH-LABEL: 'maximum_f16' 40789c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = call half @llvm.maximum.f16(half undef, half undef) 40889c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = call <2 x half> @llvm.maximum.v2f16(<2 x half> undef, <2 x half> undef) 40989c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = call <4 x half> @llvm.maximum.v4f16(<4 x half> undef, <4 x half> undef) 41089c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = call <8 x half> @llvm.maximum.v8f16(<8 x half> undef, <8 x half> undef) 41189c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = call <16 x half> @llvm.maximum.v16f16(<16 x half> undef, <16 x half> undef) 41289c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = call <vscale x 1 x half> @llvm.maximum.nxv1f16(<vscale x 1 x half> undef, <vscale x 1 x half> undef) 41389c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = call <vscale x 2 x half> @llvm.maximum.nxv2f16(<vscale x 2 x half> undef, <vscale x 2 x half> undef) 41489c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = call <vscale x 4 x half> @llvm.maximum.nxv4f16(<vscale x 4 x half> undef, <vscale x 4 x half> undef) 41589c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = call <vscale x 8 x half> @llvm.maximum.nxv8f16(<vscale x 8 x half> undef, <vscale x 8 x half> undef) 41689c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %10 = call <vscale x 16 x half> @llvm.maximum.nxv16f16(<vscale x 16 x half> undef, <vscale x 16 x half> undef) 41789c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void 41889c10e27SLuke Lau; 41989c10e27SLuke Lau; ZVFHMIN-LABEL: 'maximum_f16' 42089c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = call half @llvm.maximum.f16(half undef, half undef) 42189c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = call <2 x half> @llvm.maximum.v2f16(<2 x half> undef, <2 x half> undef) 42289c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = call <4 x half> @llvm.maximum.v4f16(<4 x half> undef, <4 x half> undef) 42389c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = call <8 x half> @llvm.maximum.v8f16(<8 x half> undef, <8 x half> undef) 42489c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = call <16 x half> @llvm.maximum.v16f16(<16 x half> undef, <16 x half> undef) 42589c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call <vscale x 1 x half> @llvm.maximum.nxv1f16(<vscale x 1 x half> undef, <vscale x 1 x half> undef) 42689c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call <vscale x 2 x half> @llvm.maximum.nxv2f16(<vscale x 2 x half> undef, <vscale x 2 x half> undef) 42789c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call <vscale x 4 x half> @llvm.maximum.nxv4f16(<vscale x 4 x half> undef, <vscale x 4 x half> undef) 42889c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call <vscale x 8 x half> @llvm.maximum.nxv8f16(<vscale x 8 x half> undef, <vscale x 8 x half> undef) 42989c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call <vscale x 16 x half> @llvm.maximum.nxv16f16(<vscale x 16 x half> undef, <vscale x 16 x half> undef) 43089c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void 43189c10e27SLuke Lau; 43289c10e27SLuke Lau call half @llvm.maximum.f16(half undef, half undef) 43389c10e27SLuke Lau call <2 x half> @llvm.maximum.v2f16(<2 x half> undef, <2 x half> undef) 43489c10e27SLuke Lau call <4 x half> @llvm.maximum.v4f16(<4 x half> undef, <4 x half> undef) 43589c10e27SLuke Lau call <8 x half> @llvm.maximum.v8f16(<8 x half> undef, <8 x half> undef) 43689c10e27SLuke Lau call <16 x half> @llvm.maximum.v16f16(<16 x half> undef, <16 x half> undef) 437c3edeaa6SLiqinWeng call <vscale x 1 x half> @llvm.maximum.nxv1f16(<vscale x 1 x half> undef, <vscale x 1 x half> undef) 438c3edeaa6SLiqinWeng call <vscale x 2 x half> @llvm.maximum.nxv2f16(<vscale x 2 x half> undef, <vscale x 2 x half> undef) 439c3edeaa6SLiqinWeng call <vscale x 4 x half> @llvm.maximum.nxv4f16(<vscale x 4 x half> undef, <vscale x 4 x half> undef) 440c3edeaa6SLiqinWeng call <vscale x 8 x half> @llvm.maximum.nxv8f16(<vscale x 8 x half> undef, <vscale x 8 x half> undef) 441c3edeaa6SLiqinWeng call <vscale x 16 x half> @llvm.maximum.nxv16f16(<vscale x 16 x half> undef, <vscale x 16 x half> undef) 44289c10e27SLuke Lau ret void 44389c10e27SLuke Lau} 44489c10e27SLuke Lau 44540069286SPhilip Reamesdefine void @copysign() { 44640069286SPhilip Reames; CHECK-LABEL: 'copysign' 44740069286SPhilip Reames; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call float @llvm.copysign.f32(float undef, float undef) 44840069286SPhilip Reames; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = call <2 x float> @llvm.copysign.v2f32(<2 x float> undef, <2 x float> undef) 44940069286SPhilip Reames; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = call <4 x float> @llvm.copysign.v4f32(<4 x float> undef, <4 x float> undef) 45040069286SPhilip Reames; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = call <8 x float> @llvm.copysign.v8f32(<8 x float> undef, <8 x float> undef) 45140069286SPhilip Reames; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = call <16 x float> @llvm.copysign.v16f32(<16 x float> undef, <16 x float> undef) 45202045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call <vscale x 1 x float> @llvm.copysign.nxv1f32(<vscale x 1 x float> undef, <vscale x 1 x float> undef) 45302045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call <vscale x 2 x float> @llvm.copysign.nxv2f32(<vscale x 2 x float> undef, <vscale x 2 x float> undef) 45402045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call <vscale x 4 x float> @llvm.copysign.nxv4f32(<vscale x 4 x float> undef, <vscale x 4 x float> undef) 45502045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call <vscale x 8 x float> @llvm.copysign.nxv8f32(<vscale x 8 x float> undef, <vscale x 8 x float> undef) 45602045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call <vscale x 16 x float> @llvm.copysign.nxv16f32(<vscale x 16 x float> undef, <vscale x 16 x float> undef) 45702045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = call double @llvm.copysign.f64(double undef, double undef) 45802045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %12 = call <2 x double> @llvm.copysign.v2f64(<2 x double> undef, <2 x double> undef) 45902045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %13 = call <4 x double> @llvm.copysign.v4f64(<4 x double> undef, <4 x double> undef) 46002045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %14 = call <8 x double> @llvm.copysign.v8f64(<8 x double> undef, <8 x double> undef) 46102045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %15 = call <16 x double> @llvm.copysign.v16f64(<16 x double> undef, <16 x double> undef) 46202045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = call <vscale x 1 x double> @llvm.copysign.nxv1f64(<vscale x 1 x double> undef, <vscale x 1 x double> undef) 46302045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = call <vscale x 2 x double> @llvm.copysign.nxv2f64(<vscale x 2 x double> undef, <vscale x 2 x double> undef) 46402045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %18 = call <vscale x 4 x double> @llvm.copysign.nxv4f64(<vscale x 4 x double> undef, <vscale x 4 x double> undef) 46502045021SCraig Topper; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = call <vscale x 8 x double> @llvm.copysign.nxv8f64(<vscale x 8 x double> undef, <vscale x 8 x double> undef) 4660a5d52a7SSergey Kachkov; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void 46740069286SPhilip Reames; 46840069286SPhilip Reames call float @llvm.copysign.f32(float undef, float undef) 46940069286SPhilip Reames call <2 x float> @llvm.copysign.v2f32(<2 x float> undef, <2 x float> undef) 47040069286SPhilip Reames call <4 x float> @llvm.copysign.v4f32(<4 x float> undef, <4 x float> undef) 47140069286SPhilip Reames call <8 x float> @llvm.copysign.v8f32(<8 x float> undef, <8 x float> undef) 47240069286SPhilip Reames call <16 x float> @llvm.copysign.v16f32(<16 x float> undef, <16 x float> undef) 473c3edeaa6SLiqinWeng call <vscale x 1 x float> @llvm.copysign.nxv1f32(<vscale x 1 x float> undef, <vscale x 1 x float> undef) 474c3edeaa6SLiqinWeng call <vscale x 2 x float> @llvm.copysign.nxv2f32(<vscale x 2 x float> undef, <vscale x 2 x float> undef) 475c3edeaa6SLiqinWeng call <vscale x 4 x float> @llvm.copysign.nxv4f32(<vscale x 4 x float> undef, <vscale x 4 x float> undef) 476c3edeaa6SLiqinWeng call <vscale x 8 x float> @llvm.copysign.nxv8f32(<vscale x 8 x float> undef, <vscale x 8 x float> undef) 477c3edeaa6SLiqinWeng call <vscale x 16 x float> @llvm.copysign.nxv16f32(<vscale x 16 x float> undef, <vscale x 16 x float> undef) 47840069286SPhilip Reames call double @llvm.copysign.f64(double undef, double undef) 47940069286SPhilip Reames call <2 x double> @llvm.copysign.v2f64(<2 x double> undef, <2 x double> undef) 48040069286SPhilip Reames call <4 x double> @llvm.copysign.v4f64(<4 x double> undef, <4 x double> undef) 48140069286SPhilip Reames call <8 x double> @llvm.copysign.v8f64(<8 x double> undef, <8 x double> undef) 48240069286SPhilip Reames call <16 x double> @llvm.copysign.v16f64(<16 x double> undef, <16 x double> undef) 483c3edeaa6SLiqinWeng call <vscale x 1 x double> @llvm.copysign.nxv1f64(<vscale x 1 x double> undef, <vscale x 1 x double> undef) 484c3edeaa6SLiqinWeng call <vscale x 2 x double> @llvm.copysign.nxv2f64(<vscale x 2 x double> undef, <vscale x 2 x double> undef) 485c3edeaa6SLiqinWeng call <vscale x 4 x double> @llvm.copysign.nxv4f64(<vscale x 4 x double> undef, <vscale x 4 x double> undef) 486c3edeaa6SLiqinWeng call <vscale x 8 x double> @llvm.copysign.nxv8f64(<vscale x 8 x double> undef, <vscale x 8 x double> undef) 48740069286SPhilip Reames ret void 48840069286SPhilip Reames} 48940069286SPhilip Reames 49089c10e27SLuke Laudefine void @copysign_f16() { 49189c10e27SLuke Lau; ZVFH-LABEL: 'copysign_f16' 49289c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call half @llvm.copysign.f16(half undef, half undef) 49389c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = call <2 x half> @llvm.copysign.v2f16(<2 x half> undef, <2 x half> undef) 49489c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = call <4 x half> @llvm.copysign.v4f16(<4 x half> undef, <4 x half> undef) 49589c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = call <8 x half> @llvm.copysign.v8f16(<8 x half> undef, <8 x half> undef) 49689c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = call <16 x half> @llvm.copysign.v16f16(<16 x half> undef, <16 x half> undef) 49789c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call <vscale x 1 x half> @llvm.copysign.nxv1f16(<vscale x 1 x half> undef, <vscale x 1 x half> undef) 49889c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call <vscale x 2 x half> @llvm.copysign.nxv2f16(<vscale x 2 x half> undef, <vscale x 2 x half> undef) 49989c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call <vscale x 4 x half> @llvm.copysign.nxv4f16(<vscale x 4 x half> undef, <vscale x 4 x half> undef) 50089c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call <vscale x 8 x half> @llvm.copysign.nxv8f16(<vscale x 8 x half> undef, <vscale x 8 x half> undef) 50189c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call <vscale x 16 x half> @llvm.copysign.nxv16f16(<vscale x 16 x half> undef, <vscale x 16 x half> undef) 50289c10e27SLuke Lau; ZVFH-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void 50389c10e27SLuke Lau; 50489c10e27SLuke Lau; ZVFHMIN-LABEL: 'copysign_f16' 50589c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call half @llvm.copysign.f16(half undef, half undef) 5067f6bbb3cSPhilip Reames; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %2 = call <2 x half> @llvm.copysign.v2f16(<2 x half> undef, <2 x half> undef) 5077f6bbb3cSPhilip Reames; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %3 = call <4 x half> @llvm.copysign.v4f16(<4 x half> undef, <4 x half> undef) 5087f6bbb3cSPhilip Reames; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %4 = call <8 x half> @llvm.copysign.v8f16(<8 x half> undef, <8 x half> undef) 50989c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %5 = call <16 x half> @llvm.copysign.v16f16(<16 x half> undef, <16 x half> undef) 51089c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Invalid cost for instruction: %6 = call <vscale x 1 x half> @llvm.copysign.nxv1f16(<vscale x 1 x half> undef, <vscale x 1 x half> undef) 51189c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Invalid cost for instruction: %7 = call <vscale x 2 x half> @llvm.copysign.nxv2f16(<vscale x 2 x half> undef, <vscale x 2 x half> undef) 51289c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Invalid cost for instruction: %8 = call <vscale x 4 x half> @llvm.copysign.nxv4f16(<vscale x 4 x half> undef, <vscale x 4 x half> undef) 51389c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Invalid cost for instruction: %9 = call <vscale x 8 x half> @llvm.copysign.nxv8f16(<vscale x 8 x half> undef, <vscale x 8 x half> undef) 51489c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Invalid cost for instruction: %10 = call <vscale x 16 x half> @llvm.copysign.nxv16f16(<vscale x 16 x half> undef, <vscale x 16 x half> undef) 51589c10e27SLuke Lau; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void 51689c10e27SLuke Lau; 51789c10e27SLuke Lau call half @llvm.copysign.f16(half undef, half undef) 51889c10e27SLuke Lau call <2 x half> @llvm.copysign.v2f16(<2 x half> undef, <2 x half> undef) 51989c10e27SLuke Lau call <4 x half> @llvm.copysign.v4f16(<4 x half> undef, <4 x half> undef) 52089c10e27SLuke Lau call <8 x half> @llvm.copysign.v8f16(<8 x half> undef, <8 x half> undef) 52189c10e27SLuke Lau call <16 x half> @llvm.copysign.v16f16(<16 x half> undef, <16 x half> undef) 522c3edeaa6SLiqinWeng call <vscale x 1 x half> @llvm.copysign.nxv1f16(<vscale x 1 x half> undef, <vscale x 1 x half> undef) 523c3edeaa6SLiqinWeng call <vscale x 2 x half> @llvm.copysign.nxv2f16(<vscale x 2 x half> undef, <vscale x 2 x half> undef) 524c3edeaa6SLiqinWeng call <vscale x 4 x half> @llvm.copysign.nxv4f16(<vscale x 4 x half> undef, <vscale x 4 x half> undef) 525c3edeaa6SLiqinWeng call <vscale x 8 x half> @llvm.copysign.nxv8f16(<vscale x 8 x half> undef, <vscale x 8 x half> undef) 526c3edeaa6SLiqinWeng call <vscale x 16 x half> @llvm.copysign.nxv16f16(<vscale x 16 x half> undef, <vscale x 16 x half> undef) 52789c10e27SLuke Lau ret void 52889c10e27SLuke Lau} 529