[InstSimplify] allow poison/undef in constant match for "C - X ==/!= X -> false/true"
authorSanjay Patel <spatel@rotateright.com>
Tue, 6 Sep 2022 12:07:31 +0000 (08:07 -0400)
committerSanjay Patel <spatel@rotateright.com>
Tue, 6 Sep 2022 12:19:30 +0000 (08:19 -0400)
commita8fcb512426316080b94702538061914bb4a6bd1
tree7cbe38ad3c58661b3de082666cc551eb19f8be0d
parentdd6eb4d67f234afe115981957f91f5d81eba9db6
[InstSimplify] allow poison/undef in constant match for "C - X ==/!= X -> false/true"

This fold was added with 5e9522c311dd, but over-specified.
We can assume that an undef element is an odd number:
https://alive2.llvm.org/ce/z/djQmWU
llvm/lib/Analysis/InstructionSimplify.cpp
llvm/test/Transforms/InstSimplify/icmp.ll