[MachineLICM] Fix wrong and confusing comment. NFC.

This commit is contained in:
Sjoerd Meijer 2021-01-29 13:32:56 +00:00
parent 229c1cff51
commit f03f3a8474
1 changed files with 5 additions and 5 deletions

View File

@ -964,11 +964,11 @@ bool MachineLICMBase::IsLICMCandidate(MachineInstr &I) {
return false;
}
// If it is load then check if it is guaranteed to execute by making sure that
// it dominates all exiting blocks. If it doesn't, then there is a path out of
// the loop which does not execute this load, so we can't hoist it. Loads
// from constant memory are not safe to speculate all the time, for example
// indexed load from a jump table.
// If it is a load then check if it is guaranteed to execute by making sure
// that it dominates all exiting blocks. If it doesn't, then there is a path
// out of the loop which does not execute this load, so we can't hoist it.
// Loads from constant memory are safe to speculate, for example indexed load
// from a jump table.
// Stores and side effects are already checked by isSafeToMove.
if (I.mayLoad() && !mayLoadFromGOTOrConstantPool(I) &&
!IsGuaranteedToExecute(I.getParent())) {