; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt < %s -passes="print" 2>&1 -disable-output -S -mtriple=riscv64 -mattr=+v,+f,+d,+zfh,+zvfh,+zvfbfmin | FileCheck %s --check-prefixes=CHECK,ZVFH ; RUN: opt < %s -passes="print" 2>&1 -disable-output -S -mtriple=riscv64 -mattr=+v,+f,+d,+zfh,+zvfhmin,+zvfbfmin | FileCheck %s --check-prefixes=CHECK,ZVFHMIN define void @fabs() { ; CHECK-LABEL: 'fabs' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call bfloat @llvm.fabs.bf16(bfloat poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %2 = call <2 x bfloat> @llvm.fabs.v2bf16(<2 x bfloat> poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %3 = call <4 x bfloat> @llvm.fabs.v4bf16(<4 x bfloat> poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %4 = call <8 x bfloat> @llvm.fabs.v8bf16(<8 x bfloat> poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %5 = call <16 x bfloat> @llvm.fabs.v16bf16(<16 x bfloat> poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %6 = call @llvm.fabs.nxv2bf16( poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %7 = call @llvm.fabs.nxv4bf16( poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %8 = call @llvm.fabs.nxv8bf16( poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %9 = call @llvm.fabs.nxv16bf16( poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call float @llvm.fabs.f32(float poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = call <2 x float> @llvm.fabs.v2f32(<2 x float> poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = call <4 x float> @llvm.fabs.v4f32(<4 x float> poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %13 = call <8 x float> @llvm.fabs.v8f32(<8 x float> poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %14 = call <16 x float> @llvm.fabs.v16f32(<16 x float> poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = call @llvm.fabs.nxv1f32( poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = call @llvm.fabs.nxv2f32( poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %17 = call @llvm.fabs.nxv4f32( poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %18 = call @llvm.fabs.nxv8f32( poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %19 = call @llvm.fabs.nxv16f32( poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %20 = call double @llvm.fabs.f64(double poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %21 = call <2 x double> @llvm.fabs.v2f64(<2 x double> poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %22 = call <4 x double> @llvm.fabs.v4f64(<4 x double> poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %23 = call <8 x double> @llvm.fabs.v8f64(<8 x double> poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %24 = call <16 x double> @llvm.fabs.v16f64(<16 x double> poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %25 = call @llvm.fabs.nxv1f64( poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %26 = call @llvm.fabs.nxv2f64( poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %27 = call @llvm.fabs.nxv4f64( poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %28 = call @llvm.fabs.nxv8f64( poison) ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call bfloat @llvm.fabs.bf16(bfloat poison) call <2 x bfloat> @llvm.fabs.v2bf16(<2 x bfloat> poison) call <4 x bfloat> @llvm.fabs.v4bf16(<4 x bfloat> poison) call <8 x bfloat> @llvm.fabs.v8bf16(<8 x bfloat> poison) call <16 x bfloat> @llvm.fabs.v16f16(<16 x bfloat> poison) call @llvm.fabs.nxv2bf16( poison) call @llvm.fabs.nxv4bf16( poison) call @llvm.fabs.nxv8bf16( poison) call @llvm.fabs.nxv16f16( poison) call float @llvm.fabs.f32(float poison) call <2 x float> @llvm.fabs.v2f32(<2 x float> poison) call <4 x float> @llvm.fabs.v4f32(<4 x float> poison) call <8 x float> @llvm.fabs.v8f32(<8 x float> poison) call <16 x float> @llvm.fabs.v16f32(<16 x float> poison) call @llvm.fabs.nxv1f32( poison) call @llvm.fabs.nxv2f32( poison) call @llvm.fabs.nxv4f32( poison) call @llvm.fabs.nxv8f32( poison) call @llvm.fabs.nxv16f32( poison) call double @llvm.fabs.f64(double poison) call <2 x double> @llvm.fabs.v2f64(<2 x double> poison) call <4 x double> @llvm.fabs.v4f64(<4 x double> poison) call <8 x double> @llvm.fabs.v8f64(<8 x double> poison) call <16 x double> @llvm.fabs.v16f64(<16 x double> poison) call @llvm.fabs.nxv1f64( poison) call @llvm.fabs.nxv2f64( poison) call @llvm.fabs.nxv4f64( poison) call @llvm.fabs.nxv8f64( poison) ret void } define void @fabs_f16() { ; ZVFH-LABEL: 'fabs_f16' ; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call half @llvm.fabs.f16(half poison) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = call <2 x half> @llvm.fabs.v2f16(<2 x half> poison) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = call <4 x half> @llvm.fabs.v4f16(<4 x half> poison) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = call <8 x half> @llvm.fabs.v8f16(<8 x half> poison) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = call <16 x half> @llvm.fabs.v16f16(<16 x half> poison) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call @llvm.fabs.nxv2f16( poison) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call @llvm.fabs.nxv4f16( poison) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = call @llvm.fabs.nxv8f16( poison) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %9 = call @llvm.fabs.nxv16f16( poison) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; ZVFHMIN-LABEL: 'fabs_f16' ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call half @llvm.fabs.f16(half poison) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %2 = call <2 x half> @llvm.fabs.v2f16(<2 x half> poison) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %3 = call <4 x half> @llvm.fabs.v4f16(<4 x half> poison) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %4 = call <8 x half> @llvm.fabs.v8f16(<8 x half> poison) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %5 = call <16 x half> @llvm.fabs.v16f16(<16 x half> poison) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %6 = call @llvm.fabs.nxv2f16( poison) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %7 = call @llvm.fabs.nxv4f16( poison) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %8 = call @llvm.fabs.nxv8f16( poison) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %9 = call @llvm.fabs.nxv16f16( poison) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call half @llvm.fabs.f16(half poison) call <2 x half> @llvm.fabs.v2f16(<2 x half> poison) call <4 x half> @llvm.fabs.v4f16(<4 x half> poison) call <8 x half> @llvm.fabs.v8f16(<8 x half> poison) call <16 x half> @llvm.fabs.v16f16(<16 x half> poison) call @llvm.fabs.nxv2f16( poison) call @llvm.fabs.nxv4f16( poison) call @llvm.fabs.nxv8f16( poison) call @llvm.fabs.nxv16f16( poison) ret void } define void @minnum() { ; CHECK-LABEL: 'minnum' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call float @llvm.minnum.f32(float undef, float undef) ; 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) ; 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) ; 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) ; 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) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call @llvm.minnum.nxv1f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call @llvm.minnum.nxv2f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call @llvm.minnum.nxv4f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call @llvm.minnum.nxv8f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call @llvm.minnum.nxv16f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = call double @llvm.minnum.f64(double undef, double undef) ; 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) ; 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) ; 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) ; 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) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = call @llvm.minnum.nxv1f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = call @llvm.minnum.nxv2f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %18 = call @llvm.minnum.nxv4f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = call @llvm.minnum.nxv8f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.minnum.f32(float undef, float undef) call <2 x float> @llvm.minnum.v2f32(<2 x float> undef, <2 x float> undef) call <4 x float> @llvm.minnum.v4f32(<4 x float> undef, <4 x float> undef) call <8 x float> @llvm.minnum.v8f32(<8 x float> undef, <8 x float> undef) call <16 x float> @llvm.minnum.v16f32(<16 x float> undef, <16 x float> undef) call @llvm.minnum.nxv1f32( undef, undef) call @llvm.minnum.nxv2f32( undef, undef) call @llvm.minnum.nxv4f32( undef, undef) call @llvm.minnum.nxv8f32( undef, undef) call @llvm.minnum.nxv16f32( undef, undef) call double @llvm.minnum.f64(double undef, double undef) call <2 x double> @llvm.minnum.v2f64(<2 x double> undef, <2 x double> undef) call <4 x double> @llvm.minnum.v4f64(<4 x double> undef, <4 x double> undef) call <8 x double> @llvm.minnum.v8f64(<8 x double> undef, <8 x double> undef) call <16 x double> @llvm.minnum.v16f64(<16 x double> undef, <16 x double> undef) call @llvm.minnum.nxv1f64( undef, undef) call @llvm.minnum.nxv2f64( undef, undef) call @llvm.minnum.nxv4f64( undef, undef) call @llvm.minnum.nxv8f64( undef, undef) ret void } define void @minnum_f16() { ; ZVFH-LABEL: 'minnum_f16' ; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call half @llvm.minnum.f16(half undef, half undef) ; 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) ; 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) ; 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) ; 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) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call @llvm.minnum.nxv1f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call @llvm.minnum.nxv2f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call @llvm.minnum.nxv4f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call @llvm.minnum.nxv8f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call @llvm.minnum.nxv16f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; ZVFHMIN-LABEL: 'minnum_f16' ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call half @llvm.minnum.f16(half undef, half undef) ; 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) ; 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) ; 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) ; 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) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call @llvm.minnum.nxv1f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call @llvm.minnum.nxv2f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call @llvm.minnum.nxv4f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call @llvm.minnum.nxv8f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call @llvm.minnum.nxv16f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call half @llvm.minnum.f16(half undef, half undef) call <2 x half> @llvm.minnum.v2f16(<2 x half> undef, <2 x half> undef) call <4 x half> @llvm.minnum.v4f16(<4 x half> undef, <4 x half> undef) call <8 x half> @llvm.minnum.v8f16(<8 x half> undef, <8 x half> undef) call <16 x half> @llvm.minnum.v16f16(<16 x half> undef, <16 x half> undef) call @llvm.minnum.nxv1f16( undef, undef) call @llvm.minnum.nxv2f16( undef, undef) call @llvm.minnum.nxv4f16( undef, undef) call @llvm.minnum.nxv8f16( undef, undef) call @llvm.minnum.nxv16f16( undef, undef) ret void } define void @maxnum() { ; CHECK-LABEL: 'maxnum' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call float @llvm.maxnum.f32(float undef, float undef) ; 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) ; 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) ; 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) ; 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) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call @llvm.maxnum.nxv1f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call @llvm.maxnum.nxv2f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call @llvm.maxnum.nxv4f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call @llvm.maxnum.nxv8f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call @llvm.maxnum.nxv16f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = call double @llvm.maxnum.f64(double undef, double undef) ; 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) ; 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) ; 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) ; 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) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = call @llvm.maxnum.nxv1f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = call @llvm.maxnum.nxv2f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %18 = call @llvm.maxnum.nxv4f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = call @llvm.maxnum.nxv8f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.maxnum.f32(float undef, float undef) call <2 x float> @llvm.maxnum.v2f32(<2 x float> undef, <2 x float> undef) call <4 x float> @llvm.maxnum.v4f32(<4 x float> undef, <4 x float> undef) call <8 x float> @llvm.maxnum.v8f32(<8 x float> undef, <8 x float> undef) call <16 x float> @llvm.maxnum.v16f32(<16 x float> undef, <16 x float> undef) call @llvm.maxnum.nxv1f32( undef, undef) call @llvm.maxnum.nxv2f32( undef, undef) call @llvm.maxnum.nxv4f32( undef, undef) call @llvm.maxnum.nxv8f32( undef, undef) call @llvm.maxnum.nxv16f32( undef, undef) call double @llvm.maxnum.f64(double undef, double undef) call <2 x double> @llvm.maxnum.v2f64(<2 x double> undef, <2 x double> undef) call <4 x double> @llvm.maxnum.v4f64(<4 x double> undef, <4 x double> undef) call <8 x double> @llvm.maxnum.v8f64(<8 x double> undef, <8 x double> undef) call <16 x double> @llvm.maxnum.v16f64(<16 x double> undef, <16 x double> undef) call @llvm.maxnum.nxv1f64( undef, undef) call @llvm.maxnum.nxv2f64( undef, undef) call @llvm.maxnum.nxv4f64( undef, undef) call @llvm.maxnum.nxv8f64( undef, undef) ret void } define void @maxnum_f16() { ; ZVFH-LABEL: 'maxnum_f16' ; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call half @llvm.maxnum.f16(half undef, half undef) ; 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) ; 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) ; 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) ; 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) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call @llvm.maxnum.nxv1f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call @llvm.maxnum.nxv2f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call @llvm.maxnum.nxv4f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call @llvm.maxnum.nxv8f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call @llvm.maxnum.nxv16f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; ZVFHMIN-LABEL: 'maxnum_f16' ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call half @llvm.maxnum.f16(half undef, half undef) ; 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) ; 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) ; 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) ; 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) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call @llvm.maxnum.nxv1f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call @llvm.maxnum.nxv2f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call @llvm.maxnum.nxv4f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call @llvm.maxnum.nxv8f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call @llvm.maxnum.nxv16f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call half @llvm.maxnum.f16(half undef, half undef) call <2 x half> @llvm.maxnum.v2f16(<2 x half> undef, <2 x half> undef) call <4 x half> @llvm.maxnum.v4f16(<4 x half> undef, <4 x half> undef) call <8 x half> @llvm.maxnum.v8f16(<8 x half> undef, <8 x half> undef) call <16 x half> @llvm.maxnum.v16f16(<16 x half> undef, <16 x half> undef) call @llvm.maxnum.nxv1f16( undef, undef) call @llvm.maxnum.nxv2f16( undef, undef) call @llvm.maxnum.nxv4f16( undef, undef) call @llvm.maxnum.nxv8f16( undef, undef) call @llvm.maxnum.nxv16f16( undef, undef) ret void } define void @minimum() { ; CHECK-LABEL: 'minimum' ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = call float @llvm.minimum.f32(float undef, float undef) ; 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) ; 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) ; 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) ; 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) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = call @llvm.minimum.nxv1f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = call @llvm.minimum.nxv2f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = call @llvm.minimum.nxv4f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = call @llvm.minimum.nxv8f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %10 = call @llvm.minimum.nxv16f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %11 = call double @llvm.minimum.f64(double undef, double undef) ; 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) ; 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) ; 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) ; 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) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %16 = call @llvm.minimum.nxv1f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %17 = call @llvm.minimum.nxv2f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %18 = call @llvm.minimum.nxv4f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %19 = call @llvm.minimum.nxv8f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.minimum.f32(float undef, float undef) call <2 x float> @llvm.minimum.v2f32(<2 x float> undef, <2 x float> undef) call <4 x float> @llvm.minimum.v4f32(<4 x float> undef, <4 x float> undef) call <8 x float> @llvm.minimum.v8f32(<8 x float> undef, <8 x float> undef) call <16 x float> @llvm.minimum.v16f32(<16 x float> undef, <16 x float> undef) call @llvm.minimum.nxv1f32( undef, undef) call @llvm.minimum.nxv2f32( undef, undef) call @llvm.minimum.nxv4f32( undef, undef) call @llvm.minimum.nxv8f32( undef, undef) call @llvm.minimum.nxv16f32( undef, undef) call double @llvm.minimum.f64(double undef, double undef) call <2 x double> @llvm.minimum.v2f64(<2 x double> undef, <2 x double> undef) call <4 x double> @llvm.minimum.v4f64(<4 x double> undef, <4 x double> undef) call <8 x double> @llvm.minimum.v8f64(<8 x double> undef, <8 x double> undef) call <16 x double> @llvm.minimum.v16f64(<16 x double> undef, <16 x double> undef) call @llvm.minimum.nxv1f64( undef, undef) call @llvm.minimum.nxv2f64( undef, undef) call @llvm.minimum.nxv4f64( undef, undef) call @llvm.minimum.nxv8f64( undef, undef) ret void } define void @minimum_f16() { ; ZVFH-LABEL: 'minimum_f16' ; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = call half @llvm.minimum.f16(half undef, half undef) ; 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) ; 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) ; 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) ; 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) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = call @llvm.minimum.nxv1f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = call @llvm.minimum.nxv2f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = call @llvm.minimum.nxv4f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = call @llvm.minimum.nxv8f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %10 = call @llvm.minimum.nxv16f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; ZVFHMIN-LABEL: 'minimum_f16' ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = call half @llvm.minimum.f16(half undef, half undef) ; 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) ; 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) ; 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) ; 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) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call @llvm.minimum.nxv1f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call @llvm.minimum.nxv2f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call @llvm.minimum.nxv4f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call @llvm.minimum.nxv8f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call @llvm.minimum.nxv16f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call half @llvm.minimum.f16(half undef, half undef) call <2 x half> @llvm.minimum.v2f16(<2 x half> undef, <2 x half> undef) call <4 x half> @llvm.minimum.v4f16(<4 x half> undef, <4 x half> undef) call <8 x half> @llvm.minimum.v8f16(<8 x half> undef, <8 x half> undef) call <16 x half> @llvm.minimum.v16f16(<16 x half> undef, <16 x half> undef) call @llvm.minimum.nxv1f16( undef, undef) call @llvm.minimum.nxv2f16( undef, undef) call @llvm.minimum.nxv4f16( undef, undef) call @llvm.minimum.nxv8f16( undef, undef) call @llvm.minimum.nxv16f16( undef, undef) ret void } define void @maximum() { ; CHECK-LABEL: 'maximum' ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = call float @llvm.maximum.f32(float undef, float undef) ; 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) ; 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) ; 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) ; 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) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = call @llvm.maximum.nxv1f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = call @llvm.maximum.nxv2f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = call @llvm.maximum.nxv4f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = call @llvm.maximum.nxv8f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %10 = call @llvm.maximum.nxv16f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %11 = call double @llvm.maximum.f64(double undef, double undef) ; 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) ; 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) ; 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) ; 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) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %16 = call @llvm.maximum.nxv1f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %17 = call @llvm.maximum.nxv2f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %18 = call @llvm.maximum.nxv4f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %19 = call @llvm.maximum.nxv8f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.maximum.f32(float undef, float undef) call <2 x float> @llvm.maximum.v2f32(<2 x float> undef, <2 x float> undef) call <4 x float> @llvm.maximum.v4f32(<4 x float> undef, <4 x float> undef) call <8 x float> @llvm.maximum.v8f32(<8 x float> undef, <8 x float> undef) call <16 x float> @llvm.maximum.v16f32(<16 x float> undef, <16 x float> undef) call @llvm.maximum.nxv1f32( undef, undef) call @llvm.maximum.nxv2f32( undef, undef) call @llvm.maximum.nxv4f32( undef, undef) call @llvm.maximum.nxv8f32( undef, undef) call @llvm.maximum.nxv16f32( undef, undef) call double @llvm.maximum.f64(double undef, double undef) call <2 x double> @llvm.maximum.v2f64(<2 x double> undef, <2 x double> undef) call <4 x double> @llvm.maximum.v4f64(<4 x double> undef, <4 x double> undef) call <8 x double> @llvm.maximum.v8f64(<8 x double> undef, <8 x double> undef) call <16 x double> @llvm.maximum.v16f64(<16 x double> undef, <16 x double> undef) call @llvm.maximum.nxv1f64( undef, undef) call @llvm.maximum.nxv2f64( undef, undef) call @llvm.maximum.nxv4f64( undef, undef) call @llvm.maximum.nxv8f64( undef, undef) ret void } define void @maximum_f16() { ; ZVFH-LABEL: 'maximum_f16' ; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = call half @llvm.maximum.f16(half undef, half undef) ; 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) ; 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) ; 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) ; 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) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = call @llvm.maximum.nxv1f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = call @llvm.maximum.nxv2f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = call @llvm.maximum.nxv4f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = call @llvm.maximum.nxv8f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %10 = call @llvm.maximum.nxv16f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; ZVFHMIN-LABEL: 'maximum_f16' ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = call half @llvm.maximum.f16(half undef, half undef) ; 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) ; 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) ; 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) ; 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) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call @llvm.maximum.nxv1f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call @llvm.maximum.nxv2f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call @llvm.maximum.nxv4f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call @llvm.maximum.nxv8f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call @llvm.maximum.nxv16f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call half @llvm.maximum.f16(half undef, half undef) call <2 x half> @llvm.maximum.v2f16(<2 x half> undef, <2 x half> undef) call <4 x half> @llvm.maximum.v4f16(<4 x half> undef, <4 x half> undef) call <8 x half> @llvm.maximum.v8f16(<8 x half> undef, <8 x half> undef) call <16 x half> @llvm.maximum.v16f16(<16 x half> undef, <16 x half> undef) call @llvm.maximum.nxv1f16( undef, undef) call @llvm.maximum.nxv2f16( undef, undef) call @llvm.maximum.nxv4f16( undef, undef) call @llvm.maximum.nxv8f16( undef, undef) call @llvm.maximum.nxv16f16( undef, undef) ret void } define void @copysign() { ; CHECK-LABEL: 'copysign' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call float @llvm.copysign.f32(float undef, float undef) ; 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) ; 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) ; 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) ; 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) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call @llvm.copysign.nxv1f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call @llvm.copysign.nxv2f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call @llvm.copysign.nxv4f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call @llvm.copysign.nxv8f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call @llvm.copysign.nxv16f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = call double @llvm.copysign.f64(double undef, double undef) ; 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) ; 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) ; 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) ; 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) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = call @llvm.copysign.nxv1f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = call @llvm.copysign.nxv2f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %18 = call @llvm.copysign.nxv4f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = call @llvm.copysign.nxv8f64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call float @llvm.copysign.f32(float undef, float undef) call <2 x float> @llvm.copysign.v2f32(<2 x float> undef, <2 x float> undef) call <4 x float> @llvm.copysign.v4f32(<4 x float> undef, <4 x float> undef) call <8 x float> @llvm.copysign.v8f32(<8 x float> undef, <8 x float> undef) call <16 x float> @llvm.copysign.v16f32(<16 x float> undef, <16 x float> undef) call @llvm.copysign.nxv1f32( undef, undef) call @llvm.copysign.nxv2f32( undef, undef) call @llvm.copysign.nxv4f32( undef, undef) call @llvm.copysign.nxv8f32( undef, undef) call @llvm.copysign.nxv16f32( undef, undef) call double @llvm.copysign.f64(double undef, double undef) call <2 x double> @llvm.copysign.v2f64(<2 x double> undef, <2 x double> undef) call <4 x double> @llvm.copysign.v4f64(<4 x double> undef, <4 x double> undef) call <8 x double> @llvm.copysign.v8f64(<8 x double> undef, <8 x double> undef) call <16 x double> @llvm.copysign.v16f64(<16 x double> undef, <16 x double> undef) call @llvm.copysign.nxv1f64( undef, undef) call @llvm.copysign.nxv2f64( undef, undef) call @llvm.copysign.nxv4f64( undef, undef) call @llvm.copysign.nxv8f64( undef, undef) ret void } define void @copysign_f16() { ; ZVFH-LABEL: 'copysign_f16' ; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call half @llvm.copysign.f16(half undef, half undef) ; 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) ; 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) ; 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) ; 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) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call @llvm.copysign.nxv1f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call @llvm.copysign.nxv2f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call @llvm.copysign.nxv4f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call @llvm.copysign.nxv8f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call @llvm.copysign.nxv16f16( undef, undef) ; ZVFH-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; ZVFHMIN-LABEL: 'copysign_f16' ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call half @llvm.copysign.f16(half undef, half undef) ; 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) ; 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) ; 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) ; 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) ; ZVFHMIN-NEXT: Cost Model: Invalid cost for instruction: %6 = call @llvm.copysign.nxv1f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Invalid cost for instruction: %7 = call @llvm.copysign.nxv2f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Invalid cost for instruction: %8 = call @llvm.copysign.nxv4f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Invalid cost for instruction: %9 = call @llvm.copysign.nxv8f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Invalid cost for instruction: %10 = call @llvm.copysign.nxv16f16( undef, undef) ; ZVFHMIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call half @llvm.copysign.f16(half undef, half undef) call <2 x half> @llvm.copysign.v2f16(<2 x half> undef, <2 x half> undef) call <4 x half> @llvm.copysign.v4f16(<4 x half> undef, <4 x half> undef) call <8 x half> @llvm.copysign.v8f16(<8 x half> undef, <8 x half> undef) call <16 x half> @llvm.copysign.v16f16(<16 x half> undef, <16 x half> undef) call @llvm.copysign.nxv1f16( undef, undef) call @llvm.copysign.nxv2f16( undef, undef) call @llvm.copysign.nxv4f16( undef, undef) call @llvm.copysign.nxv8f16( undef, undef) call @llvm.copysign.nxv16f16( undef, undef) ret void }