This is an archive of the discontinued LLVM Phabricator instance.

[SVE] Expand scalable vector ISD::BITCASTs when targeting big-endian.
ClosedPublic

Authored by paulwalker-arm on Aug 8 2023, 8:51 AM.

Details

Summary

Whilst sub-optimial, it's better than the current selection failure.

Fixes: #64406

Diff Detail

Event Timeline

paulwalker-arm created this revision.Aug 8 2023, 8:51 AM
Herald added a project: Restricted Project. · View Herald Transcript
paulwalker-arm requested review of this revision.Aug 8 2023, 8:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 8 2023, 8:51 AM
efriedma accepted this revision.Aug 8 2023, 11:17 AM

Ideally, we want to turn this into a vector shuffle, but this seems fine as a stopgap.

This revision is now accepted and ready to land.Aug 8 2023, 11:17 AM

Have you considered the rest of big endian for SVE? My understanding was that it has been mostly ignored up to this point, and that there might be other combines that are making little endian assumptions. Anything that uses a bitcast could be wrong if it changes the element size.

Matt added a subscriber: Matt.Aug 9 2023, 3:46 PM

Have you considered the rest of big endian for SVE? My understanding was that it has been mostly ignored up to this point, and that there might be other combines that are making little endian assumptions. Anything that uses a bitcast could be wrong if it changes the element size.

During initial SVE bring up we did attempt to make the implementation either big endian clean or a user visible error. However, without any real testing I can imagine there are places where this has regressed. I've no plans to actively pipe clean full big endian support, I just spotted the bug report and figured I'd reduce the barrier to others and perhaps that'll prompt more testing and reporting.