It is possible, under specific circumstances involving ptrtoint ConstantExpr's, for...
authorOwen Anderson <resistor@mac.com>
Thu, 16 Sep 2010 18:28:33 +0000 (18:28 +0000)
committerOwen Anderson <resistor@mac.com>
Thu, 16 Sep 2010 18:28:33 +0000 (18:28 +0000)
commitc2ce21ad51590377b572a572243e373f7a7b9fb4
treee1648b926976b1bda2137558aada313284d2dda3
parent6dbe29e34e0017dac703f951429964d9c95b528c
It is possible, under specific circumstances involving ptrtoint ConstantExpr's, for LVI to end up trying to merge
a Constant into a ConstantRange.  Handle this conservatively for now, rather than asserting.  The testcase is
more complex that I would like, but the manifestation of the problem is sensitive to iteration orders and the state of the
LVI cache, and I have not been able to reproduce it with manually constructed or simplified cases.

Fixes PR8162.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114103 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/LazyValueInfo.cpp
test/Transforms/CorrelatedValuePropagation/2010-09-26-MergeConstantRange.ll [new file with mode: 0644]