forked from OSchip/llvm-project
CodeGen: Use else if between Value and PseudoSourceValue cases
These are mutually exclusive.
This commit is contained in:
parent
8a7ead691b
commit
a397846cb0
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue