[PATCH] D149196: [SelectionDAG] Use `computeKnownBits` if `Op` is not recognized by `isKnownNeverZero`
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 26 00:11:29 PDT 2023
foad added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:5020
- return false;
+ return !computeKnownBits(Op, Depth - 1).One.isZero();
}
----------------
craig.topper wrote:
> `return computeKnownBits(Op, Depth - 1).isNonZero()`. KnownBits already has a wrapper so we don't have to reference the `One` field directly.
It would be less confusing overall to *not* increment Depth.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149196/new/
https://reviews.llvm.org/D149196
More information about the llvm-commits
mailing list