[llvm] 5b84ae7 - Fix another unused variable error.
Adrian Kuegel via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 16 02:32:55 PST 2021
Author: Adrian Kuegel
Date: 2021-11-16T11:32:44+01:00
New Revision: 5b84ae7c48083bd0f40199837990cf915a2053b8
URL: https://github.com/llvm/llvm-project/commit/5b84ae7c48083bd0f40199837990cf915a2053b8
DIFF: https://github.com/llvm/llvm-project/commit/5b84ae7c48083bd0f40199837990cf915a2053b8.diff
LOG: Fix another unused variable error.
Added:
Modified:
llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp b/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
index a8d0a8c4d82f..1ec3c26f6159 100644
--- a/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
@@ -375,9 +375,6 @@ bool LoadStoreOpt::doSingleStoreMerge(SmallVectorImpl<GStore *> &Stores) {
ConstantVals.emplace_back(MaybeCst->Value);
}
- Register WideReg;
- auto *WideMMO =
- MF->getMachineMemOperand(&FirstStore->getMMO(), 0, WideValueTy);
if (ConstantVals.empty()) {
// Mimic the SDAG behaviour here and don't try to do anything for unknown
// values. In future, we should also support the cases of loads and
@@ -395,11 +392,12 @@ bool LoadStoreOpt::doSingleStoreMerge(SmallVectorImpl<GStore *> &Stores) {
// wider one.
WideConst.insertBits(ConstantVals[Idx], Idx * SmallTy.getSizeInBits());
}
- WideReg = Builder.buildConstant(WideValueTy, WideConst).getReg(0);
+ Register WideReg = Builder.buildConstant(WideValueTy, WideConst).getReg(0);
LLVM_DEBUG({
dbgs() << "Created merged store: "
<< *Builder.buildStore(WideReg, FirstStore->getPointerReg(),
- *WideMMO);
+ *MF->getMachineMemOperand(
+ &FirstStore->getMMO(), 0, WideValueTy));
});
NumStoresMerged += Stores.size();
More information about the llvm-commits
mailing list