[llvm] [DAG] SelectionDAG::isKnownToBeAPowerOfTwo - add ISD::TRUNCATE handling and tests (PR #184365)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 3 10:01:27 PST 2026
================
@@ -4780,6 +4780,9 @@ bool SelectionDAG::isKnownToBeAPowerOfTwo(SDValue Val,
// vscale(power-of-two) is a power-of-two
return isKnownToBeAPowerOfTwo(Val.getOperand(0), /*OrZero=*/false,
Depth + 1);
+
+ case ISD::TRUNCATE:
+ return isKnownToBeAPowerOfTwo(Val.getOperand(0), OrZero, Depth + 1);
----------------
RKSimon wrote:
@pranshoe alive2 proof?
https://github.com/llvm/llvm-project/pull/184365
More information about the llvm-commits
mailing list