diff options
| author | Chris Lattner <sabre@nondot.org> | 2012-06-01 05:16:33 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2012-06-01 05:16:33 +0000 |
| commit | 182fe3eef1822a59c881a9c470fdb6c0c492fdaa (patch) | |
| tree | 8d50958c23d25b235b0dcb990d9f952eec4fe509 /llvm/test | |
| parent | 22afea7689d691a198c0101ae23384898b4e9a2e (diff) | |
| download | bcm5719-llvm-182fe3eef1822a59c881a9c470fdb6c0c492fdaa.tar.gz bcm5719-llvm-182fe3eef1822a59c881a9c470fdb6c0c492fdaa.zip | |
enhance getNoopInput to know about vector<->vector bitcasts of legal
types, as well as int<->ptr casts. This allows us to tailcall functions
with some trivial casts between the call and return (i.e. because the
return types disagree).
llvm-svn: 157798
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/CodeGen/X86/tailcall-64.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/tailcall-64.ll b/llvm/test/CodeGen/X86/tailcall-64.ll index 569a67c2530..a3ef2dc8ef4 100644 --- a/llvm/test/CodeGen/X86/tailcall-64.ll +++ b/llvm/test/CodeGen/X86/tailcall-64.ll @@ -19,3 +19,25 @@ define i64 @test_noop_bitcast() { } ; CHECK: test_noop_bitcast: ; CHECK: jmp _testi ## TAILCALL + + +; Tail call shouldn't be blocked by no-op inttoptr. +define i8* @test_inttoptr() { + %A = tail call i64 @testi() + %B = inttoptr i64 %A to i8* + ret i8* %B +} + +; CHECK: test_inttoptr: +; CHECK: jmp _testi ## TAILCALL + + +declare <4 x float> @testv() + +define <4 x i32> @test_vectorbitcast() { + %A = tail call <4 x float> @testv() + %B = bitcast <4 x float> %A to <4 x i32> + ret <4 x i32> %B +} +; CHECK: test_vectorbitcast: +; CHECK: jmp _testv ## TAILCALL |

