diff --git a/llvm/test/Analysis/CostModel/RISCV/exp.ll b/llvm/test/Analysis/CostModel/RISCV/exp.ll new file mode 100644 index 0000000000000..fa7a9451f567a --- /dev/null +++ b/llvm/test/Analysis/CostModel/RISCV/exp.ll @@ -0,0 +1,109 @@ +; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py +; RUN: opt -passes="print" 2>&1 -disable-output -S -mtriple=riscv64 -mattr=+v,+f,+d,+zvfh,+zvfbfmin %s | FileCheck %s + +define void @ldexp() { +; CHECK-LABEL: 'ldexp' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call bfloat @llvm.ldexp.bf16.i32(bfloat poison, i32 poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %2 = call <2 x bfloat> @llvm.ldexp.v2bf16.v2i32(<2 x bfloat> poison, <2 x i32> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %3 = call <4 x bfloat> @llvm.ldexp.v4bf16.v4i32(<4 x bfloat> poison, <4 x i32> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %4 = call <8 x bfloat> @llvm.ldexp.v8bf16.v8i32(<8 x bfloat> poison, <8 x i32> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %5 = call <16 x bfloat> @llvm.ldexp.v16bf16.v16i32(<16 x bfloat> poison, <16 x i32> poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %6 = call @llvm.ldexp.nxv1bf16.nxv1i32( poison, poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %7 = call @llvm.ldexp.nxv2bf16.nxv2i32( poison, poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %8 = call @llvm.ldexp.nxv4bf16.nxv4i32( poison, poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call @llvm.ldexp.nxv8bf16.nxv8i32( poison, poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %10 = call @llvm.ldexp.nxv16bf16.nxv16i32( poison, poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = call float @llvm.ldexp.f32.i32(float poison, i32 poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %12 = call <2 x float> @llvm.ldexp.v2f32.v2i32(<2 x float> poison, <2 x i32> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %13 = call <4 x float> @llvm.ldexp.v4f32.v4i32(<4 x float> poison, <4 x i32> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %14 = call <8 x float> @llvm.ldexp.v8f32.v8i32(<8 x float> poison, <8 x i32> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %15 = call <16 x float> @llvm.ldexp.v16f32.v16i32(<16 x float> poison, <16 x i32> poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %16 = call @llvm.ldexp.nxv1f32.nxv1i32( poison, poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call @llvm.ldexp.nxv2f32.nxv2i32( poison, poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call @llvm.ldexp.nxv4f32.nxv4i32( poison, poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %19 = call @llvm.ldexp.nxv8f32.nxv8i32( poison, poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %20 = call @llvm.ldexp.nxv16f32.nxv16i32( poison, poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %21 = call double @llvm.ldexp.f64.i32(double poison, i32 poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %22 = call <2 x double> @llvm.ldexp.v2f64.v2i32(<2 x double> poison, <2 x i32> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %23 = call <4 x double> @llvm.ldexp.v4f64.v4i32(<4 x double> poison, <4 x i32> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %24 = call <8 x double> @llvm.ldexp.v8f64.v8i32(<8 x double> poison, <8 x i32> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %25 = call <16 x double> @llvm.ldexp.v16f64.v16i32(<16 x double> poison, <16 x i32> poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %26 = call @llvm.ldexp.nxv1f64.nxv1i32( poison, poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %27 = call @llvm.ldexp.nxv2f64.nxv2i32( poison, poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %28 = call @llvm.ldexp.nxv4f64.nxv4i32( poison, poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %29 = call @llvm.ldexp.nxv8f64.nxv8i32( poison, poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %30 = call @llvm.ldexp.nxv16f64.nxv16i32( poison, poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %31 = call float @llvm.ldexp.f32.i64(float poison, i64 poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %32 = call <2 x float> @llvm.ldexp.v2f32.v2i64(<2 x float> poison, <2 x i64> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %33 = call <4 x float> @llvm.ldexp.v4f32.v4i64(<4 x float> poison, <4 x i64> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %34 = call <8 x float> @llvm.ldexp.v8f32.v8i64(<8 x float> poison, <8 x i64> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %35 = call <16 x float> @llvm.ldexp.v16f32.v16i64(<16 x float> poison, <16 x i64> poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %36 = call @llvm.ldexp.nxv1f32.nxv1i64( poison, poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %37 = call @llvm.ldexp.nxv2f32.nxv2i64( poison, poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %38 = call @llvm.ldexp.nxv4f32.nxv4i64( poison, poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %39 = call @llvm.ldexp.nxv8f32.nxv8i64( poison, poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %40 = call @llvm.ldexp.nxv16f32.nxv16i64( poison, poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %41 = call double @llvm.ldexp.f64.i64(double poison, i64 poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %42 = call <2 x double> @llvm.ldexp.v2f64.v2i64(<2 x double> poison, <2 x i64> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %43 = call <4 x double> @llvm.ldexp.v4f64.v4i64(<4 x double> poison, <4 x i64> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %44 = call <8 x double> @llvm.ldexp.v8f64.v8i64(<8 x double> poison, <8 x i64> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %45 = call <16 x double> @llvm.ldexp.v16f64.v16i64(<16 x double> poison, <16 x i64> poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %46 = call @llvm.ldexp.nxv1f64.nxv1i64( poison, poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %47 = call @llvm.ldexp.nxv2f64.nxv2i64( poison, poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %48 = call @llvm.ldexp.nxv4f64.nxv4i64( poison, poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %49 = call @llvm.ldexp.nxv8f64.nxv8i64( poison, poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %50 = call @llvm.ldexp.nxv16f64.nxv16i64( poison, poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + call bfloat @llvm.ldexp.bf16.i32(bfloat poison, i32 poison) + call <2 x bfloat> @llvm.ldexp.v2bf16.v2i32(<2 x bfloat> poison, <2 x i32> poison) + call <4 x bfloat> @llvm.ldexp.v4bf16.v4i32(<4 x bfloat> poison, <4 x i32> poison) + call <8 x bfloat> @llvm.ldexp.v8bf16.v8i32(<8 x bfloat> poison, <8 x i32> poison) + call <16 x bfloat> @llvm.ldexp.v16bf16.v16i32(<16 x bfloat> poison, <16 x i32> poison) + call @llvm.ldexp.nxv1bf16.nxv1i32( poison, poison) + call @llvm.ldexp.nxv2bf16.nxv2i32( poison, poison) + call @llvm.ldexp.nxv4bf16.nxv4i32( poison, poison) + call @llvm.ldexp.nxv8bf16.nxv8i32( poison, poison) + call @llvm.ldexp.nxv16bf16.nxv16i32( poison, poison) + call float @llvm.ldexp.f32.i32(float poison, i32 poison) + call <2 x float> @llvm.ldexp.v2f32.v2i32(<2 x float> poison, <2 x i32> poison) + call <4 x float> @llvm.ldexp.v4f32.v4i32(<4 x float> poison, <4 x i32> poison) + call <8 x float> @llvm.ldexp.v8f32.v8i32(<8 x float> poison, <8 x i32> poison) + call <16 x float> @llvm.ldexp.v16f32.v16i32(<16 x float> poison, <16 x i32> poison) + call @llvm.ldexp.nxv1f32.nxv1i32( poison, poison) + call @llvm.ldexp.nxv2f32.nxv2i32( poison, poison) + call @llvm.ldexp.nxv4f32.nxv4i32( poison, poison) + call @llvm.ldexp.nxv8f32.nxv8i32( poison, poison) + call @llvm.ldexp.nxv16f32.nxv16i32( poison, poison) + call double @llvm.ldexp.f64.i32(double poison, i32 poison) + call <2 x double> @llvm.ldexp.v2f64.v2i32(<2 x double> poison, <2 x i32> poison) + call <4 x double> @llvm.ldexp.v4f64.v4i32(<4 x double> poison, <4 x i32> poison) + call <8 x double> @llvm.ldexp.v8f64.v8i32(<8 x double> poison, <8 x i32> poison) + call <16 x double> @llvm.ldexp.v16f64.v16i32(<16 x double> poison, <16 x i32> poison) + call @llvm.ldexp.nxv1f64.nxv1i32( poison, poison) + call @llvm.ldexp.nxv2f64.nxv2i32( poison, poison) + call @llvm.ldexp.nxv4f64.nxv4i32( poison, poison) + call @llvm.ldexp.nxv8f64.nxv8i32( poison, poison) + call @llvm.ldexp.nxv16f64.nxv16i32( poison, poison) + call float @llvm.ldexp.f32.i64(float poison, i64 poison) + call <2 x float> @llvm.ldexp.v2f32.v2i64(<2 x float> poison, <2 x i64> poison) + call <4 x float> @llvm.ldexp.v4f32.v4i64(<4 x float> poison, <4 x i64> poison) + call <8 x float> @llvm.ldexp.v8f32.v8i64(<8 x float> poison, <8 x i64> poison) + call <16 x float> @llvm.ldexp.v16f32.v16i64(<16 x float> poison, <16 x i64> poison) + call @llvm.ldexp.nxv1f32.nxv1i64( poison, poison) + call @llvm.ldexp.nxv2f32.nxv2i64( poison, poison) + call @llvm.ldexp.nxv4f32.nxv4i64( poison, poison) + call @llvm.ldexp.nxv8f32.nxv8i64( poison, poison) + call @llvm.ldexp.nxv16f32.nxv16i64( poison, poison) + call double @llvm.ldexp.f64.i64(double poison, i64 poison) + call <2 x double> @llvm.ldexp.v2f64.v2i64(<2 x double> poison, <2 x i64> poison) + call <4 x double> @llvm.ldexp.v4f64.v4i64(<4 x double> poison, <4 x i64> poison) + call <8 x double> @llvm.ldexp.v8f64.v8i64(<8 x double> poison, <8 x i64> poison) + call <16 x double> @llvm.ldexp.v16f64.v16i64(<16 x double> poison, <16 x i64> poison) + call @llvm.ldexp.nxv1f64.nxv1i64( poison, poison) + call @llvm.ldexp.nxv2f64.nxv2i64( poison, poison) + call @llvm.ldexp.nxv4f64.nxv4i64( poison, poison) + call @llvm.ldexp.nxv8f64.nxv8i64( poison, poison) + call @llvm.ldexp.nxv16f64.nxv16i64( poison, poison) + ret void +} diff --git a/llvm/test/Analysis/CostModel/RISCV/fround.ll b/llvm/test/Analysis/CostModel/RISCV/fround.ll index a0818d487d151..94c09389cadec 100644 --- a/llvm/test/Analysis/CostModel/RISCV/fround.ll +++ b/llvm/test/Analysis/CostModel/RISCV/fround.ll @@ -606,6 +606,200 @@ define void @llrint_fp16() { ret void } +define void @lround() { +; CHECK-LABEL: 'lround' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call i32 @llvm.lround.i32.bf16(bfloat poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %2 = call <2 x i32> @llvm.lround.v2i32.v2bf16(<2 x bfloat> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %3 = call <4 x i32> @llvm.lround.v4i32.v4bf16(<4 x bfloat> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %4 = call <8 x i32> @llvm.lround.v8i32.v8bf16(<8 x bfloat> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %5 = call <16 x i32> @llvm.lround.v16i32.v16bf16(<16 x bfloat> poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %6 = call @llvm.lround.nxv1i32.nxv1bf16( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %7 = call @llvm.lround.nxv2i32.nxv2bf16( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %8 = call @llvm.lround.nxv4i32.nxv4bf16( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call @llvm.lround.nxv8i32.nxv8bf16( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %10 = call @llvm.lround.nxv16i32.nxv16bf16( poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = call i32 @llvm.lround.i32.f32(float poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %12 = call <2 x i32> @llvm.lround.v2i32.v2f32(<2 x float> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %13 = call <4 x i32> @llvm.lround.v4i32.v4f32(<4 x float> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %14 = call <8 x i32> @llvm.lround.v8i32.v8f32(<8 x float> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %15 = call <16 x i32> @llvm.lround.v16i32.v16f32(<16 x float> poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %16 = call @llvm.lround.nxv1i32.nxv1f32( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call @llvm.lround.nxv2i32.nxv2f32( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call @llvm.lround.nxv4i32.nxv4f32( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %19 = call @llvm.lround.nxv8i32.nxv8f32( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %20 = call @llvm.lround.nxv16i32.nxv16f32( poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %21 = call i32 @llvm.lround.i32.f64(double poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %22 = call <2 x i32> @llvm.lround.v2i32.v2f64(<2 x double> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %23 = call <4 x i32> @llvm.lround.v4i32.v4f64(<4 x double> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %24 = call <8 x i32> @llvm.lround.v8i32.v8f64(<8 x double> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %25 = call <16 x i32> @llvm.lround.v16i32.v16f64(<16 x double> poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %26 = call @llvm.lround.nxv1i32.nxv1f64( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %27 = call @llvm.lround.nxv2i32.nxv2f64( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %28 = call @llvm.lround.nxv4i32.nxv4f64( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %29 = call @llvm.lround.nxv8i32.nxv8f64( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %30 = call @llvm.lround.nxv16i32.nxv16f64( poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %31 = call i64 @llvm.lround.i64.bf16(bfloat poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %32 = call <2 x i64> @llvm.lround.v2i64.v2bf16(<2 x bfloat> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %33 = call <4 x i64> @llvm.lround.v4i64.v4bf16(<4 x bfloat> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %34 = call <8 x i64> @llvm.lround.v8i64.v8bf16(<8 x bfloat> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %35 = call <16 x i64> @llvm.lround.v16i64.v16bf16(<16 x bfloat> poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %36 = call @llvm.lround.nxv1i64.nxv1bf16( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %37 = call @llvm.lround.nxv2i64.nxv2bf16( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %38 = call @llvm.lround.nxv4i64.nxv4bf16( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %39 = call @llvm.lround.nxv8i64.nxv8bf16( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %40 = call @llvm.lround.nxv16i64.nxv16bf16( poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %41 = call i64 @llvm.lround.i64.f32(float poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %42 = call <2 x i64> @llvm.lround.v2i64.v2f32(<2 x float> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %43 = call <4 x i64> @llvm.lround.v4i64.v4f32(<4 x float> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %44 = call <8 x i64> @llvm.lround.v8i64.v8f32(<8 x float> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %45 = call <16 x i64> @llvm.lround.v16i64.v16f32(<16 x float> poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %46 = call @llvm.lround.nxv1i64.nxv1f32( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %47 = call @llvm.lround.nxv2i64.nxv2f32( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %48 = call @llvm.lround.nxv4i64.nxv4f32( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %49 = call @llvm.lround.nxv8i64.nxv8f32( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %50 = call @llvm.lround.nxv16i64.nxv16f32( poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %51 = call i64 @llvm.lround.i64.f64(double poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %52 = call <2 x i64> @llvm.lround.v2i64.v2f64(<2 x double> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %53 = call <4 x i64> @llvm.lround.v4i64.v4f64(<4 x double> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %54 = call <8 x i64> @llvm.lround.v8i64.v8f64(<8 x double> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %55 = call <16 x i64> @llvm.lround.v16i64.v16f64(<16 x double> poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %56 = call @llvm.lround.nxv1i64.nxv1f64( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %57 = call @llvm.lround.nxv2i64.nxv2f64( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %58 = call @llvm.lround.nxv4i64.nxv4f64( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %59 = call @llvm.lround.nxv8i64.nxv8f64( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %60 = call @llvm.lround.nxv16i64.nxv16f64( poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + call i32 @llvm.lround.i32.bf16(bfloat poison) + call <2 x i32> @llvm.lround.v2i32.v2bf16(<2 x bfloat> poison) + call <4 x i32> @llvm.lround.v4i32.v4bf16(<4 x bfloat> poison) + call <8 x i32> @llvm.lround.v8i32.v8bf16(<8 x bfloat> poison) + call <16 x i32> @llvm.lround.v16i32.v16bf16(<16 x bfloat> poison) + call @llvm.lround.nxv1i32.nxv1bf16( poison) + call @llvm.lround.nxv2i32.nxv2bf16( poison) + call @llvm.lround.nxv4i32.nxv4bf16( poison) + call @llvm.lround.nxv8i32.nxv8bf16( poison) + call @llvm.lround.nxv16i32.nxv16bf16( poison) + call i32 @llvm.lround.i32.f32(float poison) + call <2 x i32> @llvm.lround.v2i32.v2f32(<2 x float> poison) + call <4 x i32> @llvm.lround.v4i32.v4f32(<4 x float> poison) + call <8 x i32> @llvm.lround.v8i32.v8f32(<8 x float> poison) + call <16 x i32> @llvm.lround.v16i32.v16f32(<16 x float> poison) + call @llvm.lround.nxv1i32.nxv1f32( poison) + call @llvm.lround.nxv2i32.nxv2f32( poison) + call @llvm.lround.nxv4i32.nxv4f32( poison) + call @llvm.lround.nxv8i32.nxv8f32( poison) + call @llvm.lround.nxv16i32.nxv16f32( poison) + call i32 @llvm.lround.i32.f64(double poison) + call <2 x i32> @llvm.lround.v2i32.v2f64(<2 x double> poison) + call <4 x i32> @llvm.lround.v4i32.v4f64(<4 x double> poison) + call <8 x i32> @llvm.lround.v8i32.v8f64(<8 x double> poison) + call <16 x i32> @llvm.lround.v16i32.v16f64(<16 x double> poison) + call @llvm.lround.nxv1i32.nxv1f64( poison) + call @llvm.lround.nxv2i32.nxv2f64( poison) + call @llvm.lround.nxv4i32.nxv4f64( poison) + call @llvm.lround.nxv8i32.nxv8f64( poison) + call @llvm.lround.nxv16i32.nxv16f64( poison) + call i64 @llvm.lround.i64.bf16(bfloat poison) + call <2 x i64> @llvm.lround.v2i64.v2bf16(<2 x bfloat> poison) + call <4 x i64> @llvm.lround.v4i64.v4bf16(<4 x bfloat> poison) + call <8 x i64> @llvm.lround.v8i64.v8bf16(<8 x bfloat> poison) + call <16 x i64> @llvm.lround.v16i64.v16bf16(<16 x bfloat> poison) + call @llvm.lround.nxv1i64.nxv1bf16( poison) + call @llvm.lround.nxv2i64.nxv2bf16( poison) + call @llvm.lround.nxv4i64.nxv4bf16( poison) + call @llvm.lround.nxv8i64.nxv8bf16( poison) + call @llvm.lround.nxv16i64.nxv16bf16( poison) + call i64 @llvm.lround.i64.f32(float poison) + call <2 x i64> @llvm.lround.v2i64.v2f32(<2 x float> poison) + call <4 x i64> @llvm.lround.v4i64.v4f32(<4 x float> poison) + call <8 x i64> @llvm.lround.v8i64.v8f32(<8 x float> poison) + call <16 x i64> @llvm.lround.v16i64.v16f32(<16 x float> poison) + call @llvm.lround.nxv1i64.nxv1f32( poison) + call @llvm.lround.nxv2i64.nxv2f32( poison) + call @llvm.lround.nxv4i64.nxv4f32( poison) + call @llvm.lround.nxv8i64.nxv8f32( poison) + call @llvm.lround.nxv16i64.nxv16f32( poison) + call i64 @llvm.lround.i64.f64(double poison) + call <2 x i64> @llvm.lround.v2i64.v2f64(<2 x double> poison) + call <4 x i64> @llvm.lround.v4i64.v4f64(<4 x double> poison) + call <8 x i64> @llvm.lround.v8i64.v8f64(<8 x double> poison) + call <16 x i64> @llvm.lround.v16i64.v16f64(<16 x double> poison) + call @llvm.lround.nxv1i64.nxv1f64( poison) + call @llvm.lround.nxv2i64.nxv2f64( poison) + call @llvm.lround.nxv4i64.nxv4f64( poison) + call @llvm.lround.nxv8i64.nxv8f64( poison) + call @llvm.lround.nxv16i64.nxv16f64( poison) + ret void +} + +define void @llround() { +; CHECK-LABEL: 'llround' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call i64 @llvm.llround.i64.bf16(bfloat poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %2 = call <2 x i64> @llvm.llround.v2i64.v2bf16(<2 x bfloat> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %3 = call <4 x i64> @llvm.llround.v4i64.v4bf16(<4 x bfloat> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %4 = call <8 x i64> @llvm.llround.v8i64.v8bf16(<8 x bfloat> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %5 = call <16 x i64> @llvm.llround.v16i64.v16bf16(<16 x bfloat> poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %6 = call @llvm.llround.nxv1i64.nxv1bf16( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %7 = call @llvm.llround.nxv2i64.nxv2bf16( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %8 = call @llvm.llround.nxv4i64.nxv4bf16( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call @llvm.llround.nxv8i64.nxv8bf16( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %10 = call @llvm.llround.nxv16i64.nxv16bf16( poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = call i64 @llvm.llround.i64.f32(float poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %12 = call <2 x i64> @llvm.llround.v2i64.v2f32(<2 x float> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %13 = call <4 x i64> @llvm.llround.v4i64.v4f32(<4 x float> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %14 = call <8 x i64> @llvm.llround.v8i64.v8f32(<8 x float> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %15 = call <16 x i64> @llvm.llround.v16i64.v16f32(<16 x float> poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %16 = call @llvm.llround.nxv1i64.nxv1f32( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call @llvm.llround.nxv2i64.nxv2f32( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call @llvm.llround.nxv4i64.nxv4f32( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %19 = call @llvm.llround.nxv8i64.nxv8f32( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %20 = call @llvm.llround.nxv16i64.nxv16f32( poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %21 = call i64 @llvm.llround.i64.f64(double poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %22 = call <2 x i64> @llvm.llround.v2i64.v2f64(<2 x double> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %23 = call <4 x i64> @llvm.llround.v4i64.v4f64(<4 x double> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %24 = call <8 x i64> @llvm.llround.v8i64.v8f64(<8 x double> poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %25 = call <16 x i64> @llvm.llround.v16i64.v16f64(<16 x double> poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %26 = call @llvm.llround.nxv1i64.nxv1f64( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %27 = call @llvm.llround.nxv2i64.nxv2f64( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %28 = call @llvm.llround.nxv4i64.nxv4f64( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %29 = call @llvm.llround.nxv8i64.nxv8f64( poison) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %30 = call @llvm.llround.nxv16i64.nxv16f64( poison) +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + call i64 @llvm.llround.i64.bf16(bfloat poison) + call <2 x i64> @llvm.llround.v2i64.v2bf16(<2 x bfloat> poison) + call <4 x i64> @llvm.llround.v4i64.v4bf16(<4 x bfloat> poison) + call <8 x i64> @llvm.llround.v8i64.v8bf16(<8 x bfloat> poison) + call <16 x i64> @llvm.llround.v16i64.v16bf16(<16 x bfloat> poison) + call @llvm.llround.nxv1i64.nxv1bf16( poison) + call @llvm.llround.nxv2i64.nxv2bf16( poison) + call @llvm.llround.nxv4i64.nxv4bf16( poison) + call @llvm.llround.nxv8i64.nxv8bf16( poison) + call @llvm.llround.nxv16i64.nxv16bf16( poison) + call i64 @llvm.llround.i64.f32(float poison) + call <2 x i64> @llvm.llround.v2i64.v2f32(<2 x float> poison) + call <4 x i64> @llvm.llround.v4i64.v4f32(<4 x float> poison) + call <8 x i64> @llvm.llround.v8i64.v8f32(<8 x float> poison) + call <16 x i64> @llvm.llround.v16i64.v16f32(<16 x float> poison) + call @llvm.llround.nxv1i64.nxv1f32( poison) + call @llvm.llround.nxv2i64.nxv2f32( poison) + call @llvm.llround.nxv4i64.nxv4f32( poison) + call @llvm.llround.nxv8i64.nxv8f32( poison) + call @llvm.llround.nxv16i64.nxv16f32( poison) + call i64 @llvm.llround.i64.f64(double poison) + call <2 x i64> @llvm.llround.v2i64.v2f64(<2 x double> poison) + call <4 x i64> @llvm.llround.v4i64.v4f64(<4 x double> poison) + call <8 x i64> @llvm.llround.v8i64.v8f64(<8 x double> poison) + call <16 x i64> @llvm.llround.v16i64.v16f64(<16 x double> poison) + call @llvm.llround.nxv1i64.nxv1f64( poison) + call @llvm.llround.nxv2i64.nxv2f64( poison) + call @llvm.llround.nxv4i64.nxv4f64( poison) + call @llvm.llround.nxv8i64.nxv8f64( poison) + call @llvm.llround.nxv16i64.nxv16f64( poison) + ret void +} + define void @nearbyint() { ; CHECK-LABEL: 'nearbyint' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call bfloat @llvm.nearbyint.bf16(bfloat undef)