This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Fix ReconstructShuffle for bigendian
ClosedPublic

Authored by dmgreen on Feb 12 2020, 6:27 AM.

Details

Summary

Simon pointed out that this function is doing a bitcast, which can be incorrect for big endian. This makes the lowering of VMOVN in MVE incorrect, but the function is shared between Neon and MVE so both can be incorrect.

This attempts to fix things by using the newly added VECTOR_REG_CAST instead of the BITCAST. As it may now be used on Neon, I've added the relevant patterns for it there too. I've also added a quick dag combine for it, to remove them where possible.

Diff Detail

Event Timeline

dmgreen created this revision.Feb 12 2020, 6:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 12 2020, 6:27 AM
simon_tatham accepted this revision.Feb 12 2020, 6:41 AM

LGTM, with a not-very-important comment nitpick.

llvm/lib/Target/ARM/ARMInstrInfo.td
307

This reference to MVE-specific instruction names might be out of place now this comment is shared with NEON :-) But I don't know enough NEON to be sure of what the analogous load/store instructions there look like. Are those VST1 / VLD1, perhaps?

This revision is now accepted and ready to land.Feb 12 2020, 6:41 AM
This revision was automatically updated to reflect the committed changes.