[cfe-commits] r128375 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/CodeGen/CGExprConstant.cpp lib/Sema/SemaCXXCast.cpp lib/Sema/SemaExpr.cpp test/CodeGen/altivec.c test/CodeGen/builtins-ppc-altivec.c test/Sema/altivec-init.c

Anton Yartsev anton.yartsev at gmail.com
Sun Mar 27 02:32:41 PDT 2011


Author: ayartsev
Date: Sun Mar 27 04:32:40 2011
New Revision: 128375

URL: http://llvm.org/viewvc/llvm-project?rev=128375&view=rev
Log:
supported: AltiVec vector initialization with a single literal according to PIM section 2.5.1 - after initialization all elements have the value specified by the literal

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
    cfe/trunk/lib/CodeGen/CGExprConstant.cpp
    cfe/trunk/lib/Sema/SemaCXXCast.cpp
    cfe/trunk/lib/Sema/SemaExpr.cpp
    cfe/trunk/test/CodeGen/altivec.c
    cfe/trunk/test/CodeGen/builtins-ppc-altivec.c
    cfe/trunk/test/Sema/altivec-init.c

Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=128375&r1=128374&r2=128375&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Sun Mar 27 04:32:40 2011
@@ -2226,6 +2226,8 @@
   "size of bit-field %0 (%1 bits) exceeds size of its type (%2 bits)">;
 def err_anon_bitfield_width_exceeds_type_size : Error<
   "size of anonymous bit-field (%0 bits) exceeds size of its type (%1 bits)">;
+def err_incorrect_number_of_vector_initializers : Error<
+  "number of elements must be either one or match the size of the vector">;
   
 // Used by C++ which allows bit-fields that are wider than the type.
 def warn_bitfield_width_exceeds_type_size: Warning<

Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprConstant.cpp?rev=128375&r1=128374&r2=128375&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprConstant.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprConstant.cpp Sun Mar 27 04:32:40 2011
@@ -979,12 +979,29 @@
       llvm::SmallVector<llvm::Constant *, 4> Inits;
       unsigned NumElts = Result.Val.getVectorLength();
 
-      for (unsigned i = 0; i != NumElts; ++i) {
-        APValue &Elt = Result.Val.getVectorElt(i);
-        if (Elt.isInt())
-          Inits.push_back(llvm::ConstantInt::get(VMContext, Elt.getInt()));
-        else
-          Inits.push_back(llvm::ConstantFP::get(VMContext, Elt.getFloat()));
+      if (Context.getLangOptions().AltiVec &&
+          isa<CastExpr>(E) &&
+          cast<CastExpr>(E)->getCastKind() == CK_VectorSplat) {
+        // AltiVec vector initialization with a single literal
+        APValue &Elt = Result.Val.getVectorElt(0);
+
+        llvm::Constant* InitValue = Elt.isInt()
+          ? cast<llvm::Constant>
+              (llvm::ConstantInt::get(VMContext, Elt.getInt()))
+          : cast<llvm::Constant>
+              (llvm::ConstantFP::get(VMContext, Elt.getFloat()));
+
+        for (unsigned i = 0; i != NumElts; ++i)
+          Inits.push_back(InitValue);
+
+      } else {
+        for (unsigned i = 0; i != NumElts; ++i) {
+          APValue &Elt = Result.Val.getVectorElt(i);
+          if (Elt.isInt())
+            Inits.push_back(llvm::ConstantInt::get(VMContext, Elt.getInt()));
+          else
+            Inits.push_back(llvm::ConstantFP::get(VMContext, Elt.getFloat()));
+        }
       }
       return llvm::ConstantVector::get(Inits);
     }

Modified: cfe/trunk/lib/Sema/SemaCXXCast.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCXXCast.cpp?rev=128375&r1=128374&r2=128375&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaCXXCast.cpp (original)
+++ cfe/trunk/lib/Sema/SemaCXXCast.cpp Sun Mar 27 04:32:40 2011
@@ -1517,6 +1517,16 @@
     return ret;
   }
 
+  // Case of AltiVec vector initialization with a single literal
+  if (CastTy->isVectorType()
+      && CastTy->getAs<VectorType>()->getVectorKind() ==
+         VectorType::AltiVecVector
+      && (CastExpr->getType()->isIntegerType()
+          || CastExpr->getType()->isFloatingType())) {
+    Kind = CK_VectorSplat;
+    return false;
+  }
+
   // Make sure we determine the value kind before we bail out for
   // dependent types.
   VK = Expr::getValueKindForType(CastTy);

Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=128375&r1=128374&r2=128375&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Sun Mar 27 04:32:40 2011
@@ -5105,8 +5105,16 @@
   if (castType->isExtVectorType())
     return CheckExtVectorCast(TyR, castType, castExpr, Kind);
 
-  if (castType->isVectorType())
-    return CheckVectorCast(TyR, castType, castExpr->getType(), Kind);
+  if (castType->isVectorType()) {
+    if (castType->getAs<VectorType>()->getVectorKind() ==
+        VectorType::AltiVecVector &&
+          (castExpr->getType()->isIntegerType() ||
+           castExpr->getType()->isFloatingType())) {
+      Kind = CK_VectorSplat;
+      return false;
+    } else
+      return CheckVectorCast(TyR, castType, castExpr->getType(), Kind);
+  }
   if (castExpr->getType()->isVectorType())
     return CheckVectorCast(TyR, castExpr->getType(), castType, Kind);
 
@@ -5254,9 +5262,9 @@
                                TypeSourceInfo *TInfo) {
   ParenListExpr *PE = cast<ParenListExpr>(Op);
   QualType Ty = TInfo->getType();
-  bool isAltiVecLiteral = false;
+  bool isVectorLiteral = false;
 
-  // Check for an altivec literal,
+  // Check for an altivec or OpenCL literal,
   // i.e. all the elements are integer constants.
   if (getLangOptions().AltiVec && Ty->isVectorType()) {
     if (PE->getNumExprs() == 0) {
@@ -5265,18 +5273,45 @@
     }
     if (PE->getNumExprs() == 1) {
       if (!PE->getExpr(0)->getType()->isVectorType())
-        isAltiVecLiteral = true;
+        isVectorLiteral = true;
     }
     else
-      isAltiVecLiteral = true;
+      isVectorLiteral = true;
   }
 
-  // If this is an altivec initializer, '(' type ')' '(' init, ..., init ')'
+  // If this is a vector initializer, '(' type ')' '(' init, ..., init ')'
   // then handle it as such.
-  if (isAltiVecLiteral) {
+  if (isVectorLiteral) {
     llvm::SmallVector<Expr *, 8> initExprs;
-    for (unsigned i = 0, e = PE->getNumExprs(); i != e; ++i)
-      initExprs.push_back(PE->getExpr(i));
+    // '(...)' form of vector initialization in AltiVec: the number of
+    // initializers must be one or must match the size of the vector.
+    // If a single value is specified in the initializer then it will be
+    // replicated to all the components of the vector
+    if (Ty->getAs<VectorType>()->getVectorKind() ==
+        VectorType::AltiVecVector) {
+      unsigned numElems = Ty->getAs<VectorType>()->getNumElements();
+      // The number of initializers must be one or must match the size of the
+      // vector. If a single value is specified in the initializer then it will
+      // be replicated to all the components of the vector
+      if (PE->getNumExprs() == 1) {
+        QualType ElemTy = Ty->getAs<VectorType>()->getElementType();
+        Expr *Literal = PE->getExpr(0);
+        ImpCastExprToType(Literal, ElemTy,
+                          PrepareScalarCast(*this, Literal, ElemTy));
+        return BuildCStyleCastExpr(LParenLoc, TInfo, RParenLoc, Literal);
+      }
+      else if (PE->getNumExprs() < numElems) {
+        Diag(PE->getExprLoc(),
+             diag::err_incorrect_number_of_vector_initializers);
+        return ExprError();
+      }
+      else
+        for (unsigned i = 0, e = PE->getNumExprs(); i != e; ++i)
+          initExprs.push_back(PE->getExpr(i));
+    }
+    else
+      for (unsigned i = 0, e = PE->getNumExprs(); i != e; ++i)
+        initExprs.push_back(PE->getExpr(i));
 
     // FIXME: This means that pretty-printing the final AST will produce curly
     // braces instead of the original commas.

Modified: cfe/trunk/test/CodeGen/altivec.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/altivec.c?rev=128375&r1=128374&r2=128375&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/altivec.c (original)
+++ cfe/trunk/test/CodeGen/altivec.c Sun Mar 27 04:32:40 2011
@@ -1,4 +1,31 @@
 // RUN: %clang_cc1 -faltivec -triple powerpc-unknown-unknown -emit-llvm %s -o - | FileCheck %s
 
-// CHECK: @test0 = global <4 x i32> <i32 1, i32 1, i32 1, i32 1>
-vector int test0 = (vector int)(1);
+// Check initialization
+
+vector int test0 = (vector int)(1);       // CHECK: @test0 = global <4 x i32> <i32 1, i32 1, i32 1, i32 1>
+vector float test1 = (vector float)(1.0); // CHECK: @test1 = global <4 x float> <float 1.000000e+{{0+}}, float 1.000000e+{{0+}}, float 1.000000e+{{0+}}, float 1.000000e+{{0+}}>
+
+void test2()
+{
+  vector int vi;
+  vector float vf;
+  vi = (vector int)(1);             // CHECK: <i32 1, i32 1, i32 1, i32 1>
+  vf = (vector float)(1.0);         // CHECK: <float 1.000000e+{{0+}}, float 1.000000e+{{0+}}, float 1.000000e+{{0+}}, float 1.000000e+{{0+}}>
+  vi = (vector int)(1, 2, 3, 4);    // CHECK: <i32 1, i32 2, i32 3, i32 4>
+  vi = (vector int)(1, 2, 3, 4, 5); // CHECK: <i32 1, i32 2, i32 3, i32 4>
+
+  vi = (vector int){1};             // CHECK: <i32 1, i32 0, i32 0, i32 0>
+  vi = (vector int){1, 2};          // CHECK: <i32 1, i32 2, i32 0, i32 0>
+  vi = (vector int){1, 2, 3, 4};    // CHECK: <i32 1, i32 2, i32 3, i32 4>
+
+}
+
+// Check pre/post increment/decrement
+void test3() {
+  vector int vi;
+  vi++;                                    // CHECK: add nsw <4 x i32> {{.*}} <i32 1, i32 1, i32 1, i32 1>
+  vector unsigned int vui;
+  --vui;                                   // CHECK: add <4 x i32> {{.*}} <i32 -1, i32 -1, i32 -1, i32 -1>
+  vector float vf;
+  vf++;                                    // CHECK: fadd <4 x float> {{.*}} <float 1.000000e+{{0+}}, float 1.000000e+{{0+}}, float 1.000000e+{{0+}}, float 1.000000e+{{0+}}>
+}

Modified: cfe/trunk/test/CodeGen/builtins-ppc-altivec.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/builtins-ppc-altivec.c?rev=128375&r1=128374&r2=128375&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/builtins-ppc-altivec.c (original)
+++ cfe/trunk/test/CodeGen/builtins-ppc-altivec.c Sun Mar 27 04:32:40 2011
@@ -1789,23 +1789,23 @@
 
   /* vec_lvlx */
   res_vsc = vec_lvlx(0, &param_sc);             // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vsc = vec_lvlx(0, &vsc);                  // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vuc = vec_lvlx(0, &param_uc);             // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vuc = vec_lvlx(0, &vuc);                  // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vbc = vec_lvlx(0, &vbc);                  // CHECK: @llvm.ppc.altivec.lvx
@@ -1814,23 +1814,23 @@
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vs  = vec_lvlx(0, &param_s);              // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vs  = vec_lvlx(0, &vs);                   // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vus = vec_lvlx(0, &param_us);             // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vus = vec_lvlx(0, &vus);                  // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vbs = vec_lvlx(0, &vbs);                  // CHECK: @llvm.ppc.altivec.lvx
@@ -1844,23 +1844,23 @@
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vi  = vec_lvlx(0, &param_i);              // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vi  = vec_lvlx(0, &vi);                   // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vui = vec_lvlx(0, &param_ui);             // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vui = vec_lvlx(0, &vui);                  // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vbi = vec_lvlx(0, &vbi);                  // CHECK: @llvm.ppc.altivec.lvx
@@ -1869,29 +1869,29 @@
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vf  = vec_lvlx(0, &vf);                   // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <4 x float> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x float> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   /* vec_lvlxl */
   res_vsc = vec_lvlxl(0, &param_sc);            // CHECK: @llvm.ppc.altivec.lvxl
-                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vsc = vec_lvlxl(0, &vsc);                 // CHECK: @llvm.ppc.altivec.lvxl
-                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vuc = vec_lvlxl(0, &param_uc);            // CHECK: @llvm.ppc.altivec.lvxl
-                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vuc = vec_lvlxl(0, &vuc);                 // CHECK: @llvm.ppc.altivec.lvxl
-                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vbc = vec_lvlxl(0, &vbc);                 // CHECK: @llvm.ppc.altivec.lvxl
@@ -1900,23 +1900,23 @@
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vs  = vec_lvlxl(0, &param_s);             // CHECK: @llvm.ppc.altivec.lvxl
-                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vs  = vec_lvlxl(0, &vs);                  // CHECK: @llvm.ppc.altivec.lvxl
-                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vus = vec_lvlxl(0, &param_us);            // CHECK: @llvm.ppc.altivec.lvxl
-                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vus = vec_lvlxl(0, &vus);                 // CHECK: @llvm.ppc.altivec.lvxl
-                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vbs = vec_lvlxl(0, &vbs);                 // CHECK: @llvm.ppc.altivec.lvxl
@@ -1930,23 +1930,23 @@
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vi  = vec_lvlxl(0, &param_i);             // CHECK: @llvm.ppc.altivec.lvxl
-                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vi  = vec_lvlxl(0, &vi);                  // CHECK: @llvm.ppc.altivec.lvxl
-                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vui = vec_lvlxl(0, &param_ui);            // CHECK: @llvm.ppc.altivec.lvxl
-                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vui = vec_lvlxl(0, &vui);                 // CHECK: @llvm.ppc.altivec.lvxl
-                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vbi = vec_lvlxl(0, &vbi);                 // CHECK: @llvm.ppc.altivec.lvxl
@@ -1955,29 +1955,29 @@
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vf  = vec_lvlxl(0, &vf);                  // CHECK: @llvm.ppc.altivec.lvxl
-                                                // CHECK: store <4 x float> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x float> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   /* vec_lvrx */
-  res_vsc = vec_lvrx(0, &param_sc);             // CHECK: store <16 x i8> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  res_vsc = vec_lvrx(0, &param_sc);             // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
-  res_vsc = vec_lvrx(0, &vsc);                  // CHECK: store <16 x i8> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  res_vsc = vec_lvrx(0, &vsc);                  // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
-  res_vuc = vec_lvrx(0, &param_uc);             // CHECK: store <16 x i8> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  res_vuc = vec_lvrx(0, &param_uc);             // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
-  res_vuc = vec_lvrx(0, &vuc);                  // CHECK: store <16 x i8> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  res_vuc = vec_lvrx(0, &vuc);                  // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vbc = vec_lvrx(0, &vbc);                  // CHECK: store <16 x i8> zeroinitializer
@@ -1985,24 +1985,24 @@
                                                 // CHECK: @llvm.ppc.altivec.lvsl
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
-  res_vs  = vec_lvrx(0, &param_s);              // CHECK: store <8 x i16> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  res_vs  = vec_lvrx(0, &param_s);              // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
-  res_vs  = vec_lvrx(0, &vs);                   // CHECK: store <8 x i16> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  res_vs  = vec_lvrx(0, &vs);                   // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
-  res_vus = vec_lvrx(0, &param_us);             // CHECK: store <8 x i16> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  res_vus = vec_lvrx(0, &param_us);             // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
-  res_vus = vec_lvrx(0, &vus);                  // CHECK: store <8 x i16> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  res_vus = vec_lvrx(0, &vus);                  // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vbs = vec_lvrx(0, &vbs);                  // CHECK: store <8 x i16> zeroinitializer
@@ -2015,24 +2015,24 @@
                                                 // CHECK: @llvm.ppc.altivec.lvsl
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
-  res_vi  = vec_lvrx(0, &param_i);              // CHECK: store <4 x i32> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  res_vi  = vec_lvrx(0, &param_i);              // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
-  res_vi  = vec_lvrx(0, &vi);                   // CHECK: store <4 x i32> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  res_vi  = vec_lvrx(0, &vi);                   // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
-  res_vui = vec_lvrx(0, &param_ui);             // CHECK: store <4 x i32> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  res_vui = vec_lvrx(0, &param_ui);             // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
-  res_vui = vec_lvrx(0, &vui);                  // CHECK: store <4 x i32> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  res_vui = vec_lvrx(0, &vui);                  // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vbi = vec_lvrx(0, &vbi);                  // CHECK: store <4 x i32> zeroinitializer
@@ -2040,30 +2040,30 @@
                                                 // CHECK: @llvm.ppc.altivec.lvsl
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
-  res_vf  = vec_lvrx(0, &vf);                   // CHECK: store <4 x float> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  res_vf  = vec_lvrx(0, &vf);                   // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x float> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   /* vec_lvrxl */
-  res_vsc = vec_lvrxl(0, &param_sc);            // CHECK: store <16 x i8> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvxl
+  res_vsc = vec_lvrxl(0, &param_sc);            // CHECK: @llvm.ppc.altivec.lvxl
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
-  res_vsc = vec_lvrxl(0, &vsc);                 // CHECK: store <16 x i8> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvxl
+  res_vsc = vec_lvrxl(0, &vsc);                 // CHECK: @llvm.ppc.altivec.lvxl
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
-  res_vuc = vec_lvrxl(0, &param_uc);            // CHECK: store <16 x i8> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvxl
+  res_vuc = vec_lvrxl(0, &param_uc);            // CHECK: @llvm.ppc.altivec.lvxl
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
-  res_vuc = vec_lvrxl(0, &vuc);                 // CHECK: store <16 x i8> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvxl
+  res_vuc = vec_lvrxl(0, &vuc);                 // CHECK: @llvm.ppc.altivec.lvxl
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vbc = vec_lvrxl(0, &vbc);                 // CHECK: store <16 x i8> zeroinitializer
@@ -2071,24 +2071,24 @@
                                                 // CHECK: @llvm.ppc.altivec.lvsl
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
-  res_vs  = vec_lvrxl(0, &param_s);             // CHECK: store <8 x i16> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvxl
+  res_vs  = vec_lvrxl(0, &param_s);             // CHECK: @llvm.ppc.altivec.lvxl
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
-  res_vs  = vec_lvrxl(0, &vs);                  // CHECK: store <8 x i16> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvxl
+  res_vs  = vec_lvrxl(0, &vs);                  // CHECK: @llvm.ppc.altivec.lvxl
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
-  res_vus = vec_lvrxl(0, &param_us);            // CHECK: store <8 x i16> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvxl
+  res_vus = vec_lvrxl(0, &param_us);            // CHECK: @llvm.ppc.altivec.lvxl
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
-  res_vus = vec_lvrxl(0, &vus);                 // CHECK: store <8 x i16> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvxl
+  res_vus = vec_lvrxl(0, &vus);                 // CHECK: @llvm.ppc.altivec.lvxl
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vbs = vec_lvrxl(0, &vbs);                 // CHECK: store <8 x i16> zeroinitializer
@@ -2101,24 +2101,24 @@
                                                 // CHECK: @llvm.ppc.altivec.lvsl
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
-  res_vi  = vec_lvrxl(0, &param_i);             // CHECK: store <4 x i32> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvxl
+  res_vi  = vec_lvrxl(0, &param_i);             // CHECK: @llvm.ppc.altivec.lvxl
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
-  res_vi  = vec_lvrxl(0, &vi);                  // CHECK: store <4 x i32> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvxl
+  res_vi  = vec_lvrxl(0, &vi);                  // CHECK: @llvm.ppc.altivec.lvxl
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
-  res_vui = vec_lvrxl(0, &param_ui);            // CHECK: store <4 x i32> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvxl
+  res_vui = vec_lvrxl(0, &param_ui);            // CHECK: @llvm.ppc.altivec.lvxl
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
-  res_vui = vec_lvrxl(0, &vui);                 // CHECK: store <4 x i32> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvxl
+  res_vui = vec_lvrxl(0, &vui);                 // CHECK: @llvm.ppc.altivec.lvxl
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   res_vbi = vec_lvrxl(0, &vbi);                 // CHECK: store <4 x i32> zeroinitializer
@@ -2126,39 +2126,39 @@
                                                 // CHECK: @llvm.ppc.altivec.lvsl
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
-  res_vf  = vec_lvrxl(0, &vf);                  // CHECK: store <4 x float> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvxl
+  res_vf  = vec_lvrxl(0, &vf);                  // CHECK: @llvm.ppc.altivec.lvxl
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x float> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
 
   /* vec_stvlx */
-  vec_stvlx(vsc, 0, &param_sc);                 // CHECK: store <16 x i8> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlx(vsc, 0, &param_sc);                 // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
-  vec_stvlx(vsc, 0, &vsc);                      // CHECK: store <16 x i8> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlx(vsc, 0, &vsc);                      // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
-  vec_stvlx(vuc, 0, &param_uc);                 // CHECK: store <16 x i8> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlx(vuc, 0, &param_uc);                 // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
-  vec_stvlx(vuc, 0, &vuc);                      // CHECK: store <16 x i8> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlx(vuc, 0, &vuc);                      // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
@@ -2172,33 +2172,33 @@
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
-  vec_stvlx(vs, 0, &param_s);                   // CHECK: store <8 x i16> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlx(vs, 0, &param_s);                   // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
-  vec_stvlx(vs, 0, &vs);                        // CHECK: store <8 x i16> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlx(vs, 0, &vs);                        // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
-  vec_stvlx(vus, 0, &param_us);                 // CHECK: store <8 x i16> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlx(vus, 0, &param_us);                 // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
-  vec_stvlx(vus, 0, &vus);                      // CHECK: store <8 x i16> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlx(vus, 0, &vus);                      // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
@@ -2220,33 +2220,33 @@
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
-  vec_stvlx(vi, 0, &param_i);                   // CHECK: store <4 x i32> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlx(vi, 0, &param_i);                   // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
-  vec_stvlx(vi, 0, &vi);                        // CHECK: store <4 x i32> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlx(vi, 0, &vi);                        // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
-  vec_stvlx(vui, 0, &param_ui);                 // CHECK: store <4 x i32> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlx(vui, 0, &param_ui);                 // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
-  vec_stvlx(vui, 0, &vui);                      // CHECK: store <4 x i32> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlx(vui, 0, &vui);                      // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
@@ -2260,42 +2260,42 @@
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
-  vec_stvlx(vf, 0, &vf);                        // CHECK: store <4 x float> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlx(vf, 0, &vf);                        // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x float> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
   /* vec_stvlxl */
-  vec_stvlxl(vsc, 0, &param_sc);                // CHECK: store <16 x i8> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlxl(vsc, 0, &param_sc);                // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvxl
 
-  vec_stvlxl(vsc, 0, &vsc);                     // CHECK: store <16 x i8> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlxl(vsc, 0, &vsc);                     // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvxl
 
-  vec_stvlxl(vuc, 0, &param_uc);                // CHECK: store <16 x i8> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlxl(vuc, 0, &param_uc);                // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvxl
 
-  vec_stvlxl(vuc, 0, &vuc);                     // CHECK: store <16 x i8> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlxl(vuc, 0, &vuc);                     // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
@@ -2309,33 +2309,33 @@
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvxl
 
-  vec_stvlxl(vs, 0, &param_s);                  // CHECK: store <8 x i16> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlxl(vs, 0, &param_s);                  // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvxl
 
-  vec_stvlxl(vs, 0, &vs);                       // CHECK: store <8 x i16> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlxl(vs, 0, &vs);                       // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvxl
 
-  vec_stvlxl(vus, 0, &param_us);                // CHECK: store <8 x i16> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlxl(vus, 0, &param_us);                // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvxl
 
-  vec_stvlxl(vus, 0, &vus);                     // CHECK: store <8 x i16> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlxl(vus, 0, &vus);                     // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
@@ -2357,33 +2357,33 @@
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvxl
 
-  vec_stvlxl(vi, 0, &param_i);                  // CHECK: store <4 x i32> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlxl(vi, 0, &param_i);                  // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvxl
 
-  vec_stvlxl(vi, 0, &vi);                       // CHECK: store <4 x i32> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlxl(vi, 0, &vi);                       // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvxl
 
-  vec_stvlxl(vui, 0, &param_ui);                // CHECK: store <4 x i32> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlxl(vui, 0, &param_ui);                // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvxl
 
-  vec_stvlxl(vui, 0, &vui);                     // CHECK: store <4 x i32> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlxl(vui, 0, &vui);                     // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
@@ -2397,9 +2397,9 @@
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvxl
 
-  vec_stvlxl(vf, 0, &vf);                       // CHECK: store <4 x float> zeroinitializer
-                                                // CHECK: @llvm.ppc.altivec.lvx
+  vec_stvlxl(vf, 0, &vf);                       // CHECK: @llvm.ppc.altivec.lvx
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x float> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
@@ -2407,32 +2407,32 @@
 
   /* vec_stvrx */
   vec_stvrx(vsc, 0, &param_sc);                 // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
   vec_stvrx(vsc, 0, &vsc);                      // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
   vec_stvrx(vuc, 0, &param_uc);                 // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
   vec_stvrx(vuc, 0, &vuc);                      // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
@@ -2447,32 +2447,32 @@
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
   vec_stvrx(vs, 0, &param_s);                   // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
   vec_stvrx(vs, 0, &vs);                        // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
   vec_stvrx(vus, 0, &param_us);                 // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
   vec_stvrx(vus, 0, &vus);                      // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
@@ -2495,32 +2495,32 @@
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
   vec_stvrx(vi, 0, &param_i);                   // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
   vec_stvrx(vi, 0, &vi);                        // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
   vec_stvrx(vui, 0, &param_ui);                 // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
   vec_stvrx(vui, 0, &vui);                      // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
@@ -2535,8 +2535,8 @@
                                                 // CHECK: @llvm.ppc.altivec.stvx
 
   vec_stvrx(vf, 0, &vf);                        // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <4 x float> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x float> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
@@ -2544,32 +2544,32 @@
 
   /* vec_stvrxl */
   vec_stvrxl(vsc, 0, &param_sc);                // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvxl
 
   vec_stvrxl(vsc, 0, &vsc);                     // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvxl
 
   vec_stvrxl(vuc, 0, &param_uc);                // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvxl
 
   vec_stvrxl(vuc, 0, &vuc);                     // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <16 x i8> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
@@ -2584,32 +2584,32 @@
                                                 // CHECK: @llvm.ppc.altivec.stvxl
 
   vec_stvrxl(vs, 0, &param_s);                  // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvxl
 
   vec_stvrxl(vs, 0, &vs);                       // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvxl
 
   vec_stvrxl(vus, 0, &param_us);                // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvxl
 
   vec_stvrxl(vus, 0, &vus);                     // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <8 x i16> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
@@ -2632,32 +2632,32 @@
                                                 // CHECK: @llvm.ppc.altivec.stvxl
 
   vec_stvrxl(vi, 0, &param_i);                  // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvxl
 
   vec_stvrxl(vi, 0, &vi);                       // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvxl
 
   vec_stvrxl(vui, 0, &param_ui);                // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.stvxl
 
   vec_stvrxl(vui, 0, &vui);                     // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x i32> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
@@ -2672,8 +2672,8 @@
                                                 // CHECK: @llvm.ppc.altivec.stvxl
 
   vec_stvrxl(vf, 0, &vf);                       // CHECK: @llvm.ppc.altivec.lvx
-                                                // CHECK: store <4 x float> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.lvsl
+                                                // CHECK: store <4 x float> zeroinitializer
                                                 // CHECK: @llvm.ppc.altivec.vperm
                                                 // CHECK: @llvm.ppc.altivec.lvsr
                                                 // CHECK: @llvm.ppc.altivec.vperm
@@ -3053,7 +3053,7 @@
   res_i = vec_any_out(vf, vf);                  // CHECK: @llvm.ppc.altivec.vcmpbfp.p
 }
 
-/* ------------------------------ Relational Operators------------------------------- */
+/* ------------------------------ Relational Operators ------------------------------ */
 // CHECK: define void @test7
 void test7() {
   vector signed char vsc1 = (vector signed char)(-1);
@@ -3113,14 +3113,3 @@
   res_i = (vf1 <= vf2);                    // CHECK: @llvm.ppc.altivec.vcmpgefp.p(i32 2
   res_i = (vf1 >= vf2);                    // CHECK: @llvm.ppc.altivec.vcmpgefp.p(i32 2
 }
-
-/* ------------------------------- increment/decrement: ----------------------------- */
-// CHECK: define void @test8
-void test8() {
-  vector int vi;
-  vi++;                                    // CHECK: add nsw <4 x i32> {{.*}} <i32 1, i32 1, i32 1, i32 1>
-  vector unsigned int vui;
-  --vui;                                   // CHECK: add <4 x i32> {{.*}} <i32 -1, i32 -1, i32 -1, i32 -1>
-  vector float vf;
-  vf++;                                    // CHECK: fadd <4 x float> {{.*}} <float 1.000000e+{{0+}}, float 1.000000e+{{0+}}, float 1.000000e+{{0+}}, float 1.000000e+{{0+}}>
-}

Modified: cfe/trunk/test/Sema/altivec-init.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/altivec-init.c?rev=128375&r1=128374&r2=128375&view=diff
==============================================================================
--- cfe/trunk/test/Sema/altivec-init.c (original)
+++ cfe/trunk/test/Sema/altivec-init.c Sun Mar 27 04:32:40 2011
@@ -9,6 +9,18 @@
   a = (v8){4, 2};
   b = (v4)(5, 6, 7, 8, 9); // expected-warning {{excess elements in vector initializer}}
   b = (v4)(5, 6, 8, 8.0f);
+
+  vector int vi;
+  vi = (vector int)(1);
+  vi = (vector int)(1, 2);          // expected-error {{number of elements must be either one or match the size of the vector}}
+  vi = (vector int)(1, 2, 3, 4);
+  vi = (vector int)(1, 2, 3, 4, 5); // expected-warning {{excess elements in vector initializer}}
+  vi = (vector int){1};
+  vi = (vector int){1, 2};
+  vi = (vector int){1, 2, 3, 4, 5}; // expected-warning {{excess elements in vector initializer}}
+  vector float vf;
+  vf = (vector float)(1.0);
+
   return (v8){0, 1, 2, 3, 1, 2, 3, 4};
 
   // FIXME: test that (type)(fn)(args) still works with -faltivec





More information about the cfe-commits mailing list