mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 17:29:19 +00:00
[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
This commit is contained in:
parent
927ede5a87
commit
226ddf5278
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user