blob: b5c891ce6209e26195a51ae83257d4be2d05fd92 [file] [log] [blame]
Reid Kleckner7662d502017-08-05 00:10:43 +00001; 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.
4define void @fastiselcall() {
5entry:
6 %call = call i32 @targetfn(i32 42)
7 ret void
Reid Kleckner61776e62017-08-05 00:15:40 +00008; CHECK-LABEL: fastiselcall:
Reid Kleckner3a7a2e42018-03-14 21:54:21 +00009; FastISel's local value code was dead, so it's gone.
10; CHECK-NOT: movl $42,
Reid Kleckner7662d502017-08-05 00:10:43 +000011; SDag-ISel's arg mov:
12; CHECK: movabsq $_targetfn, %[[REG:[^ ]*]]
13; CHECK: movl $42, %edi
14; CHECK: callq *%[[REG]]
15
16}
17declare i32 @targetfn(i32)