[llvm] [DAGCombiner] Remove a hasOneUse check in visitAND (PR #115142)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 6 02:02:41 PST 2024
================
@@ -7095,8 +7095,7 @@ SDValue DAGCombiner::visitAND(SDNode *N) {
// fold (and (masked_load) (splat_vec (x, ...))) to zext_masked_load
auto *MLoad = dyn_cast<MaskedLoadSDNode>(N0);
ConstantSDNode *Splat = isConstOrConstSplat(N1, true, true);
- if (MLoad && MLoad->getExtensionType() == ISD::EXTLOAD && Splat &&
- N1.hasOneUse()) {
----------------
davemgreen wrote:
Should it be checking N0.hasOneUse()? (i.e the load)
https://github.com/llvm/llvm-project/pull/115142
More information about the llvm-commits
mailing list