This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] Add isZero/isAllOnes methods to ConstantSDNode.
ClosedPublic

Authored by craig.topper on Sep 9 2021, 12:07 PM.

Details

Summary

Soft deprecrate isNullValue/isAllOnesValue and update in tree
callers. This matches the changes to the APInt interface from
D109483.

Diff Detail

Event Timeline

craig.topper created this revision.Sep 9 2021, 12:07 PM
craig.topper requested review of this revision.Sep 9 2021, 12:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 9 2021, 12:07 PM

clang-format

Upload the whole patch.

lattner accepted this revision.Sep 9 2021, 12:50 PM

Awesome, thanks Craig!

llvm/include/llvm/CodeGen/SelectionDAGNodes.h
1585

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.

This revision is now accepted and ready to land.Sep 9 2021, 12:50 PM
This revision was landed with ongoing or failed builds.Sep 9 2021, 1:29 PM
This revision was automatically updated to reflect the committed changes.