You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[M68k] Fix CMP pattern matching and emission logic
CMP nodes with an immediate operand always have the immediate on the
right-hand side. But the pattern defined in TableGen had the immediate
on the left-hand side, causing the match to fail, so this has been
corrected.
Also, `emitCmp()` contained logic ported from X86 that is not relevant
to M68k, such as imposing restrictions on which ValueTypes can be
compared, so that logic has been removed. It would also replace CMP with
SUB to enable a specific optimization, but (as of now) on M68k it
usually results in a register copy before the SUB, which loses
efficiency.
With these changes, CMP instructions more reliably take advantage of
their addressing modes, and redundancy is significantly reduced.
0 commit comments