blob: 092ea577f6ca73daadb79f4abcfe4e902d45e35d [file] [log] [blame]
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
; RUN: opt < %s -passes='print<cost-model>' 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 <vscale x 2 x float> @llvm.floor.nxv2f32(<vscale x 2 x float> undef)
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = call <vscale x 4 x float> @llvm.floor.nxv4f32(<vscale x 4 x float> undef)
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = call <vscale x 8 x float> @llvm.floor.nxv8f32(<vscale x 8 x float> undef)
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = call <vscale x 16 x float> @llvm.floor.nxv16f32(<vscale x 16 x float> 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 <vscale x 1 x double> @llvm.floor.nxv1f64(<vscale x 1 x double> undef)
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %16 = call <vscale x 2 x double> @llvm.floor.nxv2f64(<vscale x 2 x double> undef)
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %17 = call <vscale x 4 x double> @llvm.floor.nxv4f64(<vscale x 4 x double> undef)
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %18 = call <vscale x 8 x double> @llvm.floor.nxv8f64(<vscale x 8 x double> 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 <vscale x 2 x float> @llvm.floor.nvx2f32(<vscale x 2 x float> undef)
call <vscale x 4 x float> @llvm.floor.nvx4f32(<vscale x 4 x float> undef)
call <vscale x 8 x float> @llvm.floor.nvx8f32(<vscale x 8 x float> undef)
call <vscale x 16 x float> @llvm.floor.nvx16f32(<vscale x 16 x float> 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 <vscale x 1 x double> @llvm.floor.nvx1f64(<vscale x 1 x double> undef)
call <vscale x 2 x double> @llvm.floor.nvx2f64(<vscale x 2 x double> undef)
call <vscale x 4 x double> @llvm.floor.nvx5f64(<vscale x 4 x double> undef)
call <vscale x 8 x double> @llvm.floor.nvx8f64(<vscale x 8 x double> 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 <vscale x 2 x float> @llvm.ceil.nxv2f32(<vscale x 2 x float> undef)
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = call <vscale x 4 x float> @llvm.ceil.nxv4f32(<vscale x 4 x float> undef)
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = call <vscale x 8 x float> @llvm.ceil.nxv8f32(<vscale x 8 x float> undef)
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = call <vscale x 16 x float> @llvm.ceil.nxv16f32(<vscale x 16 x float> 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 <vscale x 1 x double> @llvm.ceil.nxv1f64(<vscale x 1 x double> undef)
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %16 = call <vscale x 2 x double> @llvm.ceil.nxv2f64(<vscale x 2 x double> undef)
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %17 = call <vscale x 4 x double> @llvm.ceil.nxv4f64(<vscale x 4 x double> undef)
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %18 = call <vscale x 8 x double> @llvm.ceil.nxv8f64(<vscale x 8 x double> 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 <vscale x 2 x float> @llvm.ceil.nvx2f32(<vscale x 2 x float> undef)
call <vscale x 4 x float> @llvm.ceil.nvx4f32(<vscale x 4 x float> undef)
call <vscale x 8 x float> @llvm.ceil.nvx8f32(<vscale x 8 x float> undef)
call <vscale x 16 x float> @llvm.ceil.nvx16f32(<vscale x 16 x float> 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 <vscale x 1 x double> @llvm.ceil.nvx1f64(<vscale x 1 x double> undef)
call <vscale x 2 x double> @llvm.ceil.nvx2f64(<vscale x 2 x double> undef)
call <vscale x 4 x double> @llvm.ceil.nvx5f64(<vscale x 4 x double> undef)
call <vscale x 8 x double> @llvm.ceil.nvx8f64(<vscale x 8 x double> 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 <vscale x 2 x float> @llvm.trunc.nxv2f32(<vscale x 2 x float> undef)
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = call <vscale x 4 x float> @llvm.trunc.nxv4f32(<vscale x 4 x float> undef)
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = call <vscale x 8 x float> @llvm.trunc.nxv8f32(<vscale x 8 x float> undef)
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = call <vscale x 16 x float> @llvm.trunc.nxv16f32(<vscale x 16 x float> 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 <vscale x 1 x double> @llvm.trunc.nxv1f64(<vscale x 1 x double> undef)
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %16 = call <vscale x 2 x double> @llvm.trunc.nxv2f64(<vscale x 2 x double> undef)
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %17 = call <vscale x 4 x double> @llvm.trunc.nxv4f64(<vscale x 4 x double> undef)
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %18 = call <vscale x 8 x double> @llvm.trunc.nxv8f64(<vscale x 8 x double> 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 <vscale x 2 x float> @llvm.trunc.nvx2f32(<vscale x 2 x float> undef)
call <vscale x 4 x float> @llvm.trunc.nvx4f32(<vscale x 4 x float> undef)
call <vscale x 8 x float> @llvm.trunc.nvx8f32(<vscale x 8 x float> undef)
call <vscale x 16 x float> @llvm.trunc.nvx16f32(<vscale x 16 x float> 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 <vscale x 1 x double> @llvm.trunc.nvx1f64(<vscale x 1 x double> undef)
call <vscale x 2 x double> @llvm.trunc.nvx2f64(<vscale x 2 x double> undef)
call <vscale x 4 x double> @llvm.trunc.nvx5f64(<vscale x 4 x double> undef)
call <vscale x 8 x double> @llvm.trunc.nvx8f64(<vscale x 8 x double> 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 <vscale x 2 x float> @llvm.rint.nxv2f32(<vscale x 2 x float> undef)
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %7 = call <vscale x 4 x float> @llvm.rint.nxv4f32(<vscale x 4 x float> undef)
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %8 = call <vscale x 8 x float> @llvm.rint.nxv8f32(<vscale x 8 x float> undef)
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call <vscale x 16 x float> @llvm.rint.nxv16f32(<vscale x 16 x float> 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 <vscale x 1 x double> @llvm.rint.nxv1f64(<vscale x 1 x double> undef)
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %16 = call <vscale x 2 x double> @llvm.rint.nxv2f64(<vscale x 2 x double> undef)
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call <vscale x 4 x double> @llvm.rint.nxv4f64(<vscale x 4 x double> undef)
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call <vscale x 8 x double> @llvm.rint.nxv8f64(<vscale x 8 x double> 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 <vscale x 2 x float> @llvm.rint.nvx2f32(<vscale x 2 x float> undef)
call <vscale x 4 x float> @llvm.rint.nvx4f32(<vscale x 4 x float> undef)
call <vscale x 8 x float> @llvm.rint.nvx8f32(<vscale x 8 x float> undef)
call <vscale x 16 x float> @llvm.rint.nvx16f32(<vscale x 16 x float> 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 <vscale x 1 x double> @llvm.rint.nvx1f64(<vscale x 1 x double> undef)
call <vscale x 2 x double> @llvm.rint.nvx2f64(<vscale x 2 x double> undef)
call <vscale x 4 x double> @llvm.rint.nvx5f64(<vscale x 4 x double> undef)
call <vscale x 8 x double> @llvm.rint.nvx8f64(<vscale x 8 x double> 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 <vscale x 2 x float> @llvm.nearbyint.nxv2f32(<vscale x 2 x float> undef)
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %7 = call <vscale x 4 x float> @llvm.nearbyint.nxv4f32(<vscale x 4 x float> undef)
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %8 = call <vscale x 8 x float> @llvm.nearbyint.nxv8f32(<vscale x 8 x float> undef)
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call <vscale x 16 x float> @llvm.nearbyint.nxv16f32(<vscale x 16 x float> 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 <vscale x 1 x double> @llvm.nearbyint.nxv1f64(<vscale x 1 x double> undef)
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %16 = call <vscale x 2 x double> @llvm.nearbyint.nxv2f64(<vscale x 2 x double> undef)
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call <vscale x 4 x double> @llvm.nearbyint.nxv4f64(<vscale x 4 x double> undef)
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call <vscale x 8 x double> @llvm.nearbyint.nxv8f64(<vscale x 8 x double> 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 <vscale x 2 x float> @llvm.nearbyint.nvx2f32(<vscale x 2 x float> undef)
call <vscale x 4 x float> @llvm.nearbyint.nvx4f32(<vscale x 4 x float> undef)
call <vscale x 8 x float> @llvm.nearbyint.nvx8f32(<vscale x 8 x float> undef)
call <vscale x 16 x float> @llvm.nearbyint.nvx16f32(<vscale x 16 x float> 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 <vscale x 1 x double> @llvm.nearbyint.nvx1f64(<vscale x 1 x double> undef)
call <vscale x 2 x double> @llvm.nearbyint.nvx2f64(<vscale x 2 x double> undef)
call <vscale x 4 x double> @llvm.nearbyint.nvx5f64(<vscale x 4 x double> undef)
call <vscale x 8 x double> @llvm.nearbyint.nvx8f64(<vscale x 8 x double> 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 <vscale x 2 x float> @llvm.round.nxv2f32(<vscale x 2 x float> undef)
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = call <vscale x 4 x float> @llvm.round.nxv4f32(<vscale x 4 x float> undef)
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = call <vscale x 8 x float> @llvm.round.nxv8f32(<vscale x 8 x float> undef)
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = call <vscale x 16 x float> @llvm.round.nxv16f32(<vscale x 16 x float> 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 <vscale x 1 x double> @llvm.round.nxv1f64(<vscale x 1 x double> undef)
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %16 = call <vscale x 2 x double> @llvm.round.nxv2f64(<vscale x 2 x double> undef)
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %17 = call <vscale x 4 x double> @llvm.round.nxv4f64(<vscale x 4 x double> undef)
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %18 = call <vscale x 8 x double> @llvm.round.nxv8f64(<vscale x 8 x double> 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 <vscale x 2 x float> @llvm.round.nvx2f32(<vscale x 2 x float> undef)
call <vscale x 4 x float> @llvm.round.nvx4f32(<vscale x 4 x float> undef)
call <vscale x 8 x float> @llvm.round.nvx8f32(<vscale x 8 x float> undef)
call <vscale x 16 x float> @llvm.round.nvx16f32(<vscale x 16 x float> 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 <vscale x 1 x double> @llvm.round.nvx1f64(<vscale x 1 x double> undef)
call <vscale x 2 x double> @llvm.round.nvx2f64(<vscale x 2 x double> undef)
call <vscale x 4 x double> @llvm.round.nvx5f64(<vscale x 4 x double> undef)
call <vscale x 8 x double> @llvm.round.nvx8f64(<vscale x 8 x double> 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 <vscale x 2 x float> @llvm.roundeven.nxv2f32(<vscale x 2 x float> undef)
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %7 = call <vscale x 4 x float> @llvm.roundeven.nxv4f32(<vscale x 4 x float> undef)
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %8 = call <vscale x 8 x float> @llvm.roundeven.nxv8f32(<vscale x 8 x float> undef)
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call <vscale x 16 x float> @llvm.roundeven.nxv16f32(<vscale x 16 x float> 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 <vscale x 1 x double> @llvm.roundeven.nxv1f64(<vscale x 1 x double> undef)
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %16 = call <vscale x 2 x double> @llvm.roundeven.nxv2f64(<vscale x 2 x double> undef)
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call <vscale x 4 x double> @llvm.roundeven.nxv4f64(<vscale x 4 x double> undef)
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call <vscale x 8 x double> @llvm.roundeven.nxv8f64(<vscale x 8 x double> 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 <vscale x 2 x float> @llvm.roundeven.nvx2f32(<vscale x 2 x float> undef)
call <vscale x 4 x float> @llvm.roundeven.nvx4f32(<vscale x 4 x float> undef)
call <vscale x 8 x float> @llvm.roundeven.nvx8f32(<vscale x 8 x float> undef)
call <vscale x 16 x float> @llvm.roundeven.nvx16f32(<vscale x 16 x float> 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 <vscale x 1 x double> @llvm.roundeven.nvx1f64(<vscale x 1 x double> undef)
call <vscale x 2 x double> @llvm.roundeven.nvx2f64(<vscale x 2 x double> undef)
call <vscale x 4 x double> @llvm.roundeven.nvx5f64(<vscale x 4 x double> undef)
call <vscale x 8 x double> @llvm.roundeven.nvx8f64(<vscale x 8 x double> 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 <vscale x 2 x float> @llvm.floor.nvx2f32(<vscale x 2 x float>)
declare <vscale x 4 x float> @llvm.floor.nvx4f32(<vscale x 4 x float>)
declare <vscale x 8 x float> @llvm.floor.nvx8f32(<vscale x 8 x float>)
declare <vscale x 16 x float> @llvm.floor.nvx16f32(<vscale x 16 x float>)
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 <vscale x 1 x double> @llvm.floor.nvx1f64(<vscale x 1 x double>)
declare <vscale x 2 x double> @llvm.floor.nvx2f64(<vscale x 2 x double>)
declare <vscale x 4 x double> @llvm.floor.nvx5f64(<vscale x 4 x double>)
declare <vscale x 8 x double> @llvm.floor.nvx8f64(<vscale x 8 x double>)
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 <vscale x 2 x float> @llvm.ceil.nvx2f32(<vscale x 2 x float>)
declare <vscale x 4 x float> @llvm.ceil.nvx4f32(<vscale x 4 x float>)
declare <vscale x 8 x float> @llvm.ceil.nvx8f32(<vscale x 8 x float>)
declare <vscale x 16 x float> @llvm.ceil.nvx16f32(<vscale x 16 x float>)
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 <vscale x 1 x double> @llvm.ceil.nvx1f64(<vscale x 1 x double>)
declare <vscale x 2 x double> @llvm.ceil.nvx2f64(<vscale x 2 x double>)
declare <vscale x 4 x double> @llvm.ceil.nvx5f64(<vscale x 4 x double>)
declare <vscale x 8 x double> @llvm.ceil.nvx8f64(<vscale x 8 x double>)
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 <vscale x 2 x float> @llvm.trunc.nvx2f32(<vscale x 2 x float>)
declare <vscale x 4 x float> @llvm.trunc.nvx4f32(<vscale x 4 x float>)
declare <vscale x 8 x float> @llvm.trunc.nvx8f32(<vscale x 8 x float>)
declare <vscale x 16 x float> @llvm.trunc.nvx16f32(<vscale x 16 x float>)
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 <vscale x 1 x double> @llvm.trunc.nvx1f64(<vscale x 1 x double>)
declare <vscale x 2 x double> @llvm.trunc.nvx2f64(<vscale x 2 x double>)
declare <vscale x 4 x double> @llvm.trunc.nvx5f64(<vscale x 4 x double>)
declare <vscale x 8 x double> @llvm.trunc.nvx8f64(<vscale x 8 x double>)
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 <vscale x 2 x float> @llvm.rint.nvx2f32(<vscale x 2 x float>)
declare <vscale x 4 x float> @llvm.rint.nvx4f32(<vscale x 4 x float>)
declare <vscale x 8 x float> @llvm.rint.nvx8f32(<vscale x 8 x float>)
declare <vscale x 16 x float> @llvm.rint.nvx16f32(<vscale x 16 x float>)
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 <vscale x 1 x double> @llvm.rint.nvx1f64(<vscale x 1 x double>)
declare <vscale x 2 x double> @llvm.rint.nvx2f64(<vscale x 2 x double>)
declare <vscale x 4 x double> @llvm.rint.nvx5f64(<vscale x 4 x double>)
declare <vscale x 8 x double> @llvm.rint.nvx8f64(<vscale x 8 x double>)
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 <vscale x 2 x float> @llvm.nearbyint.nvx2f32(<vscale x 2 x float>)
declare <vscale x 4 x float> @llvm.nearbyint.nvx4f32(<vscale x 4 x float>)
declare <vscale x 8 x float> @llvm.nearbyint.nvx8f32(<vscale x 8 x float>)
declare <vscale x 16 x float> @llvm.nearbyint.nvx16f32(<vscale x 16 x float>)
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 <vscale x 1 x double> @llvm.nearbyint.nvx1f64(<vscale x 1 x double>)
declare <vscale x 2 x double> @llvm.nearbyint.nvx2f64(<vscale x 2 x double>)
declare <vscale x 4 x double> @llvm.nearbyint.nvx5f64(<vscale x 4 x double>)
declare <vscale x 8 x double> @llvm.nearbyint.nvx8f64(<vscale x 8 x double>)
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 <vscale x 2 x float> @llvm.round.nvx2f32(<vscale x 2 x float>)
declare <vscale x 4 x float> @llvm.round.nvx4f32(<vscale x 4 x float>)
declare <vscale x 8 x float> @llvm.round.nvx8f32(<vscale x 8 x float>)
declare <vscale x 16 x float> @llvm.round.nvx16f32(<vscale x 16 x float>)
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 <vscale x 1 x double> @llvm.round.nvx1f64(<vscale x 1 x double>)
declare <vscale x 2 x double> @llvm.round.nvx2f64(<vscale x 2 x double>)
declare <vscale x 4 x double> @llvm.round.nvx5f64(<vscale x 4 x double>)
declare <vscale x 8 x double> @llvm.round.nvx8f64(<vscale x 8 x double>)
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 <vscale x 2 x float> @llvm.roundeven.nvx2f32(<vscale x 2 x float>)
declare <vscale x 4 x float> @llvm.roundeven.nvx4f32(<vscale x 4 x float>)
declare <vscale x 8 x float> @llvm.roundeven.nvx8f32(<vscale x 8 x float>)
declare <vscale x 16 x float> @llvm.roundeven.nvx16f32(<vscale x 16 x float>)
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 <vscale x 1 x double> @llvm.roundeven.nvx1f64(<vscale x 1 x double>)
declare <vscale x 2 x double> @llvm.roundeven.nvx2f64(<vscale x 2 x double>)
declare <vscale x 4 x double> @llvm.roundeven.nvx5f64(<vscale x 4 x double>)
declare <vscale x 8 x double> @llvm.roundeven.nvx8f64(<vscale x 8 x double>)