[llvm] r244859 - [CodeGen] Assert on getNode(FP_EXTEND) with a smaller dst type.
Ahmed Bougacha via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 12 18:10:29 PDT 2015
Author: ab
Date: Wed Aug 12 20:10:29 2015
New Revision: 244859
URL: http://llvm.org/viewvc/llvm-project?rev=244859&view=rev
Log:
[CodeGen] Assert on getNode(FP_EXTEND) with a smaller dst type.
This would have caught the problem in r244858.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=244859&r1=244858&r2=244859&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Aug 12 20:10:29 2015
@@ -3010,6 +3010,8 @@ SDValue SelectionDAG::getNode(unsigned O
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;
More information about the llvm-commits
mailing list