summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/AMDGPU/fail.llvm.fptrunc.round.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU/fail.llvm.fptrunc.round.ll')
-rw-r--r--llvm/test/CodeGen/AMDGPU/fail.llvm.fptrunc.round.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/fail.llvm.fptrunc.round.ll b/llvm/test/CodeGen/AMDGPU/fail.llvm.fptrunc.round.ll
new file mode 100644
index 000000000000..7bfe11fcd30c
--- /dev/null
+++ b/llvm/test/CodeGen/AMDGPU/fail.llvm.fptrunc.round.ll
@@ -0,0 +1,11 @@
+; RUN: not --crash llc -march=amdgcn -mcpu=gfx1030 -verify-machineinstrs -o /dev/null %s 2>&1 | FileCheck %s --ignore-case --check-prefix=FAIL
+; RUN: not --crash llc -global-isel -march=amdgcn -mcpu=gfx1030 -verify-machineinstrs -o /dev/null %s 2>&1 | FileCheck %s --ignore-case --check-prefix=FAIL
+
+define amdgpu_gs void @test_fptrunc_round_legalization(double %a, i32 %data0, <4 x i32> %data1, half addrspace(1)* %out) {
+; FAIL: LLVM ERROR: Cannot select
+ %res = call half @llvm.fptrunc.round.f64(double %a, metadata !"round.upward")
+ store half %res, half addrspace(1)* %out, align 4
+ ret void
+}
+
+declare half @llvm.fptrunc.round.f64(double, metadata)