This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] [TableGen] Clean up boolean tests
ClosedPublic

Authored by Paul-C-Anagnostopoulos on Oct 16 2020, 6:40 AM.

Details

Summary

Inspired by the new TableGen !not operator, I'm making a pass over the .td files to clean up boolean tests. Examples:

!if(!eq(bool, 1), ...) => !if(bool, ...)
!if(!eq(bool, 0), ...) => !if(!not(bool), ...)

I'm doing this one target at a time.

Diff Detail

Event Timeline

Paul-C-Anagnostopoulos requested review of this revision.Oct 16 2020, 6:40 AM

I will push this revision later today if there are no objections.

dmgreen accepted this revision.Oct 19 2020, 6:36 AM
dmgreen added a subscriber: dmgreen.

Sure, LGTM if they work the same way.

This revision is now accepted and ready to land.Oct 19 2020, 6:36 AM

Yes, !if takes a boolean, so there is no need for things like !eq(s, 1). I'm finding these in one target at a time, while looking for places to use !not.

Brilliant, Thanks for the cleanup!

Cool, please do