[all-commits] [llvm/llvm-project] 3f9d64: [AArch64][SME] Always allocate a lazy-save buffer ...

sdesmalen-arm via All-commits all-commits at lists.llvm.org
Mon Nov 21 08:33:41 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3f9d64a2adc53fa7dc3e8fa482cfcaba7e81c4b0
      https://github.com/llvm/llvm-project/commit/3f9d64a2adc53fa7dc3e8fa482cfcaba7e81c4b0
  Author: Sander de Smalen <sander.desmalen at arm.com>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/test/CodeGen/AArch64/sme-disable-gisel-fisel.ll
    M llvm/test/CodeGen/AArch64/sme-shared-za-interface.ll

  Log Message:
  -----------
  [AArch64][SME] Always allocate a lazy-save buffer if a function has ZA state.

We already do this for most cases, with the exception of instructions that
get expanded to function calls (e.g. for lowering operations on fp128
values), in which case we temporarily allocate a lazy-save buffer.

The code that is generated in this case, is however incorrect, as it seems
to pass an incorrect address for the TPIDR2 object to the ZA restore
function. By always allocating the lazy-save buffer once, we avoid this
issue entirely.

The cost is that we also allocate such a buffer when it is not
needed. We could fix that in a follow-up patch, where we remove the
lazy-save buffer when it isn't used.

Reviewed By: paulwalker-arm

Differential Revision: https://reviews.llvm.org/D138208




More information about the All-commits mailing list