[InstCombine] try harder to narrow bitwise logic with cast operands
authorSanjay Patel <spatel@rotateright.com>
Wed, 27 Jul 2022 21:40:35 +0000 (17:40 -0400)
committerSanjay Patel <spatel@rotateright.com>
Thu, 28 Jul 2022 11:23:22 +0000 (07:23 -0400)
commit28ad5dc3f7adae7d779586f9f981a1c22dec195e
tree915792729efab8e906d208eefb550f7c6698dded
parent35e8179c470228be1663e14f7497d6fd3e017a2c
[InstCombine] try harder to narrow bitwise logic with cast operands

This works with any logic + extend:
https://alive2.llvm.org/ce/z/vzsqQD

The motivating case is from issue #56294, but that's still not optimal
(it should simplify completely).
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
llvm/test/Transforms/InstCombine/and-xor-or.ll