[llvm] 225e270 - [PowerPC] Precommit test for lowering llvm.trap on ppc64le. NFC.

Kai Luo via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 7 18:20:14 PST 2024


Author: Kai Luo
Date: 2024-01-08T10:20:01+08:00
New Revision: 225e2704af3c53bc0c4ee6bf92f32ace54d10fbc

URL: https://github.com/llvm/llvm-project/commit/225e2704af3c53bc0c4ee6bf92f32ace54d10fbc
DIFF: https://github.com/llvm/llvm-project/commit/225e2704af3c53bc0c4ee6bf92f32ace54d10fbc.diff

LOG: [PowerPC] Precommit test for lowering llvm.trap on ppc64le. NFC.

Added: 
    llvm/test/CodeGen/PowerPC/intrinsic-trap.ll

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/PowerPC/intrinsic-trap.ll b/llvm/test/CodeGen/PowerPC/intrinsic-trap.ll
new file mode 100644
index 00000000000000..b02eb5d8fd27a7
--- /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()


        


More information about the llvm-commits mailing list