SCCP: overdefined calls cannot become constant
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 7 Nov 2014 08:54:19 +0000 (08:54 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 7 Nov 2014 08:54:19 +0000 (08:54 +0000)
commit3f2ffe0423fdf58e2f07e32a27089c68011d4125
tree5372564d1f8b876309c98546aea2bd1eb0dd2bda
parent893f22f88245d29487e1fff662ac9e78f86f8e91
SCCP: overdefined calls cannot become constant

We would attempt to fold away a call instruction which had been marked
overdefined.  However, it's not valid to transition to constant from
overdefined.

This fixes PR21512.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221513 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/SCCP.cpp
test/Transforms/SCCP/ipsccp-basic.ll