Bugfix: SCCP

The SCCP pass was failing an assertion that I traced back to
SCCPSolver::visitExtractValueInst. getStructValueState was used on the
aggregate operand even if it had no structure type. I added a check to
use getStructValueState for structs and getValueState for other

This behavior was introduced in r85793. Please note that I'm not sure
whether my changes correctly address this problem. In case they don't,
I'd be glad to learn why in order to get a better understanding of
llvm. :slight_smile:

Please find attached a patch.


sccp-fix.patch (837 Bytes)

Thanks, I applied a variant of your patch with a testcase here:

You're seeing this on extractvalue from a array, right?


That is correct. With the latest code from the trunk the problem is