[llvm] de92a20 - [SelectionDAG] Move variable declaration to its first assignment. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 3 14:11:11 PDT 2023
Author: Craig Topper
Date: 2023-04-03T14:03:05-07:00
New Revision: de92a2013196d9119a5cf33e9a18d4b8a8d1e3df
URL: https://github.com/llvm/llvm-project/commit/de92a2013196d9119a5cf33e9a18d4b8a8d1e3df
DIFF: https://github.com/llvm/llvm-project/commit/de92a2013196d9119a5cf33e9a18d4b8a8d1e3df.diff
LOG: [SelectionDAG] Move variable declaration to its first assignment. NFC
We declared this variable and assigned it to true, but then overwrote
it before its first use.
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index bb9cc4097e05..0a34856e76c4 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -7503,13 +7503,12 @@ void SelectionDAGBuilder::visitVPLoad(
AAMDNodes AAInfo = VPIntrin.getAAMetadata();
const MDNode *Ranges = VPIntrin.getMetadata(LLVMContext::MD_range);
SDValue LD;
- bool AddToChain = true;
// Do not serialize variable-length loads of constant memory with
// anything.
if (!Alignment)
Alignment = DAG.getEVTAlign(VT);
MemoryLocation ML = MemoryLocation::getAfter(PtrOperand, AAInfo);
- AddToChain = !AA || !AA->pointsToConstantMemory(ML);
+ bool AddToChain = !AA || !AA->pointsToConstantMemory(ML);
SDValue InChain = AddToChain ? DAG.getRoot() : DAG.getEntryNode();
MachineMemOperand *MMO = DAG.getMachineFunction().getMachineMemOperand(
MachinePointerInfo(PtrOperand), MachineMemOperand::MOLoad,
More information about the llvm-commits
mailing list