[llvm] [MachineLICM] Allow hoisting loads from invariant address (PR #70796)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 6 06:13:05 PST 2023


================
@@ -1305,7 +1356,7 @@ MachineInstr *MachineLICMBase::ExtractHoistableLoad(MachineInstr *MI,
   MBB->insert(Pos, NewMIs[1]);
   // If unfolding produced a load that wasn't loop-invariant or profitable to
   // hoist, discard the new instructions and bail.
-  if (!IsLoopInvariantInst(*NewMIs[0], CurLoop) ||
+  if (!IsLoopInvariantInst(*NewMIs[0], CurLoop, /*SaveToMovLoad=*/false) ||
----------------
david-arm wrote:

I think that should be:

`/*SafeToMoveLoad=*/false`

https://github.com/llvm/llvm-project/pull/70796


More information about the llvm-commits mailing list