forked from OSchip/llvm-project
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:
parent
fc72a6b72d
commit
101ea66813
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue