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 | 7d04e4a7c0a803bc7ab04986ad184291338f42da (patch) | |
tree | f17a94c7b843d5d70a58a372982558c4dc3c776a /test | |
parent | 28f1412c97fc0740d6743c5226a4ddd65b72c891 (diff) | |
download | external_llvm-7d04e4a7c0a803bc7ab04986ad184291338f42da.zip external_llvm-7d04e4a7c0a803bc7ab04986ad184291338f42da.tar.gz external_llvm-7d04e4a7c0a803bc7ab04986ad184291338f42da.tar.bz2 |
X86FastISel doesn't support the -tailcallopt ABI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70902 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/X86/fast-isel-tailcall.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/X86/fast-isel-tailcall.ll b/test/CodeGen/X86/fast-isel-tailcall.ll new file mode 100644 index 0000000..6f4d202 --- /dev/null +++ b/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 +} |