From 5b0d9465375c4e175f5805038c5ef1d7d11193bd Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 1 Jun 2012 05:16:33 +0000 Subject: 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157798 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/tailcall-64.ll | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'test/CodeGen/X86/tailcall-64.ll') diff --git a/test/CodeGen/X86/tailcall-64.ll b/test/CodeGen/X86/tailcall-64.ll index 569a67c253..a3ef2dc8ef 100644 --- a/test/CodeGen/X86/tailcall-64.ll +++ b/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 -- cgit v1.2.3