diff options
author | Akira Hatanaka <ahatanak@gmail.com> | 2011-06-24 17:55:19 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanak@gmail.com> | 2011-06-24 17:55:19 +0000 |
commit | 8b2b713f686a6d4908b73c76759447aa87b62c4a (patch) | |
tree | dd636c3d6a359cfc55bf12896b8e4ea2a7db5de2 /test/CodeGen/Mips/internalfunc.ll | |
parent | 35f4fb34ff60b8f23b2c9691b312bc67cac95eb4 (diff) | |
download | external_llvm-8b2b713f686a6d4908b73c76759447aa87b62c4a.zip external_llvm-8b2b713f686a6d4908b73c76759447aa87b62c4a.tar.gz external_llvm-8b2b713f686a6d4908b73c76759447aa87b62c4a.tar.bz2 |
Prevent generation of redundant addiu instructions that compute address of
static variables or functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133803 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Mips/internalfunc.ll')
-rw-r--r-- | test/CodeGen/Mips/internalfunc.ll | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/CodeGen/Mips/internalfunc.ll b/test/CodeGen/Mips/internalfunc.ll index 50d0993..c2a4e5c 100644 --- a/test/CodeGen/Mips/internalfunc.ll +++ b/test/CodeGen/Mips/internalfunc.ll @@ -15,7 +15,7 @@ entry: define void @caller(i32 %a0, i32 %a1) nounwind { entry: ; CHECK: lw $[[R1:[0-9]+]], %got(caller.sf1)($gp) -; CHECK: addiu ${{[0-9]+}}, $[[R1]], %lo(caller.sf1) +; CHECK: lw $25, %lo(caller.sf1)($[[R1]]) %tobool = icmp eq i32 %a1, 0 br i1 %tobool, label %if.end, label %if.then @@ -26,9 +26,9 @@ if.then: ; preds = %entry if.end: ; preds = %entry, %if.then ; CHECK: lw $[[R2:[0-9]+]], %got(sf2)($gp) -; CHECK: lw $[[R3:[0-9]+]], %got(caller.sf1)($gp) ; CHECK: addiu ${{[0-9]+}}, $[[R2]], %lo(sf2) -; CHECK: addiu ${{[0-9]+}}, $[[R3]], %lo(caller.sf1) +; CHECK: lw $[[R3:[0-9]+]], %got(caller.sf1)($gp) +; CHECK: sw ${{[0-9]+}}, %lo(caller.sf1)($[[R3]]) %tobool3 = icmp ne i32 %a0, 0 %tmp4 = load void (...)** @gf1, align 4 %cond = select i1 %tobool3, void (...)* %tmp4, void (...)* bitcast (void ()* @sf2 to void (...)*) |