aboutsummaryrefslogtreecommitdiffstats
path: root/lib
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
commitf7eef6811c8b701b815c64e754a174691953a35f (patch)
treebb2e107a4d7c507e6d87c96c6234100e1ac57c25 /lib
parentf52038a2040bd2d0ad9abc3848353074b12a4518 (diff)
downloadexternal_llvm-f7eef6811c8b701b815c64e754a174691953a35f.zip
external_llvm-f7eef6811c8b701b815c64e754a174691953a35f.tar.gz
external_llvm-f7eef6811c8b701b815c64e754a174691953a35f.tar.bz2
Fixed extract element when the result needs to be promoted and the input widened.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63217 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp b/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
index f3897fa..f9813b0 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+++ b/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) {