[AArch64][SME] Disable GlobalISel/FastISel for SME functions.
authorSander de Smalen <sander.desmalen@arm.com>
Wed, 9 Nov 2022 15:53:53 +0000 (15:53 +0000)
committerSander de Smalen <sander.desmalen@arm.com>
Wed, 9 Nov 2022 16:10:53 +0000 (16:10 +0000)
commite1e260cc64bd900d5f3f88187c60cb02d3a805f5
treec54a2dfe3826172f03dafad5aecf1ff8469cd2ac
parente9a2aa6355968863e95667f73ba95a785ea9d8a8
[AArch64][SME] Disable GlobalISel/FastISel for SME functions.

This patch ensures that GlobalISel and FastISel fall back to regular DAG ISel when:
* A function requires streaming-mode to be enabled at the start/end of the function.
  This happens when the function has no streaming interface, but does have a streaming body.
* A function requires a lazy-save to be committed at the start of the function.
  This happens if the function has the `aarch64_pstate_za_new` attribute.
* A call to a function requires a change in streaming-mode.
* A call to a function requires a lazy-save buffer to be set up.

Patch by @CarolineConcatto

Reviewed By: david-arm

Differential Revision: https://reviews.llvm.org/D136361
llvm/lib/Target/AArch64/AArch64FastISel.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
llvm/test/CodeGen/AArch64/sme-disable-gisel-fisel.ll [new file with mode: 0644]