[SCCP] Don't violate the lattice invariants
authorDavid Majnemer <david.majnemer@gmail.com>
Thu, 7 Jan 2016 21:36:16 +0000 (21:36 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Thu, 7 Jan 2016 21:36:16 +0000 (21:36 +0000)
commit8bc44fb2b48ea8c031963707488050131be8b9f0
treea9e6e7840d26dcac5cd39f8ef93188142c3a707f
parent62babebeeb57f8110c5b7233cb56dff38b10e840
[SCCP] Don't violate the lattice invariants

We marked values which are 'undef' as constant instead of undefined
which violates SCCP's invariants.  If we can figure out that a
computation results in 'undef', leave it in the undefined state.

This fixes PR16052.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257102 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/SCCP.cpp
test/Transforms/IPConstantProp/PR16052.ll [new file with mode: 0644]