[llvm] [MachineLICM][AArch64] Hoist COPY instructions with other uses in the loop (PR #71403)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 8 01:25:05 PST 2023
================
@@ -1249,6 +1249,15 @@ bool MachineLICMBase::IsProfitableToHoist(MachineInstr &MI,
return false;
}
+ // If we have a COPY with other uses in the loop, hoist to allow the users to
+ // also be hoisted.
+ if (MI.isCopy() && IsLoopInvariantInst(MI, CurLoop) &&
----------------
arsenm wrote:
Defer the IsLoopInvariantInst check until after the cheaper register checks
https://github.com/llvm/llvm-project/pull/71403
More information about the llvm-commits
mailing list