forked from OSchip/llvm-project
Revert "Fix another unused variable error."
This reverts commit 5b84ae7c48
.
This commit is contained in:
parent
669e57ebd1
commit
9a6817b7ed
|
@ -375,6 +375,9 @@ bool LoadStoreOpt::doSingleStoreMerge(SmallVectorImpl<GStore *> &Stores) {
|
||||||
ConstantVals.emplace_back(MaybeCst->Value);
|
ConstantVals.emplace_back(MaybeCst->Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Register WideReg;
|
||||||
|
auto *WideMMO =
|
||||||
|
MF->getMachineMemOperand(&FirstStore->getMMO(), 0, WideValueTy);
|
||||||
if (ConstantVals.empty()) {
|
if (ConstantVals.empty()) {
|
||||||
// Mimic the SDAG behaviour here and don't try to do anything for unknown
|
// 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
|
// values. In future, we should also support the cases of loads and
|
||||||
|
@ -392,12 +395,11 @@ bool LoadStoreOpt::doSingleStoreMerge(SmallVectorImpl<GStore *> &Stores) {
|
||||||
// wider one.
|
// wider one.
|
||||||
WideConst.insertBits(ConstantVals[Idx], Idx * SmallTy.getSizeInBits());
|
WideConst.insertBits(ConstantVals[Idx], Idx * SmallTy.getSizeInBits());
|
||||||
}
|
}
|
||||||
Register WideReg = Builder.buildConstant(WideValueTy, WideConst).getReg(0);
|
WideReg = Builder.buildConstant(WideValueTy, WideConst).getReg(0);
|
||||||
LLVM_DEBUG({
|
LLVM_DEBUG({
|
||||||
dbgs() << "Created merged store: "
|
dbgs() << "Created merged store: "
|
||||||
<< *Builder.buildStore(WideReg, FirstStore->getPointerReg(),
|
<< *Builder.buildStore(WideReg, FirstStore->getPointerReg(),
|
||||||
*MF->getMachineMemOperand(
|
*WideMMO);
|
||||||
&FirstStore->getMMO(), 0, WideValueTy));
|
|
||||||
});
|
});
|
||||||
NumStoresMerged += Stores.size();
|
NumStoresMerged += Stores.size();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue