Reid Kleckner | 7662d50 | 2017-08-05 00:10:43 +0000 | [diff] [blame^] | 1 | ; RUN: llc -fast-isel -O0 -code-model=large -mcpu=generic -mtriple=x86_64-apple-darwin10 -relocation-model=pic < %s | FileCheck %s |
| 2 | |
| 3 | ; Check that fast-isel cleans up when it fails to lower a call instruction. |
| 4 | define void @fastiselcall() { |
| 5 | entry: |
| 6 | %call = call i32 @targetfn(i32 42) |
| 7 | ret void |
| 8 | ; CHECK-LABEL: test5: |
| 9 | ; Local value area is still there: |
| 10 | ; CHECK: movl $42, {{%[a-z]+}} |
| 11 | ; Fast-ISel's arg mov is not here: |
| 12 | ; CHECK-NOT: movl $42, (%esp) |
| 13 | ; SDag-ISel's arg mov: |
| 14 | ; CHECK: movabsq $_targetfn, %[[REG:[^ ]*]] |
| 15 | ; CHECK: movl $42, %edi |
| 16 | ; CHECK: callq *%[[REG]] |
| 17 | |
| 18 | } |
| 19 | declare i32 @targetfn(i32) |