[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
parent
369c0eb5
Please register or sign in to comment