RS6000_BTI_bool_V16QI, RS6000_BTI_V16QI, RS6000_BTI_V16QI, 0 },
{ ALTIVEC_BUILTIN_VEC_CMPEQ, ALTIVEC_BUILTIN_VCMPEQUB,
RS6000_BTI_bool_V16QI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, 0 },
+ { ALTIVEC_BUILTIN_VEC_CMPEQ, ALTIVEC_BUILTIN_VCMPEQUB,
+ RS6000_BTI_bool_V16QI, RS6000_BTI_bool_V16QI, RS6000_BTI_bool_V16QI, 0 },
+ { ALTIVEC_BUILTIN_VEC_CMPEQ, ALTIVEC_BUILTIN_VCMPEQUH,
+ RS6000_BTI_bool_V8HI, RS6000_BTI_bool_V8HI, RS6000_BTI_bool_V8HI, 0 },
{ ALTIVEC_BUILTIN_VEC_CMPEQ, ALTIVEC_BUILTIN_VCMPEQUH,
RS6000_BTI_bool_V8HI, RS6000_BTI_V8HI, RS6000_BTI_V8HI, 0 },
{ ALTIVEC_BUILTIN_VEC_CMPEQ, ALTIVEC_BUILTIN_VCMPEQUH,
RS6000_BTI_bool_V8HI, RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, 0 },
+ { ALTIVEC_BUILTIN_VEC_CMPEQ, ALTIVEC_BUILTIN_VCMPEQUW,
+ RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, 0 },
{ ALTIVEC_BUILTIN_VEC_CMPEQ, ALTIVEC_BUILTIN_VCMPEQUW,
RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 },
{ ALTIVEC_BUILTIN_VEC_CMPEQ, ALTIVEC_BUILTIN_VCMPEQUW,
RS6000_BTI_bool_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 },
+ { ALTIVEC_BUILTIN_VEC_CMPEQ, P8V_BUILTIN_VCMPEQUD,
+ RS6000_BTI_bool_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_bool_V2DI, 0 },
{ ALTIVEC_BUILTIN_VEC_CMPEQ, P8V_BUILTIN_VCMPEQUD,
RS6000_BTI_bool_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, 0 },
{ ALTIVEC_BUILTIN_VEC_CMPEQ, P8V_BUILTIN_VCMPEQUD,
{ ALTIVEC_BUILTIN_VEC_CMPNE, P9V_BUILTIN_CMPNEB,
RS6000_BTI_bool_V16QI, RS6000_BTI_V16QI,
RS6000_BTI_V16QI, 0 },
+ { ALTIVEC_BUILTIN_VEC_CMPNE, P9V_BUILTIN_CMPNEB,
+ RS6000_BTI_bool_V16QI, RS6000_BTI_bool_V16QI,
+ RS6000_BTI_bool_V16QI, 0 },
{ ALTIVEC_BUILTIN_VEC_CMPNE, P9V_BUILTIN_CMPNEB,
RS6000_BTI_bool_V16QI, RS6000_BTI_unsigned_V16QI,
RS6000_BTI_unsigned_V16QI, 0 },
{ ALTIVEC_BUILTIN_VEC_CMPNE, P9V_BUILTIN_CMPNEW,
RS6000_BTI_bool_V4SI, RS6000_BTI_unsigned_V4SI,
RS6000_BTI_unsigned_V4SI, 0 },
-
+ { ALTIVEC_BUILTIN_VEC_CMPNE, P9V_BUILTIN_CMPNEB,
+ RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI,
+ RS6000_BTI_bool_V4SI, 0 },
+ { ALTIVEC_BUILTIN_VEC_CMPNE, P9V_BUILTIN_CMPNED,
+ RS6000_BTI_bool_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_bool_V2DI, 0 },
{ ALTIVEC_BUILTIN_VEC_CMPNE, P9V_BUILTIN_CMPNEF,
RS6000_BTI_bool_V4SI, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
{ ALTIVEC_BUILTIN_VEC_CMPNE, P9V_BUILTIN_CMPNED,
vector signed int vec_cmpb (vector float, vector float);
+vector bool char vec_cmpeq (vector bool char, vector bool char);
+vector bool short vec_cmpeq (vector bool short, vector bool short);
+vector bool int vec_cmpeq (vector bool int, vector bool int);
vector bool char vec_cmpeq (vector signed char, vector signed char);
vector bool char vec_cmpeq (vector unsigned char, vector unsigned char);
vector bool short vec_cmpeq (vector signed short, vector signed short);
int vec_any_ne (vector long long, vector long long);
int vec_any_ne (vector unsigned long long, vector unsigned long long);
+vector bool long long vec_cmpeq (vector bool long long, vector bool long long);
+
vector long long vec_eqv (vector long long, vector long long);
vector long long vec_eqv (vector bool long long, vector long long);
vector long long vec_eqv (vector long long, vector bool long long);
are available:
@smallexample
+vector bool char vec_cmpne (vector bool char, vector bool char);
+vector bool short vec_cmpne (vector bool short, vector bool short);
+vector bool int vec_cmpne (vector bool int, vector bool int);
+vector bool long long vec_cmpne (vector bool long long, vector bool long long);
+
vector long long vec_vctz (vector long long);
vector unsigned long long vec_vctz (vector unsigned long long);
vector int vec_vctz (vector int);
--- /dev/null
+#include <altivec.h>
+
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+
+vector bool char
+test_eq_char (vector bool char x, vector bool char y)
+{
+ return vec_cmpeq (x, y);
+}
+
+vector bool short
+test_eq_short (vector bool short x, vector bool short y)
+{
+ return vec_cmpeq (x, y);
+}
+
+vector bool int
+test_eq_int (vector bool int x, vector bool int y)
+{
+ return vec_cmpeq (x, y);
+}
+
+vector bool long
+test_eq_long (vector bool long x, vector bool long y)
+{
+ return vec_cmpeq (x, y);
+}
+
+vector bool char
+test_ne_char (vector bool char x, vector bool char y)
+{
+ return vec_cmpne (x, y);
+}
+
+vector bool short
+test_ne_short (vector bool short x, vector bool short y)
+{
+ return vec_cmpne (x, y);
+}
+
+vector bool int
+test_ne_int (vector bool int x, vector bool int y)
+{
+ return vec_cmpne (x, y);
+}
+
+vector bool long
+test_ne_long (vector bool long x, vector bool long y)
+{
+ return vec_cmpne (x, y);
+}
+
+/* Note: vec_cmpne is implemented as vcmpeq and then NOT'ed
+ using the xxlnor instruction.
+
+ Expected test results:
+ test_eq_char 1 vcmpeq inst
+ test_eq_short 1 vcmpeq inst
+ test_eq_int 1 vcmpeq inst
+ test_eq_long 1 vcmpeq inst
+ test_ne_char 1 vcmpeq, 1 xxlnor inst
+ test_ne_short 1 vcmpeq, 1 xxlnor inst
+ test_ne_int 1 vcmpeq, 1 xxlnor inst
+ test_ne_long 1 vcmpeq, 1 xxlnor inst */
+
+/* { dg-final { scan-assembler-times "vcmpeq" 8 } } */
+/* { dg-final { scan-assembler-times "xxlnor" 4 } } */