[PATCH] D149199: [SelectionDAG] Fill in some more cases in `isKnownNeverZero`
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 25 15:02:56 PDT 2023
goldstein.w.n added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:5016
case ISD::OR:
- if (isKnownNeverZero(Op.getOperand(1)) ||
- isKnownNeverZero(Op.getOperand(0)))
+ return isKnownNeverZero(Op.getOperand(0), Depth) ||
+ isKnownNeverZero(Op.getOperand(1), Depth);
----------------
craig.topper wrote:
> I assume we checked operand 1 first to favor the cheap case of a non-zero constant right hand side.
Makes sense, updated that everywhere else.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149199/new/
https://reviews.llvm.org/D149199
More information about the llvm-commits
mailing list