HomePhabricator

[AArch64][GlobalISel] NFC: Refactor emitIntegerCompare

Authored by paquette on Oct 14 2020, 3:19 PM.

Description

[AArch64][GlobalISel] NFC: Refactor emitIntegerCompare

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.

Differential Revision: https://reviews.llvm.org/D89433