summaryrefslogtreecommitdiff
path: root/test/CodeGen
diff options
context:
space:
mode:
authorReed Kotler <rkotler@mips.com>2013-08-07 04:00:26 +0000
committerReed Kotler <rkotler@mips.com>2013-08-07 04:00:26 +0000
commit51c9043f3bc215bb3026486e5e1ef5989a8d8d8b (patch)
tree9e0343687f36f8fdd107c77400982e09858e01f7 /test/CodeGen
parent9286ee62920806fc695fc3be23b51b73cb707cb5 (diff)
downloadllvm-51c9043f3bc215bb3026486e5e1ef5989a8d8d8b.tar.gz
llvm-51c9043f3bc215bb3026486e5e1ef5989a8d8d8b.tar.bz2
llvm-51c9043f3bc215bb3026486e5e1ef5989a8d8d8b.tar.xz
Create a pattern for the "trap" instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187863 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/Mips/trap1.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/trap1.ll b/test/CodeGen/Mips/trap1.ll
new file mode 100644
index 0000000000..bfcd7fed30
--- /dev/null
+++ b/test/CodeGen/Mips/trap1.ll
@@ -0,0 +1,13 @@
+; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mcpu=mips16 -soft-float -mips16-hard-float -relocation-model=pic < %s | FileCheck %s -check-prefix=pic
+
+declare void @llvm.trap()
+
+; Function Attrs: nounwind optsize readnone
+define i32 @main() {
+entry:
+ call void @llvm.trap()
+ unreachable
+; pic: break 0
+ ret i32 0
+}
+