[all-commits] [llvm/llvm-project] 955d76: [AArch64] [GlobalISel] Fix clobbered callee saved ...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Mon Aug 21 04:17:35 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 955d7615bd7563cc78a5106215daf9e6e47ffb5e
      https://github.com/llvm/llvm-project/commit/955d7615bd7563cc78a5106215daf9e6e47ffb5e
  Author: Martin Storsjö <martin at martin.st>
  Date:   2023-08-21 (Mon, 21 Aug 2023)

  Changed paths:
    M llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
    A llvm/test/CodeGen/AArch64/win64_vararg2.ll

  Log Message:
  -----------
  [AArch64] [GlobalISel] Fix clobbered callee saved registers with win64 varargs

This fixes a regression since 1c10d5b175992a9d056a2d763a932e5652386fc1
/ https://reviews.llvm.org/D130903 by applying the same fix from
SelectionDAG from 8cb3667541a94c4fa11b06e19020f753414c1d03 /
https://reviews.llvm.org/D35720.

This could possibly have been detected if the existing testcases
in win64_vararg.ll had been tested with GlobalISel too, but all
the IR snippets there fail to be translated with GlobalISel.

This adds a separate testcase based on real world LLVM IR (instead of
hand-reduced IR), which GlobalISel does translate happily - tested
with both SelectionDAG and GlobalISel.

Before this change, the stack object locations (visible in MIR
with "llc -print-after-all") didn't match with what the prologue
emitted by AArch64FrameLowering actually looked like, which caused
clobbered callee saved registers when function local stack objects
aliased the actual location of the callee saved registers.

This fixes https://github.com/llvm/llvm-project/issues/64740.

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




More information about the All-commits mailing list