aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineLICM.cpp
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
commit3dc326ba83c8fc9a47f1cb9968ff15ba73913ce8 (patch)
tree0b3292567b32ebe775b5107d89bb71c4007938e7 /lib/CodeGen/MachineLICM.cpp
parent6ee62f8126be50d4936c6b6278bb0efb3b581cd2 (diff)
Fix a logic error that caused non-rematable loop invariants loads to be licm'ed out of loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83622 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineLICM.cpp')
-rw-r--r--lib/CodeGen/MachineLICM.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CodeGen/MachineLICM.cpp b/lib/CodeGen/MachineLICM.cpp
index b5827aadcf..e60139cb92 100644
--- a/lib/CodeGen/MachineLICM.cpp
+++ b/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.