summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2015-08-13 01:10:29 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2015-08-13 01:10:29 +0000
commitb5b0cfdff769b53204f59d3a4b184016a65e08c6 (patch)
tree029b368df6049dc881a3bc30ca66ed4c0c3e96d5 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parent40ded502ffd2adddc9c2adcc4a7e5f3c840f906d (diff)
downloadbcm5719-llvm-b5b0cfdff769b53204f59d3a4b184016a65e08c6.tar.gz
bcm5719-llvm-b5b0cfdff769b53204f59d3a4b184016a65e08c6.zip
[CodeGen] Assert on getNode(FP_EXTEND) with a smaller dst type.
This would have caught the problem in r244858. llvm-svn: 244859
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index b696c33d9f6..0e3e83748a1 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud