summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-08-02 18:38:35 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-08-02 18:38:35 +0000
commit6cdc1f43e6a6dd7ba38a334b0b2f8fa70d4dc4cd (patch)
treede0a2f71aa05bf04924bf692bad5d125c15af395 /lib/CodeGen/SelectionDAG
parent96279d0eff03f18eb5e21de285148be654171005 (diff)
downloadllvm-6cdc1f43e6a6dd7ba38a334b0b2f8fa70d4dc4cd.tar.gz
llvm-6cdc1f43e6a6dd7ba38a334b0b2f8fa70d4dc4cd.tar.bz2
llvm-6cdc1f43e6a6dd7ba38a334b0b2f8fa70d4dc4cd.tar.xz
Don't create a ridiculous EXTRACT_ELEMENT. PR10563.
The testcase looks extremely fragile, so I'm adding an assertion which should catch any cases like this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136711 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 888d8b4ea3..8b353a28b6 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -2884,6 +2884,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, EVT VT,
assert(N2C && (unsigned)N2C->getZExtValue() < 2 && "Bad EXTRACT_ELEMENT!");
assert(!N1.getValueType().isVector() && !VT.isVector() &&
(N1.getValueType().isInteger() == VT.isInteger()) &&
+ N1.getValueType() != VT &&
"Wrong types for EXTRACT_ELEMENT!");
// EXTRACT_ELEMENT of BUILD_PAIR is often formed while legalize is expanding