[PowerPC] Look through OR, AND, XOR instructions when checking a clear.
authorStefan Pintilie <stefanp@ca.ibm.com>
Mon, 8 May 2023 16:22:03 +0000 (12:22 -0400)
committerStefan Pintilie <stefanp@ca.ibm.com>
Mon, 8 May 2023 18:25:20 +0000 (14:25 -0400)
commitbe95b4dec2604247d9fbad5f7641b4373b740904
treeec17e67d839656f95222b43cd01184f5de7af7e5
parentaf88d34f0552ef207ac54ec2522ae2371ea54e85
[PowerPC] Look through OR, AND, XOR instructions when checking a clear.

This patch adds the additional step of looking through AND, OR, XOR
instructions when we check the number of leading zeros.

Reviewed By: shchenz

Differential Revision: https://reviews.llvm.org/D149223
llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
llvm/test/CodeGen/PowerPC/ppc-clear-before-return.ll