[LVI] Handle unions of conditions
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 1 Jan 2021 15:32:19 +0000 (16:32 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 1 Jan 2021 15:46:21 +0000 (16:46 +0100)
commit14e540febcdace3b650dba2b8bb0e770b90409ad
tree33bcdf1ab0f1584b0729198aeda790bb9a0a5a94
parent13b1c9abaf46a7163bfc8fc0a765fbee051ccc80
[LVI] Handle unions of conditions

LVI previously handled "if (L && R)" conditions, but not
"if (L || R)" conditions. The latter case can still produce
useful information if L and R both constrain the same variable.

This adds support for handling the "if (L || R)" case as well.
The only difference is that we take the union instead of the
intersection of the lattice values.
llvm/lib/Analysis/LazyValueInfo.cpp
llvm/test/Transforms/CorrelatedValuePropagation/basic.ll