Page MenuHomePhabricator

[AArch64][SME] Prevent SVE object address calculations between smstop and call

Authored by david-arm on Sep 30 2022, 1:57 AM.



This patch introduces a new AArch64 ISD node (OBSCURE_COPY) that can
be used when we want to prevent SVE object address calculations
from being rematerialised between a smstop/smstart and a call.
At the moment we use COPY to copy the frame index to a register,
which leads to problems because the "simple register coalescing"
pass understands the COPY instruction and attempts to rematerialise
an address calculation with 'addvl' between an smstop and a call.
When in streaming mode the 'addvl' instruction may have different
behaviour because the streaming SVE vector length is not guaranteed
to equal the normal SVE vector length.

The new ISD opcode OBSCURE_COPY gets lowered to a new pseudo
instruction also called OBSCURE_COPY. This ensures it cannot be
rematerialised and we expand this into a simple move very late in
the machine instruction pipeline.

A new test is added here:


Diff Detail

Event Timeline

david-arm created this revision.Sep 30 2022, 1:57 AM
david-arm requested review of this revision.Sep 30 2022, 1:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 30 2022, 1:57 AM
Matt added a subscriber: Matt.Sep 30 2022, 8:57 PM
aemerson accepted this revision.Oct 4 2022, 8:57 AM
This revision is now accepted and ready to land.Oct 4 2022, 8:57 AM