Taints upcoming store and adds bogus conditional branches else where. Now as a separa...
[oota-llvm.git] / test / CodeGen / ARM / debugtrap.ll
1 ; This test ensures the @llvm.debugtrap() call is not removed when generating
2 ; the 'pop' instruction to restore the callee saved registers on ARM.
3
4 ; RUN: llc < %s -mtriple=armv7 -O0 -filetype=asm | FileCheck %s 
5
6 declare void @llvm.debugtrap() nounwind
7 declare void @foo() nounwind
8
9 define void @test() nounwind {
10 entry:
11   ; CHECK: bl foo
12   ; CHECK-NEXT: pop
13   ; CHECK-NEXT: trap
14   call void @foo()
15   call void @llvm.debugtrap()
16   ret void
17 }