Page MenuHomePhabricator

[AArch64][SVE] Add wide compare immediate patterns

Authored by c-rhodes on Dec 4 2019, 5:44 AM.



Recognize wide compares where the wide operand is a splat of a scalar
value in the appropriate range and convert to the immediate variant of
the instruction.

Patch by Graham Hunter

Diff Detail

Event Timeline

c-rhodes created this revision.Dec 4 2019, 5:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 4 2019, 5:44 AM
efriedma added inline comments.Dec 4 2019, 3:06 PM

I guess it's sort of orthogonal to this patch, but why do we have two opcodes for the same operation?


Do we actually know we're dealing with a legal type, at this point?

c-rhodes updated this revision to Diff 232375.Dec 5 2019, 9:56 AM

Added check to do nothing in combine if before legalisation.

c-rhodes marked 2 inline comments as done.Dec 5 2019, 9:57 AM
c-rhodes added inline comments.

AArch64ISD::DUP has been around for a while and SPLAT_VECTOR was recently introduced by Graham, but he didn't want to remove DUP in that patch and it's not been revisited yet.

efriedma added inline comments.Dec 6 2019, 5:10 PM

Can you refactor this so there isn't a bunch of copy-pasted code for signed vs. unsigned? The only relevant difference between the two codepaths is the preferred check for "Imm".

c-rhodes updated this revision to Diff 232802.Dec 9 2019, 3:44 AM

Refactor switch.

c-rhodes marked an inline comment as done.Dec 9 2019, 3:44 AM
This revision is now accepted and ready to land.Dec 9 2019, 11:40 AM
This revision was automatically updated to reflect the committed changes.