CodeGen: Use else if between Value and PseudoSourceValue cases

These are mutually exclusive.
This commit is contained in:
Matt Arsenault 2022-06-23 21:55:42 -04:00
parent 8a7ead691b
commit a397846cb0
1 changed files with 2 additions and 3 deletions

View File

@ -1371,11 +1371,10 @@ bool MachineInstr::isDereferenceableInvariantLoad(AAResults *AA) const {
continue;
// A load from a constant PseudoSourceValue is invariant.
if (const PseudoSourceValue *PSV = MMO->getPseudoValue())
if (const PseudoSourceValue *PSV = MMO->getPseudoValue()) {
if (PSV->isConstant(&MFI))
continue;
if (const Value *V = MMO->getValue()) {
} else if (const Value *V = MMO->getValue()) {
// If we have an AliasAnalysis, ask it whether the memory is constant.
if (AA &&
AA->pointsToConstantMemory(