From: Philip Reames Date: Wed, 3 Aug 2022 23:27:44 +0000 (-0700) Subject: [CostModel][RISCV] Add test coverage of floating point rounding intrinsics X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a243af52bb6660d2abdc8eacfa287de5c3d28dfa;p=platform%2Fupstream%2Fllvm.git [CostModel][RISCV] Add test coverage of floating point rounding intrinsics These costs are fairly bogus, but at least we have baseline coverage now. --- diff --git a/llvm/test/Analysis/CostModel/RISCV/fround.ll b/llvm/test/Analysis/CostModel/RISCV/fround.ll new file mode 100644 index 0000000..092ea577 --- /dev/null +++ b/llvm/test/Analysis/CostModel/RISCV/fround.ll @@ -0,0 +1,436 @@ +; 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 -riscv-v-vector-bits-min=-1 | FileCheck %s + +define void @floor() { +; CHECK-LABEL: 'floor' +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call float @llvm.floor.f32(float undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = call <2 x float> @llvm.floor.v2f32(<2 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = call <4 x float> @llvm.floor.v4f32(<4 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = call <8 x float> @llvm.floor.v8f32(<8 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = call <16 x float> @llvm.floor.v16f32(<16 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = call @llvm.floor.nxv2f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = call @llvm.floor.nxv4f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = call @llvm.floor.nxv8f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = call @llvm.floor.nxv16f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %10 = call double @llvm.floor.f64(double undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %11 = call <2 x double> @llvm.floor.v2f64(<2 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %12 = call <4 x double> @llvm.floor.v4f64(<4 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %13 = call <8 x double> @llvm.floor.v8f64(<8 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %14 = call <16 x double> @llvm.floor.v16f64(<16 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %15 = call @llvm.floor.nxv1f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %16 = call @llvm.floor.nxv2f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %17 = call @llvm.floor.nxv4f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %18 = call @llvm.floor.nxv8f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + call float @llvm.floor.f32(float undef) + call <2 x float> @llvm.floor.v2f32(<2 x float> undef) + call <4 x float> @llvm.floor.v4f32(<4 x float> undef) + call <8 x float> @llvm.floor.v8f32(<8 x float> undef) + call <16 x float> @llvm.floor.v16f32(<16 x float> undef) + call @llvm.floor.nvx2f32( undef) + call @llvm.floor.nvx4f32( undef) + call @llvm.floor.nvx8f32( undef) + call @llvm.floor.nvx16f32( undef) + call double @llvm.floor.f64(double undef) + call <2 x double> @llvm.floor.v2f64(<2 x double> undef) + call <4 x double> @llvm.floor.v4f64(<4 x double> undef) + call <8 x double> @llvm.floor.v8f64(<8 x double> undef) + call <16 x double> @llvm.floor.v16f64(<16 x double> undef) + call @llvm.floor.nvx1f64( undef) + call @llvm.floor.nvx2f64( undef) + call @llvm.floor.nvx5f64( undef) + call @llvm.floor.nvx8f64( undef) + ret void +} + +define void @ceil() { +; CHECK-LABEL: 'ceil' +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call float @llvm.ceil.f32(float undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = call <2 x float> @llvm.ceil.v2f32(<2 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = call <4 x float> @llvm.ceil.v4f32(<4 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = call <8 x float> @llvm.ceil.v8f32(<8 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = call <16 x float> @llvm.ceil.v16f32(<16 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = call @llvm.ceil.nxv2f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = call @llvm.ceil.nxv4f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = call @llvm.ceil.nxv8f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = call @llvm.ceil.nxv16f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %10 = call double @llvm.ceil.f64(double undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %11 = call <2 x double> @llvm.ceil.v2f64(<2 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %12 = call <4 x double> @llvm.ceil.v4f64(<4 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %13 = call <8 x double> @llvm.ceil.v8f64(<8 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %14 = call <16 x double> @llvm.ceil.v16f64(<16 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %15 = call @llvm.ceil.nxv1f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %16 = call @llvm.ceil.nxv2f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %17 = call @llvm.ceil.nxv4f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %18 = call @llvm.ceil.nxv8f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + call float @llvm.ceil.f32(float undef) + call <2 x float> @llvm.ceil.v2f32(<2 x float> undef) + call <4 x float> @llvm.ceil.v4f32(<4 x float> undef) + call <8 x float> @llvm.ceil.v8f32(<8 x float> undef) + call <16 x float> @llvm.ceil.v16f32(<16 x float> undef) + call @llvm.ceil.nvx2f32( undef) + call @llvm.ceil.nvx4f32( undef) + call @llvm.ceil.nvx8f32( undef) + call @llvm.ceil.nvx16f32( undef) + call double @llvm.ceil.f64(double undef) + call <2 x double> @llvm.ceil.v2f64(<2 x double> undef) + call <4 x double> @llvm.ceil.v4f64(<4 x double> undef) + call <8 x double> @llvm.ceil.v8f64(<8 x double> undef) + call <16 x double> @llvm.ceil.v16f64(<16 x double> undef) + call @llvm.ceil.nvx1f64( undef) + call @llvm.ceil.nvx2f64( undef) + call @llvm.ceil.nvx5f64( undef) + call @llvm.ceil.nvx8f64( undef) + ret void +} + +define void @trunc() { +; CHECK-LABEL: 'trunc' +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call float @llvm.trunc.f32(float undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = call <2 x float> @llvm.trunc.v2f32(<2 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = call <4 x float> @llvm.trunc.v4f32(<4 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = call <8 x float> @llvm.trunc.v8f32(<8 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = call <16 x float> @llvm.trunc.v16f32(<16 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = call @llvm.trunc.nxv2f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = call @llvm.trunc.nxv4f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = call @llvm.trunc.nxv8f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = call @llvm.trunc.nxv16f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %10 = call double @llvm.trunc.f64(double undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %11 = call <2 x double> @llvm.trunc.v2f64(<2 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %12 = call <4 x double> @llvm.trunc.v4f64(<4 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %13 = call <8 x double> @llvm.trunc.v8f64(<8 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %14 = call <16 x double> @llvm.trunc.v16f64(<16 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %15 = call @llvm.trunc.nxv1f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %16 = call @llvm.trunc.nxv2f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %17 = call @llvm.trunc.nxv4f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %18 = call @llvm.trunc.nxv8f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + call float @llvm.trunc.f32(float undef) + call <2 x float> @llvm.trunc.v2f32(<2 x float> undef) + call <4 x float> @llvm.trunc.v4f32(<4 x float> undef) + call <8 x float> @llvm.trunc.v8f32(<8 x float> undef) + call <16 x float> @llvm.trunc.v16f32(<16 x float> undef) + call @llvm.trunc.nvx2f32( undef) + call @llvm.trunc.nvx4f32( undef) + call @llvm.trunc.nvx8f32( undef) + call @llvm.trunc.nvx16f32( undef) + call double @llvm.trunc.f64(double undef) + call <2 x double> @llvm.trunc.v2f64(<2 x double> undef) + call <4 x double> @llvm.trunc.v4f64(<4 x double> undef) + call <8 x double> @llvm.trunc.v8f64(<8 x double> undef) + call <16 x double> @llvm.trunc.v16f64(<16 x double> undef) + call @llvm.trunc.nvx1f64( undef) + call @llvm.trunc.nvx2f64( undef) + call @llvm.trunc.nvx5f64( undef) + call @llvm.trunc.nvx8f64( undef) + ret void +} + +define void @rint() { +; CHECK-LABEL: 'rint' +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call float @llvm.rint.f32(float undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %2 = call <2 x float> @llvm.rint.v2f32(<2 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %3 = call <4 x float> @llvm.rint.v4f32(<4 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %4 = call <8 x float> @llvm.rint.v8f32(<8 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %5 = call <16 x float> @llvm.rint.v16f32(<16 x float> undef) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %6 = call @llvm.rint.nxv2f32( undef) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %7 = call @llvm.rint.nxv4f32( undef) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %8 = call @llvm.rint.nxv8f32( undef) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call @llvm.rint.nxv16f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %10 = call double @llvm.rint.f64(double undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %11 = call <2 x double> @llvm.rint.v2f64(<2 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %12 = call <4 x double> @llvm.rint.v4f64(<4 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %13 = call <8 x double> @llvm.rint.v8f64(<8 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %14 = call <16 x double> @llvm.rint.v16f64(<16 x double> undef) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %15 = call @llvm.rint.nxv1f64( undef) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %16 = call @llvm.rint.nxv2f64( undef) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call @llvm.rint.nxv4f64( undef) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call @llvm.rint.nxv8f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + call float @llvm.rint.f32(float undef) + call <2 x float> @llvm.rint.v2f32(<2 x float> undef) + call <4 x float> @llvm.rint.v4f32(<4 x float> undef) + call <8 x float> @llvm.rint.v8f32(<8 x float> undef) + call <16 x float> @llvm.rint.v16f32(<16 x float> undef) + call @llvm.rint.nvx2f32( undef) + call @llvm.rint.nvx4f32( undef) + call @llvm.rint.nvx8f32( undef) + call @llvm.rint.nvx16f32( undef) + call double @llvm.rint.f64(double undef) + call <2 x double> @llvm.rint.v2f64(<2 x double> undef) + call <4 x double> @llvm.rint.v4f64(<4 x double> undef) + call <8 x double> @llvm.rint.v8f64(<8 x double> undef) + call <16 x double> @llvm.rint.v16f64(<16 x double> undef) + call @llvm.rint.nvx1f64( undef) + call @llvm.rint.nvx2f64( undef) + call @llvm.rint.nvx5f64( undef) + call @llvm.rint.nvx8f64( undef) + ret void +} + +define void @nearbyint() { +; CHECK-LABEL: 'nearbyint' +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call float @llvm.nearbyint.f32(float undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %2 = call <2 x float> @llvm.nearbyint.v2f32(<2 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %3 = call <4 x float> @llvm.nearbyint.v4f32(<4 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %4 = call <8 x float> @llvm.nearbyint.v8f32(<8 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %5 = call <16 x float> @llvm.nearbyint.v16f32(<16 x float> undef) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %6 = call @llvm.nearbyint.nxv2f32( undef) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %7 = call @llvm.nearbyint.nxv4f32( undef) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %8 = call @llvm.nearbyint.nxv8f32( undef) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call @llvm.nearbyint.nxv16f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %10 = call double @llvm.nearbyint.f64(double undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %11 = call <2 x double> @llvm.nearbyint.v2f64(<2 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %12 = call <4 x double> @llvm.nearbyint.v4f64(<4 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %13 = call <8 x double> @llvm.nearbyint.v8f64(<8 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %14 = call <16 x double> @llvm.nearbyint.v16f64(<16 x double> undef) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %15 = call @llvm.nearbyint.nxv1f64( undef) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %16 = call @llvm.nearbyint.nxv2f64( undef) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call @llvm.nearbyint.nxv4f64( undef) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call @llvm.nearbyint.nxv8f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + call float @llvm.nearbyint.f32(float undef) + call <2 x float> @llvm.nearbyint.v2f32(<2 x float> undef) + call <4 x float> @llvm.nearbyint.v4f32(<4 x float> undef) + call <8 x float> @llvm.nearbyint.v8f32(<8 x float> undef) + call <16 x float> @llvm.nearbyint.v16f32(<16 x float> undef) + call @llvm.nearbyint.nvx2f32( undef) + call @llvm.nearbyint.nvx4f32( undef) + call @llvm.nearbyint.nvx8f32( undef) + call @llvm.nearbyint.nvx16f32( undef) + call double @llvm.nearbyint.f64(double undef) + call <2 x double> @llvm.nearbyint.v2f64(<2 x double> undef) + call <4 x double> @llvm.nearbyint.v4f64(<4 x double> undef) + call <8 x double> @llvm.nearbyint.v8f64(<8 x double> undef) + call <16 x double> @llvm.nearbyint.v16f64(<16 x double> undef) + call @llvm.nearbyint.nvx1f64( undef) + call @llvm.nearbyint.nvx2f64( undef) + call @llvm.nearbyint.nvx5f64( undef) + call @llvm.nearbyint.nvx8f64( undef) + ret void +} + +define void @round() { +; CHECK-LABEL: 'round' +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call float @llvm.round.f32(float undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = call <2 x float> @llvm.round.v2f32(<2 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = call <4 x float> @llvm.round.v4f32(<4 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = call <8 x float> @llvm.round.v8f32(<8 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = call <16 x float> @llvm.round.v16f32(<16 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = call @llvm.round.nxv2f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = call @llvm.round.nxv4f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = call @llvm.round.nxv8f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = call @llvm.round.nxv16f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %10 = call double @llvm.round.f64(double undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %11 = call <2 x double> @llvm.round.v2f64(<2 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %12 = call <4 x double> @llvm.round.v4f64(<4 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %13 = call <8 x double> @llvm.round.v8f64(<8 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %14 = call <16 x double> @llvm.round.v16f64(<16 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %15 = call @llvm.round.nxv1f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %16 = call @llvm.round.nxv2f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %17 = call @llvm.round.nxv4f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %18 = call @llvm.round.nxv8f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + call float @llvm.round.f32(float undef) + call <2 x float> @llvm.round.v2f32(<2 x float> undef) + call <4 x float> @llvm.round.v4f32(<4 x float> undef) + call <8 x float> @llvm.round.v8f32(<8 x float> undef) + call <16 x float> @llvm.round.v16f32(<16 x float> undef) + call @llvm.round.nvx2f32( undef) + call @llvm.round.nvx4f32( undef) + call @llvm.round.nvx8f32( undef) + call @llvm.round.nvx16f32( undef) + call double @llvm.round.f64(double undef) + call <2 x double> @llvm.round.v2f64(<2 x double> undef) + call <4 x double> @llvm.round.v4f64(<4 x double> undef) + call <8 x double> @llvm.round.v8f64(<8 x double> undef) + call <16 x double> @llvm.round.v16f64(<16 x double> undef) + call @llvm.round.nvx1f64( undef) + call @llvm.round.nvx2f64( undef) + call @llvm.round.nvx5f64( undef) + call @llvm.round.nvx8f64( undef) + ret void +} + +define void @roundeven() { +; CHECK-LABEL: 'roundeven' +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call float @llvm.roundeven.f32(float undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %2 = call <2 x float> @llvm.roundeven.v2f32(<2 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %3 = call <4 x float> @llvm.roundeven.v4f32(<4 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %4 = call <8 x float> @llvm.roundeven.v8f32(<8 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %5 = call <16 x float> @llvm.roundeven.v16f32(<16 x float> undef) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %6 = call @llvm.roundeven.nxv2f32( undef) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %7 = call @llvm.roundeven.nxv4f32( undef) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %8 = call @llvm.roundeven.nxv8f32( undef) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call @llvm.roundeven.nxv16f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %10 = call double @llvm.roundeven.f64(double undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %11 = call <2 x double> @llvm.roundeven.v2f64(<2 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %12 = call <4 x double> @llvm.roundeven.v4f64(<4 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %13 = call <8 x double> @llvm.roundeven.v8f64(<8 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 176 for instruction: %14 = call <16 x double> @llvm.roundeven.v16f64(<16 x double> undef) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %15 = call @llvm.roundeven.nxv1f64( undef) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %16 = call @llvm.roundeven.nxv2f64( undef) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call @llvm.roundeven.nxv4f64( undef) +; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call @llvm.roundeven.nxv8f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + call float @llvm.roundeven.f32(float undef) + call <2 x float> @llvm.roundeven.v2f32(<2 x float> undef) + call <4 x float> @llvm.roundeven.v4f32(<4 x float> undef) + call <8 x float> @llvm.roundeven.v8f32(<8 x float> undef) + call <16 x float> @llvm.roundeven.v16f32(<16 x float> undef) + call @llvm.roundeven.nvx2f32( undef) + call @llvm.roundeven.nvx4f32( undef) + call @llvm.roundeven.nvx8f32( undef) + call @llvm.roundeven.nvx16f32( undef) + call double @llvm.roundeven.f64(double undef) + call <2 x double> @llvm.roundeven.v2f64(<2 x double> undef) + call <4 x double> @llvm.roundeven.v4f64(<4 x double> undef) + call <8 x double> @llvm.roundeven.v8f64(<8 x double> undef) + call <16 x double> @llvm.roundeven.v16f64(<16 x double> undef) + call @llvm.roundeven.nvx1f64( undef) + call @llvm.roundeven.nvx2f64( undef) + call @llvm.roundeven.nvx5f64( undef) + call @llvm.roundeven.nvx8f64( undef) + ret void +} + +declare float @llvm.floor.f32(float) +declare <2 x float> @llvm.floor.v2f32(<2 x float>) +declare <4 x float> @llvm.floor.v4f32(<4 x float>) +declare <8 x float> @llvm.floor.v8f32(<8 x float>) +declare <16 x float> @llvm.floor.v16f32(<16 x float>) +declare @llvm.floor.nvx2f32() +declare @llvm.floor.nvx4f32() +declare @llvm.floor.nvx8f32() +declare @llvm.floor.nvx16f32() +declare double @llvm.floor.f64(double) +declare <2 x double> @llvm.floor.v2f64(<2 x double>) +declare <4 x double> @llvm.floor.v4f64(<4 x double>) +declare <8 x double> @llvm.floor.v8f64(<8 x double>) +declare <16 x double> @llvm.floor.v16f64(<16 x double>) +declare @llvm.floor.nvx1f64() +declare @llvm.floor.nvx2f64() +declare @llvm.floor.nvx5f64() +declare @llvm.floor.nvx8f64() + +declare float @llvm.ceil.f32(float) +declare <2 x float> @llvm.ceil.v2f32(<2 x float>) +declare <4 x float> @llvm.ceil.v4f32(<4 x float>) +declare <8 x float> @llvm.ceil.v8f32(<8 x float>) +declare <16 x float> @llvm.ceil.v16f32(<16 x float>) +declare @llvm.ceil.nvx2f32() +declare @llvm.ceil.nvx4f32() +declare @llvm.ceil.nvx8f32() +declare @llvm.ceil.nvx16f32() +declare double @llvm.ceil.f64(double) +declare <2 x double> @llvm.ceil.v2f64(<2 x double>) +declare <4 x double> @llvm.ceil.v4f64(<4 x double>) +declare <8 x double> @llvm.ceil.v8f64(<8 x double>) +declare <16 x double> @llvm.ceil.v16f64(<16 x double>) +declare @llvm.ceil.nvx1f64() +declare @llvm.ceil.nvx2f64() +declare @llvm.ceil.nvx5f64() +declare @llvm.ceil.nvx8f64() + +declare float @llvm.trunc.f32(float) +declare <2 x float> @llvm.trunc.v2f32(<2 x float>) +declare <4 x float> @llvm.trunc.v4f32(<4 x float>) +declare <8 x float> @llvm.trunc.v8f32(<8 x float>) +declare <16 x float> @llvm.trunc.v16f32(<16 x float>) +declare @llvm.trunc.nvx2f32() +declare @llvm.trunc.nvx4f32() +declare @llvm.trunc.nvx8f32() +declare @llvm.trunc.nvx16f32() +declare double @llvm.trunc.f64(double) +declare <2 x double> @llvm.trunc.v2f64(<2 x double>) +declare <4 x double> @llvm.trunc.v4f64(<4 x double>) +declare <8 x double> @llvm.trunc.v8f64(<8 x double>) +declare <16 x double> @llvm.trunc.v16f64(<16 x double>) +declare @llvm.trunc.nvx1f64() +declare @llvm.trunc.nvx2f64() +declare @llvm.trunc.nvx5f64() +declare @llvm.trunc.nvx8f64() + +declare float @llvm.rint.f32(float) +declare <2 x float> @llvm.rint.v2f32(<2 x float>) +declare <4 x float> @llvm.rint.v4f32(<4 x float>) +declare <8 x float> @llvm.rint.v8f32(<8 x float>) +declare <16 x float> @llvm.rint.v16f32(<16 x float>) +declare @llvm.rint.nvx2f32() +declare @llvm.rint.nvx4f32() +declare @llvm.rint.nvx8f32() +declare @llvm.rint.nvx16f32() +declare double @llvm.rint.f64(double) +declare <2 x double> @llvm.rint.v2f64(<2 x double>) +declare <4 x double> @llvm.rint.v4f64(<4 x double>) +declare <8 x double> @llvm.rint.v8f64(<8 x double>) +declare <16 x double> @llvm.rint.v16f64(<16 x double>) +declare @llvm.rint.nvx1f64() +declare @llvm.rint.nvx2f64() +declare @llvm.rint.nvx5f64() +declare @llvm.rint.nvx8f64() + +declare float @llvm.nearbyint.f32(float) +declare <2 x float> @llvm.nearbyint.v2f32(<2 x float>) +declare <4 x float> @llvm.nearbyint.v4f32(<4 x float>) +declare <8 x float> @llvm.nearbyint.v8f32(<8 x float>) +declare <16 x float> @llvm.nearbyint.v16f32(<16 x float>) +declare @llvm.nearbyint.nvx2f32() +declare @llvm.nearbyint.nvx4f32() +declare @llvm.nearbyint.nvx8f32() +declare @llvm.nearbyint.nvx16f32() +declare double @llvm.nearbyint.f64(double) +declare <2 x double> @llvm.nearbyint.v2f64(<2 x double>) +declare <4 x double> @llvm.nearbyint.v4f64(<4 x double>) +declare <8 x double> @llvm.nearbyint.v8f64(<8 x double>) +declare <16 x double> @llvm.nearbyint.v16f64(<16 x double>) +declare @llvm.nearbyint.nvx1f64() +declare @llvm.nearbyint.nvx2f64() +declare @llvm.nearbyint.nvx5f64() +declare @llvm.nearbyint.nvx8f64() + +declare float @llvm.round.f32(float) +declare <2 x float> @llvm.round.v2f32(<2 x float>) +declare <4 x float> @llvm.round.v4f32(<4 x float>) +declare <8 x float> @llvm.round.v8f32(<8 x float>) +declare <16 x float> @llvm.round.v16f32(<16 x float>) +declare @llvm.round.nvx2f32() +declare @llvm.round.nvx4f32() +declare @llvm.round.nvx8f32() +declare @llvm.round.nvx16f32() +declare double @llvm.round.f64(double) +declare <2 x double> @llvm.round.v2f64(<2 x double>) +declare <4 x double> @llvm.round.v4f64(<4 x double>) +declare <8 x double> @llvm.round.v8f64(<8 x double>) +declare <16 x double> @llvm.round.v16f64(<16 x double>) +declare @llvm.round.nvx1f64() +declare @llvm.round.nvx2f64() +declare @llvm.round.nvx5f64() +declare @llvm.round.nvx8f64() + +declare float @llvm.roundeven.f32(float) +declare <2 x float> @llvm.roundeven.v2f32(<2 x float>) +declare <4 x float> @llvm.roundeven.v4f32(<4 x float>) +declare <8 x float> @llvm.roundeven.v8f32(<8 x float>) +declare <16 x float> @llvm.roundeven.v16f32(<16 x float>) +declare @llvm.roundeven.nvx2f32() +declare @llvm.roundeven.nvx4f32() +declare @llvm.roundeven.nvx8f32() +declare @llvm.roundeven.nvx16f32() +declare double @llvm.roundeven.f64(double) +declare <2 x double> @llvm.roundeven.v2f64(<2 x double>) +declare <4 x double> @llvm.roundeven.v4f64(<4 x double>) +declare <8 x double> @llvm.roundeven.v8f64(<8 x double>) +declare <16 x double> @llvm.roundeven.v16f64(<16 x double>) +declare @llvm.roundeven.nvx1f64() +declare @llvm.roundeven.nvx2f64() +declare @llvm.roundeven.nvx5f64() +declare @llvm.roundeven.nvx8f64()