[llvm] 9a6817b - Revert "Fix another unused variable error."

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 23 13:37:58 PST 2021


Please include some details about the reason for a revert in the commit
message - helps folks figure out if this revert will address any local
issues they're seeing and maybe if someone else attempts a similar change
in the future it'll provide breadcrumbs about what pitfalls to be aware of.

On Tue, Nov 16, 2021 at 2:59 AM Frederik Gossen via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

>
> 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();
>
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211123/c56f1629/attachment.html>


More information about the llvm-commits mailing list