mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-11 16:37:42 +00:00
add a sanity check: LegalizeOp should return a value that is the same type
as its input. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27528 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
59fecec7d0
commit
4ddd283f69
@ -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…
x
Reference in New Issue
Block a user