diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-01-20 23:55:07 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-01-20 23:55:07 +0000 |
commit | d7e3cc840b81b0438e47f05d9664137a198876df (patch) | |
tree | e43d687614462ad01654f0ef2013aa9c2bc9938f /test/CodeGen/ARM/machine-licm.ll | |
parent | e906921480beacea2dea2d5ce8156bc246ee12a7 (diff) | |
download | external_llvm-d7e3cc840b81b0438e47f05d9664137a198876df.zip external_llvm-d7e3cc840b81b0438e47f05d9664137a198876df.tar.gz external_llvm-d7e3cc840b81b0438e47f05d9664137a198876df.tar.bz2 |
Don't be overly aggressive with CSE of "ldr constantpool". If it's a pc-relative
value, the "add pc" must be CSE'ed at the same time. We could follow the same
approach as T2 by adding pseudo instructions that combine the ldr + "add pc".
But the better approach is to use movw + movt (which I will enable soon), so
I'll leave this as a TODO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123949 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM/machine-licm.ll')
-rw-r--r-- | test/CodeGen/ARM/machine-licm.ll | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/CodeGen/ARM/machine-licm.ll b/test/CodeGen/ARM/machine-licm.ll index 5d2f1fd..a0494134 100644 --- a/test/CodeGen/ARM/machine-licm.ll +++ b/test/CodeGen/ARM/machine-licm.ll @@ -14,7 +14,11 @@ define void @t(i32* nocapture %vals, i32 %c) nounwind { entry: ; ARM: t: ; ARM: ldr [[REGISTER_1:r[0-9]+]], LCPI0_0 -; ARM-NOT: ldr r{{[0-9]+}}, LCPI0_1 +; Unfortunately currently ARM codegen doesn't cse the ldr from constantpool. +; The issue is it can be read by an "add pc" or a "ldr [pc]" so it's messy +; to add the pseudo instructions to make sure they are CSE'ed at the same +; time as the "ldr cp". +; ARM: ldr r{{[0-9]+}}, LCPI0_1 ; ARM: LPC0_0: ; ARM: ldr r{{[0-9]+}}, [pc, [[REGISTER_1]]] ; ARM: ldr r{{[0-9]+}}, [r{{[0-9]+}}] @@ -32,7 +36,7 @@ entry: bb.nph: ; preds = %entry ; ARM: LCPI0_0: -; ARM-NOT: LCPI0_1: +; ARM: LCPI0_1: ; ARM: .section ; THUMB: BB#1 |