[PATCH] D156777: [SelectionDAG] Add/Improve cases in `isKnownNeverZero`
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 4 09:53:28 PDT 2023
RKSimon added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:5119
+ if (MaxCnt.ule(ValKnown.getBitWidth()) &&
+ !ValKnown.One.shl(MaxCnt).isZero())
return true;
----------------
goldstein.w.n wrote:
> RKSimon wrote:
> > Use isNonZero() instead?
> apint doens't have `isNonZero`.
I missed that! Would it improve the analysis if we used ValKnown.shl(CntKnown).isNonZero() instead?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156777/new/
https://reviews.llvm.org/D156777
More information about the llvm-commits
mailing list