diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-05-11 21:33:49 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-05-11 21:33:49 +0000 |
commit | 226ddf5278dd9a9d2d74d859d387bf5b6bac1926 (patch) | |
tree | 328d6efbd9eb4995a989c5e4c89270c657cf24ff | |
parent | 927ede5a874e9a329f96ed85cb37ab07d2a55528 (diff) | |
download | external_llvm-226ddf5278dd9a9d2d74d859d387bf5b6bac1926.zip external_llvm-226ddf5278dd9a9d2d74d859d387bf5b6bac1926.tar.gz external_llvm-226ddf5278dd9a9d2d74d859d387bf5b6bac1926.tar.bz2 |
[fast-isel] Add support for selecting @llvm.trap().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156646 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/ARMFastISel.cpp | 4 | ||||
-rw-r--r-- | test/CodeGen/ARM/fast-isel.ll | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMFastISel.cpp b/lib/Target/ARM/ARMFastISel.cpp index 9dff017..97131cd 100644 --- a/lib/Target/ARM/ARMFastISel.cpp +++ b/lib/Target/ARM/ARMFastISel.cpp @@ -2443,6 +2443,10 @@ bool ARMFastISel::SelectIntrinsicCall(const IntrinsicInst &I) { return SelectCall(&I, "memset"); } + case Intrinsic::trap: { + BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, TII.get(ARM::TRAP)); + return true; + } } } diff --git a/test/CodeGen/ARM/fast-isel.ll b/test/CodeGen/ARM/fast-isel.ll index 417e2d9..ecd5fe2 100644 --- a/test/CodeGen/ARM/fast-isel.ll +++ b/test/CodeGen/ARM/fast-isel.ll @@ -226,3 +226,15 @@ define i32 @urem_fold(i32 %a) nounwind { %rem = urem i32 %a, 32 ret i32 %rem } + +define i32 @test7() noreturn nounwind { +entry: +; ARM: @test7 +; THUMB: @test7 +; ARM: trap +; THUMB: trap + tail call void @llvm.trap( ) + unreachable +} + +declare void @llvm.trap() nounwind |