[PowerPC] Exploit power9 new instruction setb
Check the expected pattens feeding to SELECT_CC like:
(select_cc lhs, rhs, 1, (sext (setcc [lr]hs, [lr]hs, cc2)), cc1)
(select_cc lhs, rhs, -1, (zext (setcc [lr]hs, [lr]hs, cc2)), cc1)
(select_cc lhs, rhs, 0, (select_cc [lr]hs, [lr]hs, 1, -1, cc2), seteq)
(select_cc lhs, rhs, 0, (select_cc [lr]hs, [lr]hs, -1, 1, cc2), seteq)
Further transform the sequence to comparison + setb if hits.
Differential Revision: https://reviews.llvm.org/D53275
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349445 91177308-0d34-0410-b5e6-96231b3b80d8
5 files changed