diff options
| author | Dan Gohman <gohman@apple.com> | 2009-05-04 19:50:33 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2009-05-04 19:50:33 +0000 |
| commit | bb525f7e02fcf5b22ae6f4e80b215a764a1f576b (patch) | |
| tree | 9686f4fdd8698195c4612570af9021616a366898 /llvm/test/CodeGen | |
| parent | 60637985de74e89e4e47e1e71be3ffbf29592845 (diff) | |
| download | bcm5719-llvm-bb525f7e02fcf5b22ae6f4e80b215a764a1f576b.tar.gz bcm5719-llvm-bb525f7e02fcf5b22ae6f4e80b215a764a1f576b.zip | |
X86FastISel doesn't support the -tailcallopt ABI.
llvm-svn: 70902
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/X86/fast-isel-tailcall.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/fast-isel-tailcall.ll b/llvm/test/CodeGen/X86/fast-isel-tailcall.ll new file mode 100644 index 00000000000..6f4d2026814 --- /dev/null +++ b/llvm/test/CodeGen/X86/fast-isel-tailcall.ll @@ -0,0 +1,13 @@ +; RUN: llvm-as < %s | llc -fast-isel -tailcallopt -march=x86 | not grep add +; PR4154 + +; On x86, -tailcallopt changes the ABI so the caller shouldn't readjust +; the stack pointer after the call in this code. + +define i32 @stub(i8* %t0) nounwind { +entry: + %t1 = load i32* inttoptr (i32 139708680 to i32*) ; <i32> [#uses=1] + %t2 = bitcast i8* %t0 to i32 (i32)* ; <i32 (i32)*> [#uses=1] + %t3 = call fastcc i32 %t2(i32 %t1) ; <i32> [#uses=1] + ret i32 %t3 +} |

