[all-commits] [llvm/llvm-project] a84243: [AArch64] Add check that prologue insertion doesn'...

Florian Hahn via All-commits all-commits at lists.llvm.org
Wed Nov 22 08:49:47 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a842430c20f1dbeec552af09612dd6073785a005
      https://github.com/llvm/llvm-project/commit/a842430c20f1dbeec552af09612dd6073785a005
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2023-11-22 (Wed, 22 Nov 2023)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
    A llvm/test/CodeGen/AArch64/emit-prologue-clobber-verification.mir
    M llvm/test/CodeGen/AArch64/framelayout-scavengingslot.mir
    M llvm/test/CodeGen/AArch64/framelayout-sve-calleesaves-fix.mir
    A llvm/test/CodeGen/AArch64/store-swift-async-context-clobber-live-reg.ll

  Log Message:
  -----------
  [AArch64] Add check that prologue insertion doesn't clobber live regs. (#71826)

This patch extends AArch64FrameLowering::emitProglogue to check if the
inserted prologue clobbers live registers.

It updates `llvm/test/CodeGen/AArch64/framelayout-scavengingslot.mir`
with an extra load to make x9 live before the store, preserving the
original test.

It uses the original
`llvm/test/CodeGen/AArch64/framelayout-scavengingslot.mir` as
`llvm/test/CodeGen/AArch64/emit-prologue-clobber-verification.mir`,
because there x9 is marked as live on entry, but used as scratch reg as
it is not callee saved.

The new assertion catches a mis-compile in
`store-swift-async-context-clobber-live-reg.ll` on
https://github.com/apple/llvm-project/tree/next




More information about the All-commits mailing list