[PATCH] D156777: [SelectionDAG] Add/Improve cases in `isKnownNeverZero`

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 4 06:18:53 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;
----------------
Use 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