[fast-isel] Add support for selecting @llvm.trap().

llvm-svn: 156646
This commit is contained in:
Chad Rosier 2012-05-11 21:33:49 +00:00
parent 5edcf8822d
commit aa9cb9df59
2 changed files with 16 additions and 0 deletions

View File

@ -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;
}
}
}

View File

@ -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