[PATCH] D156778: [SelectionDAG] Improve `isKnownToBeAPowerOfTwo`
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 2 03:39:39 PDT 2023
RKSimon added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:4078
+
+ Val = PeekThroughCasts(Val);
+
----------------
We can't safely use ANY_EXTEND, afaict you just need this:
```
while (Val.getOpcode() == ISD::ZERO_EXTEND)
Val = Val.getOperand(0);
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156778/new/
https://reviews.llvm.org/D156778
More information about the llvm-commits
mailing list