summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-10-09 06:21:52 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-10-09 06:21:52 +0000
commitccd4545ecbe9cc98c60b5b06d1c43ba72bd44f81 (patch)
treef467134ede0990a0e083941301deac6f741cacd1 /llvm/lib/CodeGen
parentc9bf49dfeab5a53d55b58e2bf4a0c48b29cb286e (diff)
downloadbcm5719-llvm-ccd4545ecbe9cc98c60b5b06d1c43ba72bd44f81.tar.gz
bcm5719-llvm-ccd4545ecbe9cc98c60b5b06d1c43ba72bd44f81.zip
Fix a logic error that caused non-rematable loop invariants loads to be licm'ed out of loop.
llvm-svn: 83622
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/MachineLICM.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineLICM.cpp b/llvm/lib/CodeGen/MachineLICM.cpp
index b5827aadcf5..e60139cb923 100644
--- a/llvm/lib/CodeGen/MachineLICM.cpp
+++ b/llvm/lib/CodeGen/MachineLICM.cpp
@@ -326,8 +326,7 @@ bool MachineLICM::IsProfitableToHoist(MachineInstr &MI) {
// FIXME: For now, only hoist re-materilizable instructions. LICM will
// increase register pressure. We want to make sure it doesn't increase
// spilling.
- if (!TID.mayLoad() && (!TID.isRematerializable() ||
- !TII->isTriviallyReMaterializable(&MI)))
+ if (!TID.isRematerializable() || !TII->isTriviallyReMaterializable(&MI))
return false;
// If result(s) of this instruction is used by PHIs, then don't hoist it.
OpenPOWER on IntegriCloud