Fix an issue with opencl init list checking.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107824 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp
index 3d95461..536222c 100644
--- a/lib/Sema/SemaInit.cpp
+++ b/lib/Sema/SemaInit.cpp
@@ -877,10 +877,15 @@
                               StructuredList, StructuredIndex);
           ++numEltsInit;
         } else {
+          QualType VecType;
           const VectorType *IVT = IType->getAs<VectorType>();
           unsigned numIElts = IVT->getNumElements();
-          QualType VecType = SemaRef.Context.getExtVectorType(elementType,
-                                                              numIElts);
+          
+          if (IType->isExtVectorType())
+            VecType = SemaRef.Context.getExtVectorType(elementType, numIElts);
+          else
+            VecType = SemaRef.Context.getVectorType(elementType, numIElts,
+                                                    IVT->getAltiVecSpecific());
           CheckSubElementType(ElementEntity, IList, VecType, Index,
                               StructuredList, StructuredIndex);
           numEltsInit += numIElts;