[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