[clang] 39e4676 - [PowerPC] Provide doubleword vector predicate form comparisons on Power7
Nemanja Ivanovic via cfe-commits
cfe-commits at lists.llvm.org
Thu May 13 02:57:25 PDT 2021
Author: Nemanja Ivanovic
Date: 2021-05-13T04:56:56-05:00
New Revision: 39e4676ca798d9aba58823515ac9d48eb64863be
URL: https://github.com/llvm/llvm-project/commit/39e4676ca798d9aba58823515ac9d48eb64863be
DIFF: https://github.com/llvm/llvm-project/commit/39e4676ca798d9aba58823515ac9d48eb64863be.diff
LOG: [PowerPC] Provide doubleword vector predicate form comparisons on Power7
There are two reasons this shouldn't be restricted to Power8 and up:
1. For XL compatibility
2. Because clang will expand comparison operators to these intrinsics*
*Without this patch, the following causes a selection error:
int test(vector signed long a, vector signed long b) {
return a < b;
}
This patch provides the handling for the intrinsics in the back
end and removes the Power8 guards from the predicate functions
(vec_{all|any}_{eq|ne|gt|ge|lt|le}).
Added:
llvm/test/CodeGen/PowerPC/vec_cmpd_p7.ll
Modified:
clang/lib/Headers/altivec.h
clang/test/CodeGen/builtins-ppc-p8vector.c
clang/test/CodeGen/builtins-ppc-vsx.c
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/PowerPC/PPCInstrVSX.td
Removed:
################################################################################
diff --git a/clang/lib/Headers/altivec.h b/clang/lib/Headers/altivec.h
index e28d234880fbb..25c1b1de998df 100644
--- a/clang/lib/Headers/altivec.h
+++ b/clang/lib/Headers/altivec.h
@@ -14790,7 +14790,7 @@ static __inline__ int __ATTRS_o_ai vec_all_eq(vector bool int __a,
(vector int)__b);
}
-#ifdef __POWER8_VECTOR__
+#ifdef __VSX__
static __inline__ int __ATTRS_o_ai vec_all_eq(vector signed long long __a,
vector signed long long __b) {
return __builtin_altivec_vcmpequd_p(__CR6_LT, __a, __b);
@@ -14974,7 +14974,7 @@ static __inline__ int __ATTRS_o_ai vec_all_ge(vector bool int __a,
(vector unsigned int)__a);
}
-#ifdef __POWER8_VECTOR__
+#ifdef __VSX__
static __inline__ int __ATTRS_o_ai vec_all_ge(vector signed long long __a,
vector signed long long __b) {
return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __b, __a);
@@ -15157,7 +15157,7 @@ static __inline__ int __ATTRS_o_ai vec_all_gt(vector bool int __a,
(vector unsigned int)__b);
}
-#ifdef __POWER8_VECTOR__
+#ifdef __VSX__
static __inline__ int __ATTRS_o_ai vec_all_gt(vector signed long long __a,
vector signed long long __b) {
return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __a, __b);
@@ -15347,7 +15347,7 @@ static __inline__ int __ATTRS_o_ai vec_all_le(vector bool int __a,
(vector unsigned int)__b);
}
-#ifdef __POWER8_VECTOR__
+#ifdef __VSX__
static __inline__ int __ATTRS_o_ai vec_all_le(vector signed long long __a,
vector signed long long __b) {
return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __a, __b);
@@ -15531,7 +15531,7 @@ static __inline__ int __ATTRS_o_ai vec_all_lt(vector bool int __a,
(vector unsigned int)__a);
}
-#ifdef __POWER8_VECTOR__
+#ifdef __VSX__
static __inline__ int __ATTRS_o_ai vec_all_lt(vector signed long long __a,
vector signed long long __b) {
return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __b, __a);
@@ -15746,7 +15746,7 @@ static __inline__ int __ATTRS_o_ai vec_all_ne(vector bool int __a,
(vector int)__b);
}
-#ifdef __POWER8_VECTOR__
+#ifdef __VSX__
static __inline__ int __ATTRS_o_ai vec_all_ne(vector signed long long __a,
vector signed long long __b) {
return __builtin_altivec_vcmpequd_p(__CR6_EQ, __a, __b);
@@ -16035,7 +16035,7 @@ static __inline__ int __ATTRS_o_ai vec_any_eq(vector bool int __a,
(vector int)__b);
}
-#ifdef __POWER8_VECTOR__
+#ifdef __VSX__
static __inline__ int __ATTRS_o_ai vec_any_eq(vector signed long long __a,
vector signed long long __b) {
return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, __a, __b);
@@ -16225,7 +16225,7 @@ static __inline__ int __ATTRS_o_ai vec_any_ge(vector bool int __a,
(vector unsigned int)__a);
}
-#ifdef __POWER8_VECTOR__
+#ifdef __VSX__
static __inline__ int __ATTRS_o_ai vec_any_ge(vector signed long long __a,
vector signed long long __b) {
return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __b, __a);
@@ -16416,7 +16416,7 @@ static __inline__ int __ATTRS_o_ai vec_any_gt(vector bool int __a,
(vector unsigned int)__b);
}
-#ifdef __POWER8_VECTOR__
+#ifdef __VSX__
static __inline__ int __ATTRS_o_ai vec_any_gt(vector signed long long __a,
vector signed long long __b) {
return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __a, __b);
@@ -16607,7 +16607,7 @@ static __inline__ int __ATTRS_o_ai vec_any_le(vector bool int __a,
(vector unsigned int)__b);
}
-#ifdef __POWER8_VECTOR__
+#ifdef __VSX__
static __inline__ int __ATTRS_o_ai vec_any_le(vector signed long long __a,
vector signed long long __b) {
return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __a, __b);
@@ -16798,7 +16798,7 @@ static __inline__ int __ATTRS_o_ai vec_any_lt(vector bool int __a,
(vector unsigned int)__a);
}
-#ifdef __POWER8_VECTOR__
+#ifdef __VSX__
static __inline__ int __ATTRS_o_ai vec_any_lt(vector signed long long __a,
vector signed long long __b) {
return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __b, __a);
@@ -17014,7 +17014,7 @@ static __inline__ int __ATTRS_o_ai vec_any_ne(vector bool int __a,
(vector int)__b);
}
-#ifdef __POWER8_VECTOR__
+#ifdef __VSX__
static __inline__ int __ATTRS_o_ai vec_any_ne(vector signed long long __a,
vector signed long long __b) {
return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, __a, __b);
diff --git a/clang/test/CodeGen/builtins-ppc-p8vector.c b/clang/test/CodeGen/builtins-ppc-p8vector.c
index 03b1e8757058d..68a2c95e870eb 100644
--- a/clang/test/CodeGen/builtins-ppc-p8vector.c
+++ b/clang/test/CodeGen/builtins-ppc-p8vector.c
@@ -432,42 +432,6 @@ void test1() {
// CHECK-LE: call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %{{.+}}, i1 false)
/* ----------------------- predicates --------------------------- */
- /* vec_all_eq */
- 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(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
-
- res_i = vec_all_eq(vull, vull);
-// 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(vull, vbll);
-// 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(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
-
- res_i = vec_all_eq(vbll, vull);
-// 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(vbll, vbll);
-// 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(vda, vda);
// CHECK: @llvm.ppc.vsx.xvcmpeqdp.p
// CHECK-LE: @llvm.ppc.vsx.xvcmpeqdp.p
@@ -476,42 +440,6 @@ void test1() {
// CHECK: @llvm.ppc.vsx.xvcmpeqsp.p
// CHECK-LE: @llvm.ppc.vsx.xvcmpeqsp.p
- /* vec_all_ne */
- 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(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
-
- res_i = vec_all_ne(vull, vull);
-// 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(vull, vbll);
-// 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(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
-
- res_i = vec_all_ne(vbll, vull);
-// 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(vbll, vbll);
-// CHECK: @llvm.ppc.altivec.vcmpequd.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
-// CHECK-PPC: error: call to 'vec_all_ne' is ambiguous
-
dummy();
// CHECK: @dummy
@@ -537,42 +465,6 @@ void test1() {
// CHECK: @llvm.ppc.vsx.xvcmpgtdp.p
// CHECK-LE: @llvm.ppc.vsx.xvcmpgtdp.p
- /* vec_any_eq */
- 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(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
-
- res_i = vec_any_eq(vull, vull);
-// 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(vull, vbll);
-// 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(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
-
- res_i = vec_any_eq(vbll, vull);
-// 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(vbll, vbll);
-// 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(vda, vda);
// CHECK: @llvm.ppc.vsx.xvcmpeqdp.p
// CHECK-LE: @llvm.ppc.vsx.xvcmpeqdp.p
@@ -581,42 +473,6 @@ void test1() {
// CHECK: @llvm.ppc.vsx.xvcmpeqsp.p
// CHECK-LE: @llvm.ppc.vsx.xvcmpeqsp.p
- /* vec_any_ne */
- 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(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
-
- res_i = vec_any_ne(vull, vull);
-// 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(vull, vbll);
-// 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(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
-
- res_i = vec_any_ne(vbll, vull);
-// 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(vbll, vbll);
-// 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(vda, vda);
// CHECK: @llvm.ppc.vsx.xvcmpeqdp.p
// CHECK-LE: @llvm.ppc.vsx.xvcmpeqdp.p
@@ -625,42 +481,6 @@ void test1() {
// CHECK: @llvm.ppc.vsx.xvcmpeqsp.p
// CHECK-LE: @llvm.ppc.vsx.xvcmpeqsp.p
- /* vec_all_ge */
- 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(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
-
- res_i = vec_all_ge(vull, vull);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_all_ge' is ambiguous
-
- res_i = vec_all_ge(vull, vbll);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_all_ge' is ambiguous
-
- 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
-
- res_i = vec_all_ge(vbll, vull);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_all_ge' is ambiguous
-
- res_i = vec_all_ge(vbll, vbll);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_all_ge' is ambiguous
-
res_i = vec_all_ge(vda, vda);
// CHECK: @llvm.ppc.vsx.xvcmpgedp.p
// CHECK-LE: @llvm.ppc.vsx.xvcmpgedp.p
@@ -669,42 +489,6 @@ void test1() {
// CHECK: @llvm.ppc.vsx.xvcmpgesp.p
// CHECK-LE: @llvm.ppc.vsx.xvcmpgesp.p
- /* vec_all_gt */
- 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(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
-
- res_i = vec_all_gt(vull, vull);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_all_gt' is ambiguous
-
- res_i = vec_all_gt(vull, vbll);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_all_gt' is ambiguous
-
- 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
-
- res_i = vec_all_gt(vbll, vull);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_all_gt' is ambiguous
-
- res_i = vec_all_gt(vbll, vbll);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_all_gt' is ambiguous
-
res_i = vec_all_gt(vda, vda);
// CHECK: @llvm.ppc.vsx.xvcmpgtdp.p
// CHECK-LE: @llvm.ppc.vsx.xvcmpgtdp.p
@@ -713,42 +497,6 @@ void test1() {
// CHECK: @llvm.ppc.vsx.xvcmpgtsp.p
// CHECK-LE: @llvm.ppc.vsx.xvcmpgtsp.p
- /* vec_all_le */
- 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(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
-
- res_i = vec_all_le(vull, vull);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_all_le' is ambiguous
-
- res_i = vec_all_le(vull, vbll);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_all_le' is ambiguous
-
- 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
-
- res_i = vec_all_le(vbll, vull);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_all_le' is ambiguous
-
- res_i = vec_all_le(vbll, vbll);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_all_le' is ambiguous
-
res_i = vec_all_le(vda, vda);
// CHECK: @llvm.ppc.vsx.xvcmpgedp.p
// CHECK-LE: @llvm.ppc.vsx.xvcmpgedp.p
@@ -757,42 +505,6 @@ void test1() {
// CHECK: @llvm.ppc.vsx.xvcmpgesp.p
// CHECK-LE: @llvm.ppc.vsx.xvcmpgesp.p
- /* vec_all_lt */
- 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(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
-
- res_i = vec_all_lt(vull, vull);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_all_lt' is ambiguous
-
- res_i = vec_all_lt(vull, vbll);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_all_lt' is ambiguous
-
- 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
-
- res_i = vec_all_lt(vbll, vull);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_all_lt' is ambiguous
-
- res_i = vec_all_lt(vbll, vbll);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_all_lt' is ambiguous
-
res_i = vec_all_lt(vda, vda);
// CHECK: @llvm.ppc.vsx.xvcmpgtdp.p
// CHECK-LE: @llvm.ppc.vsx.xvcmpgtdp.p
@@ -809,42 +521,6 @@ void test1() {
// CHECK: @llvm.ppc.vsx.xvcmpeqsp.p
// CHECK-LE: @llvm.ppc.vsx.xvcmpeqsp.p
- /* vec_any_ge */
- 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(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
-
- res_i = vec_any_ge(vull, vull);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_any_ge' is ambiguous
-
- res_i = vec_any_ge(vull, vbll);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_any_ge' is ambiguous
-
- 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
-
- res_i = vec_any_ge(vbll, vull);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_any_ge' is ambiguous
-
- res_i = vec_any_ge(vbll, vbll);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_any_ge' is ambiguous
-
res_i = vec_any_ge(vda, vda);
// CHECK: @llvm.ppc.vsx.xvcmpgedp.p
// CHECK-LE: @llvm.ppc.vsx.xvcmpgedp.p
@@ -853,82 +529,10 @@ void test1() {
// CHECK: @llvm.ppc.vsx.xvcmpgesp.p
// CHECK-LE: @llvm.ppc.vsx.xvcmpgesp.p
- /* vec_any_gt */
- 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(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
-
- res_i = vec_any_gt(vull, vull);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_any_gt' is ambiguous
-
- res_i = vec_any_gt(vull, vbll);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_any_gt' is ambiguous
-
- 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
-
- res_i = vec_any_gt(vbll, vull);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_any_gt' is ambiguous
-
- res_i = vec_any_gt(vbll, vbll);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_any_gt' is ambiguous
-
res_i = vec_any_gt(vda, vda);
// CHECK: @llvm.ppc.vsx.xvcmpgtdp.p
// CHECK-LE: @llvm.ppc.vsx.xvcmpgtdp.p
- /* vec_any_le */
- 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(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
-
- res_i = vec_any_le(vull, vull);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_any_le' is ambiguous
-
- res_i = vec_any_le(vull, vbll);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_any_le' is ambiguous
-
- 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
-
- res_i = vec_any_le(vbll, vull);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_any_le' is ambiguous
-
- res_i = vec_any_le(vbll, vbll);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_any_le' is ambiguous
-
res_i = vec_any_le(vda, vda);
// CHECK: @llvm.ppc.vsx.xvcmpgedp.p
// CHECK-LE: @llvm.ppc.vsx.xvcmpgedp.p
@@ -937,42 +541,6 @@ void test1() {
// CHECK: @llvm.ppc.vsx.xvcmpgesp.p
// CHECK-LE: @llvm.ppc.vsx.xvcmpgesp.p
- /* vec_any_lt */
- 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(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
-
- res_i = vec_any_lt(vull, vull);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_any_lt' is ambiguous
-
- res_i = vec_any_lt(vull, vbll);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_any_lt' is ambiguous
-
- 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
-
- res_i = vec_any_lt(vbll, vull);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_any_lt' is ambiguous
-
- res_i = vec_any_lt(vbll, vbll);
-// CHECK: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
-// CHECK-PPC: error: call to 'vec_any_lt' is ambiguous
-
res_i = vec_any_lt(vda, vda);
// CHECK: @llvm.ppc.vsx.xvcmpgtdp.p
// CHECK-LE: @llvm.ppc.vsx.xvcmpgtdp.p
diff --git a/clang/test/CodeGen/builtins-ppc-vsx.c b/clang/test/CodeGen/builtins-ppc-vsx.c
index 4bb7a05a435a2..abd08d463e634 100644
--- a/clang/test/CodeGen/builtins-ppc-vsx.c
+++ b/clang/test/CodeGen/builtins-ppc-vsx.c
@@ -2591,4 +2591,356 @@ void test_p8overloads_backwards_compat() {
// CHECK: ashr <2 x i64>
// CHECK-LE: urem <2 x i64> {{%.*}}, <i64 64, i64 64>
// CHECK-LE: ashr <2 x i64>
+
+ /* ----------------------- predicates --------------------------- */
+ /* vec_all_eq */
+ res_i = vec_all_eq(vsll, vsll);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ res_i = vec_all_eq(vsll, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ res_i = vec_all_eq(vull, vull);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ res_i = vec_all_eq(vull, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ res_i = vec_all_eq(vbll, vsll);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ res_i = vec_all_eq(vbll, vull);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ res_i = vec_all_eq(vbll, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ /* vec_all_ne */
+ res_i = vec_all_ne(vsll, vsll);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ res_i = vec_all_ne(vsll, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ res_i = vec_all_ne(vull, vull);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ res_i = vec_all_ne(vull, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ res_i = vec_all_ne(vbll, vsll);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ res_i = vec_all_ne(vbll, vull);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ res_i = vec_all_ne(vbll, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ dummy();
+ // CHECK: @dummy
+
+ /* vec_any_eq */
+ res_i = vec_any_eq(vsll, vsll);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ res_i = vec_any_eq(vsll, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ res_i = vec_any_eq(vull, vull);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ res_i = vec_any_eq(vull, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ res_i = vec_any_eq(vbll, vsll);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ res_i = vec_any_eq(vbll, vull);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ res_i = vec_any_eq(vbll, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ /* vec_any_ne */
+ res_i = vec_any_ne(vsll, vsll);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ res_i = vec_any_ne(vsll, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ res_i = vec_any_ne(vull, vull);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ res_i = vec_any_ne(vull, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ res_i = vec_any_ne(vbll, vsll);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ res_i = vec_any_ne(vbll, vull);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ res_i = vec_any_ne(vbll, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpequd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpequd.p
+
+ /* vec_all_ge */
+ res_i = vec_all_ge(vsll, vsll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtsd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
+
+ res_i = vec_all_ge(vsll, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtsd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
+
+ res_i = vec_all_ge(vull, vull);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_all_ge(vull, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_all_ge(vbll, vsll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_all_ge(vbll, vull);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_all_ge(vbll, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ /* vec_all_gt */
+ res_i = vec_all_gt(vsll, vsll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtsd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
+
+ res_i = vec_all_gt(vsll, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtsd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
+
+ res_i = vec_all_gt(vull, vull);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_all_gt(vull, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_all_gt(vbll, vsll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_all_gt(vbll, vull);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_all_gt(vbll, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ /* vec_all_le */
+ res_i = vec_all_le(vsll, vsll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtsd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
+
+ res_i = vec_all_le(vsll, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtsd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
+
+ res_i = vec_all_le(vull, vull);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_all_le(vull, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_all_le(vbll, vsll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_all_le(vbll, vull);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_all_le(vbll, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ /* vec_all_lt */
+ res_i = vec_all_lt(vsll, vsll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtsd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
+
+ res_i = vec_all_lt(vsll, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtsd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
+
+ res_i = vec_all_lt(vull, vull);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_all_lt(vull, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_all_lt(vbll, vsll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_all_lt(vbll, vull);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_all_lt(vbll, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ /* vec_any_ge */
+ res_i = vec_any_ge(vsll, vsll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtsd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
+
+ res_i = vec_any_ge(vsll, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtsd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
+
+ res_i = vec_any_ge(vull, vull);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_any_ge(vull, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_any_ge(vbll, vsll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_any_ge(vbll, vull);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_any_ge(vbll, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ /* vec_any_gt */
+ res_i = vec_any_gt(vsll, vsll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtsd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
+
+ res_i = vec_any_gt(vsll, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtsd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
+
+ res_i = vec_any_gt(vull, vull);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_any_gt(vull, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_any_gt(vbll, vsll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_any_gt(vbll, vull);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_any_gt(vbll, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ /* vec_any_le */
+ res_i = vec_any_le(vsll, vsll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtsd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
+
+ res_i = vec_any_le(vsll, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtsd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
+
+ res_i = vec_any_le(vull, vull);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_any_le(vull, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_any_le(vbll, vsll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_any_le(vbll, vull);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_any_le(vbll, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ /* vec_any_lt */
+ res_i = vec_any_lt(vsll, vsll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtsd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
+
+ res_i = vec_any_lt(vsll, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtsd.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtsd.p
+
+ res_i = vec_any_lt(vull, vull);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_any_lt(vull, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_any_lt(vbll, vsll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_any_lt(vbll, vull);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
+
+ res_i = vec_any_lt(vbll, vbll);
+ // CHECK: @llvm.ppc.altivec.vcmpgtud.p
+ // CHECK-LE: @llvm.ppc.altivec.vcmpgtud.p
}
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index b98cf939c7310..65d915f4b2b8a 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -9981,7 +9981,7 @@ static bool getVectorCompareInfo(SDValue Intrin, int &CompareOpc,
isDot = true;
break;
case Intrinsic::ppc_altivec_vcmpequd_p:
- if (Subtarget.hasP8Altivec()) {
+ if (Subtarget.hasVSX() || Subtarget.hasP8Altivec()) {
CompareOpc = 199;
isDot = true;
} else
@@ -10041,7 +10041,7 @@ static bool getVectorCompareInfo(SDValue Intrin, int &CompareOpc,
isDot = true;
break;
case Intrinsic::ppc_altivec_vcmpgtsd_p:
- if (Subtarget.hasP8Altivec()) {
+ if (Subtarget.hasVSX() || Subtarget.hasP8Altivec()) {
CompareOpc = 967;
isDot = true;
} else
@@ -10060,7 +10060,7 @@ static bool getVectorCompareInfo(SDValue Intrin, int &CompareOpc,
isDot = true;
break;
case Intrinsic::ppc_altivec_vcmpgtud_p:
- if (Subtarget.hasP8Altivec()) {
+ if (Subtarget.hasVSX() || Subtarget.hasP8Altivec()) {
CompareOpc = 711;
isDot = true;
} else
diff --git a/llvm/lib/Target/PowerPC/PPCInstrVSX.td b/llvm/lib/Target/PowerPC/PPCInstrVSX.td
index 66a1bc4608652..dd4a98b86498c 100644
--- a/llvm/lib/Target/PowerPC/PPCInstrVSX.td
+++ b/llvm/lib/Target/PowerPC/PPCInstrVSX.td
@@ -2419,6 +2419,22 @@ def MrgWords {
dag CVCAU = (v4i32 (XVCVDPUXWS CA));
}
+def DblwdCmp {
+ dag SGTW = (v2i64 (v2i64 (VCMPGTSW v2i64:$vA, v2i64:$vB)));
+ dag UGTW = (v2i64 (v2i64 (VCMPGTUW v2i64:$vA, v2i64:$vB)));
+ dag EQW = (v2i64 (v2i64 (VCMPEQUW v2i64:$vA, v2i64:$vB)));
+ dag UGTWSHAND = (v2i64 (XXLAND (v2i64 (XXSLDWI UGTW, UGTW, 1)), EQW));
+ dag EQWSHAND = (v2i64 (XXLAND (v2i64 (XXSLDWI EQW, EQW, 1)), EQW));
+ dag SGTWOR = (v2i64 (XXLOR SGTW, UGTWSHAND));
+ dag UGTWOR = (v2i64 (XXLOR UGTW, UGTWSHAND));
+ dag MRGSGT = (v2i64 (XXPERMDI (v2i64 (XXSPLTW SGTWOR, 0)),
+ (v2i64 (XXSPLTW SGTWOR, 2)), 0));
+ dag MRGUGT = (v2i64 (XXPERMDI (v2i64 (XXSPLTW UGTWOR, 0)),
+ (v2i64 (XXSPLTW UGTWOR, 2)), 0));
+ dag MRGEQ = (v2i64 (XXPERMDI (v2i64 (XXSPLTW EQWSHAND, 0)),
+ (v2i64 (XXSPLTW EQWSHAND, 2)), 0));
+}
+
//---------------------------- Anonymous Patterns ----------------------------//
// Predicate combinations are kept in roughly chronological order in terms of
// instruction availability in the architecture. For example, VSX came in with
@@ -2816,6 +2832,16 @@ defm : ScalToVecWPermute<
defm : ScalToVecWPermute<
v2i64, DblToULongLoad.A,
(XVCVDPUXDS (LXVDSX ForceXForm:$A)), (XVCVDPUXDS (LXVDSX ForceXForm:$A))>;
+
+// Doubleword vector predicate comparisons without Power8.
+let AddedComplexity = 0 in {
+def : Pat<(v2i64 (PPCvcmp_rec v2i64:$vA, v2i64:$vB, 967)),
+ (VCMPGTUB_rec DblwdCmp.MRGSGT, (v2i64 (XXLXORz)))>;
+def : Pat<(v2i64 (PPCvcmp_rec v2i64:$vA, v2i64:$vB, 711)),
+ (VCMPGTUB_rec DblwdCmp.MRGUGT, (v2i64 (XXLXORz)))>;
+def : Pat<(v2i64 (PPCvcmp_rec v2i64:$vA, v2i64:$vB, 199)),
+ (VCMPGTUB_rec DblwdCmp.MRGEQ, (v2i64 (XXLXORz)))>;
+} // AddedComplexity = 0
} // HasVSX
// Any big endian VSX subtarget.
diff --git a/llvm/test/CodeGen/PowerPC/vec_cmpd_p7.ll b/llvm/test/CodeGen/PowerPC/vec_cmpd_p7.ll
new file mode 100644
index 0000000000000..727c2d3284065
--- /dev/null
+++ b/llvm/test/CodeGen/PowerPC/vec_cmpd_p7.ll
@@ -0,0 +1,239 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; Test the doubleword comparison expansions on Power7
+;
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr7 < %s | FileCheck %s
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr7 < %s | FileCheck %s --check-prefix=CHECK-BE
+
+define <2 x i64> @v2si64_cmp(<2 x i64> %x, <2 x i64> %y) nounwind readnone {
+; CHECK-LABEL: v2si64_cmp:
+; CHECK: # %bb.0:
+; CHECK-NEXT: vcmpequw 2, 2, 3
+; CHECK-NEXT: blr
+;
+; CHECK-BE-LABEL: v2si64_cmp:
+; CHECK-BE: # %bb.0:
+; CHECK-BE-NEXT: vcmpequw 2, 2, 3
+; CHECK-BE-NEXT: blr
+ %cmp = icmp eq <2 x i64> %x, %y
+ %result = sext <2 x i1> %cmp to <2 x i64>
+ ret <2 x i64> %result
+}
+
+; Greater than signed
+define <2 x i64> @v2si64_cmp_gt(<2 x i64> %x, <2 x i64> %y) nounwind readnone {
+; CHECK-LABEL: v2si64_cmp_gt:
+; CHECK: # %bb.0:
+; CHECK-NEXT: xxswapd 0, 35
+; CHECK-NEXT: addi 3, 1, -32
+; CHECK-NEXT: addi 4, 1, -48
+; CHECK-NEXT: xxswapd 1, 34
+; CHECK-NEXT: stxvd2x 0, 0, 3
+; CHECK-NEXT: stxvd2x 1, 0, 4
+; CHECK-NEXT: ld 3, -24(1)
+; CHECK-NEXT: ld 4, -40(1)
+; CHECK-NEXT: ld 6, -48(1)
+; CHECK-NEXT: cmpd 4, 3
+; CHECK-NEXT: li 3, 0
+; CHECK-NEXT: li 4, -1
+; CHECK-NEXT: iselgt 5, 4, 3
+; CHECK-NEXT: std 5, -8(1)
+; CHECK-NEXT: ld 5, -32(1)
+; CHECK-NEXT: cmpd 6, 5
+; CHECK-NEXT: iselgt 3, 4, 3
+; CHECK-NEXT: std 3, -16(1)
+; CHECK-NEXT: addi 3, 1, -16
+; CHECK-NEXT: lxvd2x 0, 0, 3
+; CHECK-NEXT: xxswapd 34, 0
+; CHECK-NEXT: blr
+;
+; CHECK-BE-LABEL: v2si64_cmp_gt:
+; CHECK-BE: # %bb.0:
+; CHECK-BE-NEXT: addi 3, 1, -32
+; CHECK-BE-NEXT: addi 4, 1, -48
+; CHECK-BE-NEXT: stxvd2x 35, 0, 3
+; CHECK-BE-NEXT: stxvd2x 34, 0, 4
+; CHECK-BE-NEXT: ld 3, -24(1)
+; CHECK-BE-NEXT: ld 4, -40(1)
+; CHECK-BE-NEXT: ld 6, -48(1)
+; CHECK-BE-NEXT: cmpd 4, 3
+; CHECK-BE-NEXT: li 3, 0
+; CHECK-BE-NEXT: li 4, -1
+; CHECK-BE-NEXT: iselgt 5, 4, 3
+; CHECK-BE-NEXT: std 5, -8(1)
+; CHECK-BE-NEXT: ld 5, -32(1)
+; CHECK-BE-NEXT: cmpd 6, 5
+; CHECK-BE-NEXT: iselgt 3, 4, 3
+; CHECK-BE-NEXT: std 3, -16(1)
+; CHECK-BE-NEXT: addi 3, 1, -16
+; CHECK-BE-NEXT: lxvd2x 34, 0, 3
+; CHECK-BE-NEXT: blr
+ %cmp = icmp sgt <2 x i64> %x, %y
+ %result = sext <2 x i1> %cmp to <2 x i64>
+ ret <2 x i64> %result
+}
+
+; Greater than unsigned
+define <2 x i64> @v2ui64_cmp_gt(<2 x i64> %x, <2 x i64> %y) nounwind readnone {
+; CHECK-LABEL: v2ui64_cmp_gt:
+; CHECK: # %bb.0:
+; CHECK-NEXT: xxswapd 0, 35
+; CHECK-NEXT: addi 3, 1, -32
+; CHECK-NEXT: addi 4, 1, -48
+; CHECK-NEXT: xxswapd 1, 34
+; CHECK-NEXT: stxvd2x 0, 0, 3
+; CHECK-NEXT: stxvd2x 1, 0, 4
+; CHECK-NEXT: ld 3, -24(1)
+; CHECK-NEXT: ld 4, -40(1)
+; CHECK-NEXT: ld 6, -48(1)
+; CHECK-NEXT: cmpld 4, 3
+; CHECK-NEXT: li 3, 0
+; CHECK-NEXT: li 4, -1
+; CHECK-NEXT: iselgt 5, 4, 3
+; CHECK-NEXT: std 5, -8(1)
+; CHECK-NEXT: ld 5, -32(1)
+; CHECK-NEXT: cmpld 6, 5
+; CHECK-NEXT: iselgt 3, 4, 3
+; CHECK-NEXT: std 3, -16(1)
+; CHECK-NEXT: addi 3, 1, -16
+; CHECK-NEXT: lxvd2x 0, 0, 3
+; CHECK-NEXT: xxswapd 34, 0
+; CHECK-NEXT: blr
+;
+; CHECK-BE-LABEL: v2ui64_cmp_gt:
+; CHECK-BE: # %bb.0:
+; CHECK-BE-NEXT: addi 3, 1, -32
+; CHECK-BE-NEXT: addi 4, 1, -48
+; CHECK-BE-NEXT: stxvd2x 35, 0, 3
+; CHECK-BE-NEXT: stxvd2x 34, 0, 4
+; CHECK-BE-NEXT: ld 3, -24(1)
+; CHECK-BE-NEXT: ld 4, -40(1)
+; CHECK-BE-NEXT: ld 6, -48(1)
+; CHECK-BE-NEXT: cmpld 4, 3
+; CHECK-BE-NEXT: li 3, 0
+; CHECK-BE-NEXT: li 4, -1
+; CHECK-BE-NEXT: iselgt 5, 4, 3
+; CHECK-BE-NEXT: std 5, -8(1)
+; CHECK-BE-NEXT: ld 5, -32(1)
+; CHECK-BE-NEXT: cmpld 6, 5
+; CHECK-BE-NEXT: iselgt 3, 4, 3
+; CHECK-BE-NEXT: std 3, -16(1)
+; CHECK-BE-NEXT: addi 3, 1, -16
+; CHECK-BE-NEXT: lxvd2x 34, 0, 3
+; CHECK-BE-NEXT: blr
+ %cmp = icmp ugt <2 x i64> %x, %y
+ %result = sext <2 x i1> %cmp to <2 x i64>
+ ret <2 x i64> %result
+}
+
+; Check the intrinsics also
+declare i32 @llvm.ppc.altivec.vcmpequd.p(i32, <2 x i64>, <2 x i64>) nounwind readnone
+declare i32 @llvm.ppc.altivec.vcmpgtsd.p(i32, <2 x i64>, <2 x i64>) nounwind readnone
+declare i32 @llvm.ppc.altivec.vcmpgtud.p(i32, <2 x i64>, <2 x i64>) nounwind readnone
+
+define i32 @test_vcmpequd_p(<2 x i64> %x, <2 x i64> %y) {
+; CHECK-LABEL: test_vcmpequd_p:
+; CHECK: # %bb.0:
+; CHECK-NEXT: vcmpequw 2, 2, 3
+; CHECK-NEXT: xxlxor 35, 35, 35
+; CHECK-NEXT: xxsldwi 0, 34, 34, 1
+; CHECK-NEXT: xxland 0, 0, 34
+; CHECK-NEXT: xxspltw 1, 0, 2
+; CHECK-NEXT: xxspltw 0, 0, 0
+; CHECK-NEXT: xxmrghd 34, 0, 1
+; CHECK-NEXT: vcmpgtub. 2, 2, 3
+; CHECK-NEXT: mfocrf 3, 2
+; CHECK-NEXT: rlwinm 3, 3, 25, 31, 31
+; CHECK-NEXT: blr
+;
+; CHECK-BE-LABEL: test_vcmpequd_p:
+; CHECK-BE: # %bb.0:
+; CHECK-BE-NEXT: vcmpequw 2, 2, 3
+; CHECK-BE-NEXT: xxlxor 35, 35, 35
+; CHECK-BE-NEXT: xxsldwi 0, 34, 34, 1
+; CHECK-BE-NEXT: xxland 0, 0, 34
+; CHECK-BE-NEXT: xxspltw 1, 0, 2
+; CHECK-BE-NEXT: xxspltw 0, 0, 0
+; CHECK-BE-NEXT: xxmrghd 34, 0, 1
+; CHECK-BE-NEXT: vcmpgtub. 2, 2, 3
+; CHECK-BE-NEXT: mfocrf 3, 2
+; CHECK-BE-NEXT: rlwinm 3, 3, 25, 31, 31
+; CHECK-BE-NEXT: blr
+ %tmp = tail call i32 @llvm.ppc.altivec.vcmpequd.p(i32 2, <2 x i64> %x, <2 x i64> %y)
+ ret i32 %tmp
+}
+
+define i32 @test_vcmpgtsd_p(<2 x i64> %x, <2 x i64> %y) {
+; CHECK-LABEL: test_vcmpgtsd_p:
+; CHECK: # %bb.0:
+; CHECK-NEXT: vcmpgtuw 4, 2, 3
+; CHECK-NEXT: vcmpequw 5, 2, 3
+; CHECK-NEXT: vcmpgtsw 2, 2, 3
+; CHECK-NEXT: xxlxor 35, 35, 35
+; CHECK-NEXT: xxsldwi 0, 36, 36, 1
+; CHECK-NEXT: xxland 0, 0, 37
+; CHECK-NEXT: xxlor 0, 34, 0
+; CHECK-NEXT: xxspltw 1, 0, 2
+; CHECK-NEXT: xxspltw 0, 0, 0
+; CHECK-NEXT: xxmrghd 34, 0, 1
+; CHECK-NEXT: vcmpgtub. 2, 2, 3
+; CHECK-NEXT: mfocrf 3, 2
+; CHECK-NEXT: rlwinm 3, 3, 25, 31, 31
+; CHECK-NEXT: blr
+;
+; CHECK-BE-LABEL: test_vcmpgtsd_p:
+; CHECK-BE: # %bb.0:
+; CHECK-BE-NEXT: vcmpgtuw 4, 2, 3
+; CHECK-BE-NEXT: vcmpequw 5, 2, 3
+; CHECK-BE-NEXT: vcmpgtsw 2, 2, 3
+; CHECK-BE-NEXT: xxlxor 35, 35, 35
+; CHECK-BE-NEXT: xxsldwi 0, 36, 36, 1
+; CHECK-BE-NEXT: xxland 0, 0, 37
+; CHECK-BE-NEXT: xxlor 0, 34, 0
+; CHECK-BE-NEXT: xxspltw 1, 0, 2
+; CHECK-BE-NEXT: xxspltw 0, 0, 0
+; CHECK-BE-NEXT: xxmrghd 34, 0, 1
+; CHECK-BE-NEXT: vcmpgtub. 2, 2, 3
+; CHECK-BE-NEXT: mfocrf 3, 2
+; CHECK-BE-NEXT: rlwinm 3, 3, 25, 31, 31
+; CHECK-BE-NEXT: blr
+ %tmp = tail call i32 @llvm.ppc.altivec.vcmpgtsd.p(i32 2, <2 x i64> %x, <2 x i64> %y)
+ ret i32 %tmp
+}
+
+define i32 @test_vcmpgtud_p(<2 x i64> %x, <2 x i64> %y) {
+; CHECK-LABEL: test_vcmpgtud_p:
+; CHECK: # %bb.0:
+; CHECK-NEXT: vcmpgtuw 4, 2, 3
+; CHECK-NEXT: vcmpequw 2, 2, 3
+; CHECK-NEXT: xxlxor 35, 35, 35
+; CHECK-NEXT: xxsldwi 0, 36, 36, 1
+; CHECK-NEXT: xxland 0, 0, 34
+; CHECK-NEXT: xxlor 0, 36, 0
+; CHECK-NEXT: xxspltw 1, 0, 2
+; CHECK-NEXT: xxspltw 0, 0, 0
+; CHECK-NEXT: xxmrghd 34, 0, 1
+; CHECK-NEXT: vcmpgtub. 2, 2, 3
+; CHECK-NEXT: mfocrf 3, 2
+; CHECK-NEXT: rlwinm 3, 3, 25, 31, 31
+; CHECK-NEXT: blr
+;
+; CHECK-BE-LABEL: test_vcmpgtud_p:
+; CHECK-BE: # %bb.0:
+; CHECK-BE-NEXT: vcmpgtuw 4, 2, 3
+; CHECK-BE-NEXT: vcmpequw 2, 2, 3
+; CHECK-BE-NEXT: xxlxor 35, 35, 35
+; CHECK-BE-NEXT: xxsldwi 0, 36, 36, 1
+; CHECK-BE-NEXT: xxland 0, 0, 34
+; CHECK-BE-NEXT: xxlor 0, 36, 0
+; CHECK-BE-NEXT: xxspltw 1, 0, 2
+; CHECK-BE-NEXT: xxspltw 0, 0, 0
+; CHECK-BE-NEXT: xxmrghd 34, 0, 1
+; CHECK-BE-NEXT: vcmpgtub. 2, 2, 3
+; CHECK-BE-NEXT: mfocrf 3, 2
+; CHECK-BE-NEXT: rlwinm 3, 3, 25, 31, 31
+; CHECK-BE-NEXT: blr
+ %tmp = tail call i32 @llvm.ppc.altivec.vcmpgtud.p(i32 2, <2 x i64> %x, <2 x i64> %y)
+ ret i32 %tmp
+}
More information about the cfe-commits
mailing list