commit | 4ddd283f6928fc337c1bf3277566d7b31526e8d9 | [log] [tgz] |
---|---|---|
author | Chris Lattner <sabre@nondot.org> | Sat Apr 08 04:13:17 2006 +0000 |
committer | Chris Lattner <sabre@nondot.org> | Sat Apr 08 04:13:17 2006 +0000 |
tree | 099e094db6b7e44fa25104a458e2fa7128cbb736 | |
parent | 59fecec7d0c4aded45300cebd2cf45dd196edec0 [diff] [blame] |
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
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index ed6cdb3..7549569 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -2688,6 +2688,9 @@ } } + assert(Result.getValueType() == Op.getValueType() && + "Bad legalization!"); + // Make sure that the generated code is itself legal. if (Result != Op) Result = LegalizeOp(Result);