Index: lib/CodeGen/CGBuiltin.cpp
===================================================================
--- lib/CodeGen/CGBuiltin.cpp	(revision 105793)
+++ lib/CodeGen/CGBuiltin.cpp	(working copy)
@@ -1551,6 +1551,49 @@
   switch (BuiltinID) {
   default: return 0;
 
+  // vec_ld, vec_lvsl, vec_lvsr
+  case PPC::BI__builtin_altivec_lvx:
+  case PPC::BI__builtin_altivec_lvxl:
+  case PPC::BI__builtin_altivec_lvebx:
+  case PPC::BI__builtin_altivec_lvehx:
+  case PPC::BI__builtin_altivec_lvewx:
+  case PPC::BI__builtin_altivec_lvsl:
+  case PPC::BI__builtin_altivec_lvsr:
+  {
+    Ops[1] = Builder.CreateBitCast(Ops[1], llvm::Type::getInt8PtrTy(VMContext));
+
+    Ops[0] = !isa<Constant>(Ops[0]) || !cast<Constant>(Ops[0])->isNullValue()
+             ? Builder.CreateGEP(Ops[1], Ops[0], "tmp") : Ops[1];
+    Ops.pop_back();
+
+    switch (BuiltinID) {
+    default: assert(0 && "Unsupported ld/lvsl/lvsr intrinsic!");
+    case PPC::BI__builtin_altivec_lvx:
+      ID = Intrinsic::ppc_altivec_lvx;
+      break;
+    case PPC::BI__builtin_altivec_lvxl:
+      ID = Intrinsic::ppc_altivec_lvxl;
+      break;
+    case PPC::BI__builtin_altivec_lvebx:
+      ID = Intrinsic::ppc_altivec_lvebx;
+      break;
+    case PPC::BI__builtin_altivec_lvehx:
+      ID = Intrinsic::ppc_altivec_lvehx;
+      break;
+    case PPC::BI__builtin_altivec_lvewx:
+      ID = Intrinsic::ppc_altivec_lvewx;
+      break;
+    case PPC::BI__builtin_altivec_lvsl:
+      ID = Intrinsic::ppc_altivec_lvsl;
+      break;
+    case PPC::BI__builtin_altivec_lvsr:
+      ID = Intrinsic::ppc_altivec_lvsr;
+      break;
+    }
+    llvm::Function *F = CGM.getIntrinsic(ID);
+    return Builder.CreateCall(F, &Ops[0], &Ops[0] + Ops.size(), "");
+  }
+
   // vec_st
   case PPC::BI__builtin_altivec_stvx:
   case PPC::BI__builtin_altivec_stvxl:
@@ -1564,7 +1607,7 @@
     Ops.pop_back();
 
     switch (BuiltinID) {
-    default: assert(0 && "Unsupported vavg intrinsic!");
+    default: assert(0 && "Unsupported st intrinsic!");
     case PPC::BI__builtin_altivec_stvx:
       ID = Intrinsic::ppc_altivec_stvx;
       break;
Index: include/clang/Basic/BuiltinsPPC.def
===================================================================
--- include/clang/Basic/BuiltinsPPC.def	(revision 105793)
+++ include/clang/Basic/BuiltinsPPC.def	(working copy)
@@ -18,14 +18,6 @@
 // The format of this database matches clang/Basic/Builtins.def.
 
 // This is just a placeholder, the types and attributes are wrong.
-BUILTIN(__builtin_altivec_abs_v16qi, "V16UcV16Sc", "")
-BUILTIN(__builtin_altivec_abs_v8hi, "V8UsV8Ss", "")
-BUILTIN(__builtin_altivec_abs_v4si, "V4UiV4Si", "")
-
-BUILTIN(__builtin_altivec_abss_v16qi, "V16UcV16Sc", "")
-BUILTIN(__builtin_altivec_abss_v8hi, "V8UsV8Ss", "")
-BUILTIN(__builtin_altivec_abss_v4si, "V4UiV4Si", "")
-
 BUILTIN(__builtin_altivec_vaddcuw, "V4UiV4UiV4Ui", "")
 
 BUILTIN(__builtin_altivec_vaddsbs, "V16ScV16ScV16Sc", "")
@@ -49,6 +41,67 @@
 BUILTIN(__builtin_altivec_vavgsw, "V4SiV4SiV4Si", "")
 BUILTIN(__builtin_altivec_vavguw, "V4UiV4UiV4Ui", "")
 
+BUILTIN(__builtin_altivec_vrfip, "V4fV4f", "")
+
+BUILTIN(__builtin_altivec_vcfsx, "V4fV4ii", "")
+BUILTIN(__builtin_altivec_vcfux, "V4fV4ii", "")
+BUILTIN(__builtin_altivec_vctsxs, "V4SiV4fi", "")
+BUILTIN(__builtin_altivec_vctuxs, "V4UiV4fi", "")
+
+BUILTIN(__builtin_altivec_dss, "vUi", "")
+BUILTIN(__builtin_altivec_dssall, "v", "")
+BUILTIN(__builtin_altivec_dst, "vv*iUi", "") 
+BUILTIN(__builtin_altivec_dstt, "vv*iUi", "")
+BUILTIN(__builtin_altivec_dstst, "vv*iUi", "")
+BUILTIN(__builtin_altivec_dststt, "vv*iUi", "")
+
+BUILTIN(__builtin_altivec_vexptefp, "V4fV4f", "")
+
+BUILTIN(__builtin_altivec_vrfim, "V4fV4f", "")
+
+BUILTIN(__builtin_altivec_lvx, "V4iiv*", "")
+BUILTIN(__builtin_altivec_lvxl, "V4iiv*", "")
+BUILTIN(__builtin_altivec_lvebx, "V16civ*", "")
+BUILTIN(__builtin_altivec_lvehx, "V8siv*", "")
+BUILTIN(__builtin_altivec_lvewx, "V4iiv*", "")
+
+BUILTIN(__builtin_altivec_vlogefp, "V4fV4f", "")
+
+BUILTIN(__builtin_altivec_lvsl, "V16cUcv*", "")
+BUILTIN(__builtin_altivec_lvsr, "V16cUcv*", "")
+
+BUILTIN(__builtin_altivec_vmaddfp, "V4fV4fV4fV4f", "")
+BUILTIN(__builtin_altivec_vmhaddshs, "V8sV8sV8sV8s", "")
+BUILTIN(__builtin_altivec_vmhraddshs, "V8sV8sV8sV8s", "")
+
+BUILTIN(__builtin_altivec_vmsumubm, "V4UiV16UcV16UcV4Ui", "")
+BUILTIN(__builtin_altivec_vmsummbm, "V4SiV16ScV16UcV4Si", "")
+BUILTIN(__builtin_altivec_vmsumuhm, "V4UiV8UsV8UsV4Ui", "")
+BUILTIN(__builtin_altivec_vmsumshm, "V4SiV8SsV8SsV4Si", "")
+BUILTIN(__builtin_altivec_vmsumuhs, "V4UiV8UsV8UsV4Ui", "")
+BUILTIN(__builtin_altivec_vmsumshs, "V4SiV8SsV8SsV4Si", "")
+
+BUILTIN(__builtin_altivec_vmuleub, "V8UsV16UcV16Uc", "")
+BUILTIN(__builtin_altivec_vmulesb, "V8SsV16ScV16Sc", "")
+BUILTIN(__builtin_altivec_vmuleuh, "V4UiV8UsV8Us", "")
+BUILTIN(__builtin_altivec_vmulesh, "V4SiV8SsV8Ss", "")
+BUILTIN(__builtin_altivec_vmuloub, "V8UsV16UcV16Uc", "")
+BUILTIN(__builtin_altivec_vmulosb, "V8SsV16ScV16Sc", "")
+BUILTIN(__builtin_altivec_vmulouh, "V4UiV8UsV8Us", "")
+BUILTIN(__builtin_altivec_vmulosh, "V4SiV8SsV8Ss", "")
+
+BUILTIN(__builtin_altivec_vnmsubfp, "V4fV4fV4fV4f", "")
+
+BUILTIN(__builtin_altivec_vpkpx, "V8sV4UiV4Ui", "")
+BUILTIN(__builtin_altivec_vpkuhus, "V16UcV8UsV8Us", "")
+BUILTIN(__builtin_altivec_vpkshss, "V16ScV8SsV8Ss", "")
+BUILTIN(__builtin_altivec_vpkuwus, "V8UsV4UiV4Ui", "")
+BUILTIN(__builtin_altivec_vpkswss, "V8SsV4SiV4Si", "")
+BUILTIN(__builtin_altivec_vpkshus, "V16UcV8SsV8Ss", "")
+BUILTIN(__builtin_altivec_vpkswus, "V8UsV4SiV4Si", "")
+
+BUILTIN(__builtin_altivec_vperm_4si, "V4iV4iV4iV16Uc", "")
+
 BUILTIN(__builtin_altivec_stvx, "vV4iiv*", "")
 BUILTIN(__builtin_altivec_stvxl, "vV4iiv*", "")
 BUILTIN(__builtin_altivec_stvebx, "vV16civ*", "")
@@ -92,6 +145,48 @@
 
 BUILTIN(__builtin_altivec_mtvscr, "vV4i", "")
 
+BUILTIN(__builtin_altivec_vrefp, "V4fV4f", "")
+
+BUILTIN(__builtin_altivec_vrlb, "V16cV16cV16Uc", "")
+BUILTIN(__builtin_altivec_vrlh, "V8sV8sV8Us", "")
+BUILTIN(__builtin_altivec_vrlw, "V4iV4iV4Ui", "")
+
+BUILTIN(__builtin_altivec_vsel_4si, "V4iV4iV4iV4Ui", "")
+
+BUILTIN(__builtin_altivec_vsl, "V4iV4iV4i", "")
+BUILTIN(__builtin_altivec_vslo, "V4iV4iV4i", "")
+
+BUILTIN(__builtin_altivec_vsrab, "V16cV16cV16Uc", "")
+BUILTIN(__builtin_altivec_vsrah, "V8sV8sV8Us", "")
+BUILTIN(__builtin_altivec_vsraw, "V4iV4iV4Ui", "")
+
+BUILTIN(__builtin_altivec_vsr, "V4iV4iV4i", "")
+BUILTIN(__builtin_altivec_vsro, "V4iV4iV4i", "")
+
+BUILTIN(__builtin_altivec_vrfin, "V4fV4f", "")
+
+BUILTIN(__builtin_altivec_vrsqrtefp, "V4fV4f", "")
+
+BUILTIN(__builtin_altivec_vsubcuw, "V4UiV4UiV4Ui", "")
+
+BUILTIN(__builtin_altivec_vsum4sbs, "V4SiV16ScV4Si", "")
+BUILTIN(__builtin_altivec_vsum4ubs, "V4UiV16UcV4Ui", "")
+BUILTIN(__builtin_altivec_vsum4shs, "V4SiV8SsV4Si", "")
+
+BUILTIN(__builtin_altivec_vsum2sws, "V4SiV4SiV4Si", "")
+
+BUILTIN(__builtin_altivec_vsumsws, "V4SiV4SiV4Si", "")
+
+BUILTIN(__builtin_altivec_vrfiz, "V4fV4f", "")
+
+BUILTIN(__builtin_altivec_vupkhsb, "V8sV16c", "")
+BUILTIN(__builtin_altivec_vupkhpx, "V4UiV8s", "")
+BUILTIN(__builtin_altivec_vupkhsh, "V4iV8s", "")
+
+BUILTIN(__builtin_altivec_vupklsb, "V8sV16c", "")
+BUILTIN(__builtin_altivec_vupklpx, "V4UiV8s", "")
+BUILTIN(__builtin_altivec_vupklsh, "V4iV8s", "")
+
 BUILTIN(__builtin_altivec_vcmpbfp_p, "iiV4fV4f", "")
 
 BUILTIN(__builtin_altivec_vcmpgefp_p, "iiV4fV4f", "")
Index: lib/Headers/altivec.h
===================================================================
--- lib/Headers/altivec.h	(revision 105793)
+++ lib/Headers/altivec.h	(working copy)
@@ -20,6 +20,9 @@
  *
 \*===----------------------------------------------------------------------===*/
 
+// TODO: add functions for 'vector bool ..' and 'vector pixel' argument types according to 
+// the 'AltiVec Technology Programming Interface Manual'
+
 #ifndef __ALTIVEC_H
 #define __ALTIVEC_H
 
@@ -34,534 +37,629 @@
 #define __CR6_LT     2
 #define __CR6_LT_REV 3
 
-#define _ATTRS_o_ai __attribute__((__overloadable__, __always_inline__))
+#define __ATTRS_o_ai __attribute__((__overloadable__, __always_inline__))
 
+static vector signed char __ATTRS_o_ai
+vec_perm(vector signed char a, vector signed char b, vector unsigned char c);
+
+static vector unsigned char __ATTRS_o_ai
+vec_perm(vector unsigned char a, vector unsigned char b, vector unsigned char c);
+
+static vector short __ATTRS_o_ai
+vec_perm(vector short a, vector short b, vector unsigned char c);
+
+static vector unsigned short __ATTRS_o_ai
+vec_perm(vector unsigned short a, vector unsigned short b, vector unsigned char c);
+
+static vector int __ATTRS_o_ai
+vec_perm(vector int a, vector int b, vector unsigned char c);
+
+static vector unsigned int __ATTRS_o_ai
+vec_perm(vector unsigned int a, vector unsigned int b, vector unsigned char c);
+
+static vector float __ATTRS_o_ai
+vec_perm(vector float a, vector float b, vector unsigned char c);
+
 /* vec_abs */
 
-#define __builtin_vec_abs vec_abs
 #define __builtin_altivec_abs_v16qi vec_abs
 #define __builtin_altivec_abs_v8hi  vec_abs
 #define __builtin_altivec_abs_v4si  vec_abs
 
-static vector signed char _ATTRS_o_ai
+static vector signed char __ATTRS_o_ai
 vec_abs(vector signed char a)
 {
   return __builtin_altivec_vmaxsb(a, -a);
 }
 
-static vector signed short _ATTRS_o_ai
+static vector signed short __ATTRS_o_ai
 vec_abs(vector signed short a)
 {
   return __builtin_altivec_vmaxsh(a, -a);
 }
 
-static vector signed int _ATTRS_o_ai
+static vector signed int __ATTRS_o_ai
 vec_abs(vector signed int a)
 {
   return __builtin_altivec_vmaxsw(a, -a);
 }
 
-static vector float _ATTRS_o_ai
+static vector float __ATTRS_o_ai
 vec_abs(vector float a)
 {
-  vector unsigned int res = (vector unsigned int)a &
-                            (vector unsigned int)(0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF);
+  vector unsigned int res = (vector unsigned int)a & (vector unsigned int)(0x7FFFFFFF);
   return (vector float)res;
 }
 
 /* vec_abss */
 
-#define __builtin_vec_abss vec_abss
 #define __builtin_altivec_abss_v16qi vec_abss
 #define __builtin_altivec_abss_v8hi  vec_abss
 #define __builtin_altivec_abss_v4si  vec_abss
 
-static vector signed char _ATTRS_o_ai
+static vector signed char __ATTRS_o_ai
 vec_abss(vector signed char a)
 {
-  return __builtin_altivec_vmaxsb(a, __builtin_altivec_vsubsbs(
-    (vector signed char)(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), a));
+  return __builtin_altivec_vmaxsb(a, __builtin_altivec_vsubsbs((vector signed char)(0), a));
 }
 
-static vector signed short _ATTRS_o_ai
+static vector signed short __ATTRS_o_ai
 vec_abss(vector signed short a)
 {
-  return __builtin_altivec_vmaxsh(a, __builtin_altivec_vsubshs(
-    (vector signed short)(0, 0, 0, 0, 0, 0, 0, 0), a));
+  return __builtin_altivec_vmaxsh(a, __builtin_altivec_vsubshs((vector signed short)(0), a));
 }
 
-static vector signed int _ATTRS_o_ai
+static vector signed int __ATTRS_o_ai
 vec_abss(vector signed int a)
 {
-  return __builtin_altivec_vmaxsw(a, __builtin_altivec_vsubsws(
-    (vector signed int)(0, 0, 0, 0), a));
+  return __builtin_altivec_vmaxsw(a, __builtin_altivec_vsubsws((vector signed int)(0), a));
 }
 
 /* vec_add */
 
-#define __builtin_altivec_vaddubm vec_add
-#define __builtin_altivec_vadduhm vec_add
-#define __builtin_altivec_vadduwm vec_add
-#define __builtin_altivec_vaddfp  vec_add
-#define __builtin_vec_vaddubm vec_add
-#define __builtin_vec_vadduhm vec_add
-#define __builtin_vec_vadduwm vec_add
-#define __builtin_vec_vaddfp  vec_add
-#define vec_vaddubm vec_add
-#define vec_vadduhm vec_add
-#define vec_vadduwm vec_add
-#define vec_vaddfp  vec_add
-
-static vector signed char _ATTRS_o_ai
+static vector signed char __ATTRS_o_ai
 vec_add(vector signed char a, vector signed char b)
 {
   return a + b;
 }
 
-static vector unsigned char _ATTRS_o_ai
+static vector unsigned char __ATTRS_o_ai
 vec_add(vector unsigned char a, vector unsigned char b)
 {
   return a + b;
 }
 
-static vector short _ATTRS_o_ai
+static vector short __ATTRS_o_ai
 vec_add(vector short a, vector short b)
 {
   return a + b;
 }
 
-static vector unsigned short _ATTRS_o_ai
+static vector unsigned short __ATTRS_o_ai
 vec_add(vector unsigned short a, vector unsigned short b)
 {
   return a + b;
 }
 
-static vector int _ATTRS_o_ai
+static vector int __ATTRS_o_ai
 vec_add(vector int a, vector int b)
 {
   return a + b;
 }
 
-static vector unsigned int _ATTRS_o_ai
+static vector unsigned int __ATTRS_o_ai
 vec_add(vector unsigned int a, vector unsigned int b)
 {
   return a + b;
 }
 
-static vector float _ATTRS_o_ai
+static vector float __ATTRS_o_ai
 vec_add(vector float a, vector float b)
 {
   return a + b;
 }
 
+/* vec_vaddubm */
+
+#define __builtin_altivec_vaddubm vec_vaddubm
+
+static vector signed char __ATTRS_o_ai
+vec_vaddubm(vector signed char a, vector signed char b)
+{
+  return a + b;
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vaddubm(vector unsigned char a, vector unsigned char b)
+{
+  return a + b;
+}
+
+/* vec_vadduhm */
+
+#define __builtin_altivec_vadduhm vec_vadduhm
+
+static vector short __ATTRS_o_ai
+vec_vadduhm(vector short a, vector short b)
+{
+  return a + b;
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vadduhm(vector unsigned short a, vector unsigned short b)
+{
+  return a + b;
+}
+
+/* vec_vadduwm */
+
+#define __builtin_altivec_vadduwm vec_vadduwm
+
+static vector int __ATTRS_o_ai
+vec_vadduwm(vector int a, vector int b)
+{
+  return a + b;
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_vadduwm(vector unsigned int a, vector unsigned int b)
+{
+  return a + b;
+}
+
+/* vec_vaddfp */
+
+#define __builtin_altivec_vaddfp  vec_vaddfp
+
+static vector float __attribute__((__always_inline__))
+vec_vaddfp(vector float a, vector float b)
+{
+  return a + b;
+}
+
 /* vec_addc */
 
-#define __builtin_vec_addc __builtin_altivec_vaddcuw
-#define vec_vaddcuw        __builtin_altivec_vaddcuw
-#define vec_addc           __builtin_altivec_vaddcuw
+static vector unsigned int __attribute__((__always_inline__))
+vec_addc(vector unsigned int a, vector unsigned int b)
+{
+  return __builtin_altivec_vaddcuw(a, b);
+}
 
+/* vec_vaddcuw */
+
+static vector unsigned int __attribute__((__always_inline__))
+vec_vaddcuw(vector unsigned int a, vector unsigned int b)
+{
+  return __builtin_altivec_vaddcuw(a, b);
+}
+
 /* vec_adds */
 
-#define __builtin_vec_vaddsbs __builtin_altivec_vaddsbs
-#define __builtin_vec_vaddubs __builtin_altivec_vaddubs
-#define __builtin_vec_vaddshs __builtin_altivec_vaddshs
-#define __builtin_vec_vadduhs __builtin_altivec_vadduhs
-#define __builtin_vec_vaddsws __builtin_altivec_vaddsws
-#define __builtin_vec_vadduws __builtin_altivec_vadduws
-#define vec_vaddsbs __builtin_altivec_vaddsbs
-#define vec_vaddubs __builtin_altivec_vaddubs
-#define vec_vaddshs __builtin_altivec_vaddshs
-#define vec_vadduhs __builtin_altivec_vadduhs
-#define vec_vaddsws __builtin_altivec_vaddsws
-#define vec_vadduws __builtin_altivec_vadduws
-
-static vector signed char _ATTRS_o_ai
+static vector signed char __ATTRS_o_ai
 vec_adds(vector signed char a, vector signed char b)
 {
   return __builtin_altivec_vaddsbs(a, b);
 }
 
-static vector unsigned char _ATTRS_o_ai
+static vector unsigned char __ATTRS_o_ai
 vec_adds(vector unsigned char a, vector unsigned char b)
 {
   return __builtin_altivec_vaddubs(a, b);
 }
 
-static vector short _ATTRS_o_ai
+static vector short __ATTRS_o_ai
 vec_adds(vector short a, vector short b)
 {
   return __builtin_altivec_vaddshs(a, b);
 }
 
-static vector unsigned short _ATTRS_o_ai
+static vector unsigned short __ATTRS_o_ai
 vec_adds(vector unsigned short a, vector unsigned short b)
 {
   return __builtin_altivec_vadduhs(a, b);
 }
 
-static vector int _ATTRS_o_ai
+static vector int __ATTRS_o_ai
 vec_adds(vector int a, vector int b)
 {
   return __builtin_altivec_vaddsws(a, b);
 }
 
-static vector unsigned int _ATTRS_o_ai
+static vector unsigned int __ATTRS_o_ai
 vec_adds(vector unsigned int a, vector unsigned int b)
 {
   return __builtin_altivec_vadduws(a, b);
 }
 
-/* vec_sub */
+/* vec_vaddsbs */
 
-#define __builtin_altivec_vsububm vec_sub
-#define __builtin_altivec_vsubuhm vec_sub
-#define __builtin_altivec_vsubuwm vec_sub
-#define __builtin_altivec_vsubfp  vec_sub
-#define __builtin_vec_vsububm vec_sub
-#define __builtin_vec_vsubuhm vec_sub
-#define __builtin_vec_vsubuwm vec_sub
-#define __builtin_vec_vsubfp  vec_sub
-#define vec_vsububm vec_sub
-#define vec_vsubuhm vec_sub
-#define vec_vsubuwm vec_sub
-#define vec_vsubfp  vec_sub
+static vector signed char __attribute__((__always_inline__))
+vec_vaddsbs(vector signed char a, vector signed char b)
+{
+  return __builtin_altivec_vaddsbs(a, b);
+}
 
-static vector signed char _ATTRS_o_ai
-vec_sub(vector signed char a, vector signed char b)
+/* vec_vaddubs */
+
+static vector unsigned char __attribute__((__always_inline__))
+vec_vaddubs(vector unsigned char a, vector unsigned char b)
 {
-  return a - b;
+  return __builtin_altivec_vaddubs(a, b);
 }
 
-static vector unsigned char _ATTRS_o_ai
-vec_sub(vector unsigned char a, vector unsigned char b)
+/* vec_vaddshs */
+
+static vector short __attribute__((__always_inline__))
+vec_vaddshs(vector short a, vector short b)
 {
-  return a - b;
+  return __builtin_altivec_vaddshs(a, b);
 }
 
-static vector short _ATTRS_o_ai
-vec_sub(vector short a, vector short b)
+/* vec_vadduhs */
+
+static vector unsigned short __attribute__((__always_inline__))
+vec_vadduhs(vector unsigned short a, vector unsigned short b)
 {
-  return a - b;
+  return __builtin_altivec_vadduhs(a, b);
 }
 
-static vector unsigned short _ATTRS_o_ai
-vec_sub(vector unsigned short a, vector unsigned short b)
+/* vec_vaddsws */
+
+static vector int __attribute__((__always_inline__))
+vec_vaddsws(vector int a, vector int b)
 {
-  return a - b;
+  return __builtin_altivec_vaddsws(a, b);
 }
 
-static vector int _ATTRS_o_ai
-vec_sub(vector int a, vector int b)
+/* vec_vadduws */
+
+static vector unsigned int __attribute__((__always_inline__))
+vec_vadduws(vector unsigned int a, vector unsigned int b)
 {
-  return a - b;
+  return __builtin_altivec_vadduws(a, b);
 }
 
-static vector unsigned int _ATTRS_o_ai
-vec_sub(vector unsigned int a, vector unsigned int b)
+/* vec_and */
+
+#define __builtin_altivec_vand vec_and
+
+static vector signed char __ATTRS_o_ai
+vec_and(vector signed char a, vector signed char b)
 {
-  return a - b;
+  return a & b;
 }
 
-static vector float _ATTRS_o_ai
-vec_sub(vector float a, vector float b)
+static vector unsigned char __ATTRS_o_ai
+vec_and(vector unsigned char a, vector unsigned char b)
 {
-  return a - b;
+  return a & b;
 }
 
-/* vec_subs */
+static vector short __ATTRS_o_ai
+vec_and(vector short a, vector short b)
+{
+  return a & b;
+}
 
-#define __builtin_vec_vsubsbs __builtin_altivec_vsubsbs
-#define __builtin_vec_vsububs __builtin_altivec_vsububs
-#define __builtin_vec_vsubshs __builtin_altivec_vsubshs
-#define __builtin_vec_vsubuhs __builtin_altivec_vsubuhs
-#define __builtin_vec_vsubsws __builtin_altivec_vsubsws
-#define __builtin_vec_vsubuws __builtin_altivec_vsubuws
-#define vec_vsubsbs __builtin_altivec_vsubsbs
-#define vec_vsububs __builtin_altivec_vsububs
-#define vec_vsubshs __builtin_altivec_vsubshs
-#define vec_vsubuhs __builtin_altivec_vsubuhs
-#define vec_vsubsws __builtin_altivec_vsubsws
-#define vec_vsubuws __builtin_altivec_vsubuws
+static vector unsigned short __ATTRS_o_ai
+vec_and(vector unsigned short a, vector unsigned short b)
+{
+  return a & b;
+}
 
-static vector signed char _ATTRS_o_ai
-vec_subs(vector signed char a, vector signed char b)
+static vector int __ATTRS_o_ai
+vec_and(vector int a, vector int b)
 {
-  return __builtin_altivec_vsubsbs(a, b);
+  return a & b;
 }
 
-static vector unsigned char _ATTRS_o_ai
-vec_subs(vector unsigned char a, vector unsigned char b)
+static vector unsigned int __ATTRS_o_ai
+vec_and(vector unsigned int a, vector unsigned int b)
 {
-  return __builtin_altivec_vsububs(a, b);
+  return a & b;
 }
 
-static vector short _ATTRS_o_ai
-vec_subs(vector short a, vector short b)
+static vector float __ATTRS_o_ai
+vec_and(vector float a, vector float b)
 {
-  return __builtin_altivec_vsubshs(a, b);
+  vector unsigned int res = (vector unsigned int)a & (vector unsigned int)b;
+  return (vector float)res;
 }
 
-static vector unsigned short _ATTRS_o_ai
-vec_subs(vector unsigned short a, vector unsigned short b)
+/* vec_vand */
+
+static vector signed char __ATTRS_o_ai
+vec_vand(vector signed char a, vector signed char b)
 {
-  return __builtin_altivec_vsubuhs(a, b);
+  return a & b;
 }
 
-static vector int _ATTRS_o_ai
-vec_subs(vector int a, vector int b)
+static vector unsigned char __ATTRS_o_ai
+vec_vand(vector unsigned char a, vector unsigned char b)
 {
-  return __builtin_altivec_vsubsws(a, b);
+  return a & b;
 }
 
-static vector unsigned int _ATTRS_o_ai
-vec_subs(vector unsigned int a, vector unsigned int b)
+static vector short __ATTRS_o_ai
+vec_vand(vector short a, vector short b)
 {
-  return __builtin_altivec_vsubuws(a, b);
+  return a & b;
 }
 
-/* vec_avg */
+static vector unsigned short __ATTRS_o_ai
+vec_vand(vector unsigned short a, vector unsigned short b)
+{
+  return a & b;
+}
 
-#define __builtin_vec_vavgsb __builtin_altivec_vavgsb
-#define __builtin_vec_vavgub __builtin_altivec_vavgub
-#define __builtin_vec_vavgsh __builtin_altivec_vavgsh
-#define __builtin_vec_vavguh __builtin_altivec_vavguh
-#define __builtin_vec_vavgsw __builtin_altivec_vavgsw
-#define __builtin_vec_vavguw __builtin_altivec_vavguw
-#define vec_vavgsb __builtin_altivec_vavgsb
-#define vec_vavgub __builtin_altivec_vavgub
-#define vec_vavgsh __builtin_altivec_vavgsh
-#define vec_vavguh __builtin_altivec_vavguh
-#define vec_vavgsw __builtin_altivec_vavgsw
-#define vec_vavguw __builtin_altivec_vavguw
+static vector int __ATTRS_o_ai
+vec_vand(vector int a, vector int b)
+{
+  return a & b;
+}
 
-static vector signed char _ATTRS_o_ai
-vec_avg(vector signed char a, vector signed char b)
+static vector unsigned int __ATTRS_o_ai
+vec_vand(vector unsigned int a, vector unsigned int b)
 {
-  return __builtin_altivec_vavgsb(a, b);
+  return a & b;
 }
 
-static vector unsigned char _ATTRS_o_ai
-vec_avg(vector unsigned char a, vector unsigned char b)
+static vector float __ATTRS_o_ai
+vec_vand(vector float a, vector float b)
 {
-  return __builtin_altivec_vavgub(a, b);
+  vector unsigned int res = (vector unsigned int)a & (vector unsigned int)b;
+  return (vector float)res;
 }
 
-static vector short _ATTRS_o_ai
-vec_avg(vector short a, vector short b)
+/* vec_andc */
+
+#define __builtin_altivec_vandc vec_andc
+
+static vector signed char __ATTRS_o_ai
+vec_andc(vector signed char a, vector signed char b)
 {
-  return __builtin_altivec_vavgsh(a, b);
+  return a & ~b;
 }
 
-static vector unsigned short _ATTRS_o_ai
-vec_avg(vector unsigned short a, vector unsigned short b)
+static vector unsigned char __ATTRS_o_ai
+vec_andc(vector unsigned char a, vector unsigned char b)
 {
-  return __builtin_altivec_vavguh(a, b);
+  return a & ~b;
 }
 
-static vector int _ATTRS_o_ai
-vec_avg(vector int a, vector int b)
+static vector short __ATTRS_o_ai
+vec_andc(vector short a, vector short b)
 {
-  return __builtin_altivec_vavgsw(a, b);
+  return a & ~b;
 }
 
-static vector unsigned int _ATTRS_o_ai
-vec_avg(vector unsigned int a, vector unsigned int b)
+static vector unsigned short __ATTRS_o_ai
+vec_andc(vector unsigned short a, vector unsigned short b)
 {
-  return __builtin_altivec_vavguw(a, b);
+  return a & ~b;
 }
 
-/* vec_st */
+static vector int __ATTRS_o_ai
+vec_andc(vector int a, vector int b)
+{
+  return a & ~b;
+}
 
-#define __builtin_vec_st vec_st
-#define vec_stvx         vec_st
+static vector unsigned int __ATTRS_o_ai
+vec_andc(vector unsigned int a, vector unsigned int b)
+{
+  return a & ~b;
+}
 
-static void _ATTRS_o_ai
-vec_st(vector signed char a, int b, vector signed char *c)
+static vector float __ATTRS_o_ai
+vec_andc(vector float a, vector float b)
 {
-  __builtin_altivec_stvx((vector int)a, b, (void *)c);
+  vector unsigned int res = (vector unsigned int)a & ~(vector unsigned int)b;
+  return (vector float)res;
 }
 
-static void _ATTRS_o_ai
-vec_st(vector unsigned char a, int b, vector unsigned char *c)
+/* vec_vandc */
+
+static vector signed char __ATTRS_o_ai
+vec_vandc(vector signed char a, vector signed char b)
 {
-  __builtin_altivec_stvx((vector int)a, b, (void *)c);
+  return a & ~b;
 }
 
-static void _ATTRS_o_ai
-vec_st(vector short a, int b, vector short *c)
+static vector unsigned char __ATTRS_o_ai
+vec_vandc(vector unsigned char a, vector unsigned char b)
 {
-  __builtin_altivec_stvx((vector int)a, b, (void *)c);
+  return a & ~b;
 }
 
-static void _ATTRS_o_ai
-vec_st(vector unsigned short a, int b, vector unsigned short *c)
+static vector short __ATTRS_o_ai
+vec_vandc(vector short a, vector short b)
 {
-  __builtin_altivec_stvx((vector int)a, b, (void *)c);
+  return a & ~b;
 }
 
-static void _ATTRS_o_ai
-vec_st(vector int a, int b, vector int *c)
+static vector unsigned short __ATTRS_o_ai
+vec_vandc(vector unsigned short a, vector unsigned short b)
 {
-  __builtin_altivec_stvx(a, b, (void *)c);
+  return a & ~b;
 }
 
-static void _ATTRS_o_ai
-vec_st(vector unsigned int a, int b, vector unsigned int *c)
+static vector int __ATTRS_o_ai
+vec_vandc(vector int a, vector int b)
 {
-  __builtin_altivec_stvx((vector int)a, b, (void *)c);
+  return a & ~b;
 }
 
-static void _ATTRS_o_ai
-vec_st(vector float a, int b, vector float *c)
+static vector unsigned int __ATTRS_o_ai
+vec_vandc(vector unsigned int a, vector unsigned int b)
 {
-  __builtin_altivec_stvx((vector int)a, b, (void *)c);
+  return a & ~b;
 }
 
-/* vec_stl */
+static vector float __ATTRS_o_ai
+vec_vandc(vector float a, vector float b)
+{
+  vector unsigned int res = (vector unsigned int)a & ~(vector unsigned int)b;
+  return (vector float)res;
+}
 
-#define __builtin_vec_stl vec_stl
-#define vec_stvxl         vec_stl
+/* vec_avg */
 
-static void _ATTRS_o_ai
-vec_stl(vector signed char a, int b, vector signed char *c)
+static vector signed char __ATTRS_o_ai
+vec_avg(vector signed char a, vector signed char b)
 {
-  __builtin_altivec_stvxl((vector int)a, b, (void *)c);
+  return __builtin_altivec_vavgsb(a, b);
 }
 
-static void _ATTRS_o_ai
-vec_stl(vector unsigned char a, int b, vector unsigned char *c)
+static vector unsigned char __ATTRS_o_ai
+vec_avg(vector unsigned char a, vector unsigned char b)
 {
-  __builtin_altivec_stvxl((vector int)a, b, (void *)c);
+  return __builtin_altivec_vavgub(a, b);
 }
 
-static void _ATTRS_o_ai
-vec_stl(vector short a, int b, vector short *c)
+static vector short __ATTRS_o_ai
+vec_avg(vector short a, vector short b)
 {
-  __builtin_altivec_stvxl((vector int)a, b, (void *)c);
+  return __builtin_altivec_vavgsh(a, b);
 }
 
-static void _ATTRS_o_ai
-vec_stl(vector unsigned short a, int b, vector unsigned short *c)
+static vector unsigned short __ATTRS_o_ai
+vec_avg(vector unsigned short a, vector unsigned short b)
 {
-  __builtin_altivec_stvxl((vector int)a, b, (void *)c);
+  return __builtin_altivec_vavguh(a, b);
 }
 
-static void _ATTRS_o_ai
-vec_stl(vector int a, int b, vector int *c)
+static vector int __ATTRS_o_ai
+vec_avg(vector int a, vector int b)
 {
-  __builtin_altivec_stvxl(a, b, (void *)c);
+  return __builtin_altivec_vavgsw(a, b);
 }
 
-static void _ATTRS_o_ai
-vec_stl(vector unsigned int a, int b, vector unsigned int *c)
+static vector unsigned int __ATTRS_o_ai
+vec_avg(vector unsigned int a, vector unsigned int b)
 {
-  __builtin_altivec_stvxl((vector int)a, b, (void *)c);
+  return __builtin_altivec_vavguw(a, b);
 }
 
-static void _ATTRS_o_ai
-vec_stl(vector float a, int b, vector float *c)
+/* vec_vavgsb */
+
+static vector signed char __attribute__((__always_inline__))
+vec_vavgsb(vector signed char a, vector signed char b)
 {
-  __builtin_altivec_stvxl((vector int)a, b, (void *)c);
+  return __builtin_altivec_vavgsb(a, b);
 }
 
-/* vec_ste */
+/* vec_vavgub */
 
-#define __builtin_vec_stvebx __builtin_altivec_stvebx
-#define __builtin_vec_stvehx __builtin_altivec_stvehx
-#define __builtin_vec_stvewx __builtin_altivec_stvewx
-#define vec_stvebx __builtin_altivec_stvebx
-#define vec_stvehx __builtin_altivec_stvehx
-#define vec_stvewx __builtin_altivec_stvewx
-
-static void _ATTRS_o_ai
-vec_ste(vector signed char a, int b, vector signed char *c)
+static vector unsigned char __attribute__((__always_inline__))
+vec_vavgub(vector unsigned char a, vector unsigned char b)
 {
-  __builtin_altivec_stvebx((vector char)a, b, (void *)c);
+  return __builtin_altivec_vavgub(a, b);
 }
 
-static void _ATTRS_o_ai
-vec_ste(vector unsigned char a, int b, vector unsigned char *c)
+/* vec_vavgsh */
+
+static vector short __attribute__((__always_inline__))
+vec_vavgsh(vector short a, vector short b)
 {
-  __builtin_altivec_stvebx((vector char)a, b, (void *)c);
+  return __builtin_altivec_vavgsh(a, b);
 }
 
-static void _ATTRS_o_ai
-vec_ste(vector short a, int b, vector short *c)
+/* vec_vavguh */
+
+static vector unsigned short __attribute__((__always_inline__))
+vec_vavguh(vector unsigned short a, vector unsigned short b)
 {
-  __builtin_altivec_stvehx(a, b, (void *)c);
+  return __builtin_altivec_vavguh(a, b);
 }
 
-static void _ATTRS_o_ai
-vec_ste(vector unsigned short a, int b, vector unsigned short *c)
+/* vec_vavgsw */
+
+static vector int __attribute__((__always_inline__))
+vec_vavgsw(vector int a, vector int b)
 {
-  __builtin_altivec_stvehx((vector short)a, b, (void *)c);
+  return __builtin_altivec_vavgsw(a, b);
 }
 
-static void _ATTRS_o_ai
-vec_ste(vector int a, int b, vector int *c)
+/* vec_vavguw */
+
+static vector unsigned int __attribute__((__always_inline__))
+vec_vavguw(vector unsigned int a, vector unsigned int b)
 {
-  __builtin_altivec_stvewx(a, b, (void *)c);
+  return __builtin_altivec_vavguw(a, b);
 }
 
-static void _ATTRS_o_ai
-vec_ste(vector unsigned int a, int b, vector unsigned int *c)
+/* vec_ceil */
+
+static vector float __attribute__((__always_inline__))
+vec_ceil(vector float a)
 {
-  __builtin_altivec_stvewx((vector int)a, b, (void *)c);
+  return __builtin_altivec_vrfip(a);
 }
 
-static void _ATTRS_o_ai
-vec_ste(vector float a, int b, vector float *c)
+/* vec_vrfip */
+
+static vector float __attribute__((__always_inline__))
+vec_vrfip(vector float a)
 {
-  __builtin_altivec_stvewx((vector int)a, b, (void *)c);
+  return __builtin_altivec_vrfip(a);
 }
 
 /* vec_cmpb */
 
-#define vec_cmpb           __builtin_altivec_vcmpbfp
-#define vec_vcmpbfp        __builtin_altivec_vcmpbfp
-#define __builtin_vec_cmpb __builtin_altivec_vcmpbfp
+static vector int __attribute__((__always_inline__))
+vec_cmpb(vector float a, vector float b)
+{
+  return __builtin_altivec_vcmpbfp(a, b);
+}
 
+/* vec_vcmpbfp */
+
+static vector int __attribute__((__always_inline__))
+vec_vcmpbfp(vector float a, vector float b)
+{
+  return __builtin_altivec_vcmpbfp(a, b);
+}
+
 /* vec_cmpeq */
 
-#define __builtin_vec_cmpeq vec_cmpeq
-
-static vector /*bool*/ char _ATTRS_o_ai
+static vector /*bool*/ char __ATTRS_o_ai
 vec_cmpeq(vector signed char a, vector signed char b)
 {
   return __builtin_altivec_vcmpequb((vector char)a, (vector char)b);
 }
 
-static vector /*bool*/ char _ATTRS_o_ai
+static vector /*bool*/ char __ATTRS_o_ai
 vec_cmpeq(vector unsigned char a, vector unsigned char b)
 {
   return __builtin_altivec_vcmpequb((vector char)a, (vector char)b);
 }
 
-static vector /*bool*/ short _ATTRS_o_ai
+static vector /*bool*/ short __ATTRS_o_ai
 vec_cmpeq(vector short a, vector short b)
 {
   return __builtin_altivec_vcmpequh(a, b);
 }
 
-static vector /*bool*/ short _ATTRS_o_ai
+static vector /*bool*/ short __ATTRS_o_ai
 vec_cmpeq(vector unsigned short a, vector unsigned short b)
 {
   return __builtin_altivec_vcmpequh((vector short)a, (vector short)b);
 }
 
-static vector /*bool*/ int _ATTRS_o_ai
+static vector /*bool*/ int __ATTRS_o_ai
 vec_cmpeq(vector int a, vector int b)
 {
   return __builtin_altivec_vcmpequw(a, b);
 }
 
-static vector /*bool*/ int _ATTRS_o_ai
+static vector /*bool*/ int __ATTRS_o_ai
 vec_cmpeq(vector unsigned int a, vector unsigned int b)
 {
   return __builtin_altivec_vcmpequw((vector int)a, (vector int)b);
 }
 
-static vector /*bool*/ int _ATTRS_o_ai
+static vector /*bool*/ int __ATTRS_o_ai
 vec_cmpeq(vector float a, vector float b)
 {
   return __builtin_altivec_vcmpeqfp(a, b);
@@ -569,74 +667,123 @@
 
 /* vec_cmpge */
 
-#define vec_cmpge           __builtin_altivec_vcmpgefp
-#define vec_vcmpgefp        __builtin_altivec_vcmpgefp
-#define __builtin_vec_cmpge __builtin_altivec_vcmpgefp
+static vector /*bool*/ int __attribute__((__always_inline__))
+vec_cmpge(vector float a, vector float b)
+{
+  return __builtin_altivec_vcmpgefp(a, b);
+}
 
+/* vec_vcmpgefp */
+
+static vector /*bool*/ int __attribute__((__always_inline__))
+vec_vcmpgefp(vector float a, vector float b)
+{
+  return __builtin_altivec_vcmpgefp(a, b);
+}
+
 /* vec_cmpgt */
 
-#define vec_vcmpgtsb __builtin_altivec_vcmpgtsb
-#define vec_vcmpgtub __builtin_altivec_vcmpgtub
-#define vec_vcmpgtsh __builtin_altivec_vcmpgtsh
-#define vec_vcmpgtuh __builtin_altivec_vcmpgtuh
-#define vec_vcmpgtsw __builtin_altivec_vcmpgtsw
-#define vec_vcmpgtuw __builtin_altivec_vcmpgtuw
-#define vec_vcmpgtfp __builtin_altivec_vcmpgtfp
-#define __builtin_vec_vcmpgtsb __builtin_altivec_vcmpgtsb
-#define __builtin_vec_vcmpgtub __builtin_altivec_vcmpgtub
-#define __builtin_vec_vcmpgtsh __builtin_altivec_vcmpgtsh
-#define __builtin_vec_vcmpgtuh __builtin_altivec_vcmpgtuh
-#define __builtin_vec_vcmpgtsw __builtin_altivec_vcmpgtsw
-#define __builtin_vec_vcmpgtuw __builtin_altivec_vcmpgtuw
-#define __builtin_vec_vcmpgtfp __builtin_altivec_vcmpgtfp
-
-static vector /*bool*/ char _ATTRS_o_ai
+static vector /*bool*/ char __ATTRS_o_ai
 vec_cmpgt(vector signed char a, vector signed char b)
 {
   return __builtin_altivec_vcmpgtsb(a, b);
 }
 
-static vector /*bool*/ char _ATTRS_o_ai
+static vector /*bool*/ char __ATTRS_o_ai
 vec_cmpgt(vector unsigned char a, vector unsigned char b)
 {
   return __builtin_altivec_vcmpgtub(a, b);
 }
 
-static vector /*bool*/ short _ATTRS_o_ai
+static vector /*bool*/ short __ATTRS_o_ai
 vec_cmpgt(vector short a, vector short b)
 {
   return __builtin_altivec_vcmpgtsh(a, b);
 }
 
-static vector /*bool*/ short _ATTRS_o_ai
+static vector /*bool*/ short __ATTRS_o_ai
 vec_cmpgt(vector unsigned short a, vector unsigned short b)
 {
   return __builtin_altivec_vcmpgtuh(a, b);
 }
 
-static vector /*bool*/ int _ATTRS_o_ai
+static vector /*bool*/ int __ATTRS_o_ai
 vec_cmpgt(vector int a, vector int b)
 {
   return __builtin_altivec_vcmpgtsw(a, b);
 }
 
-static vector /*bool*/ int _ATTRS_o_ai
+static vector /*bool*/ int __ATTRS_o_ai
 vec_cmpgt(vector unsigned int a, vector unsigned int b)
 {
   return __builtin_altivec_vcmpgtuw(a, b);
 }
 
-static vector /*bool*/ int _ATTRS_o_ai
+static vector /*bool*/ int __ATTRS_o_ai
 vec_cmpgt(vector float a, vector float b)
 {
   return __builtin_altivec_vcmpgtfp(a, b);
 }
 
-/* vec_cmple */
+/* vec_vcmpgtsb */
 
-#define __builtin_vec_cmple vec_cmple
+static vector /*bool*/ char __attribute__((__always_inline__))
+vec_vcmpgtsb(vector signed char a, vector signed char b)
+{
+  return __builtin_altivec_vcmpgtsb(a, b);
+}
 
+/* vec_vcmpgtub */
+
+static vector /*bool*/ char __attribute__((__always_inline__))
+vec_vcmpgtub(vector unsigned char a, vector unsigned char b)
+{
+  return __builtin_altivec_vcmpgtub(a, b);
+}
+
+/* vec_vcmpgtsh */
+
+static vector /*bool*/ short __attribute__((__always_inline__))
+vec_vcmpgtsh(vector short a, vector short b)
+{
+  return __builtin_altivec_vcmpgtsh(a, b);
+}
+
+/* vec_vcmpgtuh */
+
+static vector /*bool*/ short __attribute__((__always_inline__))
+vec_vcmpgtuh(vector unsigned short a, vector unsigned short b)
+{
+  return __builtin_altivec_vcmpgtuh(a, b);
+}
+
+/* vec_vcmpgtsw */
+
 static vector /*bool*/ int __attribute__((__always_inline__))
+vec_vcmpgtsw(vector int a, vector int b)
+{
+  return __builtin_altivec_vcmpgtsw(a, b);
+}
+
+/* vec_vcmpgtuw */
+
+static vector /*bool*/ int __attribute__((__always_inline__))
+vec_vcmpgtuw(vector unsigned int a, vector unsigned int b)
+{
+  return __builtin_altivec_vcmpgtuw(a, b);
+}
+
+/* vec_vcmpgtfp */
+
+static vector /*bool*/ int __attribute__((__always_inline__))
+vec_vcmpgtfp(vector float a, vector float b)
+{
+  return __builtin_altivec_vcmpgtfp(a, b);
+}
+
+/* vec_cmple */
+
+static vector /*bool*/ int __attribute__((__always_inline__))
 vec_cmple(vector float a, vector float b)
 {
   return __builtin_altivec_vcmpgefp(b, a);
@@ -644,239 +791,4533 @@
 
 /* vec_cmplt */
 
-#define __builtin_vec_cmplt vec_cmplt
-
-static vector /*bool*/ char _ATTRS_o_ai
+static vector /*bool*/ char __ATTRS_o_ai
 vec_cmplt(vector signed char a, vector signed char b)
 {
   return __builtin_altivec_vcmpgtsb(b, a);
 }
 
-static vector /*bool*/ char _ATTRS_o_ai
+static vector /*bool*/ char __ATTRS_o_ai
 vec_cmplt(vector unsigned char a, vector unsigned char b)
 {
   return __builtin_altivec_vcmpgtub(b, a);
 }
 
-static vector /*bool*/ short _ATTRS_o_ai
+static vector /*bool*/ short __ATTRS_o_ai
 vec_cmplt(vector short a, vector short b)
 {
   return __builtin_altivec_vcmpgtsh(b, a);
 }
 
-static vector /*bool*/ short _ATTRS_o_ai
+static vector /*bool*/ short __ATTRS_o_ai
 vec_cmplt(vector unsigned short a, vector unsigned short b)
 {
   return __builtin_altivec_vcmpgtuh(b, a);
 }
 
-static vector /*bool*/ int _ATTRS_o_ai
+static vector /*bool*/ int __ATTRS_o_ai
 vec_cmplt(vector int a, vector int b)
 {
   return __builtin_altivec_vcmpgtsw(b, a);
 }
 
-static vector /*bool*/ int _ATTRS_o_ai
+static vector /*bool*/ int __ATTRS_o_ai
 vec_cmplt(vector unsigned int a, vector unsigned int b)
 {
   return __builtin_altivec_vcmpgtuw(b, a);
 }
 
-static vector /*bool*/ int _ATTRS_o_ai
+static vector /*bool*/ int __ATTRS_o_ai
 vec_cmplt(vector float a, vector float b)
 {
   return __builtin_altivec_vcmpgtfp(b, a);
 }
 
+/* vec_ctf */
+
+static vector float __ATTRS_o_ai
+vec_ctf(vector int a, int b)
+{
+  return __builtin_altivec_vcfsx(a, b);
+}
+
+static vector float __ATTRS_o_ai
+vec_ctf(vector unsigned int a, int b)
+{
+  return __builtin_altivec_vcfux((vector int)a, b);
+}
+
+/* vec_vcfsx */
+
+static vector float __attribute__((__always_inline__))
+vec_vcfsx(vector int a, int b)
+{
+  return __builtin_altivec_vcfsx(a, b);
+}
+
+/* vec_vcfux */
+
+static vector float __attribute__((__always_inline__))
+vec_vcfux(vector unsigned int a, int b)
+{
+  return __builtin_altivec_vcfux((vector int)a, b);
+}
+
+/* vec_cts */
+
+static vector int __attribute__((__always_inline__))
+vec_cts(vector float a, int b)
+{
+  return __builtin_altivec_vctsxs(a, b);
+}
+
+/* vec_vctsxs */
+
+static vector int __attribute__((__always_inline__))
+vec_vctsxs(vector float a, int b)
+{
+  return __builtin_altivec_vctsxs(a, b);
+}
+
+/* vec_ctu */
+
+static vector unsigned int __attribute__((__always_inline__))
+vec_ctu(vector float a, int b)
+{
+  return __builtin_altivec_vctuxs(a, b);
+}
+
+/* vec_vctuxs */
+
+static vector unsigned int __attribute__((__always_inline__))
+vec_vctuxs(vector float a, int b)
+{
+  return __builtin_altivec_vctuxs(a, b);
+}
+
+/* vec_dss */
+
+static void __attribute__((__always_inline__))
+vec_dss(int a)
+{
+  __builtin_altivec_dss(a);
+}
+
+/* vec_dssall */
+
+static void __attribute__((__always_inline__))
+vec_dssall(void)
+{
+  __builtin_altivec_dssall();
+}
+
+/* vec_dst */
+
+static void __attribute__((__always_inline__))
+vec_dst(void *a, int b, int c)
+{
+  __builtin_altivec_dst(a, b, c);
+}
+
+/* vec_dstst */
+
+static void __attribute__((__always_inline__))
+vec_dstst(void *a, int b, int c)
+{
+  __builtin_altivec_dstst(a, b, c);
+}
+
+/* vec_dststt */
+
+static void __attribute__((__always_inline__))
+vec_dststt(void *a, int b, int c)
+{
+  __builtin_altivec_dststt(a, b, c);
+}
+
+/* vec_dstt */
+
+static void __attribute__((__always_inline__))
+vec_dstt(void *a, int b, int c)
+{
+  __builtin_altivec_dstt(a, b, c);
+}
+
+/* vec_expte */
+
+static vector float __attribute__((__always_inline__))
+vec_expte(vector float a)
+{
+  return __builtin_altivec_vexptefp(a);
+}
+
+/* vec_vexptefp */
+
+static vector float __attribute__((__always_inline__))
+vec_vexptefp(vector float a)
+{
+  return __builtin_altivec_vexptefp(a);
+}
+
+/* vec_floor */
+
+static vector float __attribute__((__always_inline__))
+vec_floor(vector float a)
+{
+  return __builtin_altivec_vrfim(a);
+}
+
+/* vec_vrfim */
+
+static vector float __attribute__((__always_inline__))
+vec_vrfim(vector float a)
+{
+  return __builtin_altivec_vrfim(a);
+}
+
+/* vec_ld */
+
+static vector signed char __ATTRS_o_ai
+vec_ld(int a, vector signed char *b)
+{
+  return (vector signed char)__builtin_altivec_lvx(a, b);
+}
+
+static vector signed char __ATTRS_o_ai
+vec_ld(int a, signed char *b)
+{
+  return (vector signed char)__builtin_altivec_lvx(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_ld(int a, vector unsigned char *b)
+{
+  return (vector unsigned char)__builtin_altivec_lvx(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_ld(int a, unsigned char *b)
+{
+  return (vector unsigned char)__builtin_altivec_lvx(a, b);
+}
+
+static vector short __ATTRS_o_ai
+vec_ld(int a, vector short *b)
+{
+  return (vector short)__builtin_altivec_lvx(a, b);
+}
+
+static vector short __ATTRS_o_ai
+vec_ld(int a, short *b)
+{
+  return (vector short)__builtin_altivec_lvx(a, b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_ld(int a, vector unsigned short *b)
+{
+  return (vector unsigned short)__builtin_altivec_lvx(a, b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_ld(int a, unsigned short *b)
+{
+  return (vector unsigned short)__builtin_altivec_lvx(a, b);
+}
+
+static vector int __ATTRS_o_ai
+vec_ld(int a, vector int *b)
+{
+  return (vector int)__builtin_altivec_lvx(a, b);
+}
+
+static vector int __ATTRS_o_ai
+vec_ld(int a, int *b)
+{
+  return (vector int)__builtin_altivec_lvx(a, b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_ld(int a, vector unsigned int *b)
+{
+  return (vector unsigned int)__builtin_altivec_lvx(a, b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_ld(int a, unsigned int *b)
+{
+  return (vector unsigned int)__builtin_altivec_lvx(a, b);
+}
+
+static vector float __ATTRS_o_ai
+vec_ld(int a, vector float *b)
+{
+  return (vector float)__builtin_altivec_lvx(a, b);
+}
+
+static vector float __ATTRS_o_ai
+vec_ld(int a, float *b)
+{
+  return (vector float)__builtin_altivec_lvx(a, b);
+}
+
+/* vec_lvx */
+
+static vector signed char __ATTRS_o_ai
+vec_lvx(int a, vector signed char *b)
+{
+  return (vector signed char)__builtin_altivec_lvx(a, b);
+}
+
+static vector signed char __ATTRS_o_ai
+vec_lvx(int a, signed char *b)
+{
+  return (vector signed char)__builtin_altivec_lvx(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_lvx(int a, vector unsigned char *b)
+{
+  return (vector unsigned char)__builtin_altivec_lvx(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_lvx(int a, unsigned char *b)
+{
+  return (vector unsigned char)__builtin_altivec_lvx(a, b);
+}
+
+static vector short __ATTRS_o_ai
+vec_lvx(int a, vector short *b)
+{
+  return (vector short)__builtin_altivec_lvx(a, b);
+}
+
+static vector short __ATTRS_o_ai
+vec_lvx(int a, short *b)
+{
+  return (vector short)__builtin_altivec_lvx(a, b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_lvx(int a, vector unsigned short *b)
+{
+  return (vector unsigned short)__builtin_altivec_lvx(a, b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_lvx(int a, unsigned short *b)
+{
+  return (vector unsigned short)__builtin_altivec_lvx(a, b);
+}
+
+static vector int __ATTRS_o_ai
+vec_lvx(int a, vector int *b)
+{
+  return (vector int)__builtin_altivec_lvx(a, b);
+}
+
+static vector int __ATTRS_o_ai
+vec_lvx(int a, int *b)
+{
+  return (vector int)__builtin_altivec_lvx(a, b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_lvx(int a, vector unsigned int *b)
+{
+  return (vector unsigned int)__builtin_altivec_lvx(a, b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_lvx(int a, unsigned int *b)
+{
+  return (vector unsigned int)__builtin_altivec_lvx(a, b);
+}
+
+static vector float __ATTRS_o_ai
+vec_lvx(int a, vector float *b)
+{
+  return (vector float)__builtin_altivec_lvx(a, b);
+}
+
+static vector float __ATTRS_o_ai
+vec_lvx(int a, float *b)
+{
+  return (vector float)__builtin_altivec_lvx(a, b);
+}
+
+/* vec_lde */
+
+static vector signed char __ATTRS_o_ai
+vec_lde(int a, vector signed char *b)
+{
+  return (vector signed char)__builtin_altivec_lvebx(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_lde(int a, vector unsigned char *b)
+{
+  return (vector unsigned char)__builtin_altivec_lvebx(a, b);
+}
+
+static vector short __ATTRS_o_ai
+vec_lde(int a, vector short *b)
+{
+  return (vector short)__builtin_altivec_lvehx(a, b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_lde(int a, vector unsigned short *b)
+{
+  return (vector unsigned short)__builtin_altivec_lvehx(a, b);
+}
+
+static vector int __ATTRS_o_ai
+vec_lde(int a, vector int *b)
+{
+  return (vector int)__builtin_altivec_lvewx(a, b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_lde(int a, vector unsigned int *b)
+{
+  return (vector unsigned int)__builtin_altivec_lvewx(a, b);
+}
+
+static vector float __ATTRS_o_ai
+vec_lde(int a, vector float *b)
+{
+  return (vector float)__builtin_altivec_lvewx(a, b);
+}
+
+/* vec_lvebx */
+
+static vector signed char __ATTRS_o_ai
+vec_lvebx(int a, vector signed char *b)
+{
+  return (vector signed char)__builtin_altivec_lvebx(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_lvebx(int a, vector unsigned char *b)
+{
+  return (vector unsigned char)__builtin_altivec_lvebx(a, b);
+}
+
+/* vec_lvehx */
+
+static vector short __ATTRS_o_ai
+vec_lvehx(int a, vector short *b)
+{
+  return (vector short)__builtin_altivec_lvehx(a, b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_lvehx(int a, vector unsigned short *b)
+{
+  return (vector unsigned short)__builtin_altivec_lvehx(a, b);
+}
+
+/* vec_lvewx */
+
+static vector int __ATTRS_o_ai
+vec_lvewx(int a, vector int *b)
+{
+  return (vector int)__builtin_altivec_lvewx(a, b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_lvewx(int a, vector unsigned int *b)
+{
+  return (vector unsigned int)__builtin_altivec_lvewx(a, b);
+}
+
+static vector float __ATTRS_o_ai
+vec_lvewx(int a, vector float *b)
+{
+  return (vector float)__builtin_altivec_lvewx(a, b);
+}
+
+/* vec_ldl */
+
+static vector signed char __ATTRS_o_ai
+vec_ldl(int a, vector signed char *b)
+{
+  return (vector signed char)__builtin_altivec_lvxl(a, b);
+}
+
+static vector signed char __ATTRS_o_ai
+vec_ldl(int a, signed char *b)
+{
+  return (vector signed char)__builtin_altivec_lvxl(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_ldl(int a, vector unsigned char *b)
+{
+  return (vector unsigned char)__builtin_altivec_lvxl(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_ldl(int a, unsigned char *b)
+{
+  return (vector unsigned char)__builtin_altivec_lvxl(a, b);
+}
+
+static vector short __ATTRS_o_ai
+vec_ldl(int a, vector short *b)
+{
+  return (vector short)__builtin_altivec_lvxl(a, b);
+}
+
+static vector short __ATTRS_o_ai
+vec_ldl(int a, short *b)
+{
+  return (vector short)__builtin_altivec_lvxl(a, b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_ldl(int a, vector unsigned short *b)
+{
+  return (vector unsigned short)__builtin_altivec_lvxl(a, b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_ldl(int a, unsigned short *b)
+{
+  return (vector unsigned short)__builtin_altivec_lvxl(a, b);
+}
+
+static vector int __ATTRS_o_ai
+vec_ldl(int a, vector int *b)
+{
+  return (vector int)__builtin_altivec_lvxl(a, b);
+}
+
+static vector int __ATTRS_o_ai
+vec_ldl(int a, int *b)
+{
+  return (vector int)__builtin_altivec_lvxl(a, b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_ldl(int a, vector unsigned int *b)
+{
+  return (vector unsigned int)__builtin_altivec_lvxl(a, b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_ldl(int a, unsigned int *b)
+{
+  return (vector unsigned int)__builtin_altivec_lvxl(a, b);
+}
+
+static vector float __ATTRS_o_ai
+vec_ldl(int a, vector float *b)
+{
+  return (vector float)__builtin_altivec_lvxl(a, b);
+}
+
+static vector float __ATTRS_o_ai
+vec_ldl(int a, float *b)
+{
+  return (vector float)__builtin_altivec_lvxl(a, b);
+}
+
+/* vec_lvxl */
+
+static vector signed char __ATTRS_o_ai
+vec_lvxl(int a, vector signed char *b)
+{
+  return (vector signed char)__builtin_altivec_lvxl(a, b);
+}
+
+static vector signed char __ATTRS_o_ai
+vec_lvxl(int a, signed char *b)
+{
+  return (vector signed char)__builtin_altivec_lvxl(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_lvxl(int a, vector unsigned char *b)
+{
+  return (vector unsigned char)__builtin_altivec_lvxl(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_lvxl(int a, unsigned char *b)
+{
+  return (vector unsigned char)__builtin_altivec_lvxl(a, b);
+}
+
+static vector short __ATTRS_o_ai
+vec_lvxl(int a, vector short *b)
+{
+  return (vector short)__builtin_altivec_lvxl(a, b);
+}
+
+static vector short __ATTRS_o_ai
+vec_lvxl(int a, short *b)
+{
+  return (vector short)__builtin_altivec_lvxl(a, b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_lvxl(int a, vector unsigned short *b)
+{
+  return (vector unsigned short)__builtin_altivec_lvxl(a, b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_lvxl(int a, unsigned short *b)
+{
+  return (vector unsigned short)__builtin_altivec_lvxl(a, b);
+}
+
+static vector int __ATTRS_o_ai
+vec_lvxl(int a, vector int *b)
+{
+  return (vector int)__builtin_altivec_lvxl(a, b);
+}
+
+static vector int __ATTRS_o_ai
+vec_lvxl(int a, int *b)
+{
+  return (vector int)__builtin_altivec_lvxl(a, b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_lvxl(int a, vector unsigned int *b)
+{
+  return (vector unsigned int)__builtin_altivec_lvxl(a, b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_lvxl(int a, unsigned int *b)
+{
+  return (vector unsigned int)__builtin_altivec_lvxl(a, b);
+}
+
+static vector float __ATTRS_o_ai
+vec_lvxl(int a, vector float *b)
+{
+  return (vector float)__builtin_altivec_lvxl(a, b);
+}
+
+static vector float __ATTRS_o_ai
+vec_lvxl(int a, float *b)
+{
+  return (vector float)__builtin_altivec_lvxl(a, b);
+}
+
+/* vec_loge */
+
+static vector float __attribute__((__always_inline__))
+vec_loge(vector float a)
+{
+  return __builtin_altivec_vlogefp(a);
+}
+
+/* vec_vlogefp */
+
+static vector float __attribute__((__always_inline__))
+vec_vlogefp(vector float a)
+{
+  return __builtin_altivec_vlogefp(a);
+}
+
+/* vec_lvsl */
+
+static vector unsigned char __ATTRS_o_ai
+vec_lvsl(int a, signed char *b)
+{
+  return (vector unsigned char)__builtin_altivec_lvsl(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_lvsl(int a, unsigned char *b)
+{
+  return (vector unsigned char)__builtin_altivec_lvsl(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_lvsl(int a, short *b)
+{
+  return (vector unsigned char)__builtin_altivec_lvsl(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_lvsl(int a, unsigned short *b)
+{
+  return (vector unsigned char)__builtin_altivec_lvsl(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_lvsl(int a, int *b)
+{
+  return (vector unsigned char)__builtin_altivec_lvsl(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_lvsl(int a, unsigned int *b)
+{
+  return (vector unsigned char)__builtin_altivec_lvsl(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_lvsl(int a, float *b)
+{
+  return (vector unsigned char)__builtin_altivec_lvsl(a, b);
+}
+
+/* vec_lvsr */
+
+static vector unsigned char __ATTRS_o_ai
+vec_lvsr(int a, signed char *b)
+{
+  return (vector unsigned char)__builtin_altivec_lvsr(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_lvsr(int a, unsigned char *b)
+{
+  return (vector unsigned char)__builtin_altivec_lvsr(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_lvsr(int a, short *b)
+{
+  return (vector unsigned char)__builtin_altivec_lvsr(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_lvsr(int a, unsigned short *b)
+{
+  return (vector unsigned char)__builtin_altivec_lvsr(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_lvsr(int a, int *b)
+{
+  return (vector unsigned char)__builtin_altivec_lvsr(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_lvsr(int a, unsigned int *b)
+{
+  return (vector unsigned char)__builtin_altivec_lvsr(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_lvsr(int a, float *b)
+{
+  return (vector unsigned char)__builtin_altivec_lvsr(a, b);
+}
+
+/* vec_madd */
+
+static vector float __attribute__((__always_inline__))
+vec_madd(vector float a, vector float b, vector float c)
+{
+  return __builtin_altivec_vmaddfp(a, b, c);
+}
+
+/* vec_vmaddfp */
+
+static vector float __attribute__((__always_inline__))
+vec_vmaddfp(vector float a, vector float b, vector float c)
+{
+  return __builtin_altivec_vmaddfp(a, b, c);
+}
+
+/* vec_madds */
+
+static vector signed short __attribute__((__always_inline__))
+vec_madds(vector signed short a, vector signed short b, vector signed short c)
+{
+  return __builtin_altivec_vmhaddshs(a, b, c);
+}
+
+/* vec_vmhaddshs */
+static vector signed short __attribute__((__always_inline__))
+vec_vmhaddshs(vector signed short a, vector signed short b, vector signed short c)
+{
+  return __builtin_altivec_vmhaddshs(a, b, c);
+}
+
 /* vec_max */
 
-#define __builtin_vec_vmaxsb __builtin_altivec_vmaxsb
-#define __builtin_vec_vmaxub __builtin_altivec_vmaxub
-#define __builtin_vec_vmaxsh __builtin_altivec_vmaxsh
-#define __builtin_vec_vmaxuh __builtin_altivec_vmaxuh
-#define __builtin_vec_vmaxsw __builtin_altivec_vmaxsw
-#define __builtin_vec_vmaxuw __builtin_altivec_vmaxuw
-#define __builtin_vec_vmaxfp __builtin_altivec_vmaxfp
-#define vec_vmaxsb __builtin_altivec_vmaxsb
-#define vec_vmaxub __builtin_altivec_vmaxub
-#define vec_vmaxsh __builtin_altivec_vmaxsh
-#define vec_vmaxuh __builtin_altivec_vmaxuh
-#define vec_vmaxsw __builtin_altivec_vmaxsw
-#define vec_vmaxuw __builtin_altivec_vmaxuw
-#define vec_vmaxfp __builtin_altivec_vmaxfp
-#define __builtin_vec_max vec_max
-
-static vector signed char _ATTRS_o_ai
+static vector signed char __ATTRS_o_ai
 vec_max(vector signed  char a, vector signed char b)
 {
   return __builtin_altivec_vmaxsb(a, b);
 }
 
-static vector unsigned char _ATTRS_o_ai
+static vector unsigned char __ATTRS_o_ai
 vec_max(vector unsigned  char a, vector unsigned char b)
 {
   return __builtin_altivec_vmaxub(a, b);
 }
 
-static vector short _ATTRS_o_ai
+static vector short __ATTRS_o_ai
 vec_max(vector short a, vector short b)
 {
   return __builtin_altivec_vmaxsh(a, b);
 }
 
-static vector unsigned short _ATTRS_o_ai
+static vector unsigned short __ATTRS_o_ai
 vec_max(vector unsigned short a, vector unsigned short b)
 {
   return __builtin_altivec_vmaxuh(a, b);
 }
 
-static vector int _ATTRS_o_ai
+static vector int __ATTRS_o_ai
 vec_max(vector int a, vector int b)
 {
   return __builtin_altivec_vmaxsw(a, b);
 }
 
-static vector unsigned int _ATTRS_o_ai
+static vector unsigned int __ATTRS_o_ai
 vec_max(vector unsigned int a, vector unsigned int b)
 {
   return __builtin_altivec_vmaxuw(a, b);
 }
 
-static vector float _ATTRS_o_ai
+static vector float __ATTRS_o_ai
 vec_max(vector float a, vector float b)
 {
   return __builtin_altivec_vmaxfp(a, b);
 }
 
+/* vec_vmaxsb */
+
+static vector signed char __attribute__((__always_inline__))
+vec_vmaxsb(vector signed  char a, vector signed char b)
+{
+  return __builtin_altivec_vmaxsb(a, b);
+}
+
+/* vec_vmaxub */
+
+static vector unsigned char __attribute__((__always_inline__))
+vec_vmaxub(vector unsigned  char a, vector unsigned char b)
+{
+  return __builtin_altivec_vmaxub(a, b);
+}
+
+/* vec_vmaxsh */
+
+static vector short __attribute__((__always_inline__))
+vec_vmaxsh(vector short a, vector short b)
+{
+  return __builtin_altivec_vmaxsh(a, b);
+}
+
+/* vec_vmaxuh */
+
+static vector unsigned short __attribute__((__always_inline__))
+vec_vmaxuh(vector unsigned short a, vector unsigned short b)
+{
+  return __builtin_altivec_vmaxuh(a, b);
+}
+
+/* vec_vmaxsw */
+
+static vector int __attribute__((__always_inline__))
+vec_vmaxsw(vector int a, vector int b)
+{
+  return __builtin_altivec_vmaxsw(a, b);
+}
+
+/* vec_vmaxuw */
+
+static vector unsigned int __attribute__((__always_inline__))
+vec_vmaxuw(vector unsigned int a, vector unsigned int b)
+{
+  return __builtin_altivec_vmaxuw(a, b);
+}
+
+/* vec_vmaxfp */
+
+static vector float __attribute__((__always_inline__))
+vec_vmaxfp(vector float a, vector float b)
+{
+  return __builtin_altivec_vmaxfp(a, b);
+}
+
+/* vec_mergeh */
+
+static vector signed char __ATTRS_o_ai
+vec_mergeh(vector signed char a, vector signed char b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 
+     0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_mergeh(vector unsigned char a, vector unsigned char b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 
+     0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
+}
+
+static vector short __ATTRS_o_ai
+vec_mergeh(vector short a, vector short b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
+     0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_mergeh(vector unsigned short a, vector unsigned short b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
+     0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
+}
+
+static vector int __ATTRS_o_ai
+vec_mergeh(vector int a, vector int b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
+     0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_mergeh(vector unsigned int a, vector unsigned int b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
+     0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
+}
+
+static vector float __ATTRS_o_ai
+vec_mergeh(vector float a, vector float b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
+     0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
+}
+
+/* vec_vmrghb */
+
+#define __builtin_altivec_vmrghb vec_vmrghb
+
+static vector signed char __ATTRS_o_ai
+vec_vmrghb(vector signed char a, vector signed char b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 
+     0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vmrghb(vector unsigned char a, vector unsigned char b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 
+     0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
+}
+
+/* vec_vmrghh */
+
+#define __builtin_altivec_vmrghh vec_vmrghh
+
+static vector short __ATTRS_o_ai
+vec_vmrghh(vector short a, vector short b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
+     0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vmrghh(vector unsigned short a, vector unsigned short b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
+     0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
+}
+
+/* vec_vmrghw */
+
+#define __builtin_altivec_vmrghw vec_vmrghw
+
+static vector int __ATTRS_o_ai
+vec_vmrghw(vector int a, vector int b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
+     0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_vmrghw(vector unsigned int a, vector unsigned int b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
+     0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
+}
+
+static vector float __ATTRS_o_ai
+vec_vmrghw(vector float a, vector float b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
+     0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
+}
+
+/* vec_mergel */
+
+static vector signed char __ATTRS_o_ai
+vec_mergel(vector signed char a, vector signed char b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, 
+     0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_mergel(vector unsigned char a, vector unsigned char b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, 
+     0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
+}
+
+static vector short __ATTRS_o_ai
+vec_mergel(vector short a, vector short b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
+     0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_mergel(vector unsigned short a, vector unsigned short b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
+     0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
+}
+
+static vector int __ATTRS_o_ai
+vec_mergel(vector int a, vector int b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
+     0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_mergel(vector unsigned int a, vector unsigned int b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
+     0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
+}
+
+static vector float __ATTRS_o_ai
+vec_mergel(vector float a, vector float b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
+     0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
+}
+
+/* vec_vmrglb */
+
+#define __builtin_altivec_vmrglb vec_vmrglb
+
+static vector signed char __ATTRS_o_ai
+vec_vmrglb(vector signed char a, vector signed char b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, 
+     0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vmrglb(vector unsigned char a, vector unsigned char b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, 
+     0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
+}
+
+/* vec_vmrglh */
+
+#define __builtin_altivec_vmrglh vec_vmrglh
+
+static vector short __ATTRS_o_ai
+vec_vmrglh(vector short a, vector short b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
+     0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vmrglh(vector unsigned short a, vector unsigned short b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
+     0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
+}
+
+/* vec_vmrglw */
+
+#define __builtin_altivec_vmrglw vec_vmrglw
+
+static vector int __ATTRS_o_ai
+vec_vmrglw(vector int a, vector int b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
+     0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_vmrglw(vector unsigned int a, vector unsigned int b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
+     0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
+}
+
+static vector float __ATTRS_o_ai
+vec_vmrglw(vector float a, vector float b)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
+     0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
+}
+
 /* vec_mfvscr */
 
-#define __builtin_vec_mfvscr __builtin_altivec_mfvscr
-#define vec_mfvscr           __builtin_altivec_mfvscr
+static vector unsigned short __attribute__((__always_inline__))
+vec_mfvscr(void)
+{
+  return __builtin_altivec_mfvscr();
+}
 
 /* vec_min */
 
-#define __builtin_vec_vminsb __builtin_altivec_vminsb
-#define __builtin_vec_vminub __builtin_altivec_vminub
-#define __builtin_vec_vminsh __builtin_altivec_vminsh
-#define __builtin_vec_vminuh __builtin_altivec_vminuh
-#define __builtin_vec_vminsw __builtin_altivec_vminsw
-#define __builtin_vec_vminuw __builtin_altivec_vminuw
-#define __builtin_vec_vminfp __builtin_altivec_vminfp
-#define vec_vminsb __builtin_altivec_vminsb
-#define vec_vminub __builtin_altivec_vminub
-#define vec_vminsh __builtin_altivec_vminsh
-#define vec_vminuh __builtin_altivec_vminuh
-#define vec_vminsw __builtin_altivec_vminsw
-#define vec_vminuw __builtin_altivec_vminuw
-#define vec_vminfp __builtin_altivec_vminfp
-#define __builtin_vec_min vec_min
-
-static vector signed char _ATTRS_o_ai
+static vector signed char __ATTRS_o_ai
 vec_min(vector signed  char a, vector signed char b)
 {
   return __builtin_altivec_vminsb(a, b);
 }
 
-static vector unsigned char _ATTRS_o_ai
+static vector unsigned char __ATTRS_o_ai
 vec_min(vector unsigned  char a, vector unsigned char b)
 {
   return __builtin_altivec_vminub(a, b);
 }
 
-static vector short _ATTRS_o_ai
+static vector short __ATTRS_o_ai
 vec_min(vector short a, vector short b)
 {
   return __builtin_altivec_vminsh(a, b);
 }
 
-static vector unsigned short _ATTRS_o_ai
+static vector unsigned short __ATTRS_o_ai
 vec_min(vector unsigned short a, vector unsigned short b)
 {
   return __builtin_altivec_vminuh(a, b);
 }
 
-static vector int _ATTRS_o_ai
+static vector int __ATTRS_o_ai
 vec_min(vector int a, vector int b)
 {
   return __builtin_altivec_vminsw(a, b);
 }
 
-static vector unsigned int _ATTRS_o_ai
+static vector unsigned int __ATTRS_o_ai
 vec_min(vector unsigned int a, vector unsigned int b)
 {
   return __builtin_altivec_vminuw(a, b);
 }
 
-static vector float _ATTRS_o_ai
+static vector float __ATTRS_o_ai
 vec_min(vector float a, vector float b)
 {
   return __builtin_altivec_vminfp(a, b);
 }
 
+/* vec_vminsb */
+
+static vector signed char __attribute__((__always_inline__))
+vec_vminsb(vector signed  char a, vector signed char b)
+{
+  return __builtin_altivec_vminsb(a, b);
+}
+
+/* vec_vminub */
+
+static vector unsigned char __attribute__((__always_inline__))
+vec_vminub(vector unsigned  char a, vector unsigned char b)
+{
+  return __builtin_altivec_vminub(a, b);
+}
+
+/* vec_vminsh */
+
+static vector short __attribute__((__always_inline__))
+vec_vminsh(vector short a, vector short b)
+{
+  return __builtin_altivec_vminsh(a, b);
+}
+
+/* vec_vminuh */
+
+static vector unsigned short __attribute__((__always_inline__))
+vec_vminuh(vector unsigned short a, vector unsigned short b)
+{
+  return __builtin_altivec_vminuh(a, b);
+}
+
+/* vec_vminsw */
+
+static vector int __attribute__((__always_inline__))
+vec_vminsw(vector int a, vector int b)
+{
+  return __builtin_altivec_vminsw(a, b);
+}
+
+/* vec_vminuw */
+
+static vector unsigned int __attribute__((__always_inline__))
+vec_vminuw(vector unsigned int a, vector unsigned int b)
+{
+  return __builtin_altivec_vminuw(a, b);
+}
+
+/* vec_vminfp */
+
+static vector float __attribute__((__always_inline__))
+vec_vminfp(vector float a, vector float b)
+{
+  return __builtin_altivec_vminfp(a, b);
+}
+
+/* vec_mladd */
+
+#define __builtin_altivec_vmladduhm vec_mladd
+
+static vector short __ATTRS_o_ai
+vec_mladd(vector short a, vector short b, vector short c)
+{
+  return a * b + c;
+}
+
+static vector short __ATTRS_o_ai
+vec_mladd(vector short a, vector unsigned short b, vector unsigned short c)
+{
+  return a * (vector short)b + (vector short)c;
+}
+
+static vector short __ATTRS_o_ai
+vec_mladd(vector unsigned short a, vector short b, vector short c)
+{
+  return (vector short)a * b + c;
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_mladd(vector unsigned short a, vector unsigned short b, vector unsigned short c)
+{
+  return a * b + c;
+}
+
+/* vec_vmladduhm */
+
+static vector short __ATTRS_o_ai
+vec_vmladduhm(vector short a, vector short b, vector short c)
+{
+  return a * b + c;
+}
+
+static vector short __ATTRS_o_ai
+vec_vmladduhm(vector short a, vector unsigned short b, vector unsigned short c)
+{
+  return a * (vector short)b + (vector short)c;
+}
+
+static vector short __ATTRS_o_ai
+vec_vmladduhm(vector unsigned short a, vector short b, vector short c)
+{
+  return (vector short)a * b + c;
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vmladduhm(vector unsigned short a, vector unsigned short b, vector unsigned short c)
+{
+  return a * b + c;
+}
+
+/* vec_mradds */
+
+static vector short __attribute__((__always_inline__))
+vec_mradds(vector short a, vector short b, vector short c)
+{
+  return __builtin_altivec_vmhraddshs(a, b, c);
+}
+
+/* vec_vmhraddshs */
+
+static vector short __attribute__((__always_inline__))
+vec_vmhraddshs(vector short a, vector short b, vector short c)
+{
+  return __builtin_altivec_vmhraddshs(a, b, c);
+}
+
+/* vec_msum */
+
+static vector int __ATTRS_o_ai
+vec_msum(vector signed char a, vector unsigned char b, vector int c)
+{
+  return __builtin_altivec_vmsummbm(a, b, c);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_msum(vector unsigned char a, vector unsigned char b, vector unsigned int c)
+{
+  return __builtin_altivec_vmsumubm(a, b, c);
+}
+
+static vector int __ATTRS_o_ai
+vec_msum(vector short a, vector short b, vector int c)
+{
+  return __builtin_altivec_vmsumshm(a, b, c);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_msum(vector unsigned short a, vector unsigned short b, vector unsigned int c)
+{
+  return __builtin_altivec_vmsumuhm(a, b, c);
+}
+
+/* vec_vmsummbm */
+
+static vector int __attribute__((__always_inline__))
+vec_vmsummbm(vector signed char a, vector unsigned char b, vector int c)
+{
+  return __builtin_altivec_vmsummbm(a, b, c);
+}
+
+/* vec_vmsumubm */
+
+static vector unsigned int __attribute__((__always_inline__))
+vec_vmsumubm(vector unsigned char a, vector unsigned char b, vector unsigned int c)
+{
+  return __builtin_altivec_vmsumubm(a, b, c);
+}
+
+/* vec_vmsumshm */
+
+static vector int __attribute__((__always_inline__))
+vec_vmsumshm(vector short a, vector short b, vector int c)
+{
+  return __builtin_altivec_vmsumshm(a, b, c);
+}
+
+/* vec_vmsumuhm */
+
+static vector unsigned int __attribute__((__always_inline__))
+vec_vmsumuhm(vector unsigned short a, vector unsigned short b, vector unsigned int c)
+{
+  return __builtin_altivec_vmsumuhm(a, b, c);
+}
+
+/* vec_msums */
+
+static vector int __ATTRS_o_ai
+vec_msums(vector short a, vector short b, vector int c)
+{
+  return __builtin_altivec_vmsumshs(a, b, c);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_msums(vector unsigned short a, vector unsigned short b, vector unsigned int c)
+{
+  return __builtin_altivec_vmsumuhs(a, b, c);
+}
+
+/* vec_vmsumshs */
+
+static vector int __attribute__((__always_inline__))
+vec_vmsumshs(vector short a, vector short b, vector int c)
+{
+  return __builtin_altivec_vmsumshs(a, b, c);
+}
+
+/* vec_vmsumuhs */
+
+static vector unsigned int __attribute__((__always_inline__))
+vec_vmsumuhs(vector unsigned short a, vector unsigned short b, vector unsigned int c)
+{
+  return __builtin_altivec_vmsumuhs(a, b, c);
+}
+
 /* vec_mtvscr */
 
-#define __builtin_vec_mtvscr __builtin_altivec_mtvscr
-#define vec_mtvscr           __builtin_altivec_mtvscr
+static void __ATTRS_o_ai
+vec_mtvscr(vector signed char a)
+{
+  __builtin_altivec_mtvscr((vector int)a);
+}
 
-/* ------------------------------ predicates ------------------------------------ */
+static void __ATTRS_o_ai
+vec_mtvscr(vector unsigned char a)
+{
+  __builtin_altivec_mtvscr((vector int)a);
+}
 
-static int __attribute__((__always_inline__))
-__builtin_vec_vcmpeq_p(char CR6_param, vector float a, vector float b)
+static void __ATTRS_o_ai
+vec_mtvscr(vector short a)
 {
-  return __builtin_altivec_vcmpeqfp_p(CR6_param, a, b);
+  __builtin_altivec_mtvscr((vector int)a);
 }
 
-static int __attribute__((__always_inline__))
-__builtin_vec_vcmpge_p(char CR6_param, vector float a, vector float b)
+static void __ATTRS_o_ai
+vec_mtvscr(vector unsigned short a)
 {
-  return __builtin_altivec_vcmpgefp_p(CR6_param, a, b);
+  __builtin_altivec_mtvscr((vector int)a);
 }
 
-static int __attribute__((__always_inline__))
-__builtin_vec_vcmpgt_p(char CR6_param, vector float a, vector float b)
+static void __ATTRS_o_ai
+vec_mtvscr(vector int a)
 {
-  return __builtin_altivec_vcmpgtfp_p(CR6_param, a, b);
+  __builtin_altivec_mtvscr((vector int)a);
 }
 
+static void __ATTRS_o_ai
+vec_mtvscr(vector unsigned int a)
+{
+  __builtin_altivec_mtvscr((vector int)a);
+}
+
+static void __ATTRS_o_ai
+vec_mtvscr(vector float a)
+{
+  __builtin_altivec_mtvscr((vector int)a);
+}
+
+/* vec_mule */
+
+static vector short __ATTRS_o_ai
+vec_mule(vector signed char a, vector signed char b)
+{
+  return __builtin_altivec_vmulesb(a, b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_mule(vector unsigned char a, vector unsigned char b)
+{
+  return __builtin_altivec_vmuleub(a, b);
+}
+
+static vector int __ATTRS_o_ai
+vec_mule(vector short a, vector short b)
+{
+  return __builtin_altivec_vmulesh(a, b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_mule(vector unsigned short a, vector unsigned short b)
+{
+  return __builtin_altivec_vmuleuh(a, b);
+}
+
+/* vec_vmulesb */
+
+static vector short __attribute__((__always_inline__))
+vec_vmulesb(vector signed char a, vector signed char b)
+{
+  return __builtin_altivec_vmulesb(a, b);
+}
+
+/* vec_vmuleub */
+
+static vector unsigned short __attribute__((__always_inline__))
+vec_vmuleub(vector unsigned char a, vector unsigned char b)
+{
+  return __builtin_altivec_vmuleub(a, b);
+}
+
+/* vec_vmulesh */
+
+static vector int __attribute__((__always_inline__))
+vec_vmulesh(vector short a, vector short b)
+{
+  return __builtin_altivec_vmulesh(a, b);
+}
+
+/* vec_vmuleuh */
+
+static vector unsigned int __attribute__((__always_inline__))
+vec_vmuleuh(vector unsigned short a, vector unsigned short b)
+{
+  return __builtin_altivec_vmuleuh(a, b);
+}
+
+/* vec_mulo */
+
+static vector short __ATTRS_o_ai
+vec_mulo(vector signed char a, vector signed char b)
+{
+  return __builtin_altivec_vmulosb(a, b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_mulo(vector unsigned char a, vector unsigned char b)
+{
+  return __builtin_altivec_vmuloub(a, b);
+}
+
+static vector int __ATTRS_o_ai
+vec_mulo(vector short a, vector short b)
+{
+  return __builtin_altivec_vmulosh(a, b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_mulo(vector unsigned short a, vector unsigned short b)
+{
+  return __builtin_altivec_vmulouh(a, b);
+}
+
+/* vec_vmulosb */
+
+static vector short __attribute__((__always_inline__))
+vec_vmulosb(vector signed char a, vector signed char b)
+{
+  return __builtin_altivec_vmulosb(a, b);
+}
+
+/* vec_vmuloub */
+
+static vector unsigned short __attribute__((__always_inline__))
+vec_vmuloub(vector unsigned char a, vector unsigned char b)
+{
+  return __builtin_altivec_vmuloub(a, b);
+}
+
+/* vec_vmulosh */
+
+static vector int __attribute__((__always_inline__))
+vec_vmulosh(vector short a, vector short b)
+{
+  return __builtin_altivec_vmulosh(a, b);
+}
+
+/* vec_vmulouh */
+
+static vector unsigned int __attribute__((__always_inline__))
+vec_vmulouh(vector unsigned short a, vector unsigned short b)
+{
+  return __builtin_altivec_vmulouh(a, b);
+}
+
+/* vec_nmsub */
+
+static vector float __attribute__((__always_inline__))
+vec_nmsub(vector float a, vector float b, vector float c)
+{
+  return __builtin_altivec_vnmsubfp(a, b, c);
+}
+
+/* vec_vnmsubfp */
+
+static vector float __attribute__((__always_inline__))
+vec_vnmsubfp(vector float a, vector float b, vector float c)
+{
+  return __builtin_altivec_vnmsubfp(a, b, c);
+}
+
+/* vec_nor */
+
+#define __builtin_altivec_vnor vec_nor
+
+static vector signed char __ATTRS_o_ai
+vec_nor(vector signed char a, vector signed char b)
+{
+  return ~(a | b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_nor(vector unsigned char a, vector unsigned char b)
+{
+  return ~(a | b);
+}
+
+static vector short __ATTRS_o_ai
+vec_nor(vector short a, vector short b)
+{
+  return ~(a | b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_nor(vector unsigned short a, vector unsigned short b)
+{
+  return ~(a | b);
+}
+
+static vector int __ATTRS_o_ai
+vec_nor(vector int a, vector int b)
+{
+  return ~(a | b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_nor(vector unsigned int a, vector unsigned int b)
+{
+  return ~(a | b);
+}
+
+static vector float __ATTRS_o_ai
+vec_nor(vector float a, vector float b)
+{
+  vector unsigned int res = ~((vector unsigned int)a | (vector unsigned int)b);
+  return (vector float)res;
+}
+
+/* vec_vnor */
+
+static vector signed char __ATTRS_o_ai
+vec_vnor(vector signed char a, vector signed char b)
+{
+  return ~(a | b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vnor(vector unsigned char a, vector unsigned char b)
+{
+  return ~(a | b);
+}
+
+static vector short __ATTRS_o_ai
+vec_vnor(vector short a, vector short b)
+{
+  return ~(a | b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vnor(vector unsigned short a, vector unsigned short b)
+{
+  return ~(a | b);
+}
+
+static vector int __ATTRS_o_ai
+vec_vnor(vector int a, vector int b)
+{
+  return ~(a | b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_vnor(vector unsigned int a, vector unsigned int b)
+{
+  return ~(a | b);
+}
+
+static vector float __ATTRS_o_ai
+vec_vnor(vector float a, vector float b)
+{
+  vector unsigned int res = ~((vector unsigned int)a | (vector unsigned int)b);
+  return (vector float)res;
+}
+
+/* vec_or */
+
+#define __builtin_altivec_vor vec_or
+
+static vector signed char __ATTRS_o_ai
+vec_or(vector signed char a, vector signed char b)
+{
+  return a | b;
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_or(vector unsigned char a, vector unsigned char b)
+{
+  return a | b;
+}
+
+static vector short __ATTRS_o_ai
+vec_or(vector short a, vector short b)
+{
+  return a | b;
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_or(vector unsigned short a, vector unsigned short b)
+{
+  return a | b;
+}
+
+static vector int __ATTRS_o_ai
+vec_or(vector int a, vector int b)
+{
+  return a | b;
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_or(vector unsigned int a, vector unsigned int b)
+{
+  return a | b;
+}
+
+static vector float __ATTRS_o_ai
+vec_or(vector float a, vector float b)
+{
+  vector unsigned int res = (vector unsigned int)a | (vector unsigned int)b;
+  return (vector float)res;
+}
+
+/* vec_vor */
+
+static vector signed char __ATTRS_o_ai
+vec_vor(vector signed char a, vector signed char b)
+{
+  return a | b;
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vor(vector unsigned char a, vector unsigned char b)
+{
+  return a | b;
+}
+
+static vector short __ATTRS_o_ai
+vec_vor(vector short a, vector short b)
+{
+  return a | b;
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vor(vector unsigned short a, vector unsigned short b)
+{
+  return a | b;
+}
+
+static vector int __ATTRS_o_ai
+vec_vor(vector int a, vector int b)
+{
+  return a | b;
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_vor(vector unsigned int a, vector unsigned int b)
+{
+  return a | b;
+}
+
+static vector float __ATTRS_o_ai
+vec_vor(vector float a, vector float b)
+{
+  vector unsigned int res = (vector unsigned int)a | (vector unsigned int)b;
+  return (vector float)res;
+}
+
+/* vec_pack */
+
+static vector signed char __ATTRS_o_ai
+vec_pack(vector signed short a, vector signed short b)
+{
+  return (vector signed char)vec_perm(a, b, (vector unsigned char)
+    (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
+     0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_pack(vector unsigned short a, vector unsigned short b)
+{
+  return (vector unsigned char)vec_perm(a, b, (vector unsigned char)
+    (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
+     0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
+}
+
+static vector short __ATTRS_o_ai
+vec_pack(vector int a, vector int b)
+{
+  return (vector short)vec_perm(a, b, (vector unsigned char)
+    (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
+     0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_pack(vector unsigned int a, vector unsigned int b)
+{
+  return (vector unsigned short)vec_perm(a, b, (vector unsigned char)
+    (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
+     0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
+}
+
+/* vec_vpkuhum */
+
+#define __builtin_altivec_vpkuhum vec_vpkuhum
+
+static vector signed char __ATTRS_o_ai
+vec_vpkuhum(vector signed short a, vector signed short b)
+{
+  return (vector signed char)vec_perm(a, b, (vector unsigned char)
+    (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
+     0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vpkuhum(vector unsigned short a, vector unsigned short b)
+{
+  return (vector unsigned char)vec_perm(a, b, (vector unsigned char)
+    (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
+     0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
+}
+
+/* vec_vpkuwum */
+
+#define __builtin_altivec_vpkuwum vec_vpkuwum
+
+static vector short __ATTRS_o_ai
+vec_vpkuwum(vector int a, vector int b)
+{
+  return (vector short)vec_perm(a, b, (vector unsigned char)
+    (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
+     0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vpkuwum(vector unsigned int a, vector unsigned int b)
+{
+  return (vector unsigned short)vec_perm(a, b, (vector unsigned char)
+    (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
+     0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
+}
+
+/* vec_packpx */
+
+static vector pixel __attribute__((__always_inline__))
+vec_packpx(vector unsigned int a, vector unsigned int b)
+{
+  return (vector pixel)__builtin_altivec_vpkpx(a, b);
+}
+
+/* vec_vpkpx */
+
+static vector pixel __attribute__((__always_inline__))
+vec_vpkpx(vector unsigned int a, vector unsigned int b)
+{
+  return (vector pixel)__builtin_altivec_vpkpx(a, b);
+}
+
+/* vec_packs */
+
+static vector signed char __ATTRS_o_ai
+vec_packs(vector short a, vector short b)
+{
+  return __builtin_altivec_vpkshss(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_packs(vector unsigned short a, vector unsigned short b)
+{
+  return __builtin_altivec_vpkuhus(a, b);
+}
+
+static vector signed short __ATTRS_o_ai
+vec_packs(vector int a, vector int b)
+{
+  return __builtin_altivec_vpkswss(a, b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_packs(vector unsigned int a, vector unsigned int b)
+{
+  return __builtin_altivec_vpkuwus(a, b);
+}
+
+/* vec_vpkshss */
+
+static vector signed char __attribute__((__always_inline__))
+vec_vpkshss(vector short a, vector short b)
+{
+  return __builtin_altivec_vpkshss(a, b);
+}
+
+/* vec_vpkuhus */
+
+static vector unsigned char __attribute__((__always_inline__))
+vec_vpkuhus(vector unsigned short a, vector unsigned short b)
+{
+  return __builtin_altivec_vpkuhus(a, b);
+}
+
+/* vec_vpkswss */
+
+static vector signed short __attribute__((__always_inline__))
+vec_vpkswss(vector int a, vector int b)
+{
+  return __builtin_altivec_vpkswss(a, b);
+}
+
+/* vec_vpkuwus */
+
+static vector unsigned short __attribute__((__always_inline__))
+vec_vpkuwus(vector unsigned int a, vector unsigned int b)
+{
+  return __builtin_altivec_vpkuwus(a, b);
+}
+
+/* vec_packsu */
+
+static vector unsigned char __ATTRS_o_ai
+vec_packsu(vector short a, vector short b)
+{
+  return __builtin_altivec_vpkshus(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_packsu(vector unsigned short a, vector unsigned short b)
+{
+  return __builtin_altivec_vpkuhus(a, b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_packsu(vector int a, vector int b)
+{
+  return __builtin_altivec_vpkswus(a, b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_packsu(vector unsigned int a, vector unsigned int b)
+{
+  return __builtin_altivec_vpkuwus(a, b);
+}
+
+/* vec_vpkshus */
+
+static vector unsigned char __ATTRS_o_ai
+vec_vpkshus(vector short a, vector short b)
+{
+  return __builtin_altivec_vpkshus(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vpkshus(vector unsigned short a, vector unsigned short b)
+{
+  return __builtin_altivec_vpkuhus(a, b);
+}
+
+/* vec_vpkswus */
+
+static vector unsigned short __ATTRS_o_ai
+vec_vpkswus(vector int a, vector int b)
+{
+  return __builtin_altivec_vpkswus(a, b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vpkswus(vector unsigned int a, vector unsigned int b)
+{
+  return __builtin_altivec_vpkuwus(a, b);
+}
+
+/* vec_perm */
+
+vector signed char __ATTRS_o_ai
+vec_perm(vector signed char a, vector signed char b, vector unsigned char c)
+{
+  return (vector signed char)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
+}
+
+vector unsigned char __ATTRS_o_ai
+vec_perm(vector unsigned char a, vector unsigned char b, vector unsigned char c)
+{
+  return (vector unsigned char)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
+}
+
+vector short __ATTRS_o_ai
+vec_perm(vector short a, vector short b, vector unsigned char c)
+{
+  return (vector short)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
+}
+
+vector unsigned short __ATTRS_o_ai
+vec_perm(vector unsigned short a, vector unsigned short b, vector unsigned char c)
+{
+  return (vector unsigned short)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
+}
+
+vector int __ATTRS_o_ai
+vec_perm(vector int a, vector int b, vector unsigned char c)
+{
+  return (vector int)__builtin_altivec_vperm_4si(a, b, c);
+}
+
+vector unsigned int __ATTRS_o_ai
+vec_perm(vector unsigned int a, vector unsigned int b, vector unsigned char c)
+{
+  return (vector unsigned int)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
+}
+
+vector float __ATTRS_o_ai
+vec_perm(vector float a, vector float b, vector unsigned char c)
+{
+  return (vector float)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
+}
+
+/* vec_vperm */
+
+vector signed char __ATTRS_o_ai
+vec_vperm(vector signed char a, vector signed char b, vector unsigned char c)
+{
+  return (vector signed char)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
+}
+
+vector unsigned char __ATTRS_o_ai
+vec_vperm(vector unsigned char a, vector unsigned char b, vector unsigned char c)
+{
+  return (vector unsigned char)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
+}
+
+vector short __ATTRS_o_ai
+vec_vperm(vector short a, vector short b, vector unsigned char c)
+{
+  return (vector short)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
+}
+
+vector unsigned short __ATTRS_o_ai
+vec_vperm(vector unsigned short a, vector unsigned short b, vector unsigned char c)
+{
+  return (vector unsigned short)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
+}
+
+vector int __ATTRS_o_ai
+vec_vperm(vector int a, vector int b, vector unsigned char c)
+{
+  return (vector int)__builtin_altivec_vperm_4si(a, b, c);
+}
+
+vector unsigned int __ATTRS_o_ai
+vec_vperm(vector unsigned int a, vector unsigned int b, vector unsigned char c)
+{
+  return (vector unsigned int)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
+}
+
+vector float __ATTRS_o_ai
+vec_vperm(vector float a, vector float b, vector unsigned char c)
+{
+  return (vector float)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
+}
+
+/* vec_re */
+
+vector float __attribute__((__always_inline__))
+vec_re(vector float a)
+{
+  return __builtin_altivec_vrefp(a);
+}
+
+/* vec_vrefp */
+
+vector float __attribute__((__always_inline__))
+vec_vrefp(vector float a)
+{
+  return __builtin_altivec_vrefp(a);
+}
+
+/* vec_rl */
+
+static vector signed char __ATTRS_o_ai
+vec_rl(vector signed char a, vector unsigned char b)
+{
+  return (vector signed char)__builtin_altivec_vrlb((vector char)a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_rl(vector unsigned char a, vector unsigned char b)
+{
+  return (vector unsigned char)__builtin_altivec_vrlb((vector char)a, b);
+}
+
+static vector short __ATTRS_o_ai
+vec_rl(vector short a, vector unsigned short b)
+{
+  return __builtin_altivec_vrlh(a, b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_rl(vector unsigned short a, vector unsigned short b)
+{
+  return (vector unsigned short)__builtin_altivec_vrlh((vector short)a, b);
+}
+
+static vector int __ATTRS_o_ai
+vec_rl(vector int a, vector unsigned int b)
+{
+  return __builtin_altivec_vrlw(a, b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_rl(vector unsigned int a, vector unsigned int b)
+{
+  return (vector unsigned int)__builtin_altivec_vrlw((vector int)a, b);
+}
+
+/* vec_vrlb */
+
+static vector signed char __ATTRS_o_ai
+vec_vrlb(vector signed char a, vector unsigned char b)
+{
+  return (vector signed char)__builtin_altivec_vrlb((vector char)a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vrlb(vector unsigned char a, vector unsigned char b)
+{
+  return (vector unsigned char)__builtin_altivec_vrlb((vector char)a, b);
+}
+
+/* vec_vrlh */
+
+static vector short __ATTRS_o_ai
+vec_vrlh(vector short a, vector unsigned short b)
+{
+  return __builtin_altivec_vrlh(a, b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vrlh(vector unsigned short a, vector unsigned short b)
+{
+  return (vector unsigned short)__builtin_altivec_vrlh((vector short)a, b);
+}
+
+/* vec_vrlw */
+
+static vector int __ATTRS_o_ai
+vec_vrlw(vector int a, vector unsigned int b)
+{
+  return __builtin_altivec_vrlw(a, b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_vrlw(vector unsigned int a, vector unsigned int b)
+{
+  return (vector unsigned int)__builtin_altivec_vrlw((vector int)a, b);
+}
+
+/* vec_round */
+
+static vector float __attribute__((__always_inline__))
+vec_round(vector float a)
+{
+  return __builtin_altivec_vrfin(a);
+}
+
+/* vec_vrfin */
+
+static vector float __attribute__((__always_inline__))
+vec_vrfin(vector float a)
+{
+  return __builtin_altivec_vrfin(a);
+}
+
+/* vec_rsqrte */
+
+static __vector float __attribute__((__always_inline__))
+vec_rsqrte(vector float a)
+{
+  return __builtin_altivec_vrsqrtefp(a);
+}
+
+/* vec_vrsqrtefp */
+
+static __vector float __attribute__((__always_inline__))
+vec_vrsqrtefp(vector float a)
+{
+  return __builtin_altivec_vrsqrtefp(a);
+}
+
+/* vec_sel */
+
+#define __builtin_altivec_vsel_4si vec_sel
+
+static vector signed char __ATTRS_o_ai
+vec_sel(vector signed char a, vector signed char b, vector unsigned char c)
+{
+  return (a & ~(vector signed char)c) | (b & (vector signed char)c);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_sel(vector unsigned char a, vector unsigned char b, vector unsigned char c)
+{
+  return (a & ~c) | (b & c);
+}
+
+static vector short __ATTRS_o_ai
+vec_sel(vector short a, vector short b, vector unsigned short c)
+{
+  return (a & ~(vector short)c) | (b & (vector short)c);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_sel(vector unsigned short a, vector unsigned short b, vector unsigned short c)
+{
+  return (a & ~c) | (b & c);
+}
+
+static vector int __ATTRS_o_ai
+vec_sel(vector int a, vector int b, vector unsigned int c)
+{
+  return (a & ~(vector int)c) | (b & (vector int)c);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_sel(vector unsigned int a, vector unsigned int b, vector unsigned int c)
+{
+  return (a & ~c) | (b & c);
+}
+
+static vector float __ATTRS_o_ai
+vec_sel(vector float a, vector float b, vector unsigned int c)
+{
+  vector int res = ((vector int)a & ~(vector int)c) | ((vector int)b & (vector int)c);
+  return (vector float)res;
+}
+
+/* vec_vsel */
+
+static vector signed char __ATTRS_o_ai
+vec_vsel(vector signed char a, vector signed char b, vector unsigned char c)
+{
+  return (a & ~(vector signed char)c) | (b & (vector signed char)c);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vsel(vector unsigned char a, vector unsigned char b, vector unsigned char c)
+{
+  return (a & ~c) | (b & c);
+}
+
+static vector short __ATTRS_o_ai
+vec_vsel(vector short a, vector short b, vector unsigned short c)
+{
+  return (a & ~(vector short)c) | (b & (vector short)c);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vsel(vector unsigned short a, vector unsigned short b, vector unsigned short c)
+{
+  return (a & ~c) | (b & c);
+}
+
+static vector int __ATTRS_o_ai
+vec_vsel(vector int a, vector int b, vector unsigned int c)
+{
+  return (a & ~(vector int)c) | (b & (vector int)c);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_vsel(vector unsigned int a, vector unsigned int b, vector unsigned int c)
+{
+  return (a & ~c) | (b & c);
+}
+
+static vector float __ATTRS_o_ai
+vec_vsel(vector float a, vector float b, vector unsigned int c)
+{
+  vector int res = ((vector int)a & ~(vector int)c) | ((vector int)b & (vector int)c);
+  return (vector float)res;
+}
+
+/* vec_sl */
+
+static vector signed char __ATTRS_o_ai
+vec_sl(vector signed char a, vector unsigned char b)
+{
+  return a << (vector signed char)b;
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_sl(vector unsigned char a, vector unsigned char b)
+{
+  return a << b;
+}
+
+static vector short __ATTRS_o_ai
+vec_sl(vector short a, vector unsigned short b)
+{
+  return a << (vector short)b;
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_sl(vector unsigned short a, vector unsigned short b)
+{
+  return a << b;
+}
+
+static vector int __ATTRS_o_ai
+vec_sl(vector int a, vector unsigned int b)
+{
+  return a << (vector int)b;
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_sl(vector unsigned int a, vector unsigned int b)
+{
+  return a << b;
+}
+
+/* vec_vslb */
+
+#define __builtin_altivec_vslb vec_vslb
+
+static vector signed char __ATTRS_o_ai
+vec_vslb(vector signed char a, vector unsigned char b)
+{
+  return vec_sl(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vslb(vector unsigned char a, vector unsigned char b)
+{
+  return vec_sl(a, b);
+}
+
+/* vec_vslh */
+
+#define __builtin_altivec_vslh vec_vslh
+
+static vector short __ATTRS_o_ai
+vec_vslh(vector short a, vector unsigned short b)
+{
+  return vec_sl(a, b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vslh(vector unsigned short a, vector unsigned short b)
+{
+  return vec_sl(a, b);
+}
+
+/* vec_vslw */
+
+#define __builtin_altivec_vslw vec_vslw
+
+static vector int __ATTRS_o_ai
+vec_vslw(vector int a, vector unsigned int b)
+{
+  return vec_sl(a, b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_vslw(vector unsigned int a, vector unsigned int b)
+{
+  return vec_sl(a, b);
+}
+
+/* vec_sld */
+
+#define __builtin_altivec_vsldoi_4si vec_sld
+
+static vector signed char __ATTRS_o_ai
+vec_sld(vector signed char a, vector signed char b, unsigned char c)
+{
+  return (vector signed char)vec_perm(a, b, (vector unsigned char)
+    (c,   c+1, c+2,  c+3,  c+4,  c+5,  c+6,  c+7, 
+     c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_sld(vector unsigned char a, vector unsigned char b, unsigned char c)
+{
+  return (vector unsigned char)vec_perm(a, b, (vector unsigned char)
+    (c,   c+1, c+2,  c+3,  c+4,  c+5,  c+6,  c+7, 
+     c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
+}
+
+static vector short __ATTRS_o_ai
+vec_sld(vector short a, vector short b, unsigned char c)
+{
+  return (vector short)vec_perm(a, b, (vector unsigned char)
+    (c,   c+1, c+2,  c+3,  c+4,  c+5,  c+6,  c+7, 
+     c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_sld(vector unsigned short a, vector unsigned short b, unsigned char c)
+{
+  return (vector unsigned short)vec_perm(a, b, (vector unsigned char)
+    (c,   c+1, c+2,  c+3,  c+4,  c+5,  c+6,  c+7, 
+     c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
+}
+
+static vector int __ATTRS_o_ai
+vec_sld(vector int a, vector int b, unsigned char c)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (c,   c+1, c+2,  c+3,  c+4,  c+5,  c+6,  c+7, 
+     c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_sld(vector unsigned int a, vector unsigned int b, unsigned char c)
+{
+  return (vector unsigned int)vec_perm(a, b, (vector unsigned char)
+    (c,   c+1, c+2,  c+3,  c+4,  c+5,  c+6,  c+7, 
+     c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
+}
+
+static vector float __ATTRS_o_ai
+vec_sld(vector float a, vector float b, unsigned char c)
+{
+  return (vector float)vec_perm(a, b, (vector unsigned char)
+    (c,   c+1, c+2,  c+3,  c+4,  c+5,  c+6,  c+7, 
+     c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
+}
+
+/* vec_vsldoi */
+
+static vector signed char __ATTRS_o_ai
+vec_vsldoi(vector signed char a, vector signed char b, unsigned char c)
+{
+  return (vector signed char)vec_perm(a, b, (vector unsigned char)
+    (c,   c+1, c+2,  c+3,  c+4,  c+5,  c+6,  c+7, 
+     c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vsldoi(vector unsigned char a, vector unsigned char b, unsigned char c)
+{
+  return (vector unsigned char)vec_perm(a, b, (vector unsigned char)
+    (c,   c+1, c+2,  c+3,  c+4,  c+5,  c+6,  c+7, 
+     c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
+}
+
+static vector short __ATTRS_o_ai
+vec_vsldoi(vector short a, vector short b, unsigned char c)
+{
+  return (vector short)vec_perm(a, b, (vector unsigned char)
+    (c,   c+1, c+2,  c+3,  c+4,  c+5,  c+6,  c+7, 
+     c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vsldoi(vector unsigned short a, vector unsigned short b, unsigned char c)
+{
+  return (vector unsigned short)vec_perm(a, b, (vector unsigned char)
+    (c,   c+1, c+2,  c+3,  c+4,  c+5,  c+6,  c+7, 
+     c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
+}
+
+static vector int __ATTRS_o_ai
+vec_vsldoi(vector int a, vector int b, unsigned char c)
+{
+  return vec_perm(a, b, (vector unsigned char)
+    (c,   c+1, c+2,  c+3,  c+4,  c+5,  c+6,  c+7, 
+     c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_vsldoi(vector unsigned int a, vector unsigned int b, unsigned char c)
+{
+  return (vector unsigned int)vec_perm(a, b, (vector unsigned char)
+    (c,   c+1, c+2,  c+3,  c+4,  c+5,  c+6,  c+7, 
+     c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
+}
+
+static vector float __ATTRS_o_ai
+vec_vsldoi(vector float a, vector float b, unsigned char c)
+{
+  return (vector float)vec_perm(a, b, (vector unsigned char)
+    (c,   c+1, c+2,  c+3,  c+4,  c+5,  c+6,  c+7, 
+     c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
+}
+
+/* vec_sll */
+
+static vector signed char __ATTRS_o_ai
+vec_sll(vector signed char a, vector unsigned char b)
+{
+  return (vector signed char)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector signed char __ATTRS_o_ai
+vec_sll(vector signed char a, vector unsigned short b)
+{
+  return (vector signed char)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector signed char __ATTRS_o_ai
+vec_sll(vector signed char a, vector unsigned int b)
+{
+  return (vector signed char)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_sll(vector unsigned char a, vector unsigned char b)
+{
+  return (vector unsigned char)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_sll(vector unsigned char a, vector unsigned short b)
+{
+  return (vector unsigned char)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_sll(vector unsigned char a, vector unsigned int b)
+{
+  return (vector unsigned char)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector short __ATTRS_o_ai
+vec_sll(vector short a, vector unsigned char b)
+{
+  return (vector short)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector short __ATTRS_o_ai
+vec_sll(vector short a, vector unsigned short b)
+{
+  return (vector short)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector short __ATTRS_o_ai
+vec_sll(vector short a, vector unsigned int b)
+{
+  return (vector short)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_sll(vector unsigned short a, vector unsigned char b)
+{
+  return (vector unsigned short)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_sll(vector unsigned short a, vector unsigned short b)
+{
+  return (vector unsigned short)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_sll(vector unsigned short a, vector unsigned int b)
+{
+  return (vector unsigned short)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector int __ATTRS_o_ai
+vec_sll(vector int a, vector unsigned char b)
+{
+  return (vector int)__builtin_altivec_vsl(a, (vector int)b);
+}
+
+static vector int __ATTRS_o_ai
+vec_sll(vector int a, vector unsigned short b)
+{
+  return (vector int)__builtin_altivec_vsl(a, (vector int)b);
+}
+
+static vector int __ATTRS_o_ai
+vec_sll(vector int a, vector unsigned int b)
+{
+  return (vector int)__builtin_altivec_vsl(a, (vector int)b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_sll(vector unsigned int a, vector unsigned char b)
+{
+  return (vector unsigned int)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_sll(vector unsigned int a, vector unsigned short b)
+{
+  return (vector unsigned int)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_sll(vector unsigned int a, vector unsigned int b)
+{
+  return (vector unsigned int)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+/* vec_vsl */
+
+static vector signed char __ATTRS_o_ai
+vec_vsl(vector signed char a, vector unsigned char b)
+{
+  return (vector signed char)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector signed char __ATTRS_o_ai
+vec_vsl(vector signed char a, vector unsigned short b)
+{
+  return (vector signed char)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector signed char __ATTRS_o_ai
+vec_vsl(vector signed char a, vector unsigned int b)
+{
+  return (vector signed char)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vsl(vector unsigned char a, vector unsigned char b)
+{
+  return (vector unsigned char)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vsl(vector unsigned char a, vector unsigned short b)
+{
+  return (vector unsigned char)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vsl(vector unsigned char a, vector unsigned int b)
+{
+  return (vector unsigned char)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector short __ATTRS_o_ai
+vec_vsl(vector short a, vector unsigned char b)
+{
+  return (vector short)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector short __ATTRS_o_ai
+vec_vsl(vector short a, vector unsigned short b)
+{
+  return (vector short)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector short __ATTRS_o_ai
+vec_vsl(vector short a, vector unsigned int b)
+{
+  return (vector short)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vsl(vector unsigned short a, vector unsigned char b)
+{
+  return (vector unsigned short)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vsl(vector unsigned short a, vector unsigned short b)
+{
+  return (vector unsigned short)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vsl(vector unsigned short a, vector unsigned int b)
+{
+  return (vector unsigned short)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector int __ATTRS_o_ai
+vec_vsl(vector int a, vector unsigned char b)
+{
+  return (vector int)__builtin_altivec_vsl(a, (vector int)b);
+}
+
+static vector int __ATTRS_o_ai
+vec_vsl(vector int a, vector unsigned short b)
+{
+  return (vector int)__builtin_altivec_vsl(a, (vector int)b);
+}
+
+static vector int __ATTRS_o_ai
+vec_vsl(vector int a, vector unsigned int b)
+{
+  return (vector int)__builtin_altivec_vsl(a, (vector int)b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_vsl(vector unsigned int a, vector unsigned char b)
+{
+  return (vector unsigned int)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_vsl(vector unsigned int a, vector unsigned short b)
+{
+  return (vector unsigned int)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_vsl(vector unsigned int a, vector unsigned int b)
+{
+  return (vector unsigned int)__builtin_altivec_vsl((vector int)a, (vector int)b);
+}
+
+/* vec_slo */
+
+static vector signed char __ATTRS_o_ai
+vec_slo(vector signed char a, vector signed char b)
+{
+  return (vector signed char)__builtin_altivec_vslo((vector int)a, (vector int)b);
+}
+
+static vector signed char __ATTRS_o_ai
+vec_slo(vector signed char a, vector unsigned char b)
+{
+  return (vector signed char)__builtin_altivec_vslo((vector int)a, (vector int)b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_slo(vector unsigned char a, vector signed char b)
+{
+  return (vector unsigned char)__builtin_altivec_vslo((vector int)a, (vector int)b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_slo(vector unsigned char a, vector unsigned char b)
+{
+  return (vector unsigned char)__builtin_altivec_vslo((vector int)a, (vector int)b);
+}
+
+static vector short __ATTRS_o_ai
+vec_slo(vector short a, vector signed char b)
+{
+  return (vector short)__builtin_altivec_vslo((vector int)a, (vector int)b);
+}
+
+static vector short __ATTRS_o_ai
+vec_slo(vector short a, vector unsigned char b)
+{
+  return (vector short)__builtin_altivec_vslo((vector int)a, (vector int)b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_slo(vector unsigned short a, vector signed char b)
+{
+  return (vector unsigned short)__builtin_altivec_vslo((vector int)a, (vector int)b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_slo(vector unsigned short a, vector unsigned char b)
+{
+  return (vector unsigned short)__builtin_altivec_vslo((vector int)a, (vector int)b);
+}
+
+static vector int __ATTRS_o_ai
+vec_slo(vector int a, vector signed char b)
+{
+  return (vector int)__builtin_altivec_vslo(a, (vector int)b);
+}
+
+static vector int __ATTRS_o_ai
+vec_slo(vector int a, vector unsigned char b)
+{
+  return (vector int)__builtin_altivec_vslo(a, (vector int)b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_slo(vector unsigned int a, vector signed char b)
+{
+  return (vector unsigned int)__builtin_altivec_vslo((vector int)a, (vector int)b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_slo(vector unsigned int a, vector unsigned char b)
+{
+  return (vector unsigned int)__builtin_altivec_vslo((vector int)a, (vector int)b);
+}
+
+static vector float __ATTRS_o_ai
+vec_slo(vector float a, vector signed char b)
+{
+  return (vector float)__builtin_altivec_vslo((vector int)a, (vector int)b);
+}
+
+static vector float __ATTRS_o_ai
+vec_slo(vector float a, vector unsigned char b)
+{
+  return (vector float)__builtin_altivec_vslo((vector int)a, (vector int)b);
+}
+
+/* vec_vslo */
+
+static vector signed char __ATTRS_o_ai
+vec_vslo(vector signed char a, vector signed char b)
+{
+  return (vector signed char)__builtin_altivec_vslo((vector int)a, (vector int)b);
+}
+
+static vector signed char __ATTRS_o_ai
+vec_vslo(vector signed char a, vector unsigned char b)
+{
+  return (vector signed char)__builtin_altivec_vslo((vector int)a, (vector int)b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vslo(vector unsigned char a, vector signed char b)
+{
+  return (vector unsigned char)__builtin_altivec_vslo((vector int)a, (vector int)b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vslo(vector unsigned char a, vector unsigned char b)
+{
+  return (vector unsigned char)__builtin_altivec_vslo((vector int)a, (vector int)b);
+}
+
+static vector short __ATTRS_o_ai
+vec_vslo(vector short a, vector signed char b)
+{
+  return (vector short)__builtin_altivec_vslo((vector int)a, (vector int)b);
+}
+
+static vector short __ATTRS_o_ai
+vec_vslo(vector short a, vector unsigned char b)
+{
+  return (vector short)__builtin_altivec_vslo((vector int)a, (vector int)b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vslo(vector unsigned short a, vector signed char b)
+{
+  return (vector unsigned short)__builtin_altivec_vslo((vector int)a, (vector int)b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vslo(vector unsigned short a, vector unsigned char b)
+{
+  return (vector unsigned short)__builtin_altivec_vslo((vector int)a, (vector int)b);
+}
+
+static vector int __ATTRS_o_ai
+vec_vslo(vector int a, vector signed char b)
+{
+  return (vector int)__builtin_altivec_vslo(a, (vector int)b);
+}
+
+static vector int __ATTRS_o_ai
+vec_vslo(vector int a, vector unsigned char b)
+{
+  return (vector int)__builtin_altivec_vslo(a, (vector int)b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_vslo(vector unsigned int a, vector signed char b)
+{
+  return (vector unsigned int)__builtin_altivec_vslo((vector int)a, (vector int)b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_vslo(vector unsigned int a, vector unsigned char b)
+{
+  return (vector unsigned int)__builtin_altivec_vslo((vector int)a, (vector int)b);
+}
+
+static vector float __ATTRS_o_ai
+vec_vslo(vector float a, vector signed char b)
+{
+  return (vector float)__builtin_altivec_vslo((vector int)a, (vector int)b);
+}
+
+static vector float __ATTRS_o_ai
+vec_vslo(vector float a, vector unsigned char b)
+{
+  return (vector float)__builtin_altivec_vslo((vector int)a, (vector int)b);
+}
+
+/* vec_splat */
+
+static vector signed char __ATTRS_o_ai
+vec_splat(vector signed char a, unsigned char b)
+{
+  return (vector signed char)vec_perm(a, a, (vector unsigned char)(b));
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_splat(vector unsigned char a, unsigned char b)
+{
+  return (vector unsigned char)vec_perm(a, a, (vector unsigned char)(b));
+}
+
+static vector short __ATTRS_o_ai
+vec_splat(vector short a, unsigned char b)
+{ 
+  b *= 2;
+  return (vector short)vec_perm(a, a, (vector unsigned char)
+    (b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1));
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_splat(vector unsigned short a, unsigned char b)
+{ 
+  b *= 2;
+  return (vector unsigned short)vec_perm(a, a, (vector unsigned char)
+    (b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1));
+}
+
+static vector int __ATTRS_o_ai
+vec_splat(vector int a, unsigned char b)
+{ 
+  b *= 4;
+  return vec_perm(a, a, (vector unsigned char)
+    (b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3));
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_splat(vector unsigned int a, unsigned char b)
+{ 
+  b *= 4;
+  return (vector unsigned int)vec_perm(a, a, (vector unsigned char)
+    (b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3));
+}
+
+static vector float __ATTRS_o_ai
+vec_splat(vector float a, unsigned char b)
+{ 
+  b *= 4;
+  return (vector float)vec_perm(a, a, (vector unsigned char)
+    (b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3));
+}
+
+/* vec_vspltb */
+
+#define __builtin_altivec_vspltb vec_vspltb
+
+static vector signed char __ATTRS_o_ai
+vec_vspltb(vector signed char a, unsigned char b)
+{
+  return (vector signed char)vec_perm(a, a, (vector unsigned char)(b));
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vspltb(vector unsigned char a, unsigned char b)
+{
+  return (vector unsigned char)vec_perm(a, a, (vector unsigned char)(b));
+}
+
+/* vec_vsplth */
+
+#define __builtin_altivec_vsplth vec_vsplth
+
+static vector short __ATTRS_o_ai
+vec_vsplth(vector short a, unsigned char b)
+{
+  b *= 2;
+  return (vector short)vec_perm(a, a, (vector unsigned char)
+    (b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1));
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vsplth(vector unsigned short a, unsigned char b)
+{
+  b *= 2;
+  return (vector unsigned short)vec_perm(a, a, (vector unsigned char)
+    (b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1));
+}
+
+/* vec_vspltw */
+
+#define __builtin_altivec_vspltw vec_vspltw
+
+static vector int __ATTRS_o_ai
+vec_vspltw(vector int a, unsigned char b)
+{
+  b *= 4;
+  return (vector int)vec_perm(a, a, (vector unsigned char)
+    (b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3));
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_vspltw(vector unsigned int a, unsigned char b)
+{
+  b *= 4;
+  return (vector unsigned int)vec_perm(a, a, (vector unsigned char)
+    (b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3));
+}
+
+static vector float __ATTRS_o_ai
+vec_vspltw(vector float a, unsigned char b)
+{
+  b *= 4;
+  return (vector float)vec_perm(a, a, (vector unsigned char)
+    (b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3));
+}
+
+/* vec_splat_s8 */
+
+#define __builtin_altivec_vspltisb vec_splat_s8
+
+// FIXME: parameter should be treated as 5-bit signed literal
+static vector signed char __ATTRS_o_ai
+vec_splat_s8(signed char a)
+{
+  return (vector signed char)(a);
+}
+
+/* vec_vspltisb */
+
+// FIXME: parameter should be treated as 5-bit signed literal
+static vector signed char __ATTRS_o_ai
+vec_vspltisb(signed char a)
+{
+  return (vector signed char)(a);
+}
+
+/* vec_splat_s16 */
+
+#define __builtin_altivec_vspltish vec_splat_s16
+
+// FIXME: parameter should be treated as 5-bit signed literal
+static vector short __ATTRS_o_ai
+vec_splat_s16(signed char a)
+{
+  return (vector short)(a);
+}
+
+/* vec_vspltish */
+
+// FIXME: parameter should be treated as 5-bit signed literal
+static vector short __ATTRS_o_ai
+vec_vspltish(signed char a)
+{
+  return (vector short)(a);
+}
+
+/* vec_splat_s32 */
+
+#define __builtin_altivec_vspltisw vec_splat_s32
+
+// FIXME: parameter should be treated as 5-bit signed literal
+static vector int __ATTRS_o_ai
+vec_splat_s32(signed char a)
+{
+  return (vector int)(a);
+}
+
+/* vec_vspltisw */
+
+// FIXME: parameter should be treated as 5-bit signed literal
+static vector int __ATTRS_o_ai
+vec_vspltisw(signed char a)
+{
+  return (vector int)(a);
+}
+
+/* vec_splat_u8 */
+
+// FIXME: parameter should be treated as 5-bit signed literal
+static vector unsigned char __ATTRS_o_ai
+vec_splat_u8(unsigned char a)
+{
+  return (vector unsigned char)(a);
+}
+
+/* vec_splat_u16 */
+
+// FIXME: parameter should be treated as 5-bit signed literal
+static vector unsigned short __ATTRS_o_ai
+vec_splat_u16(signed char a)
+{
+  return (vector unsigned short)(a);
+}
+
+/* vec_splat_u32 */
+
+// FIXME: parameter should be treated as 5-bit signed literal
+static vector unsigned int __ATTRS_o_ai
+vec_splat_u32(signed char a)
+{
+  return (vector unsigned int)(a);
+}
+
+/* vec_sr */
+
+static vector signed char __ATTRS_o_ai
+vec_sr(vector signed char a, vector unsigned char b)
+{
+  return a >> (vector signed char)b;
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_sr(vector unsigned char a, vector unsigned char b)
+{
+  return a >> b;
+}
+
+static vector short __ATTRS_o_ai
+vec_sr(vector short a, vector unsigned short b)
+{
+  return a >> (vector short)b;
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_sr(vector unsigned short a, vector unsigned short b)
+{
+  return a >> b;
+}
+
+static vector int __ATTRS_o_ai
+vec_sr(vector int a, vector unsigned int b)
+{
+  return a >> (vector int)b;
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_sr(vector unsigned int a, vector unsigned int b)
+{
+  return a >> b;
+}
+
+/* vec_vsrb */
+
+#define __builtin_altivec_vsrb vec_vsrb
+
+static vector signed char __ATTRS_o_ai
+vec_vsrb(vector signed char a, vector unsigned char b)
+{
+  return a >> (vector signed char)b;
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vsrb(vector unsigned char a, vector unsigned char b)
+{
+  return a >> b;
+}
+
+/* vec_vsrh */
+
+#define __builtin_altivec_vsrh vec_vsrh
+
+static vector short __ATTRS_o_ai
+vec_vsrh(vector short a, vector unsigned short b)
+{
+  return a >> (vector short)b;
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vsrh(vector unsigned short a, vector unsigned short b)
+{
+  return a >> b;
+}
+
+/* vec_vsrw */
+
+#define __builtin_altivec_vsrw vec_vsrw
+
+static vector int __ATTRS_o_ai
+vec_vsrw(vector int a, vector unsigned int b)
+{
+  return a >> (vector int)b;
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_vsrw(vector unsigned int a, vector unsigned int b)
+{
+  return a >> b;
+}
+
+/* vec_sra */
+
+static vector signed char __ATTRS_o_ai
+vec_sra(vector signed char a, vector unsigned char b)
+{
+  return (vector signed char)__builtin_altivec_vsrab((vector char)a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_sra(vector unsigned char a, vector unsigned char b)
+{
+  return (vector unsigned char)__builtin_altivec_vsrab((vector char)a, b);
+}
+
+static vector short __ATTRS_o_ai
+vec_sra(vector short a, vector unsigned short b)
+{
+  return __builtin_altivec_vsrah(a, (vector unsigned short)b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_sra(vector unsigned short a, vector unsigned short b)
+{
+  return (vector unsigned short)__builtin_altivec_vsrah((vector short)a, b);
+}
+
+static vector int __ATTRS_o_ai
+vec_sra(vector int a, vector unsigned int b)
+{
+  return __builtin_altivec_vsraw(a, b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_sra(vector unsigned int a, vector unsigned int b)
+{
+  return (vector unsigned int)__builtin_altivec_vsraw((vector int)a, b);
+}
+
+/* vec_vsrab */
+
+static vector signed char __ATTRS_o_ai
+vec_vsrab(vector signed char a, vector unsigned char b)
+{
+  return (vector signed char)__builtin_altivec_vsrab((vector char)a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vsrab(vector unsigned char a, vector unsigned char b)
+{
+  return (vector unsigned char)__builtin_altivec_vsrab((vector char)a, b);
+}
+
+/* vec_vsrah */
+
+static vector short __ATTRS_o_ai
+vec_vsrah(vector short a, vector unsigned short b)
+{
+  return __builtin_altivec_vsrah(a, (vector unsigned short)b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vsrah(vector unsigned short a, vector unsigned short b)
+{
+  return (vector unsigned short)__builtin_altivec_vsrah((vector short)a, b);
+}
+
+/* vec_vsraw */
+
+static vector int __ATTRS_o_ai
+vec_vsraw(vector int a, vector unsigned int b)
+{
+  return __builtin_altivec_vsraw(a, b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_vsraw(vector unsigned int a, vector unsigned int b)
+{
+  return (vector unsigned int)__builtin_altivec_vsraw((vector int)a, b);
+}
+
+/* vec_srl */
+
+static vector signed char __ATTRS_o_ai
+vec_srl(vector signed char a, vector unsigned char b)
+{
+  return (vector signed char)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector signed char __ATTRS_o_ai
+vec_srl(vector signed char a, vector unsigned short b)
+{
+  return (vector signed char)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector signed char __ATTRS_o_ai
+vec_srl(vector signed char a, vector unsigned int b)
+{
+  return (vector signed char)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_srl(vector unsigned char a, vector unsigned char b)
+{
+  return (vector unsigned char)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_srl(vector unsigned char a, vector unsigned short b)
+{
+  return (vector unsigned char)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_srl(vector unsigned char a, vector unsigned int b)
+{
+  return (vector unsigned char)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector short __ATTRS_o_ai
+vec_srl(vector short a, vector unsigned char b)
+{
+  return (vector short)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector short __ATTRS_o_ai
+vec_srl(vector short a, vector unsigned short b)
+{
+  return (vector short)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector short __ATTRS_o_ai
+vec_srl(vector short a, vector unsigned int b)
+{
+  return (vector short)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_srl(vector unsigned short a, vector unsigned char b)
+{
+  return (vector unsigned short)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_srl(vector unsigned short a, vector unsigned short b)
+{
+  return (vector unsigned short)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_srl(vector unsigned short a, vector unsigned int b)
+{
+  return (vector unsigned short)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector int __ATTRS_o_ai
+vec_srl(vector int a, vector unsigned char b)
+{
+  return (vector int)__builtin_altivec_vsr(a, (vector int)b);
+}
+
+static vector int __ATTRS_o_ai
+vec_srl(vector int a, vector unsigned short b)
+{
+  return (vector int)__builtin_altivec_vsr(a, (vector int)b);
+}
+
+static vector int __ATTRS_o_ai
+vec_srl(vector int a, vector unsigned int b)
+{
+  return (vector int)__builtin_altivec_vsr(a, (vector int)b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_srl(vector unsigned int a, vector unsigned char b)
+{
+  return (vector unsigned int)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_srl(vector unsigned int a, vector unsigned short b)
+{
+  return (vector unsigned int)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_srl(vector unsigned int a, vector unsigned int b)
+{
+  return (vector unsigned int)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+/* vec_vsr */
+
+static vector signed char __ATTRS_o_ai
+vec_vsr(vector signed char a, vector unsigned char b)
+{
+  return (vector signed char)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector signed char __ATTRS_o_ai
+vec_vsr(vector signed char a, vector unsigned short b)
+{
+  return (vector signed char)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector signed char __ATTRS_o_ai
+vec_vsr(vector signed char a, vector unsigned int b)
+{
+  return (vector signed char)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vsr(vector unsigned char a, vector unsigned char b)
+{
+  return (vector unsigned char)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vsr(vector unsigned char a, vector unsigned short b)
+{
+  return (vector unsigned char)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vsr(vector unsigned char a, vector unsigned int b)
+{
+  return (vector unsigned char)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector short __ATTRS_o_ai
+vec_vsr(vector short a, vector unsigned char b)
+{
+  return (vector short)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector short __ATTRS_o_ai
+vec_vsr(vector short a, vector unsigned short b)
+{
+  return (vector short)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector short __ATTRS_o_ai
+vec_vsr(vector short a, vector unsigned int b)
+{
+  return (vector short)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vsr(vector unsigned short a, vector unsigned char b)
+{
+  return (vector unsigned short)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vsr(vector unsigned short a, vector unsigned short b)
+{
+  return (vector unsigned short)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vsr(vector unsigned short a, vector unsigned int b)
+{
+  return (vector unsigned short)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector int __ATTRS_o_ai
+vec_vsr(vector int a, vector unsigned char b)
+{
+  return (vector int)__builtin_altivec_vsr(a, (vector int)b);
+}
+
+static vector int __ATTRS_o_ai
+vec_vsr(vector int a, vector unsigned short b)
+{
+  return (vector int)__builtin_altivec_vsr(a, (vector int)b);
+}
+
+static vector int __ATTRS_o_ai
+vec_vsr(vector int a, vector unsigned int b)
+{
+  return (vector int)__builtin_altivec_vsr(a, (vector int)b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_vsr(vector unsigned int a, vector unsigned char b)
+{
+  return (vector unsigned int)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_vsr(vector unsigned int a, vector unsigned short b)
+{
+  return (vector unsigned int)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_vsr(vector unsigned int a, vector unsigned int b)
+{
+  return (vector unsigned int)__builtin_altivec_vsr((vector int)a, (vector int)b);
+}
+
+/* vec_sro */
+
+static vector signed char __ATTRS_o_ai
+vec_sro(vector signed char a, vector signed char b)
+{
+  return (vector signed char)__builtin_altivec_vsro((vector int)a, (vector int)b);
+}
+
+static vector signed char __ATTRS_o_ai
+vec_sro(vector signed char a, vector unsigned char b)
+{
+  return (vector signed char)__builtin_altivec_vsro((vector int)a, (vector int)b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_sro(vector unsigned char a, vector signed char b)
+{
+  return (vector unsigned char)__builtin_altivec_vsro((vector int)a, (vector int)b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_sro(vector unsigned char a, vector unsigned char b)
+{
+  return (vector unsigned char)__builtin_altivec_vsro((vector int)a, (vector int)b);
+}
+
+static vector short __ATTRS_o_ai
+vec_sro(vector short a, vector signed char b)
+{
+  return (vector short)__builtin_altivec_vsro((vector int)a, (vector int)b);
+}
+
+static vector short __ATTRS_o_ai
+vec_sro(vector short a, vector unsigned char b)
+{
+  return (vector short)__builtin_altivec_vsro((vector int)a, (vector int)b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_sro(vector unsigned short a, vector signed char b)
+{
+  return (vector unsigned short)__builtin_altivec_vsro((vector int)a, (vector int)b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_sro(vector unsigned short a, vector unsigned char b)
+{
+  return (vector unsigned short)__builtin_altivec_vsro((vector int)a, (vector int)b);
+}
+
+static vector int __ATTRS_o_ai
+vec_sro(vector int a, vector signed char b)
+{
+  return (vector int)__builtin_altivec_vsro(a, (vector int)b);
+}
+
+static vector int __ATTRS_o_ai
+vec_sro(vector int a, vector unsigned char b)
+{
+  return (vector int)__builtin_altivec_vsro(a, (vector int)b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_sro(vector unsigned int a, vector signed char b)
+{
+  return (vector unsigned int)__builtin_altivec_vsro((vector int)a, (vector int)b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_sro(vector unsigned int a, vector unsigned char b)
+{
+  return (vector unsigned int)__builtin_altivec_vsro((vector int)a, (vector int)b);
+}
+
+static vector float __ATTRS_o_ai
+vec_sro(vector float a, vector signed char b)
+{
+  return (vector float)__builtin_altivec_vsro((vector int)a, (vector int)b);
+}
+
+static vector float __ATTRS_o_ai
+vec_sro(vector float a, vector unsigned char b)
+{
+  return (vector float)__builtin_altivec_vsro((vector int)a, (vector int)b);
+}
+
+/* vec_vsro */
+
+static vector signed char __ATTRS_o_ai
+vec_vsro(vector signed char a, vector signed char b)
+{
+  return (vector signed char)__builtin_altivec_vsro((vector int)a, (vector int)b);
+}
+
+static vector signed char __ATTRS_o_ai
+vec_vsro(vector signed char a, vector unsigned char b)
+{
+  return (vector signed char)__builtin_altivec_vsro((vector int)a, (vector int)b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vsro(vector unsigned char a, vector signed char b)
+{
+  return (vector unsigned char)__builtin_altivec_vsro((vector int)a, (vector int)b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vsro(vector unsigned char a, vector unsigned char b)
+{
+  return (vector unsigned char)__builtin_altivec_vsro((vector int)a, (vector int)b);
+}
+
+static vector short __ATTRS_o_ai
+vec_vsro(vector short a, vector signed char b)
+{
+  return (vector short)__builtin_altivec_vsro((vector int)a, (vector int)b);
+}
+
+static vector short __ATTRS_o_ai
+vec_vsro(vector short a, vector unsigned char b)
+{
+  return (vector short)__builtin_altivec_vsro((vector int)a, (vector int)b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vsro(vector unsigned short a, vector signed char b)
+{
+  return (vector unsigned short)__builtin_altivec_vsro((vector int)a, (vector int)b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vsro(vector unsigned short a, vector unsigned char b)
+{
+  return (vector unsigned short)__builtin_altivec_vsro((vector int)a, (vector int)b);
+}
+
+static vector int __ATTRS_o_ai
+vec_vsro(vector int a, vector signed char b)
+{
+  return (vector int)__builtin_altivec_vsro(a, (vector int)b);
+}
+
+static vector int __ATTRS_o_ai
+vec_vsro(vector int a, vector unsigned char b)
+{
+  return (vector int)__builtin_altivec_vsro(a, (vector int)b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_vsro(vector unsigned int a, vector signed char b)
+{
+  return (vector unsigned int)__builtin_altivec_vsro((vector int)a, (vector int)b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_vsro(vector unsigned int a, vector unsigned char b)
+{
+  return (vector unsigned int)__builtin_altivec_vsro((vector int)a, (vector int)b);
+}
+
+static vector float __ATTRS_o_ai
+vec_vsro(vector float a, vector signed char b)
+{
+  return (vector float)__builtin_altivec_vsro((vector int)a, (vector int)b);
+}
+
+static vector float __ATTRS_o_ai
+vec_vsro(vector float a, vector unsigned char b)
+{
+  return (vector float)__builtin_altivec_vsro((vector int)a, (vector int)b);
+}
+
+/* vec_st */
+
+static void __ATTRS_o_ai
+vec_st(vector signed char a, int b, vector signed char *c)
+{
+  __builtin_altivec_stvx((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_st(vector signed char a, int b, signed char *c)
+{
+  __builtin_altivec_stvx((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_st(vector unsigned char a, int b, vector unsigned char *c)
+{
+  __builtin_altivec_stvx((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_st(vector unsigned char a, int b, unsigned char *c)
+{
+  __builtin_altivec_stvx((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_st(vector short a, int b, vector short *c)
+{
+  __builtin_altivec_stvx((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_st(vector short a, int b, short *c)
+{
+  __builtin_altivec_stvx((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_st(vector unsigned short a, int b, vector unsigned short *c)
+{
+  __builtin_altivec_stvx((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_st(vector unsigned short a, int b, unsigned short *c)
+{
+  __builtin_altivec_stvx((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_st(vector int a, int b, vector int *c)
+{
+  __builtin_altivec_stvx(a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_st(vector int a, int b, int *c)
+{
+  __builtin_altivec_stvx(a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_st(vector unsigned int a, int b, vector unsigned int *c)
+{
+  __builtin_altivec_stvx((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_st(vector unsigned int a, int b, unsigned int *c)
+{
+  __builtin_altivec_stvx((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_st(vector float a, int b, vector float *c)
+{
+  __builtin_altivec_stvx((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_st(vector float a, int b, float *c)
+{
+  __builtin_altivec_stvx((vector int)a, b, c);
+}
+
+/* vec_stvx */
+
+static void __ATTRS_o_ai
+vec_stvx(vector signed char a, int b, vector signed char *c)
+{
+  __builtin_altivec_stvx((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvx(vector signed char a, int b, signed char *c)
+{
+  __builtin_altivec_stvx((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvx(vector unsigned char a, int b, vector unsigned char *c)
+{
+  __builtin_altivec_stvx((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvx(vector unsigned char a, int b, unsigned char *c)
+{
+  __builtin_altivec_stvx((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvx(vector short a, int b, vector short *c)
+{
+  __builtin_altivec_stvx((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvx(vector short a, int b, short *c)
+{
+  __builtin_altivec_stvx((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvx(vector unsigned short a, int b, vector unsigned short *c)
+{
+  __builtin_altivec_stvx((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvx(vector unsigned short a, int b, unsigned short *c)
+{
+  __builtin_altivec_stvx((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvx(vector int a, int b, vector int *c)
+{
+  __builtin_altivec_stvx(a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvx(vector int a, int b, int *c)
+{
+  __builtin_altivec_stvx(a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvx(vector unsigned int a, int b, vector unsigned int *c)
+{
+  __builtin_altivec_stvx((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvx(vector unsigned int a, int b, unsigned int *c)
+{
+  __builtin_altivec_stvx((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvx(vector float a, int b, vector float *c)
+{
+  __builtin_altivec_stvx((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvx(vector float a, int b, float *c)
+{
+  __builtin_altivec_stvx((vector int)a, b, c);
+}
+
+/* vec_ste */
+
+static void __ATTRS_o_ai
+vec_ste(vector signed char a, int b, signed char *c)
+{
+  __builtin_altivec_stvebx((vector char)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_ste(vector unsigned char a, int b, unsigned char *c)
+{
+  __builtin_altivec_stvebx((vector char)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_ste(vector short a, int b, short *c)
+{
+  __builtin_altivec_stvehx(a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_ste(vector unsigned short a, int b, unsigned short *c)
+{
+  __builtin_altivec_stvehx((vector short)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_ste(vector int a, int b, int *c)
+{
+  __builtin_altivec_stvewx(a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_ste(vector unsigned int a, int b, unsigned int *c)
+{
+  __builtin_altivec_stvewx((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_ste(vector float a, int b, float *c)
+{
+  __builtin_altivec_stvewx((vector int)a, b, c);
+}
+
+/* vec_stvebx */
+
+static void __ATTRS_o_ai
+vec_stvebx(vector signed char a, int b, signed char *c)
+{
+  __builtin_altivec_stvebx((vector char)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvebx(vector unsigned char a, int b, unsigned char *c)
+{
+  __builtin_altivec_stvebx((vector char)a, b, c);
+}
+
+/* vec_stvehx */
+
+static void __ATTRS_o_ai
+vec_stvehx(vector short a, int b, short *c)
+{
+  __builtin_altivec_stvehx(a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvehx(vector unsigned short a, int b, unsigned short *c)
+{
+  __builtin_altivec_stvehx((vector short)a, b, c);
+}
+
+/* vec_stvewx */
+
+static void __ATTRS_o_ai
+vec_stvewx(vector int a, int b, int *c)
+{
+  __builtin_altivec_stvewx(a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvewx(vector unsigned int a, int b, unsigned int *c)
+{
+  __builtin_altivec_stvewx((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvewx(vector float a, int b, float *c)
+{
+  __builtin_altivec_stvewx((vector int)a, b, c);
+}
+
+/* vec_stl */
+
+static void __ATTRS_o_ai
+vec_stl(vector signed char a, int b, vector signed char *c)
+{
+  __builtin_altivec_stvxl((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stl(vector signed char a, int b, signed char *c)
+{
+  __builtin_altivec_stvxl((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stl(vector unsigned char a, int b, vector unsigned char *c)
+{
+  __builtin_altivec_stvxl((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stl(vector unsigned char a, int b, unsigned char *c)
+{
+  __builtin_altivec_stvxl((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stl(vector short a, int b, vector short *c)
+{
+  __builtin_altivec_stvxl((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stl(vector short a, int b, short *c)
+{
+  __builtin_altivec_stvxl((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stl(vector unsigned short a, int b, vector unsigned short *c)
+{
+  __builtin_altivec_stvxl((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stl(vector unsigned short a, int b, unsigned short *c)
+{
+  __builtin_altivec_stvxl((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stl(vector int a, int b, vector int *c)
+{
+  __builtin_altivec_stvxl(a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stl(vector int a, int b, int *c)
+{
+  __builtin_altivec_stvxl(a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stl(vector unsigned int a, int b, vector unsigned int *c)
+{
+  __builtin_altivec_stvxl((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stl(vector unsigned int a, int b, unsigned int *c)
+{
+  __builtin_altivec_stvxl((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stl(vector float a, int b, vector float *c)
+{
+  __builtin_altivec_stvxl((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stl(vector float a, int b, float *c)
+{
+  __builtin_altivec_stvxl((vector int)a, b, c);
+}
+
+/* vec_stvxl */
+
+static void __ATTRS_o_ai
+vec_stvxl(vector signed char a, int b, vector signed char *c)
+{
+  __builtin_altivec_stvxl((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvxl(vector signed char a, int b, signed char *c)
+{
+  __builtin_altivec_stvxl((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvxl(vector unsigned char a, int b, vector unsigned char *c)
+{
+  __builtin_altivec_stvxl((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvxl(vector unsigned char a, int b, unsigned char *c)
+{
+  __builtin_altivec_stvxl((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvxl(vector short a, int b, vector short *c)
+{
+  __builtin_altivec_stvxl((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvxl(vector short a, int b, short *c)
+{
+  __builtin_altivec_stvxl((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvxl(vector unsigned short a, int b, vector unsigned short *c)
+{
+  __builtin_altivec_stvxl((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvxl(vector unsigned short a, int b, unsigned short *c)
+{
+  __builtin_altivec_stvxl((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvxl(vector int a, int b, vector int *c)
+{
+  __builtin_altivec_stvxl(a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvxl(vector int a, int b, int *c)
+{
+  __builtin_altivec_stvxl(a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvxl(vector unsigned int a, int b, vector unsigned int *c)
+{
+  __builtin_altivec_stvxl((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvxl(vector unsigned int a, int b, unsigned int *c)
+{
+  __builtin_altivec_stvxl((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvxl(vector float a, int b, vector float *c)
+{
+  __builtin_altivec_stvxl((vector int)a, b, c);
+}
+
+static void __ATTRS_o_ai
+vec_stvxl(vector float a, int b, float *c)
+{
+  __builtin_altivec_stvxl((vector int)a, b, c);
+}
+
+/* vec_sub */
+
+static vector signed char __ATTRS_o_ai
+vec_sub(vector signed char a, vector signed char b)
+{
+  return a - b;
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_sub(vector unsigned char a, vector unsigned char b)
+{
+  return a - b;
+}
+
+static vector short __ATTRS_o_ai
+vec_sub(vector short a, vector short b)
+{
+  return a - b;
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_sub(vector unsigned short a, vector unsigned short b)
+{
+  return a - b;
+}
+
+static vector int __ATTRS_o_ai
+vec_sub(vector int a, vector int b)
+{
+  return a - b;
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_sub(vector unsigned int a, vector unsigned int b)
+{
+  return a - b;
+}
+
+static vector float __ATTRS_o_ai
+vec_sub(vector float a, vector float b)
+{
+  return a - b;
+}
+
+/* vec_vsububm */
+
+#define __builtin_altivec_vsububm vec_vsububm
+
+static vector signed char __ATTRS_o_ai
+vec_vsububm(vector signed char a, vector signed char b)
+{
+  return a - b;
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vsububm(vector unsigned char a, vector unsigned char b)
+{
+  return a - b;
+}
+
+/* vec_vsubuhm */
+
+#define __builtin_altivec_vsubuhm vec_vsubuhm
+
+static vector short __ATTRS_o_ai
+vec_vsubuhm(vector short a, vector short b)
+{
+  return a - b;
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vsubuhm(vector unsigned short a, vector unsigned short b)
+{
+  return a - b;
+}
+
+/* vec_vsubuwm */
+
+#define __builtin_altivec_vsubuwm vec_vsubuwm
+
+static vector int __ATTRS_o_ai
+vec_vsubuwm(vector int a, vector int b)
+{
+  return a - b;
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_vsubuwm(vector unsigned int a, vector unsigned int b)
+{
+  return a - b;
+}
+
+/* vec_vsubfp */
+
+#define __builtin_altivec_vsubfp vec_vsubfp
+
+static vector float __attribute__((__always_inline__))
+vec_vsubfp(vector float a, vector float b)
+{
+  return a - b;
+}
+
+/* vec_subc */
+
+static vector unsigned int __attribute__((__always_inline__))
+vec_subc(vector unsigned int a, vector unsigned int b)
+{
+  return __builtin_altivec_vsubcuw(a, b);
+}
+
+/* vec_vsubcuw */
+
+static vector unsigned int __attribute__((__always_inline__))
+vec_vsubcuw(vector unsigned int a, vector unsigned int b)
+{
+  return __builtin_altivec_vsubcuw(a, b);
+}
+
+/* vec_subs */
+
+static vector signed char __ATTRS_o_ai
+vec_subs(vector signed char a, vector signed char b)
+{
+  return __builtin_altivec_vsubsbs(a, b);
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_subs(vector unsigned char a, vector unsigned char b)
+{
+  return __builtin_altivec_vsububs(a, b);
+}
+
+static vector short __ATTRS_o_ai
+vec_subs(vector short a, vector short b)
+{
+  return __builtin_altivec_vsubshs(a, b);
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_subs(vector unsigned short a, vector unsigned short b)
+{
+  return __builtin_altivec_vsubuhs(a, b);
+}
+
+static vector int __ATTRS_o_ai
+vec_subs(vector int a, vector int b)
+{
+  return __builtin_altivec_vsubsws(a, b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_subs(vector unsigned int a, vector unsigned int b)
+{
+  return __builtin_altivec_vsubuws(a, b);
+}
+
+/* vec_vsubsbs */
+
+static vector signed char __attribute__((__always_inline__))
+vec_vsubsbs(vector signed char a, vector signed char b)
+{
+  return __builtin_altivec_vsubsbs(a, b);
+}
+
+/* vec_vsububs */
+
+static vector unsigned char __attribute__((__always_inline__))
+vec_vsububs(vector unsigned char a, vector unsigned char b)
+{
+  return __builtin_altivec_vsububs(a, b);
+}
+
+/* vec_vsubshs */
+
+static vector short __attribute__((__always_inline__))
+vec_vsubshs(vector short a, vector short b)
+{
+  return __builtin_altivec_vsubshs(a, b);
+}
+
+/* vec_vsubuhs */
+
+static vector unsigned short __attribute__((__always_inline__))
+vec_vsubuhs(vector unsigned short a, vector unsigned short b)
+{
+  return __builtin_altivec_vsubuhs(a, b);
+}
+
+/* vec_vsubsws */
+
+static vector int __attribute__((__always_inline__))
+vec_vsubsws(vector int a, vector int b)
+{
+  return __builtin_altivec_vsubsws(a, b);
+}
+
+/* vec_vsubuws */
+
+static vector unsigned int __attribute__((__always_inline__))
+vec_vsubuws(vector unsigned int a, vector unsigned int b)
+{
+  return __builtin_altivec_vsubuws(a, b);
+}
+
+/* vec_sum4s */
+
+static vector int __ATTRS_o_ai
+vec_sum4s(vector signed char a, vector int b)
+{
+  return __builtin_altivec_vsum4sbs(a, b);
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_sum4s(vector unsigned char a, vector unsigned int b)
+{
+  return __builtin_altivec_vsum4ubs(a, b);
+}
+
+static vector int __ATTRS_o_ai
+vec_sum4s(vector signed short a, vector int b)
+{
+  return __builtin_altivec_vsum4shs(a, b);
+}
+
+/* vec_vsum4sbs */
+
+static vector int __attribute__((__always_inline__))
+vec_vsum4sbs(vector signed char a, vector int b)
+{
+  return __builtin_altivec_vsum4sbs(a, b);
+}
+
+/* vec_vsum4ubs */
+
+static vector unsigned int __attribute__((__always_inline__))
+vec_vsum4ubs(vector unsigned char a, vector unsigned int b)
+{
+  return __builtin_altivec_vsum4ubs(a, b);
+}
+
+/* vec_vsum4shs */
+
+static vector int __attribute__((__always_inline__))
+vec_vsum4shs(vector signed short a, vector int b)
+{
+  return __builtin_altivec_vsum4shs(a, b);
+}
+
+/* vec_sum2s */
+
+static vector signed int __attribute__((__always_inline__))
+vec_sum2s(vector int a, vector int b)
+{
+  return __builtin_altivec_vsum2sws(a, b);
+}
+
+/* vec_vsum2sws */
+
+static vector signed int __attribute__((__always_inline__))
+vec_vsum2sws(vector int a, vector int b)
+{
+  return __builtin_altivec_vsum2sws(a, b);
+}
+
+/* vec_sums */
+
+static vector signed int __attribute__((__always_inline__))
+vec_sums(vector signed int a, vector signed int b)
+{
+  return __builtin_altivec_vsumsws(a, b);
+}
+
+/* vec_vsumsws */
+
+static vector signed int __attribute__((__always_inline__))
+vec_vsumsws(vector signed int a, vector signed int b)
+{
+  return __builtin_altivec_vsumsws(a, b);
+}
+
+/* vec_trunc */
+
+static vector float __attribute__((__always_inline__))
+vec_trunc(vector float a)
+{
+  return __builtin_altivec_vrfiz(a);
+}
+
+/* vec_vrfiz */
+
+static vector float __attribute__((__always_inline__))
+vec_vrfiz(vector float a)
+{
+  return __builtin_altivec_vrfiz(a);
+}
+
+/* vec_unpackh */
+
+static vector short __ATTRS_o_ai
+vec_unpackh(vector signed char a)
+{
+  return __builtin_altivec_vupkhsb((vector char)a);
+}
+
+static vector int __ATTRS_o_ai
+vec_unpackh(vector short a)
+{
+  return __builtin_altivec_vupkhsh(a);
+}
+
+/* vec_vupkhsb */
+
+static vector short __attribute__((__always_inline__))
+vec_vupkhsb(vector signed char a)
+{
+  return __builtin_altivec_vupkhsb((vector char)a);
+}
+
+/* vec_vupkhsh */
+
+static vector int __attribute__((__always_inline__))
+vec_vupkhsh(vector short a)
+{
+  return __builtin_altivec_vupkhsh(a);
+}
+
+/* vec_unpackl */
+
+static vector short __ATTRS_o_ai
+vec_unpackl(vector signed char a)
+{
+  return __builtin_altivec_vupklsb((vector char)a);
+}
+
+static vector int __ATTRS_o_ai
+vec_unpackl(vector short a)
+{
+  return __builtin_altivec_vupklsh(a);
+}
+
+/* vec_vupklsb */
+
+static vector short __attribute__((__always_inline__))
+vec_vupklsb(vector signed char a)
+{
+  return __builtin_altivec_vupklsb((vector char)a);
+}
+
+/* vec_vupklsh */
+
+static vector int __attribute__((__always_inline__))
+vec_vupklsh(vector short a)
+{
+  return __builtin_altivec_vupklsh(a);
+}
+
+/* vec_xor */
+
+#define __builtin_altivec_vxor vec_xor
+
+static vector signed char __ATTRS_o_ai
+vec_xor(vector signed char a, vector signed char b)
+{
+  return a ^ b;
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_xor(vector unsigned char a, vector unsigned char b)
+{
+  return a ^ b;
+}
+
+static vector short __ATTRS_o_ai
+vec_xor(vector short a, vector short b)
+{
+  return a ^ b;
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_xor(vector unsigned short a, vector unsigned short b)
+{
+  return a ^ b;
+}
+
+static vector int __ATTRS_o_ai
+vec_xor(vector int a, vector int b)
+{
+  return a ^ b;
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_xor(vector unsigned int a, vector unsigned int b)
+{
+  return a ^ b;
+}
+
+static vector float __ATTRS_o_ai
+vec_xor(vector float a, vector float b)
+{
+  vector unsigned int res = (vector unsigned int)a ^ (vector unsigned int)b;
+  return (vector float)res;
+}
+
+/* vec_vxor */
+
+static vector signed char __ATTRS_o_ai
+vec_vxor(vector signed char a, vector signed char b)
+{
+  return a ^ b;
+}
+
+static vector unsigned char __ATTRS_o_ai
+vec_vxor(vector unsigned char a, vector unsigned char b)
+{
+  return a ^ b;
+}
+
+static vector short __ATTRS_o_ai
+vec_vxor(vector short a, vector short b)
+{
+  return a ^ b;
+}
+
+static vector unsigned short __ATTRS_o_ai
+vec_vxor(vector unsigned short a, vector unsigned short b)
+{
+  return a ^ b;
+}
+
+static vector int __ATTRS_o_ai
+vec_vxor(vector int a, vector int b)
+{
+  return a ^ b;
+}
+
+static vector unsigned int __ATTRS_o_ai
+vec_vxor(vector unsigned int a, vector unsigned int b)
+{
+  return a ^ b;
+}
+
+static vector float __ATTRS_o_ai
+vec_vxor(vector float a, vector float b)
+{
+  vector unsigned int res = (vector unsigned int)a ^ (vector unsigned int)b;
+  return (vector float)res;
+}
+
+/* ------------------------------ predicates ------------------------------------ */
+
 /* vec_all_eq */
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_eq(vector signed char a, vector signed char b)
 {
   return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)a, (vector char)b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_eq(vector unsigned char a, vector unsigned char b)
 {
   return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)a, (vector char)b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_eq(vector short a, vector short b)
 {
   return __builtin_altivec_vcmpequh_p(__CR6_LT, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_eq(vector unsigned short a, vector unsigned short b)
 {
   return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)a, (vector short)b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_eq(vector int a, vector int b)
 {
   return __builtin_altivec_vcmpequw_p(__CR6_LT, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_eq(vector unsigned int a, vector unsigned int b)
 {
   return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)a, (vector int)b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_eq(vector float a, vector float b)
 {
   return __builtin_altivec_vcmpeqfp_p(__CR6_LT, a, b);
@@ -884,87 +5325,87 @@
 
 /* vec_all_ge */
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_ge(vector signed char a, vector signed char b)
 {
-  return __builtin_altivec_vcmpgtsb_p(__CR6_LT, b, a);
+  return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, b, a);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_ge(vector unsigned char a, vector unsigned char b)
 {
-  return __builtin_altivec_vcmpgtub_p(__CR6_LT, b, a);
+  return __builtin_altivec_vcmpgtub_p(__CR6_EQ, b, a);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_ge(vector short a, vector short b)
 {
-  return __builtin_altivec_vcmpgtsh_p(__CR6_LT, b, a);
+  return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, b, a);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_ge(vector unsigned short a, vector unsigned short b)
 {
-  return __builtin_altivec_vcmpgtuh_p(__CR6_LT, b, a);
+  return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, b, a);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_ge(vector int a, vector int b)
 {
-  return __builtin_altivec_vcmpgtsw_p(__CR6_LT, b, a);
+  return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, b, a);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_ge(vector unsigned int a, vector unsigned int b)
 {
-  return __builtin_altivec_vcmpgtuw_p(__CR6_LT, b, a);
+  return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, b, a);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_ge(vector float a, vector float b)
 {
-  return __builtin_altivec_vcmpgtfp_p(__CR6_LT, b, a);
+  return __builtin_altivec_vcmpgefp_p(__CR6_LT, a, b);
 }
 
 /* vec_all_gt */
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_gt(vector signed char a, vector signed char b)
 {
   return __builtin_altivec_vcmpgtsb_p(__CR6_LT, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_gt(vector unsigned char a, vector unsigned char b)
 {
   return __builtin_altivec_vcmpgtub_p(__CR6_LT, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_gt(vector short a, vector short b)
 {
   return __builtin_altivec_vcmpgtsh_p(__CR6_LT, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_gt(vector unsigned short a, vector unsigned short b)
 {
   return __builtin_altivec_vcmpgtuh_p(__CR6_LT, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_gt(vector int a, vector int b)
 {
   return __builtin_altivec_vcmpgtsw_p(__CR6_LT, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_gt(vector unsigned int a, vector unsigned int b)
 {
   return __builtin_altivec_vcmpgtuw_p(__CR6_LT, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_gt(vector float a, vector float b)
 {
   return __builtin_altivec_vcmpgtfp_p(__CR6_LT, a, b);
@@ -980,87 +5421,87 @@
 
 /* vec_all_le */
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_le(vector signed char a, vector signed char b)
 {
   return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_le(vector unsigned char a, vector unsigned char b)
 {
   return __builtin_altivec_vcmpgtub_p(__CR6_EQ, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_le(vector short a, vector short b)
 {
   return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_le(vector unsigned short a, vector unsigned short b)
 {
   return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_le(vector int a, vector int b)
 {
   return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_le(vector unsigned int a, vector unsigned int b)
 {
   return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_le(vector float a, vector float b)
 {
-  return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, a, b);
+  return __builtin_altivec_vcmpgefp_p(__CR6_LT, b, a);
 }
 
 /* vec_all_lt */
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_lt(vector signed char a, vector signed char b)
 {
   return __builtin_altivec_vcmpgtsb_p(__CR6_LT, b, a);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_lt(vector unsigned char a, vector unsigned char b)
 {
   return __builtin_altivec_vcmpgtub_p(__CR6_LT, b, a);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_lt(vector short a, vector short b)
 {
   return __builtin_altivec_vcmpgtsh_p(__CR6_LT, b, a);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_lt(vector unsigned short a, vector unsigned short b)
 {
   return __builtin_altivec_vcmpgtuh_p(__CR6_LT, b, a);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_lt(vector int a, vector int b)
 {
   return __builtin_altivec_vcmpgtsw_p(__CR6_LT, b, a);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_lt(vector unsigned int a, vector unsigned int b)
 {
   return __builtin_altivec_vcmpgtuw_p(__CR6_LT, b, a);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_lt(vector float a, vector float b)
 {
   return __builtin_altivec_vcmpgtfp_p(__CR6_LT, b, a);
@@ -1076,43 +5517,43 @@
 
 /* vec_all_ne */
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_ne(vector signed char a, vector signed char b)
 {
   return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)a, (vector char)b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_ne(vector unsigned char a, vector unsigned char b)
 {
   return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)a, (vector char)b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_ne(vector short a, vector short b)
 {
   return __builtin_altivec_vcmpequh_p(__CR6_EQ, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_ne(vector unsigned short a, vector unsigned short b)
 {
   return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)a, (vector short)b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_ne(vector int a, vector int b)
 {
   return __builtin_altivec_vcmpequw_p(__CR6_EQ, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_ne(vector unsigned int a, vector unsigned int b)
 {
   return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)a, (vector int)b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_all_ne(vector float a, vector float b)
 {
   return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, a, b);
@@ -1160,43 +5601,43 @@
 
 /* vec_any_eq */
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_eq(vector signed char a, vector signed char b)
 {
   return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)a, (vector char)b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_eq(vector unsigned char a, vector unsigned char b)
 {
   return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)a, (vector char)b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_eq(vector short a, vector short b)
 {
   return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_eq(vector unsigned short a, vector unsigned short b)
 {
   return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)a, (vector short)b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_eq(vector int a, vector int b)
 {
   return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_eq(vector unsigned int a, vector unsigned int b)
 {
   return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)a, (vector int)b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_eq(vector float a, vector float b)
 {
   return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, a, b);
@@ -1204,87 +5645,87 @@
 
 /* vec_any_ge */
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_ge(vector signed char a, vector signed char b)
 {
   return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, b, a);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_ge(vector unsigned char a, vector unsigned char b)
 {
   return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, b, a);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_ge(vector short a, vector short b)
 {
   return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, b, a);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_ge(vector unsigned short a, vector unsigned short b)
 {
   return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, b, a);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_ge(vector int a, vector int b)
 {
   return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, b, a);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_ge(vector unsigned int a, vector unsigned int b)
 {
   return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, b, a);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_ge(vector float a, vector float b)
 {
-  return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, b, a);
+  return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, a, b);
 }
 
 /* vec_any_gt */
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_gt(vector signed char a, vector signed char b)
 {
   return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_gt(vector unsigned char a, vector unsigned char b)
 {
   return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_gt(vector short a, vector short b)
 {
   return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_gt(vector unsigned short a, vector unsigned short b)
 {
   return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_gt(vector int a, vector int b)
 {
   return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_gt(vector unsigned int a, vector unsigned int b)
 {
   return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_gt(vector float a, vector float b)
 {
   return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, a, b);
@@ -1292,87 +5733,87 @@
 
 /* vec_any_le */
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_le(vector signed char a, vector signed char b)
 {
   return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_le(vector unsigned char a, vector unsigned char b)
 {
   return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_le(vector short a, vector short b)
 {
   return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_le(vector unsigned short a, vector unsigned short b)
 {
   return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_le(vector int a, vector int b)
 {
   return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_le(vector unsigned int a, vector unsigned int b)
 {
   return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_le(vector float a, vector float b)
 {
-  return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, a, b);
+  return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, b, a);
 }
 
 /* vec_any_lt */
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_lt(vector signed char a, vector signed char b)
 {
   return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, b, a);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_lt(vector unsigned char a, vector unsigned char b)
 {
   return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, b, a);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_lt(vector short a, vector short b)
 {
   return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, b, a);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_lt(vector unsigned short a, vector unsigned short b)
 {
   return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, b, a);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_lt(vector int a, vector int b)
 {
   return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, b, a);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_lt(vector unsigned int a, vector unsigned int b)
 {
   return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, b, a);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_lt(vector float a, vector float b)
 {
   return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, b, a);
@@ -1388,43 +5829,43 @@
 
 /* vec_any_ne */
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_ne(vector signed char a, vector signed char b)
 {
   return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)a, (vector char)b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_ne(vector unsigned char a, vector unsigned char b)
 {
   return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)a, (vector char)b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_ne(vector short a, vector short b)
 {
   return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_ne(vector unsigned short a, vector unsigned short b)
 {
   return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)a, (vector short)b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_ne(vector int a, vector int b)
 {
   return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, a, b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_ne(vector unsigned int a, vector unsigned int b)
 {
   return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)a, (vector int)b);
 }
 
-static int _ATTRS_o_ai
+static int __ATTRS_o_ai
 vec_any_ne(vector float a, vector float b)
 {
   return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, a, b);
@@ -1478,6 +5919,6 @@
   return __builtin_altivec_vcmpbfp_p(__CR6_EQ_REV, a, b);
 }
 
-#undef _ATTRS_o_ai
+#undef __ATTRS_o_ai
 
 #endif /* __ALTIVEC_H */
Index: test/CodeGen/builtins-ppc-altivec.c
===================================================================
--- test/CodeGen/builtins-ppc-altivec.c	(revision 105793)
+++ test/CodeGen/builtins-ppc-altivec.c	(working copy)
@@ -1,192 +1,1093 @@
 // RUN: %clang_cc1 -faltivec -triple powerpc-unknown-unknown -emit-llvm %s -o - | FileCheck %s
 
-#include "altivec.h"
-
 int main ()
 {
+  // TODO: uncomment
+/*  vector bool char vbc = { 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 }; */
   vector signed char vsc = { 1, -2, 3, -4, 5, -6, 7, -8, 9, -10, 11, -12, 13, -14, 15, -16 };
   vector unsigned char vuc = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
+  // TODO: uncomment
+/*  vector bool short vbs = { 1, 0, 1, 0, 1, 0, 1, 0 }; */
   vector short vs = { -1, 2, -3, 4, -5, 6, -7, 8 };
   vector unsigned short vus = { 1, 2, 3, 4, 5, 6, 7, 8 };
+  // TODO: uncomment
+/*  vector bool int vbi = { 1, 0, 1, 0 }; */
   vector int vi = { -1, 2, -3, 4 };
   vector unsigned int vui = { 1, 2, 3, 4 };
   vector float vf = { -1.5, 2.5, -3.5, 4.5 };
 
+  // TODO: uncomment
+/*  vector bool char res_vbc; */
   vector signed char res_vsc;
   vector unsigned char res_vuc;
+  // TODO: uncomment
+/*  vector bool short res_vbs; */
   vector short res_vs;
   vector unsigned short res_vus;
+  // TODO: uncomment
+  vector pixel res_vp;
+  // TODO: uncomment
+/*  vector bool int res_vbi; */
   vector int res_vi;
   vector unsigned int res_vui;
   vector float res_vf;
 
+  signed char param_sc;
+  unsigned char param_uc;
+  short param_s;
+  unsigned short param_us;
   int param_i;
+  unsigned int param_ui;
+  float param_f;
+
   int res_i;
 
   /* vec_abs */
-  vsc = vec_abs(vsc);              // CHECK: sub <16 x i8> zeroinitializer
-                                   // CHECK: @llvm.ppc.altivec.vmaxsb
+  vsc = vec_abs(vsc);                           // CHECK: sub <16 x i8> zeroinitializer
+                                                // CHECK: @llvm.ppc.altivec.vmaxsb
 
-  vs = __builtin_vec_abs(vs);      // CHECK: sub <8 x i16> zeroinitializer
-                                   // CHECK: @llvm.ppc.altivec.vmaxsh
+  vs = vec_abs(vs);                             // CHECK: sub <8 x i16> zeroinitializer
+                                                // CHECK: @llvm.ppc.altivec.vmaxsh
 
-  vi = vec_abs(vi);                // CHECK: sub <4 x i32> zeroinitializer
-                                   // CHECK: @llvm.ppc.altivec.vmaxsw
+  vi = vec_abs(vi);                             // CHECK: sub <4 x i32> zeroinitializer
+                                                // CHECK: @llvm.ppc.altivec.vmaxsw
 
-  vf = vec_abs(vf);                // CHECK: store <4 x i32> <i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647>
-                                   // CHECK: and <4 x i32>
+  vf = vec_abs(vf);                             // CHECK: and <4 x i32>
 
   /* vec_abs */
-  vsc = vec_abss(vsc);             // CHECK: @llvm.ppc.altivec.vsubsbs
-                                   // CHECK: @llvm.ppc.altivec.vmaxsb
+  vsc = vec_abss(vsc);                          // CHECK: @llvm.ppc.altivec.vsubsbs
+                                                // CHECK: @llvm.ppc.altivec.vmaxsb
 
-  vs = __builtin_vec_abss(vs);     // CHECK: @llvm.ppc.altivec.vsubshs
-                                   // CHECK: @llvm.ppc.altivec.vmaxsh
+  vs = vec_abss(vs);                            // CHECK: @llvm.ppc.altivec.vsubshs
+                                                // CHECK: @llvm.ppc.altivec.vmaxsh
 
-  vi = vec_abss(vi);               // CHECK: @llvm.ppc.altivec.vsubsws
-                                   // CHECK: @llvm.ppc.altivec.vmaxsw
+  vi = vec_abss(vi);                            // CHECK: @llvm.ppc.altivec.vsubsws
+                                                // CHECK: @llvm.ppc.altivec.vmaxsw
 
   /*  vec_add */
-  res_vsc  = vec_add(vsc, vsc);                 // CHECK: add nsw <16 x i8>
+  res_vsc = vec_add(vsc, vsc);                  // CHECK: add nsw <16 x i8>
+  res_vuc = vec_add(vuc, vuc);                  // CHECK: add <16 x i8>
+  res_vs  = vec_add(vs, vs);                    // CHECK: add nsw <8 x i16>
+  res_vus = vec_add(vus, vus);                  // CHECK: add <8 x i16>
+  res_vi  = vec_add(vi, vi);                    // CHECK: add nsw <4 x i32>
+  res_vui = vec_add(vui, vui);                  // CHECK: add <4 x i32>
+  res_vf  = vec_add(vf, vf);                    // CHECK: fadd <4 x float>
+  res_vsc = vec_vaddubm(vsc, vsc);              // CHECK: add nsw <16 x i8>
   res_vuc = vec_vaddubm(vuc, vuc);              // CHECK: add <16 x i8>
-  res_vs  = __builtin_altivec_vadduhm(vs, vs);  // CHECK: add nsw <8 x i16>
+  res_vs  = vec_vadduhm(vs, vs);                // CHECK: add nsw <8 x i16>
   res_vus = vec_vadduhm(vus, vus);              // CHECK: add <8 x i16>
-  res_vi  = __builtin_vec_vadduwm(vi, vi);      // CHECK: add nsw <4 x i32>
+  res_vi  = vec_vadduwm(vi, vi);                // CHECK: add nsw <4 x i32>
   res_vui = vec_vadduwm(vui, vui);              // CHECK: add <4 x i32>
-  res_vf  = __builtin_vec_vaddfp(vf, vf);       // CHECK: fadd <4 x float>
+  res_vf  = vec_vaddfp(vf, vf);                 // CHECK: fadd <4 x float>
 
   /* vec_addc */
+  res_vui = vec_addc(vui, vui);                 // HECK: @llvm.ppc.altivec.vaddcuw
   res_vui = vec_vaddcuw(vui, vui);              // HECK: @llvm.ppc.altivec.vaddcuw
 
   /* vec_adds */
-  res_vsc  = vec_adds(vsc, vsc);                // CHECK: @llvm.ppc.altivec.vaddsbs
+  res_vsc = vec_adds(vsc, vsc);                 // CHECK: @llvm.ppc.altivec.vaddsbs
+  res_vuc = vec_adds(vuc, vuc);                 // CHECK: @llvm.ppc.altivec.vaddubs
+  res_vs  = vec_adds(vs, vs);                   // CHECK: @llvm.ppc.altivec.vaddshs
+  res_vus = vec_adds(vus, vus);                 // CHECK: @llvm.ppc.altivec.vadduhs
+  res_vi  = vec_adds(vi, vi);                   // CHECK: @llvm.ppc.altivec.vaddsws
+  res_vui = vec_adds(vui, vui);                 // CHECK: @llvm.ppc.altivec.vadduws
+  res_vsc = vec_vaddsbs(vsc, vsc);              // CHECK: @llvm.ppc.altivec.vaddsbs
   res_vuc = vec_vaddubs(vuc, vuc);              // CHECK: @llvm.ppc.altivec.vaddubs
-  res_vs  = __builtin_vec_vaddshs(vs, vs);      // CHECK: @llvm.ppc.altivec.vaddshs
+  res_vs  = vec_vaddshs(vs, vs);                // CHECK: @llvm.ppc.altivec.vaddshs
   res_vus = vec_vadduhs(vus, vus);              // CHECK: @llvm.ppc.altivec.vadduhs
-  res_vi  = __builtin_vec_vaddsws(vi, vi);      // CHECK: @llvm.ppc.altivec.vaddsws
+  res_vi  = vec_vaddsws(vi, vi);                // CHECK: @llvm.ppc.altivec.vaddsws
   res_vui = vec_vadduws(vui, vui);              // CHECK: @llvm.ppc.altivec.vadduws
 
-  /* vec_sub */
-  res_vsc  = vec_sub(vsc, vsc);                 // CHECK: sub nsw <16 x i8>
-  res_vuc = vec_vsububm(vuc, vuc);              // CHECK: sub <16 x i8>
-  res_vs  = __builtin_altivec_vsubuhm(vs, vs);  // CHECK: sub nsw <8 x i16>
-  res_vus = vec_vsubuhm(vus, vus);              // CHECK: sub <8 x i16>
-  res_vi  = __builtin_vec_vsubuwm(vi, vi);      // CHECK: sub nsw <4 x i32>
-  res_vui = vec_vsubuwm(vui, vui);              // CHECK: sub <4 x i32>
-  res_vf  = __builtin_vec_vsubfp(vf, vf);       // CHECK: fsub <4 x float>
+  /* vec_and */
+  res_vsc = vec_and(vsc, vsc);                  // CHECK: and <16 x i8>
+  res_vuc = vec_and(vuc, vuc);                  // CHECK: and <16 x i8>
+  res_vs  = vec_and(vs, vs);                    // CHECK: and <8 x i16>
+  res_vus = vec_and(vus, vus);                  // CHECK: and <8 x i16>
+  res_vi  = vec_and(vi, vi);                    // CHECK: and <4 x i32>
+  res_vui = vec_and(vui, vui);                  // CHECK: and <4 x i32>
+  res_vsc = vec_vand(vsc, vsc);                 // CHECK: and <16 x i8>
+  res_vuc = vec_vand(vuc, vuc);                 // CHECK: and <16 x i8>
+  res_vs  = vec_vand(vs, vs);                   // CHECK: and <8 x i16>
+  res_vus = vec_vand(vus, vus);                 // CHECK: and <8 x i16>
+  res_vi  = vec_vand(vi, vi);                   // CHECK: and <4 x i32>
+  res_vui = vec_vand(vui, vui);                 // CHECK: and <4 x i32>
 
-  /* vec_subs */
-  res_vsc  = vec_subs(vsc, vsc);                // CHECK: @llvm.ppc.altivec.vsubsbs
-  res_vuc = vec_vsububs(vuc, vuc);              // CHECK: @llvm.ppc.altivec.vsububs
-  res_vs  = __builtin_vec_vsubshs(vs, vs);      // CHECK: @llvm.ppc.altivec.vsubshs
-  res_vus = vec_vsubuhs(vus, vus);              // CHECK: @llvm.ppc.altivec.vsubuhs
-  res_vi  = __builtin_vec_vsubsws(vi, vi);      // CHECK: @llvm.ppc.altivec.vsubsws
-  res_vui = vec_vsubuws(vui, vui);              // CHECK: @llvm.ppc.altivec.vsubuws
+  /* vec_andc */
+  res_vsc = vec_andc(vsc, vsc);                 // CHECK: xor <16 x i8>
+                                                // CHECK: and <16 x i8>
 
+  res_vuc = vec_andc(vuc, vuc);                 // CHECK: xor <16 x i8>
+                                                // CHECK: and <16 x i8>
+
+  res_vs  = vec_andc(vs, vs);                   // CHECK: xor <8 x i16>
+                                                // CHECK: and <8 x i16>
+
+  res_vus = vec_andc(vus, vus);                 // CHECK: xor <8 x i16>
+                                                // CHECK: and <8 x i16>
+
+  res_vi  = vec_andc(vi, vi);                   // CHECK: xor <4 x i32>
+                                                // CHECK: and <4 x i32>
+
+  res_vui = vec_andc(vui, vui);                 // CHECK: xor <4 x i32>
+                                                // CHECK: and <4 x i32>
+
+  res_vf = vec_andc(vf, vf);                    // CHECK: xor <4 x i32>
+                                                // CHECK: and <4 x i32>
+
+  res_vsc = vec_vandc(vsc, vsc);                // CHECK: xor <16 x i8>
+                                                // CHECK: and <16 x i8>
+
+  res_vuc = vec_vandc(vuc, vuc);                // CHECK: xor <16 x i8>
+                                                // CHECK: and <16 x i8>
+
+  res_vs  = vec_vandc(vs, vs);                  // CHECK: xor <8 x i16>
+                                                // CHECK: and <8 x i16>
+
+  res_vus = vec_vandc(vus, vus);                // CHECK: xor <8 x i16>
+                                                // CHECK: and <8 x i16>
+
+  res_vi  = vec_vandc(vi, vi);                  // CHECK: xor <4 x i32>
+                                                // CHECK: and <4 x i32>
+
+  res_vui = vec_vandc(vui, vui);                // CHECK: xor <4 x i32>
+                                                // CHECK: and <4 x i32>
+
+  res_vf = vec_vandc(vf, vf);                   // CHECK: xor <4 x i32>
+                                                // CHECK: and <4 x i32>
+
   /* vec_avg */
-  res_vsc  = vec_avg(vsc, vsc);                 // CHECK: @llvm.ppc.altivec.vavgsb
-  res_vuc = __builtin_vec_vavgub(vuc, vuc);     // CHECK: @llvm.ppc.altivec.vavgub
+  res_vsc = vec_avg(vsc, vsc);                  // CHECK: @llvm.ppc.altivec.vavgsb
+  res_vuc = vec_avg(vuc, vuc);                  // CHECK: @llvm.ppc.altivec.vavgub
+  res_vs  = vec_avg(vs, vs);                    // CHECK: @llvm.ppc.altivec.vavgsh
+  res_vus = vec_avg(vus, vus);                  // CHECK: @llvm.ppc.altivec.vavguh
+  res_vi  = vec_avg(vi, vi);                    // CHECK: @llvm.ppc.altivec.vavgsw
+  res_vui = vec_avg(vui, vui);                  // CHECK: @llvm.ppc.altivec.vavguw
+  res_vsc = vec_vavgsb(vsc, vsc);               // CHECK: @llvm.ppc.altivec.vavgsb
+  res_vuc = vec_vavgub(vuc, vuc);               // CHECK: @llvm.ppc.altivec.vavgub
   res_vs  = vec_vavgsh(vs, vs);                 // CHECK: @llvm.ppc.altivec.vavgsh
-  res_vus = __builtin_vec_vavguh(vus, vus);     // CHECK: @llvm.ppc.altivec.vavguh
+  res_vus = vec_vavguh(vus, vus);               // CHECK: @llvm.ppc.altivec.vavguh
   res_vi  = vec_vavgsw(vi, vi);                 // CHECK: @llvm.ppc.altivec.vavgsw
-  res_vui = __builtin_vec_vavguw(vui, vui);     // CHECK: @llvm.ppc.altivec.vavguw
+  res_vui = vec_vavguw(vui, vui);               // CHECK: @llvm.ppc.altivec.vavguw
 
-  /* vec_st */
-  param_i = 5;
-  vec_st(vsc, 0, &res_vsc);                     // CHECK: @llvm.ppc.altivec.stvx
-  __builtin_vec_st(vuc, param_i, &res_vuc);     // CHECK: @llvm.ppc.altivec.stvx
-  vec_stvx(vs, 1, &res_vs);                     // CHECK: @llvm.ppc.altivec.stvx
-  vec_st(vus, 1000, &res_vus);                  // CHECK: @llvm.ppc.altivec.stvx
-  vec_st(vi, 0, &res_vi);                       // CHECK: @llvm.ppc.altivec.stvx
-  vec_st(vui, 0, &res_vui);                     // CHECK: @llvm.ppc.altivec.stvx
-  vec_st(vf, 0, &res_vf);                       // CHECK: @llvm.ppc.altivec.stvx
+  /* vec_ceil */
+  res_vf = vec_ceil(vf);                        // CHECK: @llvm.ppc.altivec.vrfip
+  res_vf = vec_vrfip(vf);                       // CHECK: @llvm.ppc.altivec.vrfip
 
-  /* vec_stl */
-  param_i = 10000;
-  vec_stl(vsc, param_i, &res_vsc);              // CHECK: @llvm.ppc.altivec.stvxl
-  __builtin_vec_stl(vuc, 1, &res_vuc);          // CHECK: @llvm.ppc.altivec.stvxl
-  vec_stvxl(vs, 0, &res_vs);                    // CHECK: @llvm.ppc.altivec.stvxl
-  vec_stl(vus, 0, &res_vus);                    // CHECK: @llvm.ppc.altivec.stvxl
-  vec_stl(vi, 0, &res_vi);                      // CHECK: @llvm.ppc.altivec.stvxl
-  vec_stl(vui, 0, &res_vui);                    // CHECK: @llvm.ppc.altivec.stvxl
-  vec_stl(vf, 0, &res_vf);                      // CHECK: @llvm.ppc.altivec.stvxl
-
-  /* vec_ste */
-  param_i = 10000;
-  vec_ste(vsc, param_i, &res_vsc);              // CHECK: @llvm.ppc.altivec.stvebx
-  vec_stvebx(vuc, 1, &res_vuc);                 // CHECK: @llvm.ppc.altivec.stvebx
-  __builtin_vec_stvehx(vs, 0, &res_vs);         // CHECK: @llvm.ppc.altivec.stvehx
-  vec_stvehx(vus, 0, &res_vus);                 // CHECK: @llvm.ppc.altivec.stvehx
-  vec_stvewx(vi, 0, &res_vi);                   // CHECK: @llvm.ppc.altivec.stvewx
-  __builtin_vec_stvewx(vui, 0, &res_vui);       // CHECK: @llvm.ppc.altivec.stvewx
-  vec_stvewx(vf, 0, &res_vf);                   // CHECK: @llvm.ppc.altivec.stvewx
-
   /* vec_cmpb */
+  res_vi = vec_cmpb(vf, vf);                    // CHECK: @llvm.ppc.altivec.vcmpbfp
   res_vi = vec_vcmpbfp(vf, vf);                 // CHECK: @llvm.ppc.altivec.vcmpbfp
 
   /* vec_cmpeq */
-  res_vi = vec_cmpeq(vsc, vsc);                 // CHECK: @llvm.ppc.altivec.vcmpequb
-  res_vi = __builtin_vec_cmpeq(vuc, vuc);       // CHECK: @llvm.ppc.altivec.vcmpequb
-  res_vi = vec_cmpeq(vs, vs);                   // CHECK: @llvm.ppc.altivec.vcmpequh
-  res_vi = vec_cmpeq(vus, vus);                 // CHECK: @llvm.ppc.altivec.vcmpequh
-  res_vi = vec_cmpeq(vi, vi);                   // CHECK: @llvm.ppc.altivec.vcmpequw
-  res_vi = vec_cmpeq(vui, vui);                 // CHECK: @llvm.ppc.altivec.vcmpequw
-  res_vi = vec_cmpeq(vf, vf);                   // CHECK: @llvm.ppc.altivec.vcmpeqfp
+  // TODO: uncomment
+  /*res_vbc = */vec_cmpeq(vsc, vsc);            // CHECK: @llvm.ppc.altivec.vcmpequb
+  /*res_vbc = */vec_cmpeq(vuc, vuc);            // CHECK: @llvm.ppc.altivec.vcmpequb
+  /*res_vbs = */vec_cmpeq(vs, vs);              // CHECK: @llvm.ppc.altivec.vcmpequh
+  /*res_vbs = */vec_cmpeq(vus, vus);            // CHECK: @llvm.ppc.altivec.vcmpequh
+  /*res_vbi = */vec_cmpeq(vi, vi);              // CHECK: @llvm.ppc.altivec.vcmpequw
+  /*res_vbi = */vec_cmpeq(vui, vui);            // CHECK: @llvm.ppc.altivec.vcmpequw
+  /*res_vbi = */vec_cmpeq(vf, vf);              // CHECK: @llvm.ppc.altivec.vcmpeqfp
 
   /* vec_cmpge */
-  res_vi = __builtin_vec_cmpge(vf, vf);         // CHECK: @llvm.ppc.altivec.vcmpgefp
+  // TODO: uncomment
+  /*res_vbi = */vec_cmpge(vf, vf);              // CHECK: @llvm.ppc.altivec.vcmpgefp
+  /*res_vbi = */vec_vcmpgefp(vf, vf);           // CHECK: @llvm.ppc.altivec.vcmpgefp
 
   /* vec_cmpgt */
-  res_vi = vec_cmpgt(vsc, vsc);                 // CHECK: @llvm.ppc.altivec.vcmpgtsb
-  res_vi = vec_vcmpgtub(vuc, vuc);              // CHECK: @llvm.ppc.altivec.vcmpgtub
-  res_vi = __builtin_vec_vcmpgtsh(vs, vs);      // CHECK: @llvm.ppc.altivec.vcmpgtsh
-  res_vi = vec_cmpgt(vus, vus);                 // CHECK: @llvm.ppc.altivec.vcmpgtuh
-  res_vi = vec_cmpgt(vi, vi);                   // CHECK: @llvm.ppc.altivec.vcmpgtsw
-  res_vi = vec_cmpgt(vui, vui);                 // CHECK: @llvm.ppc.altivec.vcmpgtuw
-  res_vi = vec_cmpgt(vf, vf);                   // CHECK: @llvm.ppc.altivec.vcmpgtfp
+  // TODO: uncomment
+  /*res_vbc = */vec_cmpgt(vsc, vsc);            // CHECK: @llvm.ppc.altivec.vcmpgtsb
+  /*res_vbc = */vec_cmpgt(vuc, vuc);            // CHECK: @llvm.ppc.altivec.vcmpgtub
+  /*res_vbs = */vec_cmpgt(vs, vs);              // CHECK: @llvm.ppc.altivec.vcmpgtsh
+  /*res_vbs = */vec_cmpgt(vus, vus);            // CHECK: @llvm.ppc.altivec.vcmpgtuh
+  /*res_vbi = */vec_cmpgt(vi, vi);              // CHECK: @llvm.ppc.altivec.vcmpgtsw
+  /*res_vbi = */vec_cmpgt(vui, vui);            // CHECK: @llvm.ppc.altivec.vcmpgtuw
+  /*res_vbi = */vec_cmpgt(vf, vf);              // CHECK: @llvm.ppc.altivec.vcmpgtfp
+  /*res_vbc = */vec_vcmpgtsb(vsc, vsc);         // CHECK: @llvm.ppc.altivec.vcmpgtsb
+  /*res_vbc = */vec_vcmpgtub(vuc, vuc);         // CHECK: @llvm.ppc.altivec.vcmpgtub
+  /*res_vbs = */vec_vcmpgtsh(vs, vs);           // CHECK: @llvm.ppc.altivec.vcmpgtsh
+  /*res_vbs = */vec_vcmpgtuh(vus, vus);         // CHECK: @llvm.ppc.altivec.vcmpgtuh
+  /*res_vbi = */vec_vcmpgtsw(vi, vi);           // CHECK: @llvm.ppc.altivec.vcmpgtsw
+  /*res_vbi = */vec_vcmpgtuw(vui, vui);         // CHECK: @llvm.ppc.altivec.vcmpgtuw
+  /*res_vbi = */vec_vcmpgtfp(vf, vf);           // CHECK: @llvm.ppc.altivec.vcmpgtfp
 
   /* vec_cmple */
-  res_vi = __builtin_vec_cmple(vf, vf);         // CHECK: @llvm.ppc.altivec.vcmpgefp
+  // TODO: uncomment
+  /*res_vbi = */vec_cmple(vf, vf);              // CHECK: @llvm.ppc.altivec.vcmpgefp
 
   /* vec_cmplt */
-  res_vi = vec_cmplt(vsc, vsc);                 // CHECK: @llvm.ppc.altivec.vcmpgtsb
-  res_vi = __builtin_vec_cmplt(vuc, vuc);       // CHECK: @llvm.ppc.altivec.vcmpgtub
-  res_vi = vec_cmplt(vs, vs);                   // CHECK: @llvm.ppc.altivec.vcmpgtsh
-  res_vi = vec_cmplt(vus, vus);                 // CHECK: @llvm.ppc.altivec.vcmpgtuh
-  res_vi = vec_cmplt(vi, vi);                   // CHECK: @llvm.ppc.altivec.vcmpgtsw
-  res_vi = vec_cmplt(vui, vui);                 // CHECK: @llvm.ppc.altivec.vcmpgtuw
-  res_vi = vec_cmplt(vf, vf);                   // CHECK: @llvm.ppc.altivec.vcmpgtfp
+  // TODO: uncomment
+  /*res_vbc = */vec_cmplt(vsc, vsc);            // CHECK: @llvm.ppc.altivec.vcmpgtsb
+  /*res_vbc = */vec_cmplt(vuc, vuc);            // CHECK: @llvm.ppc.altivec.vcmpgtub
+  /*res_vbs = */vec_cmplt(vs, vs);              // CHECK: @llvm.ppc.altivec.vcmpgtsh
+  /*res_vbs = */vec_cmplt(vus, vus);            // CHECK: @llvm.ppc.altivec.vcmpgtuh
+  /*res_vbi = */vec_cmplt(vi, vi);              // CHECK: @llvm.ppc.altivec.vcmpgtsw
+  /*res_vbi = */vec_cmplt(vui, vui);            // CHECK: @llvm.ppc.altivec.vcmpgtuw
+  /*res_vbi = */vec_cmplt(vf, vf);              // CHECK: @llvm.ppc.altivec.vcmpgtfp
 
+  /* vec_ctf */
+  res_vf  = vec_ctf(vi, param_i);               // CHECK: @llvm.ppc.altivec.vcfsx
+  res_vf  = vec_ctf(vui, 0);                    // CHECK: @llvm.ppc.altivec.vcfux
+  res_vf  = vec_vcfsx(vi, 0);                   // CHECK: @llvm.ppc.altivec.vcfsx
+  res_vf  = vec_vcfux(vui, 0);                  // CHECK: @llvm.ppc.altivec.vcfux
+
+  /* vec_cts */
+  res_vi = vec_cts(vf, 0);                      // CHECK: @llvm.ppc.altivec.vctsxs
+  res_vi = vec_vctsxs(vf, 0);                   // CHECK: @llvm.ppc.altivec.vctsxs
+
+  /* vec_ctu */
+  res_vui = vec_ctu(vf, 0);                     // CHECK: @llvm.ppc.altivec.vctuxs
+  res_vui = vec_vctuxs(vf, 0);                  // CHECK: @llvm.ppc.altivec.vctuxs
+
+  /* vec_dss */
+  vec_dss(param_i);                             // CHECK: @llvm.ppc.altivec.dss
+
+  /* vec_dssall */
+  vec_dssall();                                 // CHECK: @llvm.ppc.altivec.dssall
+
+  /* vec_dst */
+  vec_dst(&vsc, 0, 0);                          // CHECK: @llvm.ppc.altivec.dst
+
+  /* vec_dstst */
+  vec_dstst(&vs, 0, 0);                         // CHECK: @llvm.ppc.altivec.dstst
+
+  /* vec_dststt */
+  vec_dststt(&param_i, 0, 0);                   // CHECK: @llvm.ppc.altivec.dststt
+
+  /* vec_dstt */
+  vec_dstt(&vf, 0, 0);                          // CHECK: @llvm.ppc.altivec.dstt
+
+  /* vec_expte */
+  res_vf = vec_expte(vf);                       // CHECK: @llvm.ppc.altivec.vexptefp
+  res_vf = vec_vexptefp(vf);                    // CHECK: @llvm.ppc.altivec.vexptefp
+
+  /* vec_floor */
+  res_vf = vec_floor(vf);                       // CHECK: @llvm.ppc.altivec.vrfim
+  res_vf = vec_vrfim(vf);                       // CHECK: @llvm.ppc.altivec.vrfim
+
+  /* vec_ld */
+  res_vsc = vec_ld(0, &vsc);                    // CHECK: @llvm.ppc.altivec.lvx
+  res_vsc = vec_ld(0, &param_sc);               // CHECK: @llvm.ppc.altivec.lvx
+  res_vuc = vec_ld(0, &vuc);                    // CHECK: @llvm.ppc.altivec.lvx
+  res_vuc = vec_ld(0, &param_uc);               // CHECK: @llvm.ppc.altivec.lvx
+  res_vs  = vec_ld(0, &vs);                     // CHECK: @llvm.ppc.altivec.lvx
+  res_vs  = vec_ld(0, &param_s);                // CHECK: @llvm.ppc.altivec.lvx
+  res_vus = vec_ld(0, &vus);                    // CHECK: @llvm.ppc.altivec.lvx
+  res_vus = vec_ld(0, &param_us);               // CHECK: @llvm.ppc.altivec.lvx
+  res_vi  = vec_ld(0, &vi);                     // CHECK: @llvm.ppc.altivec.lvx
+  res_vi  = vec_ld(0, &param_i);                // CHECK: @llvm.ppc.altivec.lvx
+  res_vui = vec_ld(0, &vui);                    // CHECK: @llvm.ppc.altivec.lvx
+  res_vui = vec_ld(0, &param_ui);               // CHECK: @llvm.ppc.altivec.lvx
+  res_vf  = vec_ld(0, &vf);                     // CHECK: @llvm.ppc.altivec.lvx
+  res_vf  = vec_ld(0, &param_f);                // CHECK: @llvm.ppc.altivec.lvx
+  res_vsc = vec_lvx(0, &vsc);                   // CHECK: @llvm.ppc.altivec.lvx
+  res_vsc = vec_lvx(0, &param_sc);              // CHECK: @llvm.ppc.altivec.lvx
+  res_vuc = vec_lvx(0, &vuc);                   // CHECK: @llvm.ppc.altivec.lvx
+  res_vuc = vec_lvx(0, &param_uc);              // CHECK: @llvm.ppc.altivec.lvx
+  res_vs  = vec_lvx(0, &vs);                    // CHECK: @llvm.ppc.altivec.lvx
+  res_vs  = vec_lvx(0, &param_s);               // CHECK: @llvm.ppc.altivec.lvx
+  res_vus = vec_lvx(0, &vus);                   // CHECK: @llvm.ppc.altivec.lvx
+  res_vus = vec_lvx(0, &param_us);              // CHECK: @llvm.ppc.altivec.lvx
+  res_vi  = vec_lvx(0, &vi);                    // CHECK: @llvm.ppc.altivec.lvx
+  res_vi  = vec_lvx(0, &param_i);               // CHECK: @llvm.ppc.altivec.lvx
+  res_vui = vec_lvx(0, &vui);                   // CHECK: @llvm.ppc.altivec.lvx
+  res_vui = vec_lvx(0, &param_ui);              // CHECK: @llvm.ppc.altivec.lvx
+  res_vf  = vec_lvx(0, &vf);                    // CHECK: @llvm.ppc.altivec.lvx
+  res_vf  = vec_lvx(0, &param_f);               // CHECK: @llvm.ppc.altivec.lvx
+
+  /* vec_lde */
+  res_vsc = vec_lde(0, &vsc);                   // CHECK: @llvm.ppc.altivec.lvebx
+  res_vuc = vec_lde(0, &vuc);                   // CHECK: @llvm.ppc.altivec.lvebx
+  res_vs  = vec_lde(0, &vs);                    // CHECK: @llvm.ppc.altivec.lvehx
+  res_vus = vec_lde(0, &vus);                   // CHECK: @llvm.ppc.altivec.lvehx
+  res_vi  = vec_lde(0, &vi);                    // CHECK: @llvm.ppc.altivec.lvewx
+  res_vui = vec_lde(0, &vui);                   // CHECK: @llvm.ppc.altivec.lvewx
+  res_vf  = vec_lde(0, &vf);                    // CHECK: @llvm.ppc.altivec.lvewx
+  res_vsc = vec_lvebx(0, &vsc);                 // CHECK: @llvm.ppc.altivec.lvebx
+  res_vuc = vec_lvebx(0, &vuc);                 // CHECK: @llvm.ppc.altivec.lvebx
+  res_vs  = vec_lvehx(0, &vs);                  // CHECK: @llvm.ppc.altivec.lvehx
+  res_vus = vec_lvehx(0, &vus);                 // CHECK: @llvm.ppc.altivec.lvehx
+  res_vi  = vec_lvewx(0, &vi);                  // CHECK: @llvm.ppc.altivec.lvewx
+  res_vui = vec_lvewx(0, &vui);                 // CHECK: @llvm.ppc.altivec.lvewx
+  res_vf  = vec_lvewx(0, &vf);                  // CHECK: @llvm.ppc.altivec.lvewx
+
+  /* vec_ldl */
+  res_vsc = vec_ldl(0, &vsc);                   // CHECK: @llvm.ppc.altivec.lvxl
+  res_vsc = vec_ldl(0, &param_sc);              // CHECK: @llvm.ppc.altivec.lvxl
+  res_vuc = vec_ldl(0, &vuc);                   // CHECK: @llvm.ppc.altivec.lvxl
+  res_vuc = vec_ldl(0, &param_uc);              // CHECK: @llvm.ppc.altivec.lvxl
+  res_vs  = vec_ldl(0, &vs);                    // CHECK: @llvm.ppc.altivec.lvxl
+  res_vs  = vec_ldl(0, &param_s);               // CHECK: @llvm.ppc.altivec.lvxl
+  res_vus = vec_ldl(0, &vus);                   // CHECK: @llvm.ppc.altivec.lvxl
+  res_vus = vec_ldl(0, &param_us);              // CHECK: @llvm.ppc.altivec.lvxl
+  res_vi  = vec_ldl(0, &vi);                    // CHECK: @llvm.ppc.altivec.lvxl
+  res_vi  = vec_ldl(0, &param_i);               // CHECK: @llvm.ppc.altivec.lvxl
+  res_vui = vec_ldl(0, &vui);                   // CHECK: @llvm.ppc.altivec.lvxl
+  res_vui = vec_ldl(0, &param_ui);              // CHECK: @llvm.ppc.altivec.lvxl
+  res_vf  = vec_ldl(0, &vf);                    // CHECK: @llvm.ppc.altivec.lvxl
+  res_vf  = vec_ldl(0, &param_f);               // CHECK: @llvm.ppc.altivec.lvxl
+  res_vsc = vec_lvxl(0, &vsc);                  // CHECK: @llvm.ppc.altivec.lvxl
+  res_vsc = vec_lvxl(0, &param_sc);             // CHECK: @llvm.ppc.altivec.lvxl
+  res_vuc = vec_lvxl(0, &vuc);                  // CHECK: @llvm.ppc.altivec.lvxl
+  res_vuc = vec_lvxl(0, &param_uc);             // CHECK: @llvm.ppc.altivec.lvxl
+  res_vs  = vec_lvxl(0, &vs);                   // CHECK: @llvm.ppc.altivec.lvxl
+  res_vs  = vec_lvxl(0, &param_s);              // CHECK: @llvm.ppc.altivec.lvxl
+  res_vus = vec_lvxl(0, &vus);                  // CHECK: @llvm.ppc.altivec.lvxl
+  res_vus = vec_lvxl(0, &param_us);             // CHECK: @llvm.ppc.altivec.lvxl
+  res_vi  = vec_lvxl(0, &vi);                   // CHECK: @llvm.ppc.altivec.lvxl
+  res_vi  = vec_lvxl(0, &param_i);              // CHECK: @llvm.ppc.altivec.lvxl
+  res_vui = vec_lvxl(0, &vui);                  // CHECK: @llvm.ppc.altivec.lvxl
+  res_vui = vec_lvxl(0, &param_ui);             // CHECK: @llvm.ppc.altivec.lvxl
+  res_vf  = vec_lvxl(0, &vf);                   // CHECK: @llvm.ppc.altivec.lvxl
+  res_vf  = vec_lvxl(0, &param_f);              // CHECK: @llvm.ppc.altivec.lvxl
+
+  /* vec_loge */
+  res_vf = vec_loge(vf);                        // CHECK: @llvm.ppc.altivec.vlogefp
+  res_vf = vec_vlogefp(vf);                     // CHECK: @llvm.ppc.altivec.vlogefp
+
+  /* vec_lvsl */
+  res_vuc = vec_lvsl(0, &param_i);              // CHECK: @llvm.ppc.altivec.lvsl
+
+  /* vec_lvsr */
+  res_vuc = vec_lvsr(0, &param_i);              // CHECK: @llvm.ppc.altivec.lvsr
+
+  /* vec_madd */
+  res_vf =vec_madd(vf, vf, vf);                 // CHECK: @llvm.ppc.altivec.vmaddfp
+  res_vf = vec_vmaddfp(vf, vf, vf);             // CHECK: @llvm.ppc.altivec.vmaddfp
+
+  /* vec_madds */
+  res_vs = vec_madds(vs, vs, vs);               // CHECK: @llvm.ppc.altivec.vmhaddshs
+  res_vs = vec_vmhaddshs(vs, vs, vs);           // CHECK: @llvm.ppc.altivec.vmhaddshs
+
   /* vec_max */
-  res_vsc  = vec_max(vsc, vsc);                 // CHECK: @llvm.ppc.altivec.vmaxsb
-  res_vuc = __builtin_vec_vmaxub(vuc, vuc);     // CHECK: @llvm.ppc.altivec.vmaxub
+  res_vsc = vec_max(vsc, vsc);                  // CHECK: @llvm.ppc.altivec.vmaxsb
+  res_vuc = vec_max(vuc, vuc);                  // CHECK: @llvm.ppc.altivec.vmaxub
+  res_vs  = vec_max(vs, vs);                    // CHECK: @llvm.ppc.altivec.vmaxsh
+  res_vus = vec_max(vus, vus);                  // CHECK: @llvm.ppc.altivec.vmaxuh
+  res_vi  = vec_max(vi, vi);                    // CHECK: @llvm.ppc.altivec.vmaxsw
+  res_vui = vec_max(vui, vui);                  // CHECK: @llvm.ppc.altivec.vmaxuw
+  res_vf  = vec_max(vf, vf);                    // CHECK: @llvm.ppc.altivec.vmaxfp
+  res_vsc = vec_vmaxsb(vsc, vsc);               // CHECK: @llvm.ppc.altivec.vmaxsb
+  res_vuc = vec_vmaxub(vuc, vuc);               // CHECK: @llvm.ppc.altivec.vmaxub
   res_vs  = vec_vmaxsh(vs, vs);                 // CHECK: @llvm.ppc.altivec.vmaxsh
-  res_vus = vec_max(vus, vus);                  // CHECK: @llvm.ppc.altivec.vmaxuh
-  res_vi  = __builtin_vec_vmaxsw(vi, vi);       // CHECK: @llvm.ppc.altivec.vmaxsw
+  res_vus = vec_vmaxuh(vus, vus);               // CHECK: @llvm.ppc.altivec.vmaxuh
+  res_vi  = vec_vmaxsw(vi, vi);                 // CHECK: @llvm.ppc.altivec.vmaxsw
   res_vui = vec_vmaxuw(vui, vui);               // CHECK: @llvm.ppc.altivec.vmaxuw
-  res_vf  = __builtin_vec_max(vf, vf);          // CHECK: @llvm.ppc.altivec.vmaxfp
+  res_vf  = vec_vmaxfp(vf, vf);                 // CHECK: @llvm.ppc.altivec.vmaxfp
 
+  /* vec_mergeh */
+  res_vsc = vec_mergeh(vsc, vsc);               // CHECK: @llvm.ppc.altivec.vperm
+  res_vuc = vec_mergeh(vuc, vuc);               // CHECK: @llvm.ppc.altivec.vperm
+  res_vs  = vec_mergeh(vs, vs);                 // CHECK: @llvm.ppc.altivec.vperm
+  res_vus = vec_mergeh(vus, vus);               // CHECK: @llvm.ppc.altivec.vperm
+  res_vi  = vec_mergeh(vi, vi);                 // CHECK: @llvm.ppc.altivec.vperm
+  res_vui = vec_mergeh(vui, vui);               // CHECK: @llvm.ppc.altivec.vperm
+  res_vf  = vec_mergeh(vf, vf);                 // CHECK: @llvm.ppc.altivec.vperm
+  res_vsc = vec_vmrghb(vsc, vsc);               // CHECK: @llvm.ppc.altivec.vperm
+  res_vuc = vec_vmrghb(vuc, vuc);               // CHECK: @llvm.ppc.altivec.vperm
+  res_vs  = vec_vmrghh(vs, vs);                 // CHECK: @llvm.ppc.altivec.vperm
+  res_vus = vec_vmrghh(vus, vus);               // CHECK: @llvm.ppc.altivec.vperm
+  res_vi  = vec_vmrghw(vi, vi);                 // CHECK: @llvm.ppc.altivec.vperm
+  res_vui = vec_vmrghw(vui, vui);               // CHECK: @llvm.ppc.altivec.vperm
+  res_vf  = vec_vmrghw(vf, vf);                 // CHECK: @llvm.ppc.altivec.vperm
+
+  /* vec_mergel */
+  res_vsc = vec_mergel(vsc, vsc);               // CHECK: @llvm.ppc.altivec.vperm
+  res_vuc = vec_mergel(vuc, vuc);               // CHECK: @llvm.ppc.altivec.vperm
+  res_vs  = vec_mergel(vs, vs);                 // CHECK: @llvm.ppc.altivec.vperm
+  res_vus = vec_mergel(vus, vus);               // CHECK: @llvm.ppc.altivec.vperm
+  res_vi  = vec_mergel(vi, vi);                 // CHECK: @llvm.ppc.altivec.vperm
+  res_vui = vec_mergel(vui, vui);               // CHECK: @llvm.ppc.altivec.vperm
+  res_vf  = vec_mergel(vf, vf);                 // CHECK: @llvm.ppc.altivec.vperm
+  res_vsc = vec_vmrglb(vsc, vsc);               // CHECK: @llvm.ppc.altivec.vperm
+  res_vuc = vec_vmrglb(vuc, vuc);               // CHECK: @llvm.ppc.altivec.vperm
+  res_vs  = vec_vmrglh(vs, vs);                 // CHECK: @llvm.ppc.altivec.vperm
+  res_vus = vec_vmrglh(vus, vus);               // CHECK: @llvm.ppc.altivec.vperm
+  res_vi  = vec_vmrglw(vi, vi);                 // CHECK: @llvm.ppc.altivec.vperm
+  res_vui = vec_vmrglw(vui, vui);               // CHECK: @llvm.ppc.altivec.vperm
+  res_vf  = vec_vmrglw(vf, vf);                 // CHECK: @llvm.ppc.altivec.vperm
+
   /* vec_mfvscr */
-  vf = vec_mfvscr();                            // CHECK: @llvm.ppc.altivec.mfvscr
+  vus = vec_mfvscr();                           // CHECK: @llvm.ppc.altivec.mfvscr
 
   /* vec_min */
-  res_vsc  = vec_min(vsc, vsc);                 // CHECK: @llvm.ppc.altivec.vminsb
-  res_vuc = __builtin_vec_vminub(vuc, vuc);     // CHECK: @llvm.ppc.altivec.vminub
+  res_vsc = vec_min(vsc, vsc);                  // CHECK: @llvm.ppc.altivec.vminsb
+  res_vuc = vec_min(vuc, vuc);                  // CHECK: @llvm.ppc.altivec.vminub
+  res_vs  = vec_min(vs, vs);                    // CHECK: @llvm.ppc.altivec.vminsh
+  res_vus = vec_min(vus, vus);                  // CHECK: @llvm.ppc.altivec.vminuh
+  res_vi  = vec_min(vi, vi);                    // CHECK: @llvm.ppc.altivec.vminsw
+  res_vui = vec_min(vui, vui);                  // CHECK: @llvm.ppc.altivec.vminuw
+  res_vf  = vec_min(vf, vf);                    // CHECK: @llvm.ppc.altivec.vminfp
+  res_vsc = vec_vminsb(vsc, vsc);               // CHECK: @llvm.ppc.altivec.vminsb
+  res_vuc = vec_vminub(vuc, vuc);               // CHECK: @llvm.ppc.altivec.vminub
   res_vs  = vec_vminsh(vs, vs);                 // CHECK: @llvm.ppc.altivec.vminsh
-  res_vus = vec_min(vus, vus);                  // CHECK: @llvm.ppc.altivec.vminuh
-  res_vi  = __builtin_vec_vminsw(vi, vi);       // CHECK: @llvm.ppc.altivec.vminsw
+  res_vus = vec_vminuh(vus, vus);               // CHECK: @llvm.ppc.altivec.vminuh
+  res_vi  = vec_vminsw(vi, vi);                 // CHECK: @llvm.ppc.altivec.vminsw
   res_vui = vec_vminuw(vui, vui);               // CHECK: @llvm.ppc.altivec.vminuw
-  res_vf  = __builtin_vec_min(vf, vf);          // CHECK: @llvm.ppc.altivec.vminfp
+  res_vf  = vec_vminfp(vf, vf);                 // CHECK: @llvm.ppc.altivec.vminfp
 
+  /* vec_mladd */
+  res_vus = vec_mladd(vus, vus, vus);           // CHECK: mul <8 x i16>
+                                                // CHECK: add <8 x i16>
+
+  res_vs = vec_mladd(vus, vs, vs);              // CHECK: mul <8 x i16>
+                                                // CHECK: add nsw <8 x i16>
+
+  res_vs = vec_mladd(vs, vus, vus);             // CHECK: mul <8 x i16>
+                                                // CHECK: add nsw <8 x i16>
+
+  res_vs = vec_mladd(vs, vs, vs);               // CHECK: mul <8 x i16>
+                                                // CHECK: add nsw <8 x i16>
+
+  /* vec_mradds */
+  res_vs = vec_mradds(vs, vs, vs);              // CHECK: @llvm.ppc.altivec.vmhraddshs
+  res_vs = vec_vmhraddshs(vs, vs, vs);          // CHECK: @llvm.ppc.altivec.vmhraddshs
+ 
+  /* vec_msum */
+  res_vi  = vec_msum(vsc, vuc, vi);             // CHECK: @llvm.ppc.altivec.vmsummbm
+  res_vui = vec_msum(vuc, vuc, vui);            // CHECK: @llvm.ppc.altivec.vmsumubm
+  res_vi  = vec_msum(vs, vs, vi);               // CHECK: @llvm.ppc.altivec.vmsumshm
+  res_vui = vec_msum(vus, vus, vui);            // CHECK: @llvm.ppc.altivec.vmsumuhm
+  res_vi  = vec_vmsummbm(vsc, vuc, vi);         // CHECK: @llvm.ppc.altivec.vmsummbm
+  res_vui = vec_vmsumubm(vuc, vuc, vui);        // CHECK: @llvm.ppc.altivec.vmsumubm
+  res_vi  = vec_vmsumshm(vs, vs, vi);           // CHECK: @llvm.ppc.altivec.vmsumshm
+  res_vui = vec_vmsumuhm(vus, vus, vui);        // CHECK: @llvm.ppc.altivec.vmsumuhm
+
+  /* vec_msums */
+  res_vi  = vec_msums(vs, vs, vi);              // CHECK: @llvm.ppc.altivec.vmsumshs
+  res_vui = vec_msums(vus, vus, vui);           // CHECK: @llvm.ppc.altivec.vmsumuhs
+  res_vi  = vec_vmsumshs(vs, vs, vi);           // CHECK: @llvm.ppc.altivec.vmsumshs
+  res_vui = vec_vmsumuhs(vus, vus, vui);        // CHECK: @llvm.ppc.altivec.vmsumuhs
+
   /* vec_mtvscr */
   vec_mtvscr(vsc);                              // CHECK: @llvm.ppc.altivec.mtvscr
 
+  /* vec_mule */
+  res_vs  = vec_mule(vsc, vsc);                 // CHECK: @llvm.ppc.altivec.vmulesb
+  res_vus = vec_mule(vuc, vuc);                 // CHECK: @llvm.ppc.altivec.vmuleub
+  res_vi  = vec_mule(vs, vs);                   // CHECK: @llvm.ppc.altivec.vmulesh
+  res_vui = vec_mule(vus, vus);                 // CHECK: @llvm.ppc.altivec.vmuleuh
+  res_vs  = vec_vmulesb(vsc, vsc);              // CHECK: @llvm.ppc.altivec.vmulesb
+  res_vus = vec_vmuleub(vuc, vuc);              // CHECK: @llvm.ppc.altivec.vmuleub
+  res_vi  = vec_vmulesh(vs, vs);                // CHECK: @llvm.ppc.altivec.vmulesh
+  res_vui = vec_vmuleuh(vus, vus);              // CHECK: @llvm.ppc.altivec.vmuleuh
+
+  /* vec_mulo */
+  res_vs  = vec_mulo(vsc, vsc);                 // CHECK: @llvm.ppc.altivec.vmulosb
+  res_vus = vec_mulo(vuc, vuc);                 // CHECK: @llvm.ppc.altivec.vmuloub
+  res_vi  = vec_mulo(vs, vs);                   // CHECK: @llvm.ppc.altivec.vmulosh
+  res_vui = vec_mulo(vus, vus);                 // CHECK: @llvm.ppc.altivec.vmulouh
+  res_vs  = vec_vmulosb(vsc, vsc);              // CHECK: @llvm.ppc.altivec.vmulosb
+  res_vus = vec_vmuloub(vuc, vuc);              // CHECK: @llvm.ppc.altivec.vmuloub
+  res_vi  = vec_vmulosh(vs, vs);                // CHECK: @llvm.ppc.altivec.vmulosh
+  res_vui = vec_vmulouh(vus, vus);              // CHECK: @llvm.ppc.altivec.vmulouh
+
+  /* vec_nmsub */
+  res_vf = vec_nmsub(vf, vf, vf);               // CHECK: @llvm.ppc.altivec.vnmsubfp
+  res_vf = vec_vnmsubfp(vf, vf, vf);            // CHECK: @llvm.ppc.altivec.vnmsubfp
+
+  /* vec_nor */
+  res_vsc = vec_nor(vsc, vsc);                  // CHECK: or <16 x i8>
+                                                // CHECK: xor <16 x i8>
+
+  res_vuc = vec_nor(vuc, vuc);                  // CHECK: or <16 x i8>
+                                                // CHECK: xor <16 x i8>
+
+  res_vs  = vec_nor(vs, vs);                    // CHECK: or <8 x i16>
+                                                // CHECK: xor <8 x i16>
+
+  res_vus = vec_nor(vus, vus);                  // CHECK: or <8 x i16>
+                                                // CHECK: xor <8 x i16>
+
+  res_vi  = vec_nor(vi, vi);                    // CHECK: or <4 x i32>
+                                                // CHECK: xor <4 x i32>
+
+  res_vui = vec_nor(vui, vui);                  // CHECK: or <4 x i32>
+                                                // CHECK: xor <4 x i32>
+
+  res_vf  = vec_nor(vf, vf);                    // CHECK: or <4 x i32>
+                                                // CHECK: xor <4 x i32>
+
+  res_vsc = vec_vnor(vsc, vsc);                 // CHECK: or <16 x i8>
+                                                // CHECK: xor <16 x i8>
+
+  res_vuc = vec_vnor(vuc, vuc);                 // CHECK: or <16 x i8>
+                                                // CHECK: xor <16 x i8>
+
+  res_vs  = vec_vnor(vs, vs);                   // CHECK: or <8 x i16>
+                                                // CHECK: xor <8 x i16>
+
+  res_vus = vec_vnor(vus, vus);                 // CHECK: or <8 x i16>
+                                                // CHECK: xor <8 x i16>
+
+  res_vi  = vec_vnor(vi, vi);                   // CHECK: or <4 x i32>
+                                                // CHECK: xor <4 x i32>
+
+  res_vui = vec_vnor(vui, vui);                 // CHECK: or <4 x i32>
+                                                // CHECK: xor <4 x i32>
+
+  res_vf  = vec_vnor(vf, vf);                   // CHECK: or <4 x i32>
+                                                // CHECK: xor <4 x i32>
+
+  /* vec_or */
+  res_vsc = vec_or(vsc, vsc);                   // CHECK: or <16 x i8>
+  res_vuc = vec_or(vuc, vuc);                   // CHECK: or <16 x i8>
+  res_vs  = vec_or(vs, vs);                     // CHECK: or <8 x i16>
+  res_vus = vec_or(vus, vus);                   // CHECK: or <8 x i16>
+  res_vi  = vec_or(vi, vi);                     // CHECK: or <4 x i32>
+  res_vui = vec_or(vui, vui);                   // CHECK: or <4 x i32>
+  res_vf  = vec_or(vf, vf);                     // CHECK: or <4 x i32>
+  res_vsc = vec_vor(vsc, vsc);                  // CHECK: or <16 x i8>
+  res_vuc = vec_vor(vuc, vuc);                  // CHECK: or <16 x i8>
+  res_vs  = vec_vor(vs, vs);                    // CHECK: or <8 x i16>
+  res_vus = vec_vor(vus, vus);                  // CHECK: or <8 x i16>
+  res_vi  = vec_vor(vi, vi);                    // CHECK: or <4 x i32>
+  res_vui = vec_vor(vui, vui);                  // CHECK: or <4 x i32>
+  res_vf  = vec_vor(vf, vf);                    // CHECK: or <4 x i32>
+
+  /* vec_pack */
+  res_vsc = vec_pack(vs, vs);                   // CHECK: @llvm.ppc.altivec.vperm
+  res_vuc = vec_pack(vus, vus);                 // CHECK: @llvm.ppc.altivec.vperm
+  res_vs  = vec_pack(vi, vi);                   // CHECK: @llvm.ppc.altivec.vperm
+  res_vus = vec_pack(vui, vui);                 // CHECK: @llvm.ppc.altivec.vperm
+  res_vsc = vec_vpkuhum(vs, vs);                // CHECK: @llvm.ppc.altivec.vperm
+  res_vuc = vec_vpkuhum(vus, vus);              // CHECK: @llvm.ppc.altivec.vperm
+  res_vs  = vec_vpkuwum(vi, vi);                // CHECK: @llvm.ppc.altivec.vperm
+  res_vus = vec_vpkuwum(vui, vui);              // CHECK: @llvm.ppc.altivec.vperm
+
+  /* vec_packpx */
+  res_vp = vec_packpx(vui, vui);                // CHECK: @llvm.ppc.altivec.vpkpx
+  res_vp = vec_vpkpx(vui, vui);                 // CHECK: @llvm.ppc.altivec.vpkpx
+
+  /* vec_packs */
+  res_vsc = vec_packs(vs, vs);                  // CHECK: @llvm.ppc.altivec.vpkshss
+  res_vuc = vec_packs(vus, vus);                // CHECK: @llvm.ppc.altivec.vpkuhus
+  res_vs  = vec_packs(vi, vi);                  // CHECK: @llvm.ppc.altivec.vpkswss
+  res_vus = vec_packs(vui, vui);                // CHECK: @llvm.ppc.altivec.vpkuwus
+  res_vsc = vec_vpkshss(vs, vs);                // CHECK: @llvm.ppc.altivec.vpkshss
+  res_vuc = vec_vpkuhus(vus, vus);              // CHECK: @llvm.ppc.altivec.vpkuhus
+  res_vs  = vec_vpkswss(vi, vi);                // CHECK: @llvm.ppc.altivec.vpkswss
+  res_vus = vec_vpkuwus(vui, vui);              // CHECK: @llvm.ppc.altivec.vpkuwus
+
+  /* vec_packsu */
+  res_vuc = vec_packsu(vs, vs);                 // CHECK: @llvm.ppc.altivec.vpkshus
+  res_vuc = vec_packsu(vus, vus);               // CHECK: @llvm.ppc.altivec.vpkuhus
+  res_vus = vec_packsu(vi, vi);                 // CHECK: @llvm.ppc.altivec.vpkswus
+  res_vus = vec_packsu(vui, vui);               // CHECK: @llvm.ppc.altivec.vpkuwus
+  res_vuc = vec_vpkshus(vs, vs);                // CHECK: @llvm.ppc.altivec.vpkshus
+  res_vuc = vec_vpkshus(vus, vus);              // CHECK: @llvm.ppc.altivec.vpkuhus
+  res_vus = vec_vpkswus(vi, vi);                // CHECK: @llvm.ppc.altivec.vpkswus
+  res_vus = vec_vpkswus(vui, vui);              // CHECK: @llvm.ppc.altivec.vpkuwus
+
+  /* vec_perm */
+  res_vsc = vec_perm(vsc, vsc, vuc);            // CHECK: @llvm.ppc.altivec.vperm
+  res_vuc = vec_perm(vuc, vuc, vuc);            // CHECK: @llvm.ppc.altivec.vperm
+  res_vs  = vec_perm(vs, vs, vuc);              // CHECK: @llvm.ppc.altivec.vperm
+  res_vus = vec_perm(vus, vus, vuc);            // CHECK: @llvm.ppc.altivec.vperm
+  res_vi  = vec_perm(vi, vi, vuc);              // CHECK: @llvm.ppc.altivec.vperm
+  res_vui = vec_perm(vui, vui, vuc);            // CHECK: @llvm.ppc.altivec.vperm
+  res_vf  = vec_perm(vf, vf, vuc);              // CHECK: @llvm.ppc.altivec.vperm
+  res_vsc = vec_vperm(vsc, vsc, vuc);           // CHECK: @llvm.ppc.altivec.vperm
+  res_vuc = vec_vperm(vuc, vuc, vuc);           // CHECK: @llvm.ppc.altivec.vperm
+  res_vs  = vec_vperm(vs, vs, vuc);             // CHECK: @llvm.ppc.altivec.vperm
+  res_vus = vec_vperm(vus, vus, vuc);           // CHECK: @llvm.ppc.altivec.vperm
+  res_vi  = vec_vperm(vi, vi, vuc);             // CHECK: @llvm.ppc.altivec.vperm
+  res_vui = vec_vperm(vui, vui, vuc);           // CHECK: @llvm.ppc.altivec.vperm
+  res_vf  = vec_vperm(vf, vf, vuc);             // CHECK: @llvm.ppc.altivec.vperm
+
+  /* vec_re */
+  res_vf = vec_re(vf);                          // CHECK: @llvm.ppc.altivec.vrefp
+  res_vf = vec_vrefp(vf);                       // CHECK: @llvm.ppc.altivec.vrefp
+
+  /* vec_rl */
+  res_vsc = vec_rl(vsc, vuc);                   // CHECK: @llvm.ppc.altivec.vrlb
+  res_vuc = vec_rl(vuc, vuc);                   // CHECK: @llvm.ppc.altivec.vrlb
+  res_vs  = vec_rl(vs, vus);                    // CHECK: @llvm.ppc.altivec.vrlh
+  res_vus = vec_rl(vus, vus);                   // CHECK: @llvm.ppc.altivec.vrlh
+  res_vi  = vec_rl(vi, vui);                    // CHECK: @llvm.ppc.altivec.vrlw
+  res_vui = vec_rl(vui, vui);                   // CHECK: @llvm.ppc.altivec.vrlw
+  res_vsc = vec_vrlb(vsc, vuc);                 // CHECK: @llvm.ppc.altivec.vrlb
+  res_vuc = vec_vrlb(vuc, vuc);                 // CHECK: @llvm.ppc.altivec.vrlb
+  res_vs  = vec_vrlh(vs, vus);                  // CHECK: @llvm.ppc.altivec.vrlh
+  res_vus = vec_vrlh(vus, vus);                 // CHECK: @llvm.ppc.altivec.vrlh
+  res_vi  = vec_vrlw(vi, vui);                  // CHECK: @llvm.ppc.altivec.vrlw
+  res_vui = vec_vrlw(vui, vui);                 // CHECK: @llvm.ppc.altivec.vrlw
+
+  /* vec_round */
+  res_vf = vec_round(vf);                       // CHECK: @llvm.ppc.altivec.vrfin
+  res_vf = vec_vrfin(vf);                       // CHECK: @llvm.ppc.altivec.vrfin
+
+  /* vec_rsqrte */
+  res_vf = vec_rsqrte(vf);                      // CHECK: @llvm.ppc.altivec.vrsqrtefp
+  res_vf = vec_vrsqrtefp(vf);                   // CHECK: @llvm.ppc.altivec.vrsqrtefp
+
+  /* vec_sel */
+  res_vsc = vec_sel(vsc, vsc, vuc);             // CHECK: xor <16 x i8>
+                                                // CHECK: and <16 x i8>
+                                                // CHECK: and <16 x i8>
+                                                // CHECK: or <16 x i8>
+
+  res_vuc = vec_sel(vuc, vuc, vuc);             // CHECK: xor <16 x i8>
+                                                // CHECK: and <16 x i8>
+                                                // CHECK: and <16 x i8>
+                                                // CHECK: or <16 x i8>
+
+  res_vs  = vec_sel(vs, vs, vus);               // CHECK: xor <8 x i16>
+                                                // CHECK: and <8 x i16>
+                                                // CHECK: and <8 x i16>
+                                                // CHECK: or <8 x i16>
+
+
+  res_vus = vec_sel(vus, vus, vus);             // CHECK: xor <8 x i16>
+                                                // CHECK: and <8 x i16>
+                                                // CHECK: and <8 x i16>
+                                                // CHECK: or <8 x i16>
+
+  res_vi  = vec_sel(vi, vi, vui);               // CHECK: xor <4 x i32>
+                                                // CHECK: and <4 x i32>
+                                                // CHECK: and <4 x i32>
+                                                // CHECK: or <4 x i32>
+
+
+  res_vui = vec_sel(vui, vui, vui);             // CHECK: xor <4 x i32>
+                                                // CHECK: and <4 x i32>
+                                                // CHECK: and <4 x i32>
+                                                // CHECK: or <4 x i32>
+
+
+  res_vf  = vec_sel(vf, vf, vui);               // CHECK: xor <4 x i32>
+                                                // CHECK: and <4 x i32>
+                                                // CHECK: and <4 x i32>
+                                                // CHECK: or <4 x i32>
+
+  res_vsc = vec_vsel(vsc, vsc, vuc);            // CHECK: xor <16 x i8>
+                                                // CHECK: and <16 x i8>
+                                                // CHECK: and <16 x i8>
+                                                // CHECK: or <16 x i8>
+
+  res_vuc = vec_vsel(vuc, vuc, vuc);            // CHECK: xor <16 x i8>
+                                                // CHECK: and <16 x i8>
+                                                // CHECK: and <16 x i8>
+                                                // CHECK: or <16 x i8>
+
+  res_vs  = vec_vsel(vs, vs, vus);              // CHECK: xor <8 x i16>
+                                                // CHECK: and <8 x i16>
+                                                // CHECK: and <8 x i16>
+                                                // CHECK: or <8 x i16>
+
+
+  res_vus = vec_vsel(vus, vus, vus);            // CHECK: xor <8 x i16>
+                                                // CHECK: and <8 x i16>
+                                                // CHECK: and <8 x i16>
+                                                // CHECK: or <8 x i16>
+
+  res_vi  = vec_vsel(vi, vi, vui);              // CHECK: xor <4 x i32>
+                                                // CHECK: and <4 x i32>
+                                                // CHECK: and <4 x i32>
+                                                // CHECK: or <4 x i32>
+
+
+  res_vui = vec_vsel(vui, vui, vui);            // CHECK: xor <4 x i32>
+                                                // CHECK: and <4 x i32>
+                                                // CHECK: and <4 x i32>
+                                                // CHECK: or <4 x i32>
+
+
+  res_vf  = vec_vsel(vf, vf, vui);              // CHECK: xor <4 x i32>
+                                                // CHECK: and <4 x i32>
+                                                // CHECK: and <4 x i32>
+                                                // CHECK: or <4 x i32>
+
+
+  /* vec_sl */
+  res_vsc = vec_sl(vsc, vuc);                   // CHECK: shl <16 x i8>
+  res_vuc = vec_sl(vuc, vuc);                   // CHECK: shl <16 x i8>
+  res_vs  = vec_sl(vs, vus);                    // CHECK: shl <8 x i16>
+  res_vus = vec_sl(vus, vus);                   // CHECK: shl <8 x i16>
+  res_vi  = vec_sl(vi, vui);                    // CHECK: shl <4 x i32>
+  res_vui = vec_sl(vui, vui);                   // CHECK: shl <4 x i32>
+  res_vsc = vec_vslb(vsc, vuc);                 // CHECK: shl <16 x i8>
+  res_vuc = vec_vslb(vuc, vuc);                 // CHECK: shl <16 x i8>
+  res_vs  = vec_vslh(vs, vus);                  // CHECK: shl <8 x i16>
+  res_vus = vec_vslh(vus, vus);                 // CHECK: shl <8 x i16>
+  res_vi  = vec_vslw(vi, vui);                  // CHECK: shl <4 x i32>
+  res_vui = vec_vslw(vui, vui);                 // CHECK: shl <4 x i32>
+
+  /* vec_sld */
+  res_vsc = vec_sld(vsc, vsc, 0);               // CHECK: @llvm.ppc.altivec.vperm
+  res_vuc = vec_sld(vuc, vuc, 0);               // CHECK: @llvm.ppc.altivec.vperm
+  res_vs  = vec_sld(vs, vs, 0);                 // CHECK: @llvm.ppc.altivec.vperm
+  res_vus = vec_sld(vus, vus, 0);               // CHECK: @llvm.ppc.altivec.vperm
+  res_vi  = vec_sld(vi, vi, 0);                 // CHECK: @llvm.ppc.altivec.vperm
+  res_vui = vec_sld(vui, vui, 0);               // CHECK: @llvm.ppc.altivec.vperm
+  res_vf  = vec_sld(vf, vf, 0);                 // CHECK: @llvm.ppc.altivec.vperm
+  res_vsc = vec_vsldoi(vsc, vsc, 0);            // CHECK: @llvm.ppc.altivec.vperm
+  res_vuc = vec_vsldoi(vuc, vuc, 0);            // CHECK: @llvm.ppc.altivec.vperm
+  res_vs  = vec_vsldoi(vs, vs, 0);              // CHECK: @llvm.ppc.altivec.vperm
+  res_vus = vec_vsldoi(vus, vus, 0);            // CHECK: @llvm.ppc.altivec.vperm
+  res_vi  = vec_vsldoi(vi, vi, 0);              // CHECK: @llvm.ppc.altivec.vperm
+  res_vui = vec_vsldoi(vui, vui, 0);            // CHECK: @llvm.ppc.altivec.vperm
+  res_vf  = vec_vsldoi(vf, vf, 0);              // CHECK: @llvm.ppc.altivec.vperm
+
+  /* vec_sll */
+  res_vsc = vec_sll(vsc, vuc);                  // CHECK: @llvm.ppc.altivec.vsl
+  res_vsc = vec_sll(vsc, vus);                  // CHECK: @llvm.ppc.altivec.vsl
+  res_vsc = vec_sll(vsc, vui);                  // CHECK: @llvm.ppc.altivec.vsl
+  res_vuc = vec_sll(vuc, vuc);                  // CHECK: @llvm.ppc.altivec.vsl
+  res_vuc = vec_sll(vuc, vus);                  // CHECK: @llvm.ppc.altivec.vsl
+  res_vuc = vec_sll(vuc, vui);                  // CHECK: @llvm.ppc.altivec.vsl
+  res_vs  = vec_sll(vs, vuc);                   // CHECK: @llvm.ppc.altivec.vsl
+  res_vs  = vec_sll(vs, vus);                   // CHECK: @llvm.ppc.altivec.vsl
+  res_vs  = vec_sll(vs, vui);                   // CHECK: @llvm.ppc.altivec.vsl
+  res_vus = vec_sll(vus, vuc);                  // CHECK: @llvm.ppc.altivec.vsl
+  res_vus = vec_sll(vus, vus);                  // CHECK: @llvm.ppc.altivec.vsl
+  res_vus = vec_sll(vus, vui);                  // CHECK: @llvm.ppc.altivec.vsl
+  res_vi  = vec_sll(vi, vuc);                   // CHECK: @llvm.ppc.altivec.vsl
+  res_vi  = vec_sll(vi, vus);                   // CHECK: @llvm.ppc.altivec.vsl
+  res_vi  = vec_sll(vi, vui);                   // CHECK: @llvm.ppc.altivec.vsl
+  res_vui = vec_sll(vui, vuc);                  // CHECK: @llvm.ppc.altivec.vsl
+  res_vui = vec_sll(vui, vus);                  // CHECK: @llvm.ppc.altivec.vsl
+  res_vui = vec_sll(vui, vui);                  // CHECK: @llvm.ppc.altivec.vsl
+  res_vsc = vec_vsl(vsc, vuc);                  // CHECK: @llvm.ppc.altivec.vsl
+  res_vsc = vec_vsl(vsc, vus);                  // CHECK: @llvm.ppc.altivec.vsl
+  res_vsc = vec_vsl(vsc, vui);                  // CHECK: @llvm.ppc.altivec.vsl
+  res_vuc = vec_vsl(vuc, vuc);                  // CHECK: @llvm.ppc.altivec.vsl
+  res_vuc = vec_vsl(vuc, vus);                  // CHECK: @llvm.ppc.altivec.vsl
+  res_vuc = vec_vsl(vuc, vui);                  // CHECK: @llvm.ppc.altivec.vsl
+  res_vs  = vec_vsl(vs, vuc);                   // CHECK: @llvm.ppc.altivec.vsl
+  res_vs  = vec_vsl(vs, vus);                   // CHECK: @llvm.ppc.altivec.vsl
+  res_vs  = vec_vsl(vs, vui);                   // CHECK: @llvm.ppc.altivec.vsl
+  res_vus = vec_vsl(vus, vuc);                  // CHECK: @llvm.ppc.altivec.vsl
+  res_vus = vec_vsl(vus, vus);                  // CHECK: @llvm.ppc.altivec.vsl
+  res_vus = vec_vsl(vus, vui);                  // CHECK: @llvm.ppc.altivec.vsl
+  res_vi  = vec_vsl(vi, vuc);                   // CHECK: @llvm.ppc.altivec.vsl
+  res_vi  = vec_vsl(vi, vus);                   // CHECK: @llvm.ppc.altivec.vsl
+  res_vi  = vec_vsl(vi, vui);                   // CHECK: @llvm.ppc.altivec.vsl
+  res_vui = vec_vsl(vui, vuc);                  // CHECK: @llvm.ppc.altivec.vsl
+  res_vui = vec_vsl(vui, vus);                  // CHECK: @llvm.ppc.altivec.vsl
+  res_vui = vec_vsl(vui, vui);                  // CHECK: @llvm.ppc.altivec.vsl
+
+  /* vec_slo */
+  res_vsc = vec_slo(vsc, vsc);                  // CHECK: @llvm.ppc.altivec.vslo
+  res_vsc = vec_slo(vsc, vuc);                  // CHECK: @llvm.ppc.altivec.vslo
+  res_vuc = vec_slo(vuc, vsc);                  // CHECK: @llvm.ppc.altivec.vslo
+  res_vuc = vec_slo(vuc, vuc);                  // CHECK: @llvm.ppc.altivec.vslo
+  res_vs  = vec_slo(vs, vsc);                   // CHECK: @llvm.ppc.altivec.vslo
+  res_vs  = vec_slo(vs, vuc);                   // CHECK: @llvm.ppc.altivec.vslo
+  res_vus = vec_slo(vus, vsc);                  // CHECK: @llvm.ppc.altivec.vslo
+  res_vus = vec_slo(vus, vuc);                  // CHECK: @llvm.ppc.altivec.vslo
+  res_vi  = vec_slo(vi, vsc);                   // CHECK: @llvm.ppc.altivec.vslo
+  res_vi  = vec_slo(vi, vuc);                   // CHECK: @llvm.ppc.altivec.vslo
+  res_vui = vec_slo(vui, vsc);                  // CHECK: @llvm.ppc.altivec.vslo
+  res_vui = vec_slo(vui, vuc);                  // CHECK: @llvm.ppc.altivec.vslo
+  res_vf  = vec_slo(vf, vsc);                   // CHECK: @llvm.ppc.altivec.vslo
+  res_vf  = vec_slo(vf, vuc);                   // CHECK: @llvm.ppc.altivec.vslo
+  res_vsc = vec_vslo(vsc, vsc);                 // CHECK: @llvm.ppc.altivec.vslo
+  res_vsc = vec_vslo(vsc, vuc);                 // CHECK: @llvm.ppc.altivec.vslo
+  res_vuc = vec_vslo(vuc, vsc);                 // CHECK: @llvm.ppc.altivec.vslo
+  res_vuc = vec_vslo(vuc, vuc);                 // CHECK: @llvm.ppc.altivec.vslo
+  res_vs  = vec_vslo(vs, vsc);                  // CHECK: @llvm.ppc.altivec.vslo
+  res_vs  = vec_vslo(vs, vuc);                  // CHECK: @llvm.ppc.altivec.vslo
+  res_vus = vec_vslo(vus, vsc);                 // CHECK: @llvm.ppc.altivec.vslo
+  res_vus = vec_vslo(vus, vuc);                 // CHECK: @llvm.ppc.altivec.vslo
+  res_vi  = vec_vslo(vi, vsc);                  // CHECK: @llvm.ppc.altivec.vslo
+  res_vi  = vec_vslo(vi, vuc);                  // CHECK: @llvm.ppc.altivec.vslo
+  res_vui = vec_vslo(vui, vsc);                 // CHECK: @llvm.ppc.altivec.vslo
+  res_vui = vec_vslo(vui, vuc);                 // CHECK: @llvm.ppc.altivec.vslo
+  res_vf  = vec_vslo(vf, vsc);                  // CHECK: @llvm.ppc.altivec.vslo
+  res_vf  = vec_vslo(vf, vuc);                  // CHECK: @llvm.ppc.altivec.vslo
+
+  /* vec_splat */
+  res_vsc = vec_splat(vsc, 0);                  // CHECK: @llvm.ppc.altivec.vperm
+  res_vuc = vec_splat(vuc, 0);                  // CHECK: @llvm.ppc.altivec.vperm
+  res_vs  = vec_splat(vs, 0);                   // CHECK: @llvm.ppc.altivec.vperm
+  res_vus = vec_splat(vus, 0);                  // CHECK: @llvm.ppc.altivec.vperm
+  res_vi  = vec_splat(vi, 0);                   // CHECK: @llvm.ppc.altivec.vperm
+  res_vui = vec_splat(vui, 0);                  // CHECK: @llvm.ppc.altivec.vperm
+  res_vf  = vec_splat(vf, 0);                   // CHECK: @llvm.ppc.altivec.vperm
+  res_vsc = vec_vspltb(vsc, 0);                 // CHECK: @llvm.ppc.altivec.vperm
+  res_vuc = vec_vspltb(vuc, 0);                 // CHECK: @llvm.ppc.altivec.vperm
+  res_vs  = vec_vsplth(vs, 0);                  // CHECK: @llvm.ppc.altivec.vperm
+  res_vus = vec_vsplth(vus, 0);                 // CHECK: @llvm.ppc.altivec.vperm
+  res_vi  = vec_vspltw(vi, 0);                  // CHECK: @llvm.ppc.altivec.vperm
+  res_vui = vec_vspltw(vui, 0);                 // CHECK: @llvm.ppc.altivec.vperm
+  res_vf  = vec_vspltw(vf, 0);                  // CHECK: @llvm.ppc.altivec.vperm
+
+  /* vec_splat_s8 */
+  res_vsc = vec_splat_s8(0x09);                 // TODO: add check
+  res_vsc = vec_vspltisb(0x09);                 // TODO: add check
+
+  /* vec_splat_s16 */
+  res_vs = vec_splat_s16(0x09);                 // TODO: add check
+  res_vs = vec_vspltish(0x09);                  // TODO: add check
+
+  /* vec_splat_s32 */
+  res_vi = vec_splat_s32(0x09);                 // TODO: add check
+  res_vi = vec_vspltisw(0x09);                  // TODO: add check
+
+  /* vec_splat_u8 */
+  res_vuc = vec_splat_u8(0x09);                 // TODO: add check
+
+  /* vec_splat_u16 */
+  res_vus = vec_splat_u16(0x09);                // TODO: add check
+
+  /* vec_splat_u32 */
+  res_vui = vec_splat_u32(0x09);                // TODO: add check
+
+  /* vec_sr */
+  res_vsc = vec_sr(vsc, vuc);                   // CHECK: shr <16 x i8>
+  res_vuc = vec_sr(vuc, vuc);                   // CHECK: shr <16 x i8>
+  res_vs  = vec_sr(vs, vus);                    // CHECK: shr <8 x i16>
+  res_vus = vec_sr(vus, vus);                   // CHECK: shr <8 x i16>
+  res_vi  = vec_sr(vi, vui);                    // CHECK: shr <4 x i32>
+  res_vui = vec_sr(vui, vui);                   // CHECK: shr <4 x i32>
+  res_vsc = vec_vsrb(vsc, vuc);                 // CHECK: shr <16 x i8>
+  res_vuc = vec_vsrb(vuc, vuc);                 // CHECK: shr <16 x i8>
+  res_vs  = vec_vsrh(vs, vus);                  // CHECK: shr <8 x i16>
+  res_vus = vec_vsrh(vus, vus);                 // CHECK: shr <8 x i16>
+  res_vi  = vec_vsrw(vi, vui);                  // CHECK: shr <4 x i32>
+  res_vui = vec_vsrw(vui, vui);                 // CHECK: shr <4 x i32>
+
+  /* vec_sra */
+  res_vsc = vec_sra(vsc, vuc);                  // CHECK: @llvm.ppc.altivec.vsrab
+  res_vuc = vec_sra(vuc, vuc);                  // CHECK: @llvm.ppc.altivec.vsrab
+  res_vs  = vec_sra(vs, vus);                   // CHECK: @llvm.ppc.altivec.vsrah
+  res_vus = vec_sra(vus, vus);                  // CHECK: @llvm.ppc.altivec.vsrah
+  res_vi  = vec_sra(vi, vui);                   // CHECK: @llvm.ppc.altivec.vsraw
+  res_vui = vec_sra(vui, vui);                  // CHECK: @llvm.ppc.altivec.vsraw
+  res_vsc = vec_vsrab(vsc, vuc);                // CHECK: @llvm.ppc.altivec.vsrab
+  res_vuc = vec_vsrab(vuc, vuc);                // CHECK: @llvm.ppc.altivec.vsrab
+  res_vs  = vec_vsrah(vs, vus);                 // CHECK: @llvm.ppc.altivec.vsrah
+  res_vus = vec_vsrah(vus, vus);                // CHECK: @llvm.ppc.altivec.vsrah
+  res_vi  = vec_vsraw(vi, vui);                 // CHECK: @llvm.ppc.altivec.vsraw
+  res_vui = vec_vsraw(vui, vui);                // CHECK: @llvm.ppc.altivec.vsraw
+
+  /* vec_srl */
+  res_vsc = vec_srl(vsc, vuc);                  // CHECK: @llvm.ppc.altivec.vsr
+  res_vsc = vec_srl(vsc, vus);                  // CHECK: @llvm.ppc.altivec.vsr
+  res_vsc = vec_srl(vsc, vui);                  // CHECK: @llvm.ppc.altivec.vsr
+  res_vuc = vec_srl(vuc, vuc);                  // CHECK: @llvm.ppc.altivec.vsr
+  res_vuc = vec_srl(vuc, vus);                  // CHECK: @llvm.ppc.altivec.vsr
+  res_vuc = vec_srl(vuc, vui);                  // CHECK: @llvm.ppc.altivec.vsr
+  res_vs  = vec_srl(vs, vuc);                   // CHECK: @llvm.ppc.altivec.vsr
+  res_vs  = vec_srl(vs, vus);                   // CHECK: @llvm.ppc.altivec.vsr
+  res_vs  = vec_srl(vs, vui);                   // CHECK: @llvm.ppc.altivec.vsr
+  res_vus = vec_srl(vus, vuc);                  // CHECK: @llvm.ppc.altivec.vsr
+  res_vus = vec_srl(vus, vus);                  // CHECK: @llvm.ppc.altivec.vsr
+  res_vus = vec_srl(vus, vui);                  // CHECK: @llvm.ppc.altivec.vsr
+  res_vi  = vec_srl(vi, vuc);                   // CHECK: @llvm.ppc.altivec.vsr
+  res_vi  = vec_srl(vi, vus);                   // CHECK: @llvm.ppc.altivec.vsr
+  res_vi  = vec_srl(vi, vui);                   // CHECK: @llvm.ppc.altivec.vsr
+  res_vui = vec_srl(vui, vuc);                  // CHECK: @llvm.ppc.altivec.vsr
+  res_vui = vec_srl(vui, vus);                  // CHECK: @llvm.ppc.altivec.vsr
+  res_vui = vec_srl(vui, vui);                  // CHECK: @llvm.ppc.altivec.vsr
+  res_vsc = vec_vsr(vsc, vuc);                  // CHECK: @llvm.ppc.altivec.vsr
+  res_vsc = vec_vsr(vsc, vus);                  // CHECK: @llvm.ppc.altivec.vsr
+  res_vsc = vec_vsr(vsc, vui);                  // CHECK: @llvm.ppc.altivec.vsr
+  res_vuc = vec_vsr(vuc, vuc);                  // CHECK: @llvm.ppc.altivec.vsr
+  res_vuc = vec_vsr(vuc, vus);                  // CHECK: @llvm.ppc.altivec.vsr
+  res_vuc = vec_vsr(vuc, vui);                  // CHECK: @llvm.ppc.altivec.vsr
+  res_vs  = vec_vsr(vs, vuc);                   // CHECK: @llvm.ppc.altivec.vsr
+  res_vs  = vec_vsr(vs, vus);                   // CHECK: @llvm.ppc.altivec.vsr
+  res_vs  = vec_vsr(vs, vui);                   // CHECK: @llvm.ppc.altivec.vsr
+  res_vus = vec_vsr(vus, vuc);                  // CHECK: @llvm.ppc.altivec.vsr
+  res_vus = vec_vsr(vus, vus);                  // CHECK: @llvm.ppc.altivec.vsr
+  res_vus = vec_vsr(vus, vui);                  // CHECK: @llvm.ppc.altivec.vsr
+  res_vi  = vec_vsr(vi, vuc);                   // CHECK: @llvm.ppc.altivec.vsr
+  res_vi  = vec_vsr(vi, vus);                   // CHECK: @llvm.ppc.altivec.vsr
+  res_vi  = vec_vsr(vi, vui);                   // CHECK: @llvm.ppc.altivec.vsr
+  res_vui = vec_vsr(vui, vuc);                  // CHECK: @llvm.ppc.altivec.vsr
+  res_vui = vec_vsr(vui, vus);                  // CHECK: @llvm.ppc.altivec.vsr
+  res_vui = vec_vsr(vui, vui);                  // CHECK: @llvm.ppc.altivec.vsr
+
+  /* vec_sro */
+  res_vsc = vec_sro(vsc, vsc);                  // CHECK: @llvm.ppc.altivec.vsro
+  res_vsc = vec_sro(vsc, vuc);                  // CHECK: @llvm.ppc.altivec.vsro
+  res_vuc = vec_sro(vuc, vsc);                  // CHECK: @llvm.ppc.altivec.vsro
+  res_vuc = vec_sro(vuc, vuc);                  // CHECK: @llvm.ppc.altivec.vsro
+  res_vs  = vec_sro(vs, vsc);                   // CHECK: @llvm.ppc.altivec.vsro
+  res_vs  = vec_sro(vs, vuc);                   // CHECK: @llvm.ppc.altivec.vsro
+  res_vus = vec_sro(vus, vsc);                  // CHECK: @llvm.ppc.altivec.vsro
+  res_vus = vec_sro(vus, vuc);                  // CHECK: @llvm.ppc.altivec.vsro
+  res_vi  = vec_sro(vi, vsc);                   // CHECK: @llvm.ppc.altivec.vsro
+  res_vi  = vec_sro(vi, vuc);                   // CHECK: @llvm.ppc.altivec.vsro
+  res_vui = vec_sro(vui, vsc);                  // CHECK: @llvm.ppc.altivec.vsro
+  res_vui = vec_sro(vui, vuc);                  // CHECK: @llvm.ppc.altivec.vsro
+  res_vf  = vec_sro(vf, vsc);                   // CHECK: @llvm.ppc.altivec.vsro
+  res_vf  = vec_sro(vf, vuc);                   // CHECK: @llvm.ppc.altivec.vsro
+  res_vsc = vec_vsro(vsc, vsc);                 // CHECK: @llvm.ppc.altivec.vsro
+  res_vsc = vec_vsro(vsc, vuc);                 // CHECK: @llvm.ppc.altivec.vsro
+  res_vuc = vec_vsro(vuc, vsc);                 // CHECK: @llvm.ppc.altivec.vsro
+  res_vuc = vec_vsro(vuc, vuc);                 // CHECK: @llvm.ppc.altivec.vsro
+  res_vs  = vec_vsro(vs, vsc);                  // CHECK: @llvm.ppc.altivec.vsro
+  res_vs  = vec_vsro(vs, vuc);                  // CHECK: @llvm.ppc.altivec.vsro
+  res_vus = vec_vsro(vus, vsc);                 // CHECK: @llvm.ppc.altivec.vsro
+  res_vus = vec_vsro(vus, vuc);                 // CHECK: @llvm.ppc.altivec.vsro
+  res_vi  = vec_vsro(vi, vsc);                  // CHECK: @llvm.ppc.altivec.vsro
+  res_vi  = vec_vsro(vi, vuc);                  // CHECK: @llvm.ppc.altivec.vsro
+  res_vui = vec_vsro(vui, vsc);                 // CHECK: @llvm.ppc.altivec.vsro
+  res_vui = vec_vsro(vui, vuc);                 // CHECK: @llvm.ppc.altivec.vsro
+  res_vf  = vec_vsro(vf, vsc);                  // CHECK: @llvm.ppc.altivec.vsro
+  res_vf  = vec_vsro(vf, vuc);                  // CHECK: @llvm.ppc.altivec.vsro
+
+  /* vec_st */
+  vec_st(vsc, 0, &vsc);                        // CHECK: @llvm.ppc.altivec.stvx
+  vec_st(vsc, 0, &param_sc);                   // CHECK: @llvm.ppc.altivec.stvx
+  vec_st(vuc, 0, &vuc);                        // CHECK: @llvm.ppc.altivec.stvx
+  vec_st(vuc, 0, &param_uc);                   // CHECK: @llvm.ppc.altivec.stvx
+  vec_st(vs, 0, &vs);                          // CHECK: @llvm.ppc.altivec.stvx
+  vec_st(vs, 0, &param_s);                     // CHECK: @llvm.ppc.altivec.stvx
+  vec_st(vus, 0, &vus);                        // CHECK: @llvm.ppc.altivec.stvx
+  vec_st(vus, 0, &param_us);                   // CHECK: @llvm.ppc.altivec.stvx
+  vec_st(vi, 0, &vi);                          // CHECK: @llvm.ppc.altivec.stvx
+  vec_st(vi, 0, &param_i);                     // CHECK: @llvm.ppc.altivec.stvx
+  vec_st(vui, 0, &vui);                        // CHECK: @llvm.ppc.altivec.stvx
+  vec_st(vui, 0, &param_ui);                   // CHECK: @llvm.ppc.altivec.stvx
+  vec_st(vf, 0, &vf);                          // CHECK: @llvm.ppc.altivec.stvx
+  vec_st(vf, 0, &param_f);                     // CHECK: @llvm.ppc.altivec.stvx
+  vec_stvx(vsc, 0, &vsc);                      // CHECK: @llvm.ppc.altivec.stvx
+  vec_stvx(vsc, 0, &param_sc);                 // CHECK: @llvm.ppc.altivec.stvx
+  vec_stvx(vuc, 0, &vuc);                      // CHECK: @llvm.ppc.altivec.stvx
+  vec_stvx(vuc, 0, &param_uc);                 // CHECK: @llvm.ppc.altivec.stvx
+  vec_stvx(vs, 0, &vs);                        // CHECK: @llvm.ppc.altivec.stvx
+  vec_stvx(vs, 0, &param_s);                   // CHECK: @llvm.ppc.altivec.stvx
+  vec_stvx(vus, 0, &vus);                      // CHECK: @llvm.ppc.altivec.stvx
+  vec_stvx(vus, 0, &param_us);                 // CHECK: @llvm.ppc.altivec.stvx
+  vec_stvx(vi, 0, &vi);                        // CHECK: @llvm.ppc.altivec.stvx
+  vec_stvx(vi, 0, &param_i);                   // CHECK: @llvm.ppc.altivec.stvx
+  vec_stvx(vui, 0, &vui);                      // CHECK: @llvm.ppc.altivec.stvx
+  vec_stvx(vui, 0, &param_ui);                 // CHECK: @llvm.ppc.altivec.stvx
+  vec_stvx(vf, 0, &vf);                        // CHECK: @llvm.ppc.altivec.stvx
+  vec_stvx(vf, 0, &param_f);                   // CHECK: @llvm.ppc.altivec.stvx
+
+  /* vec_ste */
+  vec_ste(vsc, 0, &param_sc);                  // CHECK: @llvm.ppc.altivec.stvebx
+  vec_ste(vuc, 0, &param_uc);                  // CHECK: @llvm.ppc.altivec.stvebx
+  vec_ste(vs, 0, &param_s);                    // CHECK: @llvm.ppc.altivec.stvehx
+  vec_ste(vus, 0, &param_us);                  // CHECK: @llvm.ppc.altivec.stvehx
+  vec_ste(vi, 0, &param_i);                    // CHECK: @llvm.ppc.altivec.stvewx
+  vec_ste(vui, 0, &param_ui);                  // CHECK: @llvm.ppc.altivec.stvewx
+  vec_ste(vf, 0, &param_f);                    // CHECK: @llvm.ppc.altivec.stvewx
+  vec_stvebx(vsc, 0, &param_sc);               // CHECK: @llvm.ppc.altivec.stvebx
+  vec_stvebx(vuc, 0, &param_uc);               // CHECK: @llvm.ppc.altivec.stvebx
+  vec_stvehx(vs, 0, &param_s);                 // CHECK: @llvm.ppc.altivec.stvehx
+  vec_stvehx(vus, 0, &param_us);               // CHECK: @llvm.ppc.altivec.stvehx
+  vec_stvewx(vi, 0, &param_i);                 // CHECK: @llvm.ppc.altivec.stvewx
+  vec_stvewx(vui, 0, &param_ui);               // CHECK: @llvm.ppc.altivec.stvewx
+  vec_stvewx(vf, 0, &param_f);                 // CHECK: @llvm.ppc.altivec.stvewx
+
+  /* vec_stl */
+  vec_stl(vsc, 0, &vsc);                        // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stl(vsc, 0, &param_sc);                   // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stl(vuc, 0, &vuc);                        // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stl(vuc, 0, &param_uc);                   // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stl(vs, 0, &vs);                          // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stl(vs, 0, &param_s);                     // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stl(vus, 0, &vus);                        // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stl(vus, 0, &param_us);                   // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stl(vi, 0, &vi);                          // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stl(vi, 0, &param_i);                     // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stl(vui, 0, &vui);                        // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stl(vui, 0, &param_ui);                   // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stl(vf, 0, &vf);                          // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stl(vf, 0, &param_f);                     // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stvxl(vsc, 0, &vsc);                      // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stvxl(vsc, 0, &param_sc);                 // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stvxl(vuc, 0, &vuc);                      // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stvxl(vuc, 0, &param_uc);                 // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stvxl(vs, 0, &vs);                        // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stvxl(vs, 0, &param_s);                   // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stvxl(vus, 0, &vus);                      // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stvxl(vus, 0, &param_us);                 // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stvxl(vi, 0, &vi);                        // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stvxl(vi, 0, &param_i);                   // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stvxl(vui, 0, &vui);                      // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stvxl(vui, 0, &param_ui);                 // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stvxl(vf, 0, &vf);                        // CHECK: @llvm.ppc.altivec.stvxl
+  vec_stvxl(vf, 0, &param_f);                   // CHECK: @llvm.ppc.altivec.stvxl
+
+  /* vec_sub */
+  res_vsc = vec_sub(vsc, vsc);                  // CHECK: sub nsw <16 x i8>
+  res_vuc = vec_sub(vuc, vuc);                  // CHECK: sub <16 x i8>
+  res_vs  = vec_sub(vs, vs);                    // CHECK: sub nsw <8 x i16>
+  res_vus = vec_sub(vus, vus);                  // CHECK: sub <8 x i16>
+  res_vi  = vec_sub(vi, vi);                    // CHECK: sub nsw <4 x i32>
+  res_vui = vec_sub(vui, vui);                  // CHECK: sub <4 x i32>
+  res_vf  = vec_sub(vf, vf);                    // CHECK: fsub <4 x float>
+  res_vsc = vec_vsububm(vsc, vsc);              // CHECK: sub nsw <16 x i8>
+  res_vuc = vec_vsububm(vuc, vuc);              // CHECK: sub <16 x i8>
+  res_vs  = vec_vsubuhm(vs, vs);                // CHECK: sub nsw <8 x i16>
+  res_vus = vec_vsubuhm(vus, vus);              // CHECK: sub <8 x i16>
+  res_vi  = vec_vsubuwm(vi, vi);                // CHECK: sub nsw <4 x i32>
+  res_vui = vec_vsubuwm(vui, vui);              // CHECK: sub <4 x i32>
+  res_vf  = vec_vsubfp(vf, vf);                 // CHECK: fsub <4 x float>
+
+  /* vec_subc */
+  res_vui = vec_subc(vui, vui);                 // CHECK: @llvm.ppc.altivec.vsubcuw
+  res_vui = vec_vsubcuw(vui, vui);              // CHECK: @llvm.ppc.altivec.vsubcuw
+
+  /* vec_subs */
+  res_vsc = vec_subs(vsc, vsc);                 // CHECK: @llvm.ppc.altivec.vsubsbs
+  res_vuc = vec_subs(vuc, vuc);                 // CHECK: @llvm.ppc.altivec.vsububs
+  res_vs  = vec_subs(vs, vs);                   // CHECK: @llvm.ppc.altivec.vsubshs
+  res_vus = vec_subs(vus, vus);                 // CHECK: @llvm.ppc.altivec.vsubuhs
+  res_vi  = vec_subs(vi, vi);                   // CHECK: @llvm.ppc.altivec.vsubsws
+  res_vui = vec_subs(vui, vui);                 // CHECK: @llvm.ppc.altivec.vsubuws
+  res_vsc = vec_vsubsbs(vsc, vsc);              // CHECK: @llvm.ppc.altivec.vsubsbs
+  res_vuc = vec_vsububs(vuc, vuc);              // CHECK: @llvm.ppc.altivec.vsububs
+  res_vs  = vec_vsubshs(vs, vs);                // CHECK: @llvm.ppc.altivec.vsubshs
+  res_vus = vec_vsubuhs(vus, vus);              // CHECK: @llvm.ppc.altivec.vsubuhs
+  res_vi  = vec_vsubsws(vi, vi);                // CHECK: @llvm.ppc.altivec.vsubsws
+  res_vui = vec_vsubuws(vui, vui);              // CHECK: @llvm.ppc.altivec.vsubuws
+
+  /* vec_sum4s */
+  res_vi  = vec_sum4s(vsc, vi);                 // CHECK: @llvm.ppc.altivec.vsum4sbs
+  res_vui = vec_sum4s(vuc, vui);                // CHECK: @llvm.ppc.altivec.vsum4ubs
+  res_vi  = vec_sum4s(vs, vi);                  // CHECK: @llvm.ppc.altivec.vsum4shs
+  res_vi  = vec_vsum4sbs(vsc, vi);              // CHECK: @llvm.ppc.altivec.vsum4sbs
+  res_vui = vec_vsum4ubs(vuc, vui);             // CHECK: @llvm.ppc.altivec.vsum4ubs
+  res_vi  = vec_vsum4shs(vs, vi);               // CHECK: @llvm.ppc.altivec.vsum4shs
+
+  /* vec_sum2s */
+  res_vi = vec_sum2s(vi, vi);                   // CHECK: @llvm.ppc.altivec.vsum2sws
+  res_vi = vec_vsum2sws(vi, vi);                // CHECK: @llvm.ppc.altivec.vsum2sws
+
+  /* vec_sums */
+  res_vi = vec_sums(vi, vi);                    // CHECK: @llvm.ppc.altivec.vsumsws
+  res_vi = vec_vsumsws(vi, vi);                 // CHECK: @llvm.ppc.altivec.vsumsws
+
+  /* vec_trunc */
+  res_vf = vec_trunc(vf);                       // CHECK: @llvm.ppc.altivec.vrfiz
+  res_vf = vec_vrfiz(vf);                       // CHECK: @llvm.ppc.altivec.vrfiz
+
+  /* vec_unpackh */
+  res_vs = vec_unpackh(vsc);                    // CHECK: @llvm.ppc.altivec.vupkhsb
+  res_vi = vec_unpackh(vs);                     // CHECK: @llvm.ppc.altivec.vupkhsh
+  res_vs = vec_vupkhsb(vsc);                    // CHECK: @llvm.ppc.altivec.vupkhsb
+  res_vi = vec_vupkhsh(vs);                     // CHECK: @llvm.ppc.altivec.vupkhsh
+
+  /* vec_unpackl */
+  res_vs = vec_unpackl(vsc);                    // CHECK: @llvm.ppc.altivec.vupklsb
+  res_vi = vec_vupklsh(vs);                     // CHECK: @llvm.ppc.altivec.vupklsh
+  res_vs = vec_vupklsb(vsc);                    // CHECK: @llvm.ppc.altivec.vupklsb
+  res_vi = vec_vupklsh(vs);                     // CHECK: @llvm.ppc.altivec.vupklsh
+
+  /* vec_xor */
+  res_vsc = vec_xor(vsc, vsc);                  // CHECK: xor <16 x i8>
+  res_vuc = vec_xor(vuc, vuc);                  // CHECK: xor <16 x i8>
+  res_vs  = vec_xor(vs, vs);                    // CHECK: xor <8 x i16>
+  res_vus = vec_xor(vus, vus);                  // CHECK: xor <8 x i16>
+  res_vi  = vec_xor(vi, vi);                    // CHECK: xor <4 x i32>
+  res_vui = vec_xor(vui, vui);                  // CHECK: xor <4 x i32>
+  res_vf  = vec_xor(vf, vf);                    // CHECK: xor <4 x i32>
+  res_vsc = vec_vxor(vsc, vsc);                 // CHECK: xor <16 x i8>
+  res_vuc = vec_vxor(vuc, vuc);                 // CHECK: xor <16 x i8>
+  res_vs  = vec_vxor(vs, vs);                   // CHECK: xor <8 x i16>
+  res_vus = vec_vxor(vus, vus);                 // CHECK: xor <8 x i16>
+  res_vi  = vec_vxor(vi, vi);                   // CHECK: xor <4 x i32>
+  res_vui = vec_vxor(vui, vui);                 // CHECK: xor <4 x i32>
+  res_vf  = vec_vxor(vf, vf);                   // CHECK: xor <4 x i32>
+
   /* ------------------------------ predicates -------------------------------------- */
 
-  res_i = __builtin_vec_vcmpeq_p(__CR6_EQ, vsc, vui); // CHECK: @llvm.ppc.altivec.vcmpeqfp.p
-  res_i = __builtin_vec_vcmpge_p(__CR6_EQ, vs, vi);   // CHECK: @llvm.ppc.altivec.vcmpgefp.p
-  res_i = __builtin_vec_vcmpgt_p(__CR6_EQ, vuc, vf);  // CHECK: @llvm.ppc.altivec.vcmpgtfp.p
-
   /*  vec_all_eq */
   res_i = vec_all_eq(vsc, vsc);                 // CHECK: @llvm.ppc.altivec.vcmpequb.p
   res_i = vec_all_eq(vuc, vuc);                 // CHECK: @llvm.ppc.altivec.vcmpequb.p
@@ -203,7 +1104,7 @@
   res_i = vec_all_ge(vus, vus);                 // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
   res_i = vec_all_ge(vi, vi);                   // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
   res_i = vec_all_ge(vui, vui);                 // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
-  res_i = vec_all_ge(vf, vf);                   // CHECK: @llvm.ppc.altivec.vcmpgtfp.p
+  res_i = vec_all_ge(vf, vf);                   // CHECK: @llvm.ppc.altivec.vcmpgefp.p
 
   /* vec_all_gt */
   res_i = vec_all_gt(vsc, vsc);                 // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
@@ -224,7 +1125,7 @@
   res_i = vec_all_le(vus, vus);                 // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
   res_i = vec_all_le(vi, vi);                   // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
   res_i = vec_all_le(vui, vui);                 // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
-  res_i = vec_all_le(vf, vf);                   // CHECK: @llvm.ppc.altivec.vcmpgtfp.p
+  res_i = vec_all_le(vf, vf);                   // CHECK: @llvm.ppc.altivec.vcmpgefp.p
 
   /* vec_all_nan */
   res_i = vec_all_nan(vf);                      // CHECK: @llvm.ppc.altivec.vcmpeqfp.p
@@ -269,7 +1170,7 @@
   res_i = vec_any_ge(vus, vus);                 // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
   res_i = vec_any_ge(vi, vi);                   // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
   res_i = vec_any_ge(vui, vui);                 // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
-  res_i = vec_any_ge(vf, vf);                   // CHECK: @llvm.ppc.altivec.vcmpgtfp.p
+  res_i = vec_any_ge(vf, vf);                   // CHECK: @llvm.ppc.altivec.vcmpgefp.p
 
   /* vec_any_gt */
   res_i = vec_any_gt(vsc, vsc);                 // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
@@ -287,7 +1188,7 @@
   res_i = vec_any_le(vus, vus);                 // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
   res_i = vec_any_le(vi, vi);                   // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
   res_i = vec_any_le(vui, vui);                 // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
-  res_i = vec_any_le(vf, vf);                   // CHECK: @llvm.ppc.altivec.vcmpgtfp.p
+  res_i = vec_any_le(vf, vf);                   // CHECK: @llvm.ppc.altivec.vcmpgefp.p
 
   /* vec_any_lt */
   res_i = vec_any_lt(vsc, vsc);                 // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
