[all-commits] [llvm/llvm-project] a574ef: [AArch64] Fix incorrect big-endian spill in foldMe...

john-brawn-arm via All-commits all-commits at lists.llvm.org
Thu Oct 12 08:10:42 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a574ef61766d49db4350b6f06a108f36bccb25bb
      https://github.com/llvm/llvm-project/commit/a574ef61766d49db4350b6f06a108f36bccb25bb
  Author: john-brawn-arm <john.brawn at arm.com>
  Date:   2023-10-12 (Thu, 12 Oct 2023)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
    M llvm/test/CodeGen/AArch64/arm64-neon-mul-div.ll
    M llvm/test/CodeGen/AArch64/fexplog.ll
    M llvm/test/CodeGen/AArch64/fold-int-pow2-with-fmul-or-fdiv.ll
    M llvm/test/CodeGen/AArch64/fpow.ll
    M llvm/test/CodeGen/AArch64/frem.ll
    M llvm/test/CodeGen/AArch64/fsincos.ll
    M llvm/test/CodeGen/AArch64/llvm.exp10.ll
    M llvm/test/CodeGen/AArch64/pow.ll
    M llvm/test/CodeGen/AArch64/spill-fold.mir
    M llvm/test/CodeGen/AArch64/sve-fixed-length-fp128.ll
    M llvm/test/CodeGen/AArch64/vec-libcalls.ll

  Log Message:
  -----------
  [AArch64] Fix incorrect big-endian spill in foldMemoryOperandImpl (#65601)

When an sreg sub-register of a q register was spilled,
AArch64InstrInfo::foldMemoryOperandImpl would emit a spill of a d
register, which gives the wrong result when the target is big-endian as
the following q register fill will put the value in the top half.

Fix this by greatly simplifying the existing code for widening the spill
to only handle wzr to xzr widening, as the default result we get if the
function returns nullptr is already that a widened spill will be
emitted.




More information about the All-commits mailing list