[llvm] Power of 2 SDValue is known to be power of 2 after dag ops BSWAP/BITREVERSE (PR #182207)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 19 01:20:28 PST 2026
================
@@ -4762,6 +4762,10 @@ bool SelectionDAG::isKnownToBeAPowerOfTwo(SDValue Val,
isKnownToBeAPowerOfTwo(Val.getOperand(0), /*OrZero=*/false, Depth + 1))
return true;
break;
+ case ISD::BSWAP:
+ case ISD::BITREVERSE:
+ isKnownToBeAPowerOfTwo(Val.getOperand(0), /*OrZero=*/false, Depth + 1);
----------------
RKSimon wrote:
Missing return, DemandedElts and OrZero handling
https://github.com/llvm/llvm-project/pull/182207
More information about the llvm-commits
mailing list