[llvm] [DAG] ISD::matchUnaryPredicate / matchUnaryFpPredicate / matchBinaryPredicate - add DemandedElts variant (PR #183013)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 6 09:47:38 PDT 2026
================
@@ -4675,26 +4683,11 @@ bool SelectionDAG::isKnownToBeAPowerOfTwo(SDValue Val,
};
// Is the constant a known power of 2 or zero?
- if (ISD::matchUnaryPredicate(Val, IsPowerOfTwoOrZero))
+ if (ISD::matchUnaryPredicate(Val, DemandedElts, IsPowerOfTwoOrZero,
+ /*AllowUndefs=*/false, /*AllowTruncation=*/true))
----------------
RKSimon wrote:
yes, split it off from this patch and start a followup Draft PR - and then once this lands, you can rebase it off trunk and get it ready for Review
https://github.com/llvm/llvm-project/pull/183013
More information about the llvm-commits
mailing list