1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

add a sanity check: LegalizeOp should return a value that is the same type

as its input.

llvm-svn: 27528
This commit is contained in:
Chris Lattner 2006-04-08 04:13:17 +00:00
parent 92c219136f
commit 12c1bd4cbc

View File

@ -2688,6 +2688,9 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
}
}
assert(Result.getValueType() == Op.getValueType() &&
"Bad legalization!");
// Make sure that the generated code is itself legal.
if (Result != Op)
Result = LegalizeOp(Result);