[all-commits] [llvm/llvm-project] ba5bbd: [PowerPC] Precommit test case for PR46759. NFC.

bzEq via All-commits all-commits at lists.llvm.org
Wed Jul 22 07:20:26 PDT 2020


  Branch: refs/heads/release/11.x
  Home:   https://github.com/llvm/llvm-project
  Commit: ba5bbd4bd00f8aacf379cdcb738b149a1f63166a
      https://github.com/llvm/llvm-project/commit/ba5bbd4bd00f8aacf379cdcb738b149a1f63166a
  Author: Kai Luo <lkail at cn.ibm.com>
  Date:   2020-07-22 (Wed, 22 Jul 2020)

  Changed paths:
    A llvm/test/CodeGen/PowerPC/pr46759.ll

  Log Message:
  -----------
  [PowerPC] Precommit test case for PR46759. NFC.

(cherry picked from commit 817767abeec8343b20de83f8b1b2c8c20bbbe00a)


  Commit: e95e071b6b68929527570cb830e5f3bc8b992e04
      https://github.com/llvm/llvm-project/commit/e95e071b6b68929527570cb830e5f3bc8b992e04
  Author: Kai Luo <lkail at cn.ibm.com>
  Date:   2020-07-22 (Wed, 22 Jul 2020)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
    M llvm/test/CodeGen/PowerPC/pr46759.ll

  Log Message:
  -----------
  [PowerPC] Fix wrong codegen when stack pointer has to realign in prologue

Current powerpc backend generates wrong code sequence if stack pointer
has to realign if -fstack-clash-protection enabled. When probing in
prologue, backend should generate a subtraction instruction rather
than a `stux` instruction to realign the stack pointer.

This patch is part of fix of
https://bugs.llvm.org/show_bug.cgi?id=46759.

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

(cherry picked from commit 8912252252c87d8ef6623ecf9fdde444560ee4b9)


  Commit: c522fd02da1b0dcadeae041d12fe35e52ce0973f
      https://github.com/llvm/llvm-project/commit/c522fd02da1b0dcadeae041d12fe35e52ce0973f
  Author: Kai Luo <lkail at cn.ibm.com>
  Date:   2020-07-22 (Wed, 22 Jul 2020)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCISelLowering.cpp
    M llvm/lib/Target/PowerPC/PPCInstr64Bit.td
    M llvm/lib/Target/PowerPC/PPCInstrInfo.td
    M llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
    M llvm/test/CodeGen/PowerPC/pr46759.ll
    M llvm/test/CodeGen/PowerPC/stack-clash-dynamic-alloca.ll

  Log Message:
  -----------
  [PowerPC] Fix wrong codegen when stack pointer has to realign performing dynalloc

Current powerpc backend generates wrong code sequence if stack pointer
has to realign if `-fstack-clash-protection` enabled. When probing
dynamic stack allocation, current `PREPARE_PROBED_ALLOCA` takes
`NegSizeReg` as input and returns
`FinalStackPtr`. `FinalStackPtr=StackPtr+ActualNegSize` is calculated
correctly, however code following `PREPARE_PROBED_ALLOCA` still uses
value of `NegSizeReg`, which does not contain `ActualNegSize` if
`MaxAlign > TargetAlign`, to calculate loop trip count and residual
number of bytes.

This patch is part of fix of
https://bugs.llvm.org/show_bug.cgi?id=46759.

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

(cherry picked from commit c3f9697f1f227296818fbaf1a770a29842ea454c)


Compare: https://github.com/llvm/llvm-project/compare/764e28231e4b...c522fd02da1b


More information about the All-commits mailing list