[InstCombine] complete fold extractvalue (any_mul_with_overflow X, -1)
authorChenbing Zheng <Chenbing.Zheng@streamcomputing.com>
Fri, 2 Sep 2022 02:58:42 +0000 (10:58 +0800)
committerChenbing Zheng <Chenbing.Zheng@streamcomputing.com>
Fri, 2 Sep 2022 02:58:42 +0000 (10:58 +0800)
commitd30cf77cb1e4f743c52adbd52bf4f079794eded3
tree217a098db87d24e01fa7c30652497edd497a17e2
parentad2b356f8584e80e6e4dedd66e1d47ead08a10bd
[InstCombine] complete fold extractvalue (any_mul_with_overflow X, -1)

When we do extractvalue (any_mul_with_overflow X, -1) --> (-X and icmp),
which left partly failed to match vector constant with poison element.
This patch try to fix it.

Alive2: https://alive2.llvm.org/ce/z/2rGp_3

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D132996
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/test/Transforms/InstCombine/with_overflow.ll