diff options
author | Mon P Wang <wangmp@apple.com> | 2008-12-10 03:59:02 +0000 |
---|---|---|
committer | Mon P Wang <wangmp@apple.com> | 2008-12-10 03:59:02 +0000 |
commit | 4637c3c6988d47600d556dbb51d87b48cbd7d5cf (patch) | |
tree | 392df3c9b796d0195ee0400e09ec5900efbb7444 /llvm/lib/CodeGen | |
parent | 0b77319742c954e8a79bacf3f280242a06f59dbe (diff) | |
download | bcm5719-llvm-4637c3c6988d47600d556dbb51d87b48cbd7d5cf.tar.gz bcm5719-llvm-4637c3c6988d47600d556dbb51d87b48cbd7d5cf.zip |
Fixed a bug when trying to optimize a extract vector element of a
bit convert that changes the number of elements of a shuffle.
llvm-svn: 60829
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index aae4c59a8c7..9cc8061f183 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -4874,7 +4874,8 @@ SDValue DAGCombiner::visitEXTRACT_VECTOR_ELT(SDNode *N) { MVT LVT = EVT; if (InVec.getOpcode() == ISD::BIT_CONVERT) { MVT BCVT = InVec.getOperand(0).getValueType(); - if (!BCVT.isVector() || EVT.bitsGT(BCVT.getVectorElementType())) + if (!BCVT.isVector() || EVT.bitsGT(BCVT.getVectorElementType()) || + VT.getVectorNumElements() != BCVT.getVectorNumElements()) return SDValue(); InVec = InVec.getOperand(0); EVT = BCVT.getVectorElementType(); |