[SDAG] Start plumbing an assert into SDValues that we don't form one
authorChandler Carruth <chandlerc@gmail.com>
Fri, 25 Jul 2014 07:23:23 +0000 (07:23 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 25 Jul 2014 07:23:23 +0000 (07:23 +0000)
commit94bd553eb8429dce48e64380a67d814cbc8f2ebd
treea8f3941e814c16693c62bb1db5fce6852f7602e1
parentcaf09b01fc69450bb385cdd107cd3a6efc851b83
[SDAG] Start plumbing an assert into SDValues that we don't form one
with a result number outside the range of results for the node.

I don't know how we managed to not really check this very basic
invariant for so long, but the code is *very* broken at this point.
I have over 270 test failures with the assert enabled. I'm committing it
disabled so that others can join in the cleanup effort and reproduce the
issues. I've also included one of the obvious fixes that I already
found. More fixes to come.

llvm-svn: 213926
llvm/include/llvm/CodeGen/SelectionDAGNodes.h
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp