summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMon P Wang <wangmp@apple.com>2009-01-28 18:53:39 +0000
committerMon P Wang <wangmp@apple.com>2009-01-28 18:53:39 +0000
commita15ea78ea6357447f66c64b90732c4984468cd8f (patch)
tree42f6ef7642a5e10debe50a0eea455355950e30f5
parented8f2003185cc08916eec500df1d1c0cb88de889 (diff)
downloadbcm5719-llvm-a15ea78ea6357447f66c64b90732c4984468cd8f.tar.gz
bcm5719-llvm-a15ea78ea6357447f66c64b90732c4984468cd8f.zip
Fixed extract element when the result needs to be promoted and the input widened.
llvm-svn: 63217
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
index f3897fad1d0..f9813b0bdda 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
@@ -292,6 +292,8 @@ SDValue DAGTypeLegalizer::PromoteIntRes_CTTZ(SDNode *N) {
SDValue DAGTypeLegalizer::PromoteIntRes_EXTRACT_VECTOR_ELT(SDNode *N) {
MVT OldVT = N->getValueType(0);
SDValue OldVec = N->getOperand(0);
+ if (getTypeAction(OldVec.getValueType()) == WidenVector)
+ OldVec = GetWidenedVector(N->getOperand(0));
unsigned OldElts = OldVec.getValueType().getVectorNumElements();
if (OldElts == 1) {
OpenPOWER on IntegriCloud