[AArch64][SME] Fix chain for arm_locally_streaming functions.
authorSander de Smalen <sander.desmalen@arm.com>
Tue, 25 Oct 2022 07:53:31 +0000 (07:53 +0000)
committerSander de Smalen <sander.desmalen@arm.com>
Tue, 25 Oct 2022 08:14:51 +0000 (08:14 +0000)
commit19b9e6204a9e4a19bb988b8697c6492fe0609898
tree59dffa29f7fd8b437da8e2969ab6df44ffde5921
parentecd78ec5b98ca77010c1c22eed64699e5e4c7a8e
[AArch64][SME] Fix chain for arm_locally_streaming functions.

The Chain wasn't set correctly in the DAG for functions marked
with aarch64_pstate_sm_body, which meant that SelectionDAG would
dead-code some of the CopyToReg's. This didn't show up in the
existing tests because all uses were in the same block, but when
adding some control-flow, suddenly things would break.

Reviewed By: kmclaughlin

Differential Revision: https://reviews.llvm.org/D136579
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/test/CodeGen/AArch64/sme-streaming-body.ll