This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Fix crash when neither Neon nor SVE are enabled
ClosedPublic

Authored by frasercrmck on Aug 17 2023, 6:13 AM.

Details

Summary

The subtarget was unconditionally reporting that SVE was to be used to
lower vectors when Neon was unavailable, even when SVE itself was
unavailable. This decision leads other parts of the compiler to crash,
e.g., when querying SVE vector sizes.

Diff Detail

Event Timeline

frasercrmck created this revision.Aug 17 2023, 6:13 AM
frasercrmck requested review of this revision.Aug 17 2023, 6:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 17 2023, 6:13 AM
  • fix test checks in CostModel test (wrong script)

If this is the right solution, it might be best to backport it to LLVM 17 as that's where I originally found the issue.

sdesmalen accepted this revision.Aug 17 2023, 6:24 AM

Thanks for fixing this! I'm surprised we didn't catch this before. Are you happy to backport this patch to LLVM17 ?

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

Thanks for fixing this! I'm surprised we didn't catch this before. Are you happy to backport this patch to LLVM17 ?

My pleasure, thanks for the quick review! Yes I'm happy to do the backporting; expect that soon :)