[PATCH] D149195: [SelectionDAG] Limit max recursion in `isKnownNeverZero` and `isKnownToBeAPowerOfTwo`

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 26 00:09:57 PDT 2023


foad added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:5014-5015
   case ISD::OR:
     if (isKnownNeverZero(Op.getOperand(1)) ||
         isKnownNeverZero(Op.getOperand(0)))
       return true;
----------------
Need to pass Depth into the recursive calls, otherwise what's the point?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149195/new/

https://reviews.llvm.org/D149195



More information about the llvm-commits mailing list