This is an archive of the discontinued LLVM Phabricator instance.

[SelDag] Add isIntOrFPConstant helper function.
ClosedPublic

Authored by fhahn on Mar 26 2021, 10:38 AM.

Details

Summary

This patch adds a new isIntOrFPConstant helper function to check if a
SDValue is a integer of FP constant. This pattern is used in various
places.

There also are places that incorrectly just check for integer constants,
e.g. D99384, so hopefully this helper will help people avoid that issue.

Diff Detail

Event Timeline

fhahn created this revision.Mar 26 2021, 10:38 AM
fhahn requested review of this revision.Mar 26 2021, 10:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 26 2021, 10:38 AM
Herald added a subscriber: wdng. · View Herald Transcript
RKSimon accepted this revision.Mar 28 2021, 3:45 AM

LGTM

This revision is now accepted and ready to land.Mar 28 2021, 3:45 AM
This revision was automatically updated to reflect the committed changes.