diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2022-06-23 21:55:42 -0400 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2022-06-25 09:24:25 -0400 |
commit | a397846cb0940e76136f3c9f399d86364f162922 (patch) | |
tree | 1aded1836050fe0575e6372209b241b34d2a541d /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | 8a7ead691bad29b86017d9e42fa63a57c8c0d629 (diff) | |
download | llvm-a397846cb0940e76136f3c9f399d86364f162922.zip llvm-a397846cb0940e76136f3c9f399d86364f162922.tar.gz llvm-a397846cb0940e76136f3c9f399d86364f162922.tar.bz2 |
CodeGen: Use else if between Value and PseudoSourceValue cases
These are mutually exclusive.
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 9015674..31f45e1 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -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( |