This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Add convenience matchers for nots and all-ones constants
ClosedPublic

Authored by paquette on Nov 13 2020, 1:40 PM.

Details

Summary

Add a convenience matcher which handles

G_XOR %not_reg, -1

And a convenience matcher which returns true if an integer constant is all ones.

I expect that this will become useful. I'd like to use it in D90774 at least.

Diff Detail

Event Timeline

paquette created this revision.Nov 13 2020, 1:40 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 13 2020, 1:40 PM
Herald added a subscriber: rovka. · View Herald Transcript
paquette requested review of this revision.Nov 13 2020, 1:40 PM
arsenm accepted this revision.Nov 13 2020, 1:42 PM
This revision is now accepted and ready to land.Nov 13 2020, 1:42 PM