[LVI][CVP] Handle (x | y) < C style conditions
authorNikita Popov <nikita.ppv@gmail.com>
Sun, 28 Jun 2020 12:47:29 +0000 (14:47 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 1 Jul 2020 18:43:24 +0000 (20:43 +0200)
commit91836fd7f3c128b4c608bd4b389a64ff4ac1db8a
tree1d81324c9060c2354624a493f0acfd32858c8bf7
parent05d79295df136efd6fd875ead2ba6a0cb50b7997
[LVI][CVP] Handle (x | y) < C style conditions

InstCombine may convert conditions like (x < C) && (y < C) into
(x | y) < C (for some C). This patch teaches LVI to recognize that
in this case, it can infer either x < C or y < C along the edge.

This fixes the issue reported at
https://github.com/rust-lang/rust/issues/73827.

Differential Revision: https://reviews.llvm.org/D82715
llvm/lib/Analysis/LazyValueInfo.cpp
llvm/test/Transforms/CorrelatedValuePropagation/icmp.ll