[InstCombine] add narrowing transform for low-masked binop with zext operand
authorSanjay Patel <spatel@rotateright.com>
Thu, 9 Jun 2022 20:59:26 +0000 (16:59 -0400)
committerSanjay Patel <spatel@rotateright.com>
Thu, 9 Jun 2022 20:59:26 +0000 (16:59 -0400)
commitafa192cfb6049a15c5542d132d500b910b802c74
tree69590323b6ad1afe240c89a93427f1a05f76598f
parent48a606d0c703cf577931dc172de8b823a618d673
[InstCombine] add narrowing transform for low-masked binop with zext operand

https://alive2.llvm.org/ce/z/hRy3rE

As shown in D123408, we can produce this pattern when moving
cast around, and we already have a related fold for a binop
with a constant operand.
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
llvm/test/Transforms/InstCombine/and.ll