[PATCH] D156778: [SelectionDAG] Improve `isKnownToBeAPowerOfTwo`
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 1 15:56:25 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:4069
+ case ISD::ZERO_EXTEND:
+ case ISD::ANY_EXTEND:
+ V = V.getOperand(0);
----------------
Looking through ANY_EXTEND is probably broken
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:4136-4137
+ if (Val.getOpcode() == ISD::SELECT || Val.getOpcode() == ISD::VSELECT)
+ return isKnownToBeAPowerOfTwo(Val.getOperand(1), Depth + 1) &&
+ isKnownToBeAPowerOfTwo(Val.getOperand(2), Depth + 1);
+
----------------
try RHS first
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