mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
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
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user