[llvm] 9a6817b - Revert "Fix another unused variable error."
Frederik Gossen via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 16 02:59:07 PST 2021
Author: Frederik Gossen
Date: 2021-11-16T11:58:02+01:00
New Revision: 9a6817b7edb44669cec14a3fbde8a93dfb217c1a
URL: https://github.com/llvm/llvm-project/commit/9a6817b7edb44669cec14a3fbde8a93dfb217c1a
DIFF: https://github.com/llvm/llvm-project/commit/9a6817b7edb44669cec14a3fbde8a93dfb217c1a.diff
LOG: Revert "Fix another unused variable error."
This reverts commit 5b84ae7c48083bd0f40199837990cf915a2053b8.
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 1ec3c26f6159..a8d0a8c4d82f 100644
--- a/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
@@ -375,6 +375,9 @@ 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
@@ -392,12 +395,11 @@ bool LoadStoreOpt::doSingleStoreMerge(SmallVectorImpl<GStore *> &Stores) {
// wider one.
WideConst.insertBits(ConstantVals[Idx], Idx * SmallTy.getSizeInBits());
}
- Register WideReg = Builder.buildConstant(WideValueTy, WideConst).getReg(0);
+ WideReg = Builder.buildConstant(WideValueTy, WideConst).getReg(0);
LLVM_DEBUG({
dbgs() << "Created merged store: "
<< *Builder.buildStore(WideReg, FirstStore->getPointerReg(),
- *MF->getMachineMemOperand(
- &FirstStore->getMMO(), 0, WideValueTy));
+ *WideMMO);
});
NumStoresMerged += Stores.size();
More information about the llvm-commits
mailing list