HomePhabricator

[PowerPC] Remove redundant load immediate instructions

Description

[PowerPC] Remove redundant load immediate instructions

Currently PowerPC backend emits code like this:

r3 = li 0
std r3, 264(r1)
r3 = li 0
std r3, 272(r1)

This patch fixes that and other cases where a register already contains a value that is loaded so we will get:

r3 = li 0
std r3, 264(r1)
std r3, 272(r1)

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

Details

Committed
Yi-Hong.LyuJul 23 2019, 12:11 PM
Differential Revision
D64220: [PowerPC] Remove redundant load immediate instructions
Parents
rL366839: Accidently checked in.
Branches
Unknown
Tags
Unknown