This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] NFC: Refactor emitIntegerCompare
ClosedPublic

Authored by paquette on Oct 14 2020, 4:18 PM.

Details

Summary

Simplify emitIntegerCompare and improve comments + asserts.

Mostly making the code a little easier to follow.

Also, this code is only used for G_ICMP. The legalizer ensures that the LHS/RHS for every G_ICMP is either a s32 or s64. So, there's no need to handle anything else. This lets us remove a bunch of checks for whether or not we successfully emitted the compare.

Diff Detail

Event Timeline

paquette created this revision.Oct 14 2020, 4:18 PM
paquette requested review of this revision.Oct 14 2020, 4:18 PM
aemerson accepted this revision.Oct 15 2020, 12:06 PM
This revision is now accepted and ready to land.Oct 15 2020, 12:06 PM
This revision was automatically updated to reflect the committed changes.