diff options
Diffstat (limited to 'test/CodeGen/X86/fast-isel-x86.ll')
-rw-r--r-- | test/CodeGen/X86/fast-isel-x86.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/X86/fast-isel-x86.ll b/test/CodeGen/X86/fast-isel-x86.ll index a212a7c6876e..61e9b98f6e7e 100644 --- a/test/CodeGen/X86/fast-isel-x86.ll +++ b/test/CodeGen/X86/fast-isel-x86.ll @@ -60,3 +60,21 @@ entry: ; CHECK: addl $28 } declare fastcc void @test4fastccsret(%struct.a* sret) + + +; Check that fast-isel cleans up when it fails to lower a call instruction. +define void @test5() { +entry: + %call = call i32 @test5dllimport(i32 42) + ret void +; CHECK-LABEL: test5: +; Local value area is still there: +; CHECK: movl $42, {{%[a-z]+}} +; Fast-ISel's arg push is not here: +; CHECK-NOT: movl $42, (%esp) +; SDag-ISel's arg push: +; CHECK: movl %esp, [[REGISTER:%[a-z]+]] +; CHECK: movl $42, ([[REGISTER]]) +; CHECK: movl __imp__test5dllimport +} +declare dllimport i32 @test5dllimport(i32) |