[PATCH] D129765: [DAG] SimplifyDemandedBits - don't early-out for multiple use values
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 22 09:58:12 PDT 2022
RKSimon added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1106-1112
} else if (OriginalDemandedBits == 0 || OriginalDemandedElts == 0) {
// Not demanding any bits/elts from Op.
return TLO.CombineTo(Op, TLO.DAG.getUNDEF(VT));
} else if (Depth >= SelectionDAG::MaxRecursionDepth) {
// Limit search depth.
return false;
}
----------------
RKSimon wrote:
> deadalnix wrote:
> > Why not start with the early returns?
> I'll clean it up - we can move the max depth limit to the top now, but the multi-use case still has to come before the no demanded case.
This actually caused regressions because we had a couple of cases where we had no demanded bits/elts but were at the depth limit - returning UNDEF allowed for further simplifications later on.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129765/new/
https://reviews.llvm.org/D129765
More information about the llvm-commits
mailing list