Dimitry Andric | 227b928 | 2016-01-03 17:22:03 +0000 | [diff] [blame] | 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 |
Alexandros Lamprineas | 8c26e7c | 2016-01-29 10:23:32 +0000 | [diff] [blame] | 13 | ; CHECK-NEXT: .inst 0xe7ffdefe |
Dimitry Andric | 227b928 | 2016-01-03 17:22:03 +0000 | [diff] [blame] | 14 | call void @foo() |
| 15 | call void @llvm.debugtrap() |
| 16 | ret void |
| 17 | } |