diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-04-08 04:13:17 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-04-08 04:13:17 +0000 | 
| commit | 101ea66813cab4f5fce7313cbf13d3ccc089053c (patch) | |
| tree | 17dafc0201cc9de268e6a667078640298e056456 /llvm/lib/CodeGen | |
| parent | fc72a6b72d90aaca69375f26d8f7b58f975161c9 (diff) | |
| download | bcm5719-llvm-101ea66813cab4f5fce7313cbf13d3ccc089053c.tar.gz bcm5719-llvm-101ea66813cab4f5fce7313cbf13d3ccc089053c.zip | |
add a sanity check: LegalizeOp should return a value that is the same type
as its input.
llvm-svn: 27528
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 3 | 
1 files changed, 3 insertions, 0 deletions
| diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index ed6cdb3417f..7549569636a 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -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); | 

