[PowerPC][Peephole] Combine extsw and sldi after instruction selection
authorKai Luo <lkail@cn.ibm.com>
Tue, 9 Jul 2019 02:55:08 +0000 (02:55 +0000)
committerKai Luo <lkail@cn.ibm.com>
Tue, 9 Jul 2019 02:55:08 +0000 (02:55 +0000)
commit1931ed73c3d26f914e137e41304f84bdd823954b
tree92e053d4e1e3d66081f5935ec9c404c0234382bb
parent25ab27e6ef81fe805fb75de16993a1f131b9c91a
[PowerPC][Peephole] Combine extsw and sldi after instruction selection

Summary:
`extsw` and `sldi` are supposed to be combined if they are in the same
BB in instruction selection phase. This patch handles the case where
extsw and sldi are not in the same BB.

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

llvm-svn: 365430
llvm/lib/Target/PowerPC/P9InstrResources.td
llvm/lib/Target/PowerPC/PPCInstr64Bit.td
llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
llvm/test/CodeGen/PowerPC/combine-sext-and-shl-after-isel.ll