[LVI] Apply transfer rule for overdefine inputs for binary operators
authorPhilip Reames <listmail@philipreames.com>
Tue, 26 Apr 2016 23:10:35 +0000 (23:10 +0000)
committerPhilip Reames <listmail@philipreames.com>
Tue, 26 Apr 2016 23:10:35 +0000 (23:10 +0000)
commit053c2a6f25e48132d8f66bd73f3575da47cfde88
tree5ea9e98328394ec62faee41bb052e716bb1a4fc5
parentc1b9d47b3b30ba6714776e4a255968946e48bb29
[LVI] Apply transfer rule for overdefine inputs for binary operators

As pointed out by John Regehr over in http://reviews.llvm.org/D19485, LVI was being incredibly stupid about applying its transfer rules.  Rather than gathering local facts from the expression itself, it was simply giving up entirely if one of the inputs was overdefined.  This greatly impacts the precision of the overall analysis and makes it far more fragile as well.

This patch builds on 267609 which did the same thing for unary casts.

llvm-svn: 267620
llvm/lib/Analysis/LazyValueInfo.cpp
llvm/test/Transforms/CorrelatedValuePropagation/basic.ll