diff options
| author | Ehsan Amiri <amehsan@ca.ibm.com> | 2016-04-07 15:30:55 +0000 |
|---|---|---|
| committer | Ehsan Amiri <amehsan@ca.ibm.com> | 2016-04-07 15:30:55 +0000 |
| commit | 4701a91e59270639341fde8f34eaf2773e1c74c6 (patch) | |
| tree | 3d4977337e05df359b556b6b3e144bb5ce9fd8a7 /llvm/test/CodeGen/PowerPC/2007-09-07-LoadStoreIdxForms.ll | |
| parent | 74031ba1e9470d9b108aa5256d326c5b0053b004 (diff) | |
| download | bcm5719-llvm-4701a91e59270639341fde8f34eaf2773e1c74c6.tar.gz bcm5719-llvm-4701a91e59270639341fde8f34eaf2773e1c74c6.zip | |
[PPC] Enable transformations in PPCPassConfig::addIRPasses at O2
http://reviews.llvm.org/D18562
A large number of testcases has been modified so they pass after this test.
One testcase is deleted, because I realized even after undoing the original
change that was committed with this testcase, the testcase still passes. So
I removed it. The change to one other testcase (test/CodeGen/PowerPC/pr25802.ll)
is an arbitrary change to keep it passing. Given the original intention of the
testcase, and the fact that fixing it will require some time to change the testcase,
we concluded that this quick change will be enough.
llvm-svn: 265683
Diffstat (limited to 'llvm/test/CodeGen/PowerPC/2007-09-07-LoadStoreIdxForms.ll')
| -rw-r--r-- | llvm/test/CodeGen/PowerPC/2007-09-07-LoadStoreIdxForms.ll | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/PowerPC/2007-09-07-LoadStoreIdxForms.ll b/llvm/test/CodeGen/PowerPC/2007-09-07-LoadStoreIdxForms.ll index aae914ecc43..3be596f9a53 100644 --- a/llvm/test/CodeGen/PowerPC/2007-09-07-LoadStoreIdxForms.ll +++ b/llvm/test/CodeGen/PowerPC/2007-09-07-LoadStoreIdxForms.ll @@ -1,4 +1,5 @@ -; RUN: llc < %s -march=ppc64 | FileCheck %s +; RUN: llc < %s -march=ppc64 -O1 | FileCheck %s +; RUN: llc < %s -march=ppc64 | FileCheck --check-prefix=CHECK-OPT %s %struct.__db_region = type { %struct.__mutex_t, [4 x i8], %struct.anon, i32, [1 x i32] } %struct.__mutex_t = type { i32 } @@ -15,6 +16,24 @@ entry: ; CHECK: @foo ; CHECK: lwzx ; CHECK: blr +; CHECK-OPT: @foo +; CHECK-OPT: lwz +; CHECK-OPT: blr } +define signext i32 @test(i32* noalias nocapture readonly %b, i32 signext %n) { +entry: + %idxprom = sext i32 %n to i64 + %arrayidx = getelementptr inbounds i32, i32* %b, i64 %idxprom + %0 = load i32, i32* %arrayidx, align 4 + %mul = mul nsw i32 %0, 7 + ret i32 %mul + +; CHECK-OPT: @test +; CHECK-OPT: lwzx +; CHECK-OPT: blr + +} + + declare i32 @bork(...) |

