[llvm] a397846 - CodeGen: Use else if between Value and PseudoSourceValue cases
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 25 06:42:27 PDT 2022
Author: Matt Arsenault
Date: 2022-06-25T09:24:25-04:00
New Revision: a397846cb0940e76136f3c9f399d86364f162922
URL: https://github.com/llvm/llvm-project/commit/a397846cb0940e76136f3c9f399d86364f162922
DIFF: https://github.com/llvm/llvm-project/commit/a397846cb0940e76136f3c9f399d86364f162922.diff
LOG: CodeGen: Use else if between Value and PseudoSourceValue cases
These are mutually exclusive.
Added:
Modified:
llvm/lib/CodeGen/MachineInstr.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index 90156742f43bc..31f45e194a97c 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(
More information about the llvm-commits
mailing list