return (vector float)__res;
}
+#ifdef __VSX__
+static vector signed long long __ATTRS_o_ai
+vec_and(vector signed long long __a, vector signed long long __b)
+{
+ return __a & __b;
+}
+
+static vector signed long long __ATTRS_o_ai
+vec_and(vector bool long long __a, vector signed long long __b)
+{
+ return (vector signed long long)__a & __b;
+}
+
+static vector signed long long __ATTRS_o_ai
+vec_and(vector signed long long __a, vector bool long long __b)
+{
+ return __a & (vector signed long long)__b;
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_and(vector unsigned long long __a, vector unsigned long long __b)
+{
+ return __a & __b;
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_and(vector bool long long __a, vector unsigned long long __b)
+{
+ return (vector unsigned long long)__a & __b;
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_and(vector unsigned long long __a, vector bool long long __b)
+{
+ return __a & (vector unsigned long long)__b;
+}
+
+static vector bool long long __ATTRS_o_ai
+vec_and(vector bool long long __a, vector bool long long __b)
+{
+ return __a & __b;
+}
+#endif
+
/* vec_vand */
static vector signed char __ATTRS_o_ai
return (vector float)__res;
}
+#ifdef __VSX__
+static vector signed long long __ATTRS_o_ai
+vec_vand(vector signed long long __a, vector signed long long __b)
+{
+ return __a & __b;
+}
+
+static vector signed long long __ATTRS_o_ai
+vec_vand(vector bool long long __a, vector signed long long __b)
+{
+ return (vector signed long long)__a & __b;
+}
+
+static vector signed long long __ATTRS_o_ai
+vec_vand(vector signed long long __a, vector bool long long __b)
+{
+ return __a & (vector signed long long)__b;
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_vand(vector unsigned long long __a, vector unsigned long long __b)
+{
+ return __a & __b;
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_vand(vector bool long long __a, vector unsigned long long __b)
+{
+ return (vector unsigned long long)__a & __b;
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_vand(vector unsigned long long __a, vector bool long long __b)
+{
+ return __a & (vector unsigned long long)__b;
+}
+
+static vector bool long long __ATTRS_o_ai
+vec_vand(vector bool long long __a, vector bool long long __b)
+{
+ return __a & __b;
+}
+#endif
+
/* vec_andc */
#define __builtin_altivec_vandc vec_andc
return (vector float)__res;
}
+#ifdef __VSX__
+static vector signed long long __ATTRS_o_ai
+vec_andc(vector signed long long __a, vector signed long long __b)
+{
+ return __a & ~__b;
+}
+
+static vector signed long long __ATTRS_o_ai
+vec_andc(vector bool long long __a, vector signed long long __b)
+{
+ return (vector signed long long)__a & ~__b;
+}
+
+static vector signed long long __ATTRS_o_ai
+vec_andc(vector signed long long __a, vector bool long long __b)
+{
+ return __a & ~(vector signed long long)__b;
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_andc(vector unsigned long long __a, vector unsigned long long __b)
+{
+ return __a & ~__b;
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_andc(vector bool long long __a, vector unsigned long long __b)
+{
+ return (vector unsigned long long)__a & ~__b;
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_andc(vector unsigned long long __a, vector bool long long __b)
+{
+ return __a & ~(vector unsigned long long)__b;
+}
+
+static vector bool long long __ATTRS_o_ai
+vec_andc(vector bool long long __a, vector bool long long __b)
+{
+ return __a & ~__b;
+}
+#endif
+
/* vec_vandc */
static vector signed char __ATTRS_o_ai
return (vector float)__res;
}
+#ifdef __VSX__
+static vector signed long long __ATTRS_o_ai
+vec_vandc(vector signed long long __a, vector signed long long __b)
+{
+ return __a & ~__b;
+}
+
+static vector signed long long __ATTRS_o_ai
+vec_vandc(vector bool long long __a, vector signed long long __b)
+{
+ return (vector signed long long)__a & ~__b;
+}
+
+static vector signed long long __ATTRS_o_ai
+vec_vandc(vector signed long long __a, vector bool long long __b)
+{
+ return __a & ~(vector signed long long)__b;
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_vandc(vector unsigned long long __a, vector unsigned long long __b)
+{
+ return __a & ~__b;
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_vandc(vector bool long long __a, vector unsigned long long __b)
+{
+ return (vector unsigned long long)__a & ~__b;
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_vandc(vector unsigned long long __a, vector bool long long __b)
+{
+ return __a & ~(vector unsigned long long)__b;
+}
+
+static vector bool long long __ATTRS_o_ai
+vec_vandc(vector bool long long __a, vector bool long long __b)
+{
+ return __a & ~__b;
+}
+#endif
+
/* vec_avg */
static vector signed char __ATTRS_o_ai
#ifdef __POWER8_VECTOR__
static vector signed long long __ATTRS_o_ai
-vec_max(vector signed long long __a, vector signed long long __b)
+vec_max(vector signed long long __a, vector signed long long __b)
{
return __builtin_altivec_vmaxsd(__a, __b);
}
+static vector signed long long __ATTRS_o_ai
+vec_max(vector bool long long __a, vector signed long long __b)
+{
+ return __builtin_altivec_vmaxsd((vector signed long long)__a, __b);
+}
+
+static vector signed long long __ATTRS_o_ai
+vec_max(vector signed long long __a, vector bool long long __b)
+{
+ return __builtin_altivec_vmaxsd(__a, (vector signed long long)__b);
+}
+
static vector unsigned long long __ATTRS_o_ai
vec_max(vector unsigned long long __a, vector unsigned long long __b)
{
return __builtin_altivec_vmaxud(__a, __b);
}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_max(vector bool long long __a, vector unsigned long long __b)
+{
+ return __builtin_altivec_vmaxud((vector unsigned long long)__a, __b);
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_max(vector unsigned long long __a, vector bool long long __b)
+{
+ return __builtin_altivec_vmaxud(__a, (vector unsigned long long)__b);
+}
#endif
static vector float __ATTRS_o_ai
return __builtin_altivec_vminsd(__a, __b);
}
+static vector signed long long __ATTRS_o_ai
+vec_min(vector bool long long __a, vector signed long long __b)
+{
+ return __builtin_altivec_vminsd((vector signed long long)__a, __b);
+}
+
+static vector signed long long __ATTRS_o_ai
+vec_min(vector signed long long __a, vector bool long long __b)
+{
+ return __builtin_altivec_vminsd(__a, (vector signed long long)__b);
+}
+
static vector unsigned long long __ATTRS_o_ai
vec_min(vector unsigned long long __a, vector unsigned long long __b)
{
return __builtin_altivec_vminud(__a, __b);
}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_min(vector bool long long __a, vector unsigned long long __b)
+{
+ return __builtin_altivec_vminud((vector unsigned long long)__a, __b);
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_min(vector unsigned long long __a, vector bool long long __b)
+{
+ return __builtin_altivec_vminud(__a, (vector unsigned long long)__b);
+}
#endif
static vector float __ATTRS_o_ai
return (vector float)__res;
}
+#ifdef __VSX__
+static vector signed long long __ATTRS_o_ai
+vec_nor(vector signed long long __a, vector signed long long __b)
+{
+ return ~(__a | __b);
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_nor(vector unsigned long long __a, vector unsigned long long __b)
+{
+ return ~(__a | __b);
+}
+
+static vector bool long long __ATTRS_o_ai
+vec_nor(vector bool long long __a, vector bool long long __b)
+{
+ return ~(__a | __b);
+}
+#endif
+
/* vec_or */
#define __builtin_altivec_vor vec_or
return (vector float)__res;
}
+#ifdef __VSX__
+static vector signed long long __ATTRS_o_ai
+vec_or(vector signed long long __a, vector signed long long __b)
+{
+ return __a | __b;
+}
+
+static vector signed long long __ATTRS_o_ai
+vec_or(vector bool long long __a, vector signed long long __b)
+{
+ return (vector signed long long)__a | __b;
+}
+
+static vector signed long long __ATTRS_o_ai
+vec_or(vector signed long long __a, vector bool long long __b)
+{
+ return __a | (vector signed long long)__b;
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_or(vector unsigned long long __a, vector unsigned long long __b)
+{
+ return __a | __b;
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_or(vector bool long long __a, vector unsigned long long __b)
+{
+ return (vector unsigned long long)__a | __b;
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_or(vector unsigned long long __a, vector bool long long __b)
+{
+ return __a | (vector unsigned long long)__b;
+}
+
+static vector bool long long __ATTRS_o_ai
+vec_or(vector bool long long __a, vector bool long long __b)
+{
+ return __a | __b;
+}
+#endif
+
/* vec_vor */
static vector signed char __ATTRS_o_ai
return (vector float)__res;
}
+#ifdef __VSX__
+static vector signed long long __ATTRS_o_ai
+vec_vor(vector signed long long __a, vector signed long long __b)
+{
+ return __a | __b;
+}
+
+static vector signed long long __ATTRS_o_ai
+vec_vor(vector bool long long __a, vector signed long long __b)
+{
+ return (vector signed long long)__a | __b;
+}
+
+static vector signed long long __ATTRS_o_ai
+vec_vor(vector signed long long __a, vector bool long long __b)
+{
+ return __a | (vector signed long long)__b;
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_vor(vector unsigned long long __a, vector unsigned long long __b)
+{
+ return __a | __b;
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_vor(vector bool long long __a, vector unsigned long long __b)
+{
+ return (vector unsigned long long)__a | __b;
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_vor(vector unsigned long long __a, vector bool long long __b)
+{
+ return __a | (vector unsigned long long)__b;
+}
+
+static vector bool long long __ATTRS_o_ai
+vec_vor(vector bool long long __a, vector bool long long __b)
+{
+ return __a | __b;
+}
+#endif
+
/* vec_pack */
/* The various vector pack instructions have a big-endian bias, so for
return (vector float)__res;
}
+#ifdef __VSX__
+static vector signed long long __ATTRS_o_ai
+vec_xor(vector signed long long __a, vector signed long long __b)
+{
+ return __a ^ __b;
+}
+
+static vector signed long long __ATTRS_o_ai
+vec_xor(vector bool long long __a, vector signed long long __b)
+{
+ return (vector signed long long)__a ^ __b;
+}
+
+static vector signed long long __ATTRS_o_ai
+vec_xor(vector signed long long __a, vector bool long long __b)
+{
+ return __a ^ (vector signed long long)__b;
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_xor(vector unsigned long long __a, vector unsigned long long __b)
+{
+ return __a ^ __b;
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_xor(vector bool long long __a, vector unsigned long long __b)
+{
+ return (vector unsigned long long)__a ^ __b;
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_xor(vector unsigned long long __a, vector bool long long __b)
+{
+ return __a ^ (vector unsigned long long)__b;
+}
+
+static vector bool long long __ATTRS_o_ai
+vec_xor(vector bool long long __a, vector bool long long __b)
+{
+ return __a ^ __b;
+}
+#endif
+
/* vec_vxor */
static vector signed char __ATTRS_o_ai
return (vector float)__res;
}
+#ifdef __VSX__
+static vector signed long long __ATTRS_o_ai
+vec_vxor(vector signed long long __a, vector signed long long __b)
+{
+ return __a ^ __b;
+}
+
+static vector signed long long __ATTRS_o_ai
+vec_vxor(vector bool long long __a, vector signed long long __b)
+{
+ return (vector signed long long)__a ^ __b;
+}
+
+static vector signed long long __ATTRS_o_ai
+vec_vxor(vector signed long long __a, vector bool long long __b)
+{
+ return __a ^ (vector signed long long)__b;
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_vxor(vector unsigned long long __a, vector unsigned long long __b)
+{
+ return __a ^ __b;
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_vxor(vector bool long long __a, vector unsigned long long __b)
+{
+ return (vector unsigned long long)__a ^ __b;
+}
+
+static vector unsigned long long __ATTRS_o_ai
+vec_vxor(vector unsigned long long __a, vector bool long long __b)
+{
+ return __a ^ (vector unsigned long long)__b;
+}
+
+static vector bool long long __ATTRS_o_ai
+vec_vxor(vector bool long long __a, vector bool long long __b)
+{
+ return __a ^ __b;
+}
+#endif
+
/* ------------------------ extensions for CBEA ----------------------------- */
/* vec_extract */
vector unsigned int vui = { 1, 2, 3, 4 };
vector bool int vbi = {0, -1, -1, 0};
vector bool long long vbll = { 1, 0 };
-vector long long vll = { 1, 2 };
+vector signed long long vsll = { 1, 2 };
vector unsigned long long vull = { 1, 2 };
int res_i;
vector int res_vi;
vector unsigned int res_vui;
vector bool int res_vbi;
-vector long long res_vll;
-vector unsigned long long res_vull;
vector bool long long res_vbll;
+vector signed long long res_vsll;
+vector unsigned long long res_vull;
// CHECK-LABEL: define void @test1
void test1() {
/* vec_cmpeq */
- res_vbll = vec_cmpeq(vll, vll);
+ res_vbll = vec_cmpeq(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpequd
// CHECK-LE: @llvm.ppc.altivec.vcmpequd
// CHECK-PPC: error: call to 'vec_cmpeq' is ambiguous
// CHECK-PPC: error: call to 'vec_cmpeq' is ambiguous
/* vec_cmpgt */
- res_vbll = vec_cmpgt(vll, vll);
+ res_vbll = vec_cmpgt(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd
// CHECK-PPC: error: call to 'vec_cmpgt' is ambiguous
/* ----------------------- predicates --------------------------- */
/* vec_all_eq */
- res_i = vec_all_eq(vll, vll);
+ res_i = vec_all_eq(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpequd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_all_eq' is ambiguous
- res_i = vec_all_eq(vll, vbll);
+ res_i = vec_all_eq(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vcmpequd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_all_eq' is ambiguous
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_all_eq' is ambiguous
- res_i = vec_all_eq(vbll, vll);
+ res_i = vec_all_eq(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpequd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_all_eq' is ambiguous
// CHECK-PPC: error: call to 'vec_all_eq' is ambiguous
/* vec_all_ne */
- res_i = vec_all_ne(vll, vll);
+ res_i = vec_all_ne(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpequd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_all_ne' is ambiguous
- res_i = vec_all_ne(vll, vbll);
+ res_i = vec_all_ne(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vcmpequd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_all_ne' is ambiguous
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_all_ne' is ambiguous
- res_i = vec_all_ne(vbll, vll);
+ res_i = vec_all_ne(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpequd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_all_ne' is ambiguous
// CHECK-PPC: error: call to 'vec_all_ne' is ambiguous
/* vec_any_eq */
- res_i = vec_any_eq(vll, vll);
+ res_i = vec_any_eq(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpequd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_any_eq' is ambiguous
- res_i = vec_any_eq(vll, vbll);
+ res_i = vec_any_eq(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vcmpequd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_any_eq' is ambiguous
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_any_eq' is ambiguous
- res_i = vec_any_eq(vbll, vll);
+ res_i = vec_any_eq(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpequd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_any_eq' is ambiguous
// CHECK-PPC: error: call to 'vec_any_eq' is ambiguous
/* vec_any_ne */
- res_i = vec_any_ne(vll, vll);
+ res_i = vec_any_ne(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpequd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_any_ne' is ambiguous
- res_i = vec_any_ne(vll, vbll);
+ res_i = vec_any_ne(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vcmpequd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_any_ne' is ambiguous
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_any_ne' is ambiguous
- res_i = vec_any_ne(vbll, vll);
+ res_i = vec_any_ne(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpequd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
// CHECK-PPC: error: call to 'vec_any_ne' is ambiguous
// CHECK-PPC: error: call to 'vec_any_ne' is ambiguous
/* vec_all_ge */
- res_i = vec_all_ge(vll, vll);
+ res_i = vec_all_ge(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_all_ge' is ambiguous
- res_i = vec_all_ge(vll, vbll);
+ res_i = vec_all_ge(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_all_ge' is ambiguous
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_all_ge' is ambiguous
- res_i = vec_all_ge(vbll, vll);
+ res_i = vec_all_ge(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_all_ge' is ambiguous
// CHECK-PPC: error: call to 'vec_all_ge' is ambiguous
/* vec_all_gt */
- res_i = vec_all_gt(vll, vll);
+ res_i = vec_all_gt(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_all_gt' is ambiguous
- res_i = vec_all_gt(vll, vbll);
+ res_i = vec_all_gt(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_all_gt' is ambiguous
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_all_gt' is ambiguous
- res_i = vec_all_gt(vbll, vll);
+ res_i = vec_all_gt(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_all_gt' is ambiguous
// CHECK-PPC: error: call to 'vec_all_gt' is ambiguous
/* vec_all_le */
- res_i = vec_all_le(vll, vll);
+ res_i = vec_all_le(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_all_le' is ambiguous
- res_i = vec_all_le(vll, vbll);
+ res_i = vec_all_le(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_all_le' is ambiguous
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_all_le' is ambiguous
- res_i = vec_all_le(vbll, vll);
+ res_i = vec_all_le(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_all_le' is ambiguous
// CHECK-PPC: error: call to 'vec_all_le' is ambiguous
/* vec_all_lt */
- res_i = vec_all_lt(vll, vll);
+ res_i = vec_all_lt(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_all_lt' is ambiguous
- res_i = vec_all_lt(vll, vbll);
+ res_i = vec_all_lt(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_all_lt' is ambiguous
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_all_lt' is ambiguous
- res_i = vec_all_lt(vbll, vll);
+ res_i = vec_all_lt(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_all_lt' is ambiguous
// CHECK-PPC: error: call to 'vec_all_lt' is ambiguous
/* vec_any_ge */
- res_i = vec_any_ge(vll, vll);
+ res_i = vec_any_ge(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_any_ge' is ambiguous
- res_i = vec_any_ge(vll, vbll);
+ res_i = vec_any_ge(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_any_ge' is ambiguous
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_any_ge' is ambiguous
- res_i = vec_any_ge(vbll, vll);
+ res_i = vec_any_ge(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_any_ge' is ambiguous
// CHECK-PPC: error: call to 'vec_any_ge' is ambiguous
/* vec_any_gt */
- res_i = vec_any_gt(vll, vll);
+ res_i = vec_any_gt(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_any_gt' is ambiguous
- res_i = vec_any_gt(vll, vbll);
+ res_i = vec_any_gt(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_any_gt' is ambiguous
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_any_gt' is ambiguous
- res_i = vec_any_gt(vbll, vll);
+ res_i = vec_any_gt(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_any_gt' is ambiguous
// CHECK-PPC: error: call to 'vec_any_gt' is ambiguous
/* vec_any_le */
- res_i = vec_any_le(vll, vll);
+ res_i = vec_any_le(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_any_le' is ambiguous
- res_i = vec_any_le(vll, vbll);
+ res_i = vec_any_le(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_any_le' is ambiguous
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_any_le' is ambiguous
- res_i = vec_any_le(vbll, vll);
+ res_i = vec_any_le(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_any_le' is ambiguous
// CHECK-PPC: error: call to 'vec_any_le' is ambiguous
/* vec_any_lt */
- res_i = vec_any_lt(vll, vll);
+ res_i = vec_any_lt(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_any_lt' is ambiguous
- res_i = vec_any_lt(vll, vbll);
+ res_i = vec_any_lt(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
// CHECK-PPC: error: call to 'vec_any_lt' is ambiguous
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_any_lt' is ambiguous
- res_i = vec_any_lt(vbll, vll);
+ res_i = vec_any_lt(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
// CHECK-PPC: error: call to 'vec_any_lt' is ambiguous
// CHECK-PPC: error: call to 'vec_any_lt' is ambiguous
/* vec_max */
- res_vll = vec_max(vll, vll);
+ res_vsll = vec_max(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vmaxsd
// CHECK-LE: @llvm.ppc.altivec.vmaxsd
// CHECK-PPC: error: call to 'vec_max' is ambiguous
- res_vll = vec_max(vbll, vll);
+ res_vsll = vec_max(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vmaxsd
// CHECK-LE: @llvm.ppc.altivec.vmaxsd
// CHECK-PPC: error: call to 'vec_max' is ambiguous
- res_vll = vec_max(vll, vbll);
+ res_vsll = vec_max(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vmaxsd
// CHECK-LE: @llvm.ppc.altivec.vmaxsd
// CHECK-PPC: error: call to 'vec_max' is ambiguous
// CHECK-PPC: error: call to 'vec_max' is ambiguous
/* vec_min */
- res_vll = vec_min(vll, vll);
+ res_vsll = vec_min(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vminsd
// CHECK-LE: @llvm.ppc.altivec.vminsd
// CHECK-PPC: error: call to 'vec_min' is ambiguous
- res_vll = vec_min(vbll, vll);
+ res_vsll = vec_min(vbll, vsll);
// CHECK: @llvm.ppc.altivec.vminsd
// CHECK-LE: @llvm.ppc.altivec.vminsd
// CHECK-PPC: error: call to 'vec_min' is ambiguous
- res_vll = vec_min(vll, vbll);
+ res_vsll = vec_min(vsll, vbll);
// CHECK: @llvm.ppc.altivec.vminsd
// CHECK-LE: @llvm.ppc.altivec.vminsd
// CHECK-PPC: error: call to 'vec_min' is ambiguous
// CHECK-PPC: error: call to 'vec_min' is ambiguous
/* vec_mule */
- res_vll = vec_mule(vi, vi);
+ res_vsll = vec_mule(vi, vi);
// CHECK: @llvm.ppc.altivec.vmulesw
// CHECK-LE: @llvm.ppc.altivec.vmulosw
// CHECK-PPC: error: call to 'vec_mule' is ambiguous
// CHECK-PPC: error: call to 'vec_mule' is ambiguous
/* vec_mulo */
- res_vll = vec_mulo(vi, vi);
+ res_vsll = vec_mulo(vi, vi);
// CHECK: @llvm.ppc.altivec.vmulosw
// CHECK-LE: @llvm.ppc.altivec.vmulesw
// CHECK-PPC: error: call to 'vec_mulo' is ambiguous
// CHECK-PPC: error: call to 'vec_mulo' is ambiguous
/* vec_packs */
- res_vi = vec_packs(vll, vll);
+ res_vi = vec_packs(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vpksdss
// CHECK-LE: @llvm.ppc.altivec.vpksdss
// CHECK-PPC: error: call to 'vec_packs' is ambiguous
// CHECK-PPC: error: call to 'vec_packs' is ambiguous
/* vec_packsu */
- res_vui = vec_packsu(vll, vll);
+ res_vui = vec_packsu(vsll, vsll);
// CHECK: @llvm.ppc.altivec.vpksdus
// CHECK-LE: @llvm.ppc.altivec.vpksdus
// CHECK-PPC: error: call to 'vec_packsu' is ambiguous
// CHECK-PPC: error: call to 'vec_packsu' is ambiguous
/* vec_rl */
- res_vll = vec_rl(vll, vull);
+ res_vsll = vec_rl(vsll, vull);
// CHECK: @llvm.ppc.altivec.vrld
// CHECK-LE: @llvm.ppc.altivec.vrld
// CHECK-PPC: error: call to 'vec_rl' is ambiguous
// CHECK-PPC: error: call to 'vec_rl' is ambiguous
/* vec_sl */
- res_vll = vec_sl(vll, vull);
+ res_vsll = vec_sl(vsll, vull);
// CHECK: shl <2 x i64>
// CHECK-LE: shl <2 x i64>
// CHECK-PPC: error: call to 'vec_sl' is ambiguous
// CHECK-PPC: error: call to 'vec_sl' is ambiguous
/* vec_sr */
- res_vll = vec_sr(vll, vull);
+ res_vsll = vec_sr(vsll, vull);
// CHECK: ashr <2 x i64>
// CHECK-LE: ashr <2 x i64>
// CHECK-PPC: error: call to 'vec_sr' is ambiguous
// CHECK-PPC: error: call to 'vec_sr' is ambiguous
/* vec_sra */
- res_vll = vec_sra(vll, vull);
+ res_vsll = vec_sra(vsll, vull);
// CHECK: ashr <2 x i64>
// CHECK-LE: ashr <2 x i64>
// CHECK-PPC: error: call to 'vec_sra' is ambiguous
// CHECK-PPC: error: call to 'vec_sra' is ambiguous
/* vec_unpackh */
- res_vll = vec_unpackh(vi);
+ res_vsll = vec_unpackh(vi);
// CHECK: llvm.ppc.altivec.vupkhsw
// CHECK-LE: llvm.ppc.altivec.vupklsw
// CHECK-PPC: error: call to 'vec_unpackh' is ambiguous
// CHECK-PPC: error: call to 'vec_unpackh' is ambiguous
/* vec_unpackl */
- res_vll = vec_unpackl(vi);
+ res_vsll = vec_unpackl(vi);
// CHECK: llvm.ppc.altivec.vupklsw
// CHECK-LE: llvm.ppc.altivec.vupkhsw
// CHECK-PPC: error: call to 'vec_unpackl' is ambiguous
// CHECK-PPC: error: call to 'vec_unpackl' is ambiguous
/* vec_vpksdss */
- res_vi = vec_vpksdss(vll, vll);
+ res_vi = vec_vpksdss(vsll, vsll);
// CHECK: llvm.ppc.altivec.vpksdss
// CHECK-LE: llvm.ppc.altivec.vpksdss
// CHECK-PPC: warning: implicit declaration of function 'vec_vpksdss'
/* vec_vpksdus */
- res_vui = vec_vpksdus(vll, vll);
+ res_vui = vec_vpksdus(vsll, vsll);
// CHECK: llvm.ppc.altivec.vpksdus
// CHECK-LE: llvm.ppc.altivec.vpksdus
// CHECK-PPC: warning: implicit declaration of function 'vec_vpksdus'
/* vec_vpkudum */
- res_vi = vec_vpkudum(vll, vll);
+ res_vi = vec_vpkudum(vsll, vsll);
// CHECK: vperm
// CHECK-LE: vperm
// CHECK-PPC: warning: implicit declaration of function 'vec_vpkudum'
// CHECK-PPC: warning: implicit declaration of function 'vec_vpkudus'
/* vec_vupkhsw */
- res_vll = vec_vupkhsw(vi);
+ res_vsll = vec_vupkhsw(vi);
// CHECK: llvm.ppc.altivec.vupkhsw
// CHECK-LE: llvm.ppc.altivec.vupklsw
// CHECK-PPC: warning: implicit declaration of function 'vec_vupkhsw'
// CHECK-LE: llvm.ppc.altivec.vupklsw
/* vec_vupklsw */
- res_vll = vec_vupklsw(vi);
+ res_vsll = vec_vupklsw(vi);
// CHECK: llvm.ppc.altivec.vupklsw
// CHECK-LE: llvm.ppc.altivec.vupkhsw
// CHECK-PPC: warning: implicit declaration of function 'vec_vupklsw'
// CHECK: llvm.ppc.altivec.vupklsw
// CHECK-LE: llvm.ppc.altivec.vupkhsw
+ /* vec_max */
+ res_vsll = vec_max(vsll, vsll);
+// CHECK: @llvm.ppc.altivec.vmaxsd
+// CHECK-LE: @llvm.ppc.altivec.vmaxsd
+
+ res_vsll = vec_max(vbll, vsll);
+// CHECK: @llvm.ppc.altivec.vmaxsd
+// CHECK-LE: @llvm.ppc.altivec.vmaxsd
+
+ res_vsll = vec_max(vsll, vbll);
+// CHECK: @llvm.ppc.altivec.vmaxsd
+// CHECK-LE: @llvm.ppc.altivec.vmaxsd
+
+ res_vull = vec_max(vull, vull);
+// CHECK: @llvm.ppc.altivec.vmaxud
+// CHECK-LE: @llvm.ppc.altivec.vmaxud
+
+ res_vull = vec_max(vbll, vull);
+// CHECK: @llvm.ppc.altivec.vmaxud
+// CHECK-LE: @llvm.ppc.altivec.vmaxud
+
+ /* vec_min */
+ res_vsll = vec_min(vsll, vsll);
+// CHECK: @llvm.ppc.altivec.vminsd
+// CHECK-LE: @llvm.ppc.altivec.vminsd
+
+ res_vsll = vec_min(vbll, vsll);
+// CHECK: @llvm.ppc.altivec.vminsd
+// CHECK-LE: @llvm.ppc.altivec.vminsd
+
+ res_vsll = vec_min(vsll, vbll);
+// CHECK: @llvm.ppc.altivec.vminsd
+// CHECK-LE: @llvm.ppc.altivec.vminsd
+
+ res_vull = vec_min(vull, vull);
+// CHECK: @llvm.ppc.altivec.vminud
+// CHECK-LE: @llvm.ppc.altivec.vminud
+
+ res_vull = vec_min(vbll, vull);
+// CHECK: @llvm.ppc.altivec.vminud
+// CHECK-LE: @llvm.ppc.altivec.vminud
+
}
vector double vd = { 3.5, -7.5 };
vector signed int vsi = { -1, 2, -3, 4 };
vector unsigned int vui = { 0, 1, 2, 3 };
+vector bool long long vbll = { 1, 0 };
vector signed long long vsll = { 255LL, -937LL };
vector unsigned long long vull = { 1447LL, 2894LL };
double d = 23.4;
vector double res_vd;
vector signed int res_vsi;
vector unsigned int res_vui;
+vector bool long long res_vbll;
vector signed long long res_vsll;
vector unsigned long long res_vull;
double res_d;
vec_vsx_st(vd, 0, &res_vd);
// CHECK: @llvm.ppc.vsx.stxvd2x
+
+ /* vec_and */
+ res_vsll = vec_and(vsll, vsll);
+// CHECK: and <2 x i64>
+
+ res_vsll = vec_and(vbll, vsll);
+// CHECK: and <2 x i64>
+
+ res_vsll = vec_and(vsll, vbll);
+// CHECK: and <2 x i64>
+
+ res_vull = vec_and(vull, vull);
+// CHECK: and <2 x i64>
+
+ res_vull = vec_and(vbll, vull);
+// CHECK: and <2 x i64>
+
+ res_vull = vec_and(vull, vbll);
+// CHECK: and <2 x i64>
+
+ res_vbll = vec_and(vbll, vbll);
+// CHECK: and <2 x i64>
+
+ /* vec_vand */
+ res_vsll = vec_vand(vsll, vsll);
+// CHECK: and <2 x i64>
+
+ res_vsll = vec_vand(vbll, vsll);
+// CHECK: and <2 x i64>
+
+ res_vsll = vec_vand(vsll, vbll);
+// CHECK: and <2 x i64>
+
+ res_vull = vec_vand(vull, vull);
+// CHECK: and <2 x i64>
+
+ res_vull = vec_vand(vbll, vull);
+// CHECK: and <2 x i64>
+
+ res_vull = vec_vand(vull, vbll);
+// CHECK: and <2 x i64>
+
+ res_vbll = vec_vand(vbll, vbll);
+// CHECK: and <2 x i64>
+
+ /* vec_andc */
+ res_vsll = vec_andc(vsll, vsll);
+// CHECK: xor <2 x i64>
+// CHECK: and <2 x i64>
+
+ res_vsll = vec_andc(vbll, vsll);
+// CHECK: xor <2 x i64>
+// CHECK: and <2 x i64>
+
+ res_vsll = vec_andc(vsll, vbll);
+// CHECK: xor <2 x i64>
+// CHECK: and <2 x i64>
+
+ res_vull = vec_andc(vull, vull);
+// CHECK: xor <2 x i64>
+// CHECK: and <2 x i64>
+
+ res_vull = vec_andc(vbll, vull);
+// CHECK: xor <2 x i64>
+// CHECK: and <2 x i64>
+
+ res_vull = vec_andc(vull, vbll);
+// CHECK: xor <2 x i64>
+// CHECK: and <2 x i64>
+
+ res_vbll = vec_andc(vbll, vbll);
+// CHECK: xor <2 x i64>
+// CHECK: and <2 x i64>
+
+ /* vec_nor */
+ res_vsll = vec_nor(vsll, vsll);
+// CHECK: or <2 x i64>
+// CHECK: xor <2 x i64>
+
+ res_vull = vec_nor(vull, vull);
+// CHECK: or <2 x i64>
+// CHECK: xor <2 x i64>
+
+ res_vull = vec_nor(vbll, vbll);
+// CHECK: or <2 x i64>
+// CHECK: xor <2 x i64>
+
+ /* vec_or */
+ res_vsll = vec_or(vsll, vsll);
+// CHECK: or <2 x i64>
+
+ res_vsll = vec_or(vbll, vsll);
+// CHECK: or <2 x i64>
+
+ res_vsll = vec_or(vsll, vbll);
+// CHECK: or <2 x i64>
+
+ res_vull = vec_or(vull, vull);
+// CHECK: or <2 x i64>
+
+ res_vull = vec_or(vbll, vull);
+// CHECK: or <2 x i64>
+
+ res_vull = vec_or(vull, vbll);
+// CHECK: or <2 x i64>
+
+ res_vbll = vec_or(vbll, vbll);
+// CHECK: or <2 x i64>
+
+ /* vec_vor */
+ res_vsll = vec_vor(vsll, vsll);
+// CHECK: or <2 x i64>
+
+ res_vsll = vec_vor(vbll, vsll);
+// CHECK: or <2 x i64>
+
+ res_vsll = vec_vor(vsll, vbll);
+// CHECK: or <2 x i64>
+
+ res_vull = vec_vor(vull, vull);
+// CHECK: or <2 x i64>
+
+ res_vull = vec_vor(vbll, vull);
+// CHECK: or <2 x i64>
+
+ res_vull = vec_vor(vull, vbll);
+// CHECK: or <2 x i64>
+
+ res_vbll = vec_vor(vbll, vbll);
+// CHECK: or <2 x i64>
+
+ /* vec_xor */
+ res_vsll = vec_xor(vsll, vsll);
+// CHECK: xor <2 x i64>
+
+ res_vsll = vec_xor(vbll, vsll);
+// CHECK: xor <2 x i64>
+
+ res_vsll = vec_xor(vsll, vbll);
+// CHECK: xor <2 x i64>
+
+ res_vull = vec_xor(vull, vull);
+// CHECK: xor <2 x i64>
+
+ res_vull = vec_xor(vbll, vull);
+// CHECK: xor <2 x i64>
+
+ res_vull = vec_xor(vull, vbll);
+// CHECK: xor <2 x i64>
+
+ res_vbll = vec_xor(vbll, vbll);
+// CHECK: xor <2 x i64>
+
+ /* vec_vxor */
+ res_vsll = vec_vxor(vsll, vsll);
+// CHECK: xor <2 x i64>
+
+ res_vsll = vec_vxor(vbll, vsll);
+// CHECK: xor <2 x i64>
+
+ res_vsll = vec_vxor(vsll, vbll);
+// CHECK: xor <2 x i64>
+
+ res_vull = vec_vxor(vull, vull);
+// CHECK: xor <2 x i64>
+
+ res_vull = vec_vxor(vbll, vull);
+// CHECK: xor <2 x i64>
+
+ res_vull = vec_vxor(vull, vbll);
+// CHECK: xor <2 x i64>
+
+ res_vbll = vec_vxor(vbll, vbll);
+// CHECK: xor <2 x i64>
+
}