From: Ahmed Bougacha Date: Thu, 13 Aug 2015 01:10:29 +0000 (+0000) Subject: [CodeGen] Assert on getNode(FP_EXTEND) with a smaller dst type. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5d8c9c45e5551b4c216719d1aadc2f701ee67ec0;p=oota-llvm.git [CodeGen] Assert on getNode(FP_EXTEND) with a smaller dst type. This would have caught the problem in r244858. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244859 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index b696c33d9f6..0e3e83748a1 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -3010,6 +3010,8 @@ SDValue SelectionDAG::getNode(unsigned Opcode, SDLoc DL, VT.getVectorNumElements() == Operand.getValueType().getVectorNumElements()) && "Vector element count mismatch!"); + assert(Operand.getValueType().bitsLT(VT) && + "Invalid fpext node, dst < src!"); if (Operand.getOpcode() == ISD::UNDEF) return getUNDEF(VT); break;