summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Luo <gluokai@gmail.com>2024-01-08 10:10:02 +0800
committerKai Luo <gluokai@gmail.com>2024-01-08 10:20:01 +0800
commit225e2704af3c53bc0c4ee6bf92f32ace54d10fbc (patch)
treee841d203c1e46860246ad194a0d6ae3a5ac430e5
parent78550bef98347bccbf0e8e5fb66dc59718fc35ec (diff)
[PowerPC] Precommit test for lowering llvm.trap on ppc64le. NFC.
-rw-r--r--llvm/test/CodeGen/PowerPC/intrinsic-trap.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/PowerPC/intrinsic-trap.ll b/llvm/test/CodeGen/PowerPC/intrinsic-trap.ll
new file mode 100644
index 000000000000..b02eb5d8fd27
--- /dev/null
+++ b/llvm/test/CodeGen/PowerPC/intrinsic-trap.ll
@@ -0,0 +1,10 @@
+; REQUIRES: asserts
+; RUN: not --crash llc -verify-machineinstrs -mtriple=powerpc64le-- < %s 2>&1 | FileCheck %s
+; CHECK: Bad machine code: Non-terminator instruction after the first terminator
+
+define i32 @test() {
+ call void @llvm.trap()
+ ret i32 0
+}
+
+declare void @llvm.trap()