[all-commits] [llvm/llvm-project] 4eeb56: [PowerPC] Don't do the folding if the operand is R...

QingShan Zhang via All-commits all-commits at lists.llvm.org
Mon Mar 30 19:50:27 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4eeb56d08874e1abe46d7f6d1dd492e717b93a35
      https://github.com/llvm/llvm-project/commit/4eeb56d08874e1abe46d7f6d1dd492e717b93a35
  Author: QingShan Zhang <qshanz at cn.ibm.com>
  Date:   2020-03-31 (Tue, 31 Mar 2020)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
    M llvm/test/CodeGen/PowerPC/fold-frame-offset-using-rr.mir

  Log Message:
  -----------
  [PowerPC] Don't do the folding if the operand is R0/X0

We have this transformation in PowerPC peephole:

Replace instruction:
  renamable $x28 = ADDI8 renamable $x7, -8
  renamable $x28 = ADD8 killed renamable $x28, renamable $x0
  STFD killed renamable $f0, -8, killed renamable $x28 :: (store 8 into %ir._ind_cast99.epil)
with:
  renamable $x28 = ADDI8 renamable $x7, -16
  STFDX killed renamable $f0, $x0, killed $x28 :: (store 8 into %ir._ind_cast99.epil)

It is invalid as the '$x0' in STFDX is constant 0, not register r0.

Reviewed By: Nemanjai

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




More information about the All-commits mailing list