This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Disable GlobalISel/FastISel for more SME functions
ClosedPublic

Authored by dmgreen on Aug 22 2023, 12:06 AM.

Details

Summary

The patch D136361 disabled GlobalISel and FastISel for some SME functions, as the saving and restoring of SM is not yet handled. There were several tests added for fp128 fadd, which will be expanded to a libcall, that only happened to work by accident and did not handle other cases such as f32/f64 frem libcalls.

This extends the cases where GlobalISel / FastISel is disabled for functions with SME attributes, under the assumption that it is difficult to tell what will become a libcall reliably, and so should fall back for all function until GlobalISel and/or FastISel can handle them.

Diff Detail

Event Timeline

dmgreen created this revision.Aug 22 2023, 12:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 22 2023, 12:06 AM
dmgreen requested review of this revision.Aug 22 2023, 12:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 22 2023, 12:06 AM
sdesmalen added inline comments.Aug 22 2023, 12:38 AM
llvm/lib/Target/AArch64/AArch64FastISel.cpp
5190–5191

This condition is now redundant.

llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
535–536

This condition is now redundant.

dmgreen updated this revision to Diff 552245.Aug 22 2023, 12:45 AM

Oh right - that was meant to be hasStreamingCompatibleInterface. I don't know these interfaces very well, let me know if that sounds wrong.

dmgreen edited the summary of this revision. (Show Details)Aug 22 2023, 12:46 AM

Oh right - that was meant to be hasStreamingCompatibleInterface. I don't know these interfaces very well, let me know if that sounds wrong.

That makes more sense. Can you add a test where the caller has "aarch64_pstate_sm_compatible" as well?

It's a bit unfortunate we can't predict in advance if any operations will be expanded to function calls, but indeed better to be conservative.

dmgreen updated this revision to Diff 552260.Aug 22 2023, 1:29 AM

Added a frem_call_sm_compat test.

sdesmalen accepted this revision.Aug 22 2023, 8:56 AM

Thanks for fixing!

This revision is now accepted and ready to land.Aug 22 2023, 8:56 AM
This revision was landed with ongoing or failed builds.Aug 22 2023, 10:06 AM
This revision was automatically updated to reflect the committed changes.