diff options
| author | Reid Kleckner <reid@kleckner.net> | 2014-01-28 02:38:36 +0000 |
|---|---|---|
| committer | Reid Kleckner <reid@kleckner.net> | 2014-01-28 02:38:36 +0000 |
| commit | 26af2cae05f4a8f5a66f5ef0f5d107fef174a7f3 (patch) | |
| tree | a65d86dd391f8685236fb16cf2046d4603833099 /llvm/test/Transforms/InstCombine | |
| parent | 020acd88ecc4b99632b6af54e7e7f77ab70b4a30 (diff) | |
| download | bcm5719-llvm-26af2cae05f4a8f5a66f5ef0f5d107fef174a7f3.tar.gz bcm5719-llvm-26af2cae05f4a8f5a66f5ef0f5d107fef174a7f3.zip | |
Update optimization passes to handle inalloca arguments
Summary:
I searched Transforms/ and Analysis/ for 'ByVal' and updated those call
sites to check for inalloca if appropriate.
I added tests for any change that would allow an optimization to fire on
inalloca.
Reviewers: nlewycky
Differential Revision: http://llvm-reviews.chandlerc.com/D2449
llvm-svn: 200281
Diffstat (limited to 'llvm/test/Transforms/InstCombine')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/call-cast-target-inalloca.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/call-cast-target-inalloca.ll b/llvm/test/Transforms/InstCombine/call-cast-target-inalloca.ll new file mode 100644 index 00000000000..baf97e0ce9a --- /dev/null +++ b/llvm/test/Transforms/InstCombine/call-cast-target-inalloca.ll @@ -0,0 +1,22 @@ +; RUN: opt < %s -instcombine -S | FileCheck %s + +target datalayout = "e-p:32:32" +target triple = "i686-pc-linux-gnu" + +declare void @takes_i32(i32) +declare void @takes_i32_inalloca(i32* inalloca) + +define void @f() { +; CHECK-LABEL: define void @f() + %args = alloca i32 + call void bitcast (void (i32)* @takes_i32 to void (i32*)*)(i32* inalloca %args) +; CHECK: call void bitcast + ret void +} + +define void @g() { +; CHECK-LABEL: define void @g() + call void bitcast (void (i32*)* @takes_i32_inalloca to void (i32)*)(i32 0) +; CHECK: call void bitcast + ret void +} |

