This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Allow `ARMVectorRegCast` to match bitconverts too. (NFC)
ClosedPublic

Authored by simon_tatham on Feb 17 2020, 7:02 AM.

Details

Summary

When we start putting instances of ARMVectorRegCast in complex isel
patterns, it will be awkward that they're often turned into the more
standard bitconvert in little-endian mode. We'd rather not have to
write separate isel patterns for the two endiannesses, matching
different but equivalent cast operations.

This change aims to fix that awkwardness in advance, by turning the
Tablegen record ARMVectorRegCast from a simple SDNode instance
into a PatFrags that can match either kind of cast – with a
predicate that prevents it matching a bitconvert in the big-endian
case, where bitconvert isn't semantically identical.

No existing code generation should be affected by this change, but it
will enable the patterns introduced by D74336 to work in both
endiannesses.