[PATCH] D109535: [SelectionDAG] Add isZero/isAllOnes methods to ConstantSDNode.
Chris Lattner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 9 12:50:34 PDT 2021
lattner accepted this revision.
lattner added a comment.
This revision is now accepted and ready to land.
Awesome, thanks Craig!
================
Comment at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1585
+ // NOTE: This is soft-deprecated. Please use `isAllOnes()` instead.
bool isAllOnesValue() const { return Value->isMinusOne(); }
bool isMaxSignedValue() const { return Value->isMaxValue(true); }
----------------
Random suggestion, but I'd defined the deprecated ones in terms of the primary ones, e.g.:
`bool isAllOnesValue() const { return isAllOnes(); }`
which makes it more obvious at a glance that these are identical.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109535/new/
https://reviews.llvm.org/D109535
More information about the llvm-commits
mailing list