Index: include/clang/Basic/BuiltinsPPC.def =================================================================== --- include/clang/Basic/BuiltinsPPC.def +++ include/clang/Basic/BuiltinsPPC.def @@ -85,10 +85,15 @@ BUILTIN(__builtin_altivec_vmulesb, "V8SsV16ScV16Sc", "") BUILTIN(__builtin_altivec_vmuleuh, "V4UiV8UsV8Us", "") BUILTIN(__builtin_altivec_vmulesh, "V4SiV8SsV8Ss", "") +BUILTIN(__builtin_altivec_vmuleuw, "V2ULLiV4UiV4Ui", "") +BUILTIN(__builtin_altivec_vmulesw, "V2SLLiV4SiV4Si", "") BUILTIN(__builtin_altivec_vmuloub, "V8UsV16UcV16Uc", "") BUILTIN(__builtin_altivec_vmulosb, "V8SsV16ScV16Sc", "") BUILTIN(__builtin_altivec_vmulouh, "V4UiV8UsV8Us", "") BUILTIN(__builtin_altivec_vmulosh, "V4SiV8SsV8Ss", "") +BUILTIN(__builtin_altivec_vmulouw, "V2ULLiV4UiV4Ui", "") +BUILTIN(__builtin_altivec_vmulosw, "V2SLLiV4SiV4Si", "") +BUILTIN(__builtin_altivec_vmuluwm, "V4UiV4UiV4Ui", "") BUILTIN(__builtin_altivec_vnmsubfp, "V4fV4fV4fV4f", "") @@ -115,6 +120,7 @@ BUILTIN(__builtin_altivec_vcmpequb, "V16cV16cV16c", "") BUILTIN(__builtin_altivec_vcmpequh, "V8sV8sV8s", "") BUILTIN(__builtin_altivec_vcmpequw, "V4iV4iV4i", "") +BUILTIN(__builtin_altivec_vcmpequd, "V2LLiV2LLiV2LLi", "") BUILTIN(__builtin_altivec_vcmpeqfp, "V4iV4fV4f", "") BUILTIN(__builtin_altivec_vcmpgtsb, "V16cV16ScV16Sc", "") @@ -123,6 +129,8 @@ BUILTIN(__builtin_altivec_vcmpgtuh, "V8sV8UsV8Us", "") BUILTIN(__builtin_altivec_vcmpgtsw, "V4iV4SiV4Si", "") BUILTIN(__builtin_altivec_vcmpgtuw, "V4iV4UiV4Ui", "") +BUILTIN(__builtin_altivec_vcmpgtsd, "V2LLiV2LLiV2LLi", "") +BUILTIN(__builtin_altivec_vcmpgtud, "V2LLiV2ULLiV2ULLi", "") BUILTIN(__builtin_altivec_vcmpgtfp, "V4iV4fV4f", "") BUILTIN(__builtin_altivec_vmaxsb, "V16ScV16ScV16Sc", "") @@ -131,6 +139,8 @@ BUILTIN(__builtin_altivec_vmaxuh, "V8UsV8UsV8Us", "") BUILTIN(__builtin_altivec_vmaxsw, "V4SiV4SiV4Si", "") BUILTIN(__builtin_altivec_vmaxuw, "V4UiV4UiV4Ui", "") +BUILTIN(__builtin_altivec_vmaxsd, "V2LLiV2LLiV2LLi", "") +BUILTIN(__builtin_altivec_vmaxud, "V2ULLiV2ULLiV2ULLi", "") BUILTIN(__builtin_altivec_vmaxfp, "V4fV4fV4f", "") BUILTIN(__builtin_altivec_mfvscr, "V8Us", "") @@ -141,6 +151,8 @@ BUILTIN(__builtin_altivec_vminuh, "V8UsV8UsV8Us", "") BUILTIN(__builtin_altivec_vminsw, "V4SiV4SiV4Si", "") BUILTIN(__builtin_altivec_vminuw, "V4UiV4UiV4Ui", "") +BUILTIN(__builtin_altivec_vminsd, "V2LLiV2LLiV2LLi", "") +BUILTIN(__builtin_altivec_vminud, "V2ULLiV2ULLiV2ULLi", "") BUILTIN(__builtin_altivec_vminfp, "V4fV4fV4f", "") BUILTIN(__builtin_altivec_mtvscr, "vV4i", "") @@ -150,6 +162,7 @@ BUILTIN(__builtin_altivec_vrlb, "V16cV16cV16Uc", "") BUILTIN(__builtin_altivec_vrlh, "V8sV8sV8Us", "") BUILTIN(__builtin_altivec_vrlw, "V4iV4iV4Ui", "") +BUILTIN(__builtin_altivec_vrld, "V2LLiV2LLiV2ULLi", "") BUILTIN(__builtin_altivec_vsel_4si, "V4iV4iV4iV4Ui", "") @@ -159,6 +172,7 @@ BUILTIN(__builtin_altivec_vsrab, "V16cV16cV16Uc", "") BUILTIN(__builtin_altivec_vsrah, "V8sV8sV8Us", "") BUILTIN(__builtin_altivec_vsraw, "V4iV4iV4Ui", "") +BUILTIN(__builtin_altivec_vsrad, "V2LLiV2LLiV2ULLi", "") BUILTIN(__builtin_altivec_vsr, "V4iV4iV4i", "") BUILTIN(__builtin_altivec_vsro, "V4iV4iV4i", "") @@ -194,6 +208,7 @@ BUILTIN(__builtin_altivec_vcmpequb_p, "iiV16cV16c", "") BUILTIN(__builtin_altivec_vcmpequh_p, "iiV8sV8s", "") BUILTIN(__builtin_altivec_vcmpequw_p, "iiV4iV4i", "") +BUILTIN(__builtin_altivec_vcmpequd_p, "iiV2LLiV2LLi", "") BUILTIN(__builtin_altivec_vcmpeqfp_p, "iiV4fV4f", "") BUILTIN(__builtin_altivec_vcmpgtsb_p, "iiV16ScV16Sc", "") @@ -202,6 +217,8 @@ BUILTIN(__builtin_altivec_vcmpgtuh_p, "iiV8UsV8Us", "") BUILTIN(__builtin_altivec_vcmpgtsw_p, "iiV4SiV4Si", "") BUILTIN(__builtin_altivec_vcmpgtuw_p, "iiV4UiV4Ui", "") +BUILTIN(__builtin_altivec_vcmpgtsd_p, "iiV2LLiV2LLi", "") +BUILTIN(__builtin_altivec_vcmpgtud_p, "iiV2ULLiV2ULLi", "") BUILTIN(__builtin_altivec_vcmpgtfp_p, "iiV4fV4f", "") // VSX built-ins. Index: lib/Headers/altivec.h =================================================================== --- lib/Headers/altivec.h +++ lib/Headers/altivec.h @@ -1387,6 +1387,21 @@ __builtin_altivec_vcmpequw((vector int)__a, (vector int)__b); } +#ifdef __POWER8_VECTOR__ +static vector bool long long __ATTRS_o_ai +vec_cmpeq(vector long long __a, vector long long __b) +{ + return (vector bool long long) __builtin_altivec_vcmpequd(__a, __b); +} + +static vector bool long long __ATTRS_o_ai +vec_cmpeq(vector unsigned long long __a, vector unsigned long long __b) +{ + return (vector bool long long) + __builtin_altivec_vcmpequd((vector long long)__a, (vector long long) __b); +} +#endif + static vector bool int __ATTRS_o_ai vec_cmpeq(vector float __a, vector float __b) { @@ -1447,6 +1462,20 @@ return (vector bool int)__builtin_altivec_vcmpgtuw(__a, __b); } +#ifdef __POWER8_VECTOR__ +static vector bool long long __ATTRS_o_ai +vec_cmpgt(vector long long __a, vector long long __b) +{ + return (vector bool long long)__builtin_altivec_vcmpgtsd(__a, __b); +} + +static vector bool long long __ATTRS_o_ai +vec_cmpgt(vector unsigned long long __a, vector unsigned long long __b) +{ + return (vector bool long long)__builtin_altivec_vcmpgtud(__a, __b); +} +#endif + static vector bool int __ATTRS_o_ai vec_cmpgt(vector float __a, vector float __b) { @@ -1501,6 +1530,23 @@ return (vector bool int)__builtin_altivec_vcmpgtuw(__a, __b); } +/* vec_vcmpgtsd */ +#ifdef __POWER8_VECTOR__ +static vector bool long long __attribute__((__always_inline__)) +vec_vcmpgtsd(vector long long __a, vector long long __b) +{ + return (vector bool long long)__builtin_altivec_vcmpgtsd(__a, __b); +} + +/* vec_vcmpgtud */ + +static vector bool long long __attribute__((__always_inline__)) +vec_vcmpgtud(vector unsigned long long __a, vector unsigned long long __b) +{ + return (vector bool long long)__builtin_altivec_vcmpgtud(__a, __b); +} +#endif + /* vec_vcmpgtfp */ static vector bool int __attribute__((__always_inline__)) @@ -2679,6 +2725,44 @@ return __builtin_altivec_vmaxuw(__a, (vector unsigned int)__b); } +#ifdef __POWER8_VECTOR__ +static vector long long __ATTRS_o_ai +vec_max(vector long long __a, vector long long __b) +{ + return __builtin_altivec_vmaxsd(__a, __b); +} + +static vector long long __ATTRS_o_ai +vec_max(vector bool long long __a, vector long long __b) +{ + return __builtin_altivec_vmaxsd((vector long long)__a, __b); +} + +static vector long long __ATTRS_o_ai +vec_max(vector long long __a, vector bool long long __b) +{ + return __builtin_altivec_vmaxsd(__a, (vector unsigned 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 vec_max(vector float __a, vector float __b) { @@ -2817,6 +2901,47 @@ return __builtin_altivec_vmaxuw(__a, (vector unsigned int)__b); } +/* vec_maxsd */ +#ifdef __POWER8_VECTOR__ +static vector long long __ATTRS_o_ai +vec_vmaxsd(vector long long __a, vector long long __b) +{ + return __builtin_altivec_vmaxsd(__a, __b); +} + +static vector long long __ATTRS_o_ai +vec_vmaxsd(vector bool long long __a, vector long long __b) +{ + return __builtin_altivec_vmaxsd((vector long long)__a, __b); +} + +static vector long long __ATTRS_o_ai +vec_vmaxsd(vector long long __a, vector bool long long __b) +{ + return __builtin_altivec_vmaxsd(__a, (vector long long)__b); +} + +/* vec_maxud */ + +static vector unsigned long long __ATTRS_o_ai +vec_vmaxud(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_vmaxud(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_vmaxud(vector unsigned long long __a, vector bool long long __b) +{ + return __builtin_altivec_vmaxud(__a, (vector unsigned long long)__b); +} +#endif + /* vec_vmaxfp */ static vector float __attribute__((__always_inline__)) @@ -3327,6 +3452,44 @@ return __builtin_altivec_vminuw(__a, (vector unsigned int)__b); } +#ifdef __POWER8_VECTOR__ +static vector long long __ATTRS_o_ai +vec_min(vector long long __a, vector long long __b) +{ + return __builtin_altivec_vminsd(__a, __b); +} + +static vector long long __ATTRS_o_ai +vec_min(vector bool long long __a, vector long long __b) +{ + return __builtin_altivec_vminsd((vector long long)__a, __b); +} + +static vector long long __ATTRS_o_ai +vec_min(vector long long __a, vector bool long long __b) +{ + return __builtin_altivec_vminsd(__a, (vector 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 vec_min(vector float __a, vector float __b) { @@ -3465,6 +3628,47 @@ return __builtin_altivec_vminuw(__a, (vector unsigned int)__b); } +/* vec_minsd */ +#ifdef __POWER8_VECTOR__ +static vector long long __ATTRS_o_ai +vec_vminsd(vector long long __a, vector long long __b) +{ + return __builtin_altivec_vminsd(__a, __b); +} + +static vector long long __ATTRS_o_ai +vec_vminsd(vector bool long long __a, vector long long __b) +{ + return __builtin_altivec_vminsd((vector long long)__a, __b); +} + +static vector long long __ATTRS_o_ai +vec_vminsd(vector long long __a, vector bool long long __b) +{ + return __builtin_altivec_vminsd(__a, (vector long long)__b); +} + +/* vec_minud */ + +static vector unsigned long long __ATTRS_o_ai +vec_vminud(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_vminud(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_vminud(vector unsigned long long __a, vector bool long long __b) +{ + return __builtin_altivec_vminud(__a, (vector unsigned long long)__b); +} +#endif + /* vec_vminfp */ static vector float __attribute__((__always_inline__)) @@ -3762,6 +3966,28 @@ #endif } +#ifdef __POWER8_VECTOR__ +static vector unsigned long long __ATTRS_o_ai +vec_mule(vector unsigned int __a, vector unsigned int __b) +{ +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vmulouw(__a, __b); +#else + return __builtin_altivec_vmuleuw(__a, __b); +#endif +} + +static vector long long __ATTRS_o_ai +vec_mule(vector int __a, vector int __b) +{ +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vmulosw(__a, __b); +#else + return __builtin_altivec_vmulesw(__a, __b); +#endif +} +#endif + /* vec_vmulesb */ static vector short __attribute__((__always_inline__)) @@ -3810,6 +4036,30 @@ #endif } +/* vec_muleuw */ +#ifdef __POWER8_VECTOR__ +static vector unsigned long long __attribute__((__always_inline__)) +vec_vmuleuw(vector unsigned int __a, vector unsigned int __b) +{ +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vmulouw(__a, __b); +#else + return __builtin_altivec_vmuleuw(__a, __b); +#endif +} + +/* vec_mulesw */ +static vector long long __attribute__((__always_inline__)) +vec_vmulesw(vector unsigned int __a, vector unsigned int __b) +{ +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vmulosw(__a, __b); +#else + return __builtin_altivec_vmulesw(__a, __b); +#endif +} +#endif + /* vec_mulo */ static vector short __ATTRS_o_ai @@ -3852,6 +4102,28 @@ #endif } +#ifdef __POWER8_VECTOR__ +static vector unsigned long long __ATTRS_o_ai +vec_mulo(vector unsigned int __a, vector unsigned int __b) +{ +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vmuleuw(__a, __b); +#else + return __builtin_altivec_vmulouw(__a, __b); +#endif +} + +static vector long long __ATTRS_o_ai +vec_mulo(vector int __a, vector int __b) +{ +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vmulesw(__a, __b); +#else + return __builtin_altivec_vmulosw(__a, __b); +#endif +} +#endif + /* vec_vmulosb */ static vector short __attribute__((__always_inline__)) @@ -3900,6 +4172,38 @@ #endif } +/* vec_vmulouw */ +#ifdef __POWER8_VECTOR__ +static vector unsigned long long __attribute__((__always_inline__)) +vec_vmulouw(vector unsigned int __a, vector unsigned int __b) +{ +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vmuleuw(__a, __b); +#else + return __builtin_altivec_vmulouw(__a, __b); +#endif +} + +/* vec_vmulosw */ +static vector long long __attribute__((__always_inline__)) +vec_vmulosw(vector int __a, vector int __b) +{ +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vmulesw(__a, __b); +#else + return __builtin_altivec_vmulosw(__a, __b); +#endif +} + +/* vec_vmuluwm */ + +static vector int __attribute__((__always_inline__)) +vec_vmuluwm(vector int __a, vector int __b) +{ + return __builtin_altivec_vmuluwm(__a, __b); +} +#endif + /* vec_nmsub */ static vector float __attribute__((__always_inline__)) @@ -5095,6 +5399,20 @@ return (vector unsigned int)__builtin_altivec_vrlw((vector int)__a, __b); } +#ifdef __POWER8_VECTOR__ +static vector long long __ATTRS_o_ai +vec_rl(vector long long __a, vector unsigned long long __b) +{ + return __builtin_altivec_vrld(__a, __b); +} + +static vector unsigned long long __ATTRS_o_ai +vec_rl(vector unsigned long long __a, vector unsigned long long __b) +{ + return __builtin_altivec_vrld(__a, __b); +} +#endif + /* vec_vrlb */ static vector signed char __ATTRS_o_ai @@ -5137,6 +5455,22 @@ return (vector unsigned int)__builtin_altivec_vrlw((vector int)__a, __b); } +/* vec_vrld */ +#ifdef __POWER8_VECTOR__ +static vector long long __ATTRS_o_ai +vec_vrld(vector long long __a, vector unsigned long long __b) +{ + return __builtin_altivec_vrld(__a, __b); +} + +static vector unsigned long long __ATTRS_o_ai +vec_vrld(vector unsigned long long __a, vector unsigned long long __b) +{ + return (vector unsigned long long) + __builtin_altivec_vrld((vector long long)__a, __b); +} +#endif + /* vec_round */ static vector float __attribute__((__always_inline__)) @@ -5465,6 +5799,20 @@ return __a << __b; } +#ifdef __POWER8_VECTOR__ +static vector long long __ATTRS_o_ai +vec_sl(vector long long __a, vector unsigned long long __b) +{ + return __a << (vector long long)__b; +} + +static vector long long __ATTRS_o_ai +vec_sl(vector unsigned long long __a, vector unsigned long long __b) +{ + return __a << __b; +} +#endif + /* vec_vslb */ #define __builtin_altivec_vslb vec_vslb @@ -5513,6 +5861,23 @@ return vec_sl(__a, __b); } +/* vec_vsld */ +#ifdef __POWER8_VECTOR__ +#define __builtin_altivec_vsld vec_vsld + +static vector long long __ATTRS_o_ai +vec_vsld(vector long long __a, vector unsigned long long __b) +{ + return vec_sl(__a, __b); +} + +static vector unsigned long long __ATTRS_o_ai +vec_vsld(vector unsigned long long __a, vector unsigned long long __b) +{ + return vec_sl(__a, __b); +} +#endif + /* vec_sld */ #define __builtin_altivec_vsldoi_4si vec_sld @@ -6566,6 +6931,20 @@ return __a >> __b; } +#ifdef __POWER8_VECTOR__ +static vector long long __ATTRS_o_ai +vec_sr(vector long long __a, vector unsigned long long __b) +{ + return __a >> (vector long long)__b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_sr(vector unsigned long long __a, vector unsigned long long __b) +{ + return __a >> __b; +} +#endif + /* vec_vsrb */ #define __builtin_altivec_vsrb vec_vsrb @@ -6614,6 +6993,23 @@ return __a >> __b; } +/* vec_vsrd */ +#ifdef __POWER8_VECTOR__ +#define __builtin_altivec_vsrd vec_vsrd + +static vector long long __ATTRS_o_ai +vec_vsrd(vector long long __a, vector unsigned long long __b) +{ + return __a >> (vector long long) __b; +} + +static vector unsigned long long __ATTRS_o_ai +vec_vsrd(vector unsigned long long __a, vector unsigned long long __b) +{ + return __a >> __b; +} +#endif + /* vec_sra */ static vector signed char __ATTRS_o_ai @@ -6652,16 +7048,31 @@ 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) +#ifdef __POWER8_VECTOR__ +static vector long long __ATTRS_o_ai +vec_sra(vector long long __a, vector unsigned long long __b) { - return (vector signed char)__builtin_altivec_vsrab((vector char)__a, __b); + return __builtin_altivec_vsrad(__a, __b); } -static vector unsigned char __ATTRS_o_ai -vec_vsrab(vector unsigned char __a, vector unsigned char __b) +static vector unsigned long long __ATTRS_o_ai +vec_sra(vector unsigned long long __a, vector unsigned long long __b) +{ + return (vector unsigned long long) + __builtin_altivec_vsrad((vector long long)__a, __b); +} +#endif + +/* 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); } @@ -6694,6 +7105,22 @@ return (vector unsigned int)__builtin_altivec_vsraw((vector int)__a, __b); } +/* vec_vsrad */ +#ifdef __POWER8_VECTOR__ +static vector long long __ATTRS_o_ai +vec_vsrad(vector long long __a, vector unsigned long long __b) +{ + return __builtin_altivec_vsrad(__a, __b); +} + +static vector unsigned long long __ATTRS_o_ai +vec_vsrad(vector unsigned long long __a, vector unsigned long long __b) +{ + return (vector unsigned long long) + __builtin_altivec_vsrad((vector long long)__a, __b); +} +#endif + /* vec_srl */ static vector signed char __ATTRS_o_ai @@ -10887,6 +11314,55 @@ return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b); } +#ifdef __POWER8_VECTOR__ +static long long __ATTRS_o_ai +vec_all_eq(vector long long __a, vector long long __b) +{ + return __builtin_altivec_vcmpequd_p(__CR6_LT, __a, __b); +} + +static long long __ATTRS_o_ai +vec_all_eq(vector long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpequd_p(__CR6_LT, __a, (vector long long)__b); +} + +static long long __ATTRS_o_ai +vec_all_eq(vector unsigned long long __a, vector unsigned long long __b) +{ + return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a, + (vector long long)__b); +} + +static long long __ATTRS_o_ai +vec_all_eq(vector unsigned long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a, + (vector long long)__b); +} + +static long long __ATTRS_o_ai +vec_all_eq(vector bool long long __a, vector long long __b) +{ + return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a, + (vector long long)__b); +} + +static long long __ATTRS_o_ai +vec_all_eq(vector bool long long __a, vector unsigned long long __b) +{ + return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a, + (vector long long)__b); +} + +static long long __ATTRS_o_ai +vec_all_eq(vector bool long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a, + (vector long long)__b); +} +#endif + static int __ATTRS_o_ai vec_all_eq(vector float __a, vector float __b) { @@ -11033,6 +11509,55 @@ (vector unsigned int)__a); } +#ifdef __POWER8_VECTOR__ +static long long __ATTRS_o_ai +vec_all_ge(vector long long __a, vector long long __b) +{ + return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __b, __a); +} + +static long long __ATTRS_o_ai +vec_all_ge(vector long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, (vector long long)__b, __a); +} + +static long long __ATTRS_o_ai +vec_all_ge(vector unsigned long long __a, vector unsigned long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __b, __a); +} + +static long long __ATTRS_o_ai +vec_all_ge(vector unsigned long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b, + __a); +} + +static long long __ATTRS_o_ai +vec_all_ge(vector bool long long __a, vector long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_EQ, + (vector unsigned long long)__b, + (vector unsigned long long)__a); +} + +static long long __ATTRS_o_ai +vec_all_ge(vector bool long long __a, vector unsigned long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __b, (vector unsigned long long)__a); +} + +static long long __ATTRS_o_ai +vec_all_ge(vector bool long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_EQ, + (vector unsigned long long)__b, + (vector unsigned long long)__a); +} +#endif + static int __ATTRS_o_ai vec_all_ge(vector float __a, vector float __b) { @@ -11179,6 +11704,56 @@ (vector unsigned int)__b); } +#ifdef __POWER8_VECTOR__ +static long long __ATTRS_o_ai +vec_all_gt(vector long long __a, vector long long __b) +{ + return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __a, __b); +} + +static long long __ATTRS_o_ai +vec_all_gt(vector long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __a, (vector long long)__b); +} + +static long long __ATTRS_o_ai +vec_all_gt(vector unsigned long long __a, vector unsigned long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_LT, __a, __b); +} + +static long long __ATTRS_o_ai +vec_all_gt(vector unsigned long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_LT, __a, + (vector unsigned long long)__b); +} + +static long long __ATTRS_o_ai +vec_all_gt(vector bool long long __a, vector long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_LT, + (vector unsigned long long)__a, + (vector unsigned long long)__b); +} + +static long long __ATTRS_o_ai +vec_all_gt(vector bool long long __a, vector unsigned long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a, __b); +} + +static long long __ATTRS_o_ai +vec_all_gt(vector bool long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_LT, + (vector unsigned long long)__a, + (vector unsigned long long)__b); +} + +#endif + static int __ATTRS_o_ai vec_all_gt(vector float __a, vector float __b) { @@ -11333,6 +11908,56 @@ (vector unsigned int)__b); } +#ifdef __POWER8_VECTOR__ +static long long __ATTRS_o_ai +vec_all_le(vector long long __a, vector long long __b) +{ + return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __a, __b); +} + +static long long __ATTRS_o_ai +vec_all_le(vector long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __a, (vector long long)__b); +} + +static long long __ATTRS_o_ai +vec_all_le(vector unsigned long long __a, vector unsigned long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __a, __b); +} + +static long long __ATTRS_o_ai +vec_all_le(vector unsigned long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __a, + (vector unsigned long long)__b); +} + +static long long __ATTRS_o_ai +vec_all_le(vector bool long long __a, vector long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_EQ, + (vector unsigned long long)__a, + (vector unsigned long long)__b); +} + +static long long __ATTRS_o_ai +vec_all_le(vector bool long long __a, vector unsigned long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a, __b); +} + +static long long __ATTRS_o_ai +vec_all_le(vector bool long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_EQ, + (vector unsigned long long)__a, + (vector unsigned long long)__b); +} + +#endif + static int __ATTRS_o_ai vec_all_le(vector float __a, vector float __b) { @@ -11479,6 +12104,56 @@ (vector unsigned int)__a); } +#ifdef __POWER8_VECTOR__ +static long long __ATTRS_o_ai +vec_all_lt(vector long long __a, vector long long __b) +{ + return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __b, __a); +} + +static long long __ATTRS_o_ai +vec_all_lt(vector long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpgtsd_p(__CR6_LT, (vector long long)__b, __a); +} + +static long long __ATTRS_o_ai +vec_all_lt(vector unsigned long long __a, vector unsigned long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_LT, __b, __a); +} + +static long long __ATTRS_o_ai +vec_all_lt(vector unsigned long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b, + __a); +} + +static long long __ATTRS_o_ai +vec_all_lt(vector bool long long __a, vector long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_LT, + (vector unsigned long long)__b, + (vector unsigned long long)__a); +} + +static long long __ATTRS_o_ai +vec_all_lt(vector bool long long __a, vector unsigned long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_LT, __b, (vector unsigned long long)__a); +} + +static long long __ATTRS_o_ai +vec_all_lt(vector bool long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_LT, + (vector unsigned long long)__b, + (vector unsigned long long)__a); +} + +#endif + static int __ATTRS_o_ai vec_all_lt(vector float __a, vector float __b) { @@ -11633,6 +12308,55 @@ return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b); } +#ifdef __POWER8_VECTOR__ +static long long __ATTRS_o_ai +vec_all_ne(vector long long __a, vector long long __b) +{ + return __builtin_altivec_vcmpequd_p(__CR6_EQ, __a, __b); +} + +static long long __ATTRS_o_ai +vec_all_ne(vector long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpequd_p(__CR6_EQ, __a, (vector long long)__b); +} + +static long long __ATTRS_o_ai +vec_all_ne(vector unsigned long long __a, vector unsigned long long __b) +{ + return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector long long)__a, + (vector long long)__b); +} + +static long long __ATTRS_o_ai +vec_all_ne(vector unsigned long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector long long)__a, + (vector long long)__b); +} + +static long long __ATTRS_o_ai +vec_all_ne(vector bool long long __a, vector long long __b) +{ + return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector long long)__a, + (vector long long)__b); +} + +static long long __ATTRS_o_ai +vec_all_ne(vector bool long long __a, vector unsigned long long __b) +{ + return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector long long)__a, + (vector long long)__b); +} + +static long long __ATTRS_o_ai +vec_all_ne(vector bool long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector long long)__a, + (vector long long)__b); +} +#endif + static int __ATTRS_o_ai vec_all_ne(vector float __a, vector float __b) { @@ -11837,6 +12561,60 @@ __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b); } +#ifdef __POWER8_VECTOR__ +static long long __ATTRS_o_ai +vec_any_eq(vector long long __a, vector long long __b) +{ + return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, __a, __b); +} + +static long long __ATTRS_o_ai +vec_any_eq(vector long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, __a, (vector long long)__b); +} + +static long long __ATTRS_o_ai +vec_any_eq(vector unsigned long long __a, vector unsigned long long __b) +{ + return + __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector long long)__a, + (vector long long)__b); +} + +static long long __ATTRS_o_ai +vec_any_eq(vector unsigned long long __a, vector bool long long __b) +{ + return + __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector long long)__a, + (vector long long)__b); +} + +static long long __ATTRS_o_ai +vec_any_eq(vector bool long long __a, vector long long __b) +{ + return + __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector long long)__a, + (vector long long)__b); +} + +static long long __ATTRS_o_ai +vec_any_eq(vector bool long long __a, vector unsigned long long __b) +{ + return + __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector long long)__a, + (vector long long)__b); +} + +static long long __ATTRS_o_ai +vec_any_eq(vector bool long long __a, vector bool long long __b) +{ + return + __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector long long)__a, + (vector long long)__b); +} +#endif + static int __ATTRS_o_ai vec_any_eq(vector float __a, vector float __b) { @@ -11985,6 +12763,56 @@ (vector unsigned int)__a); } +#ifdef __POWER8_VECTOR__ +static long long __ATTRS_o_ai +vec_any_ge(vector long long __a, vector long long __b) +{ + return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __b, __a); +} + +static long long __ATTRS_o_ai +vec_any_ge(vector long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, (vector long long)__b, __a); +} + +static long long __ATTRS_o_ai +vec_any_ge(vector unsigned long long __a, vector unsigned long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __b, __a); +} + +static long long __ATTRS_o_ai +vec_any_ge(vector unsigned long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, + (vector unsigned long long)__b, __a); +} + +static long long __ATTRS_o_ai +vec_any_ge(vector bool long long __a, vector long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, + (vector unsigned long long)__b, + (vector unsigned long long)__a); +} + +static long long __ATTRS_o_ai +vec_any_ge(vector bool long long __a, vector unsigned long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __b, (vector unsigned long long)__a); +} + +static long long __ATTRS_o_ai +vec_any_ge(vector bool long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, + (vector unsigned long long)__b, + (vector unsigned long long)__a); +} + +#endif + static int __ATTRS_o_ai vec_any_ge(vector float __a, vector float __b) { @@ -12135,6 +12963,57 @@ (vector unsigned int)__b); } +#ifdef __POWER8_VECTOR__ +static long long __ATTRS_o_ai +vec_any_gt(vector long long __a, vector long long __b) +{ + return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __a, __b); +} + +static long long __ATTRS_o_ai +vec_any_gt(vector long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __a, (vector long long)__b); +} + +static long long __ATTRS_o_ai +vec_any_gt(vector unsigned long long __a, vector unsigned long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __a, __b); +} + +static long long __ATTRS_o_ai +vec_any_gt(vector unsigned long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __a, + (vector unsigned long long)__b); +} + +static long long __ATTRS_o_ai +vec_any_gt(vector bool long long __a, vector long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, + (vector unsigned long long)__a, + (vector unsigned long long)__b); +} + +static long long __ATTRS_o_ai +vec_any_gt(vector bool long long __a, vector unsigned long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, + (vector unsigned long long)__a, __b); +} + +static long long __ATTRS_o_ai +vec_any_gt(vector bool long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, + (vector unsigned long long)__a, + (vector unsigned long long)__b); +} + +#endif + static int __ATTRS_o_ai vec_any_gt(vector float __a, vector float __b) { @@ -12285,6 +13164,57 @@ (vector unsigned int)__b); } +#ifdef __POWER8_VECTOR__ +static long long __ATTRS_o_ai +vec_any_le(vector long long __a, vector long long __b) +{ + return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __a, __b); +} + +static long long __ATTRS_o_ai +vec_any_le(vector long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __a, (vector long long)__b); +} + +static long long __ATTRS_o_ai +vec_any_le(vector unsigned long long __a, vector unsigned long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __a, __b); +} + +static long long __ATTRS_o_ai +vec_any_le(vector unsigned long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __a, + (vector unsigned long long)__b); +} + +static long long __ATTRS_o_ai +vec_any_le(vector bool long long __a, vector long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, + (vector unsigned long long)__a, + (vector unsigned long long)__b); +} + +static long long __ATTRS_o_ai +vec_any_le(vector bool long long __a, vector unsigned long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, + (vector unsigned long long)__a, __b); +} + +static long long __ATTRS_o_ai +vec_any_le(vector bool long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, + (vector unsigned long long)__a, + (vector unsigned long long)__b); +} + +#endif + static int __ATTRS_o_ai vec_any_le(vector float __a, vector float __b) { @@ -12435,6 +13365,57 @@ (vector unsigned int)__a); } +#ifdef __POWER8_VECTOR__ +static long long __ATTRS_o_ai +vec_any_lt(vector long long __a, vector long long __b) +{ + return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __b, __a); +} + +static long long __ATTRS_o_ai +vec_any_lt(vector long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, (vector long long)__b, __a); +} + +static long long __ATTRS_o_ai +vec_any_lt(vector unsigned long long __a, vector unsigned long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __b, __a); +} + +static long long __ATTRS_o_ai +vec_any_lt(vector unsigned long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, + (vector unsigned long long)__b, __a); +} + +static long long __ATTRS_o_ai +vec_any_lt(vector bool long long __a, vector long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, + (vector unsigned long long)__b, + (vector unsigned long long)__a); +} + +static long long __ATTRS_o_ai +vec_any_lt(vector bool long long __a, vector unsigned long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __b, + (vector unsigned long long)__a); +} + +static long long __ATTRS_o_ai +vec_any_lt(vector bool long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, + (vector unsigned long long)__b, + (vector unsigned long long)__a); +} + +#endif + static int __ATTRS_o_ai vec_any_lt(vector float __a, vector float __b) { @@ -12607,6 +13588,60 @@ __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b); } +#ifdef __POWER8_VECTOR__ +static long long __ATTRS_o_ai +vec_any_ne(vector long long __a, vector long long __b) +{ + return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, __a, __b); +} + +static long long __ATTRS_o_ai +vec_any_ne(vector long long __a, vector bool long long __b) +{ + return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, __a, (vector long long)__b); +} + +static long long __ATTRS_o_ai +vec_any_ne(vector unsigned long long __a, vector unsigned long long __b) +{ + return + __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector long long)__a, + (vector long long)__b); +} + +static long long __ATTRS_o_ai +vec_any_ne(vector unsigned long long __a, vector bool long long __b) +{ + return + __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector long long)__a, + (vector long long)__b); +} + +static long long __ATTRS_o_ai +vec_any_ne(vector bool long long __a, vector long long __b) +{ + return + __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector long long)__a, + (vector long long)__b); +} + +static long long __ATTRS_o_ai +vec_any_ne(vector bool long long __a, vector unsigned long long __b) +{ + return + __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector long long)__a, + (vector long long)__b); +} + +static long long __ATTRS_o_ai +vec_any_ne(vector bool long long __a, vector bool long long __b) +{ + return + __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector long long)__a, + (vector long long)__b); +} +#endif + static int __ATTRS_o_ai vec_any_ne(vector float __a, vector float __b) { Index: test/CodeGen/builtins-ppc-p8vector.c =================================================================== --- test/CodeGen/builtins-ppc-p8vector.c +++ test/CodeGen/builtins-ppc-p8vector.c @@ -0,0 +1,742 @@ +// REQUIRES: powerpc-registered-target +// RUN: %clang_cc1 -faltivec -target-feature +power8-vector -triple powerpc64-unknown-unknown -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -faltivec -target-feature +power8-vector -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK-LE +// RUN: not %clang_cc1 -faltivec -triple powerpc64-unknown-unknown -emit-llvm %s -o - 2>&1 | FileCheck %s -check-prefix=CHECK-PPC + + +vector int vi = { -1, 2, -3, 4 }; +vector unsigned int vui = { 1, 2, 3, 4 }; +vector bool long long vbll = { 1, 0 }; +vector long long vll = { 1, 2 }; +vector unsigned long long vull = { 1, 2 }; + +int res_i; +vector int res_vi; +vector unsigned int res_vui; +vector long long res_vll; +vector unsigned long long res_vull; +vector bool long long res_vbll; + +// CHECK-LABEL: define void @test1 +void test1() { + + /* vec_cmpeq */ + res_vbll = vec_cmpeq(vll, vll); +// CHECK: @llvm.ppc.altivec.vcmpequd +// CHECK-LE: @llvm.ppc.altivec.vcmpequd +// CHECK-PPC: error: call to 'vec_cmpeq' is ambiguous + + res_vbll = vec_cmpeq(vull, vull); +// CHECK: @llvm.ppc.altivec.vcmpequd +// CHECK-LE: @llvm.ppc.altivec.vcmpequd +// CHECK-PPC: error: call to 'vec_cmpeq' is ambiguous + + /* vec_cmpgt */ + res_vbll = vec_cmpgt(vll, vll); +// CHECK: @llvm.ppc.altivec.vcmpgtsd +// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd +// CHECK-PPC: error: call to 'vec_cmpgt' is ambiguous + + res_vbll = vec_cmpgt(vull, vull); +// CHECK: @llvm.ppc.altivec.vcmpgtud +// CHECK-LE: @llvm.ppc.altivec.vcmpgtud +// CHECK-PPC: error: call to 'vec_cmpgt' is ambiguous + + /* vec_cmpgtsw */ + res_vbll = vec_vcmpgtsd(vll, vll); +// CHECK: @llvm.ppc.altivec.vcmpgtsd +// CHECK-LE: @llvm.ppc.altivec.vcmpgtsd +// CHECK-PPC: error: assigning to '__vector __bool unsigned long long' (vector of 2 'unsigned long long' values) from incompatible type 'int' + + /* vec_cmpgtud */ + res_vbll = vec_vcmpgtud(vull, vull); +// CHECK: @llvm.ppc.altivec.vcmpgtud +// CHECK-LE: @llvm.ppc.altivec.vcmpgtud +// CHECK-PPC: error: assigning to '__vector __bool unsigned long long' (vector of 2 'unsigned long long' values) from incompatible type 'int' + + /* ------------------------------ predicates -------------------------------------- */ + /* vec_all_eq */ + res_i = vec_all_eq(vll, vll); +// 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); +// 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, vll); +// 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 + + /* vec_all_ne */ + res_i = vec_all_ne(vll, vll); +// 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); +// 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, vll); +// 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 + + /* vec_any_eq */ + res_i = vec_any_eq(vll, vll); +// 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); +// 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, vll); +// 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 + + /* vec_any_ne */ + res_i = vec_any_ne(vll, vll); +// 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); +// 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, vll); +// 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 + + /* vec_all_ge */ + res_i = vec_all_ge(vll, vll); +// 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); +// 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, vll); +// 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 + + /* vec_all_gt */ + res_i = vec_all_gt(vll, vll); +// 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); +// 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, vll); +// 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 + + /* vec_all_le */ + res_i = vec_all_le(vll, vll); +// 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); +// 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, vll); +// 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 + + /* vec_all_lt */ + res_i = vec_all_lt(vll, vll); +// 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); +// 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, vll); +// 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 + + /* vec_any_ge */ + res_i = vec_any_ge(vll, vll); +// 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); +// 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, vll); +// 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 + + /* vec_any_gt */ + res_i = vec_any_gt(vll, vll); +// 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); +// 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, vll); +// 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 + + /* vec_any_le */ + res_i = vec_any_le(vll, vll); +// 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); +// 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, vll); +// 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 + + /* vec_any_lt */ + res_i = vec_any_lt(vll, vll); +// 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); +// 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, vll); +// 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 + + /* vec_max */ + res_vll = vec_max(vll, vll); +// 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); +// 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); +// CHECK: @llvm.ppc.altivec.vmaxsd +// CHECK-LE: @llvm.ppc.altivec.vmaxsd +// CHECK-PPC: error: call to 'vec_max' is ambiguous + + res_vull = vec_max(vull, vull); +// CHECK: @llvm.ppc.altivec.vmaxud +// CHECK-LE: @llvm.ppc.altivec.vmaxud +// CHECK-PPC: error: call to 'vec_max' is ambiguous + + res_vull = vec_max(vbll, vull); +// CHECK: @llvm.ppc.altivec.vmaxud +// CHECK-LE: @llvm.ppc.altivec.vmaxud +// CHECK-PPC: error: call to 'vec_max' is ambiguous + + res_vull = vec_max(vull, vbll); +// CHECK: @llvm.ppc.altivec.vmaxud +// CHECK-LE: @llvm.ppc.altivec.vmaxud +// CHECK-PPC: error: call to 'vec_max' is ambiguous + + res_vll = vec_vmaxsd(vll, vll); +// CHECK: @llvm.ppc.altivec.vmaxsd +// CHECK-LE: @llvm.ppc.altivec.vmaxsd +// CHECK-PPC: error: assigning to '__vector long long' (vector of 2 'long long' values) from incompatible type 'int' + + res_vll = vec_vmaxsd(vbll, vll); +// CHECK: @llvm.ppc.altivec.vmaxsd +// CHECK-LE: @llvm.ppc.altivec.vmaxsd +// CHECK-PPC: error: assigning to '__vector long long' (vector of 2 'long long' values) from incompatible type 'int' + + res_vll = vec_vmaxsd(vll, vbll); +// CHECK: @llvm.ppc.altivec.vmaxsd +// CHECK-LE: @llvm.ppc.altivec.vmaxsd +// CHECK-PPC: error: assigning to '__vector long long' (vector of 2 'long long' values) from incompatible type 'int' + + res_vull = vec_vmaxud(vull, vull); +// CHECK: @llvm.ppc.altivec.vmaxud +// CHECK-LE: @llvm.ppc.altivec.vmaxud +// CHECK-PPC: error: assigning to '__vector unsigned long long' (vector of 2 'unsigned long long' values) from incompatible type 'int' + + res_vull = vec_vmaxud(vbll, vull); +// CHECK: @llvm.ppc.altivec.vmaxud +// CHECK-LE: @llvm.ppc.altivec.vmaxud +// CHECK-PPC: error: assigning to '__vector unsigned long long' (vector of 2 'unsigned long long' values) from incompatible type 'int' + + res_vull = vec_vmaxud(vull, vbll); +// CHECK: @llvm.ppc.altivec.vmaxud +// CHECK-LE: @llvm.ppc.altivec.vmaxud +// CHECK-PPC: error: assigning to '__vector unsigned long long' (vector of 2 'unsigned long long' values) from incompatible type 'int' + + /* vec_min */ + res_vll = vec_min(vll, vll); +// 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); +// 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); +// CHECK: @llvm.ppc.altivec.vminsd +// CHECK-LE: @llvm.ppc.altivec.vminsd +// CHECK-PPC: error: call to 'vec_min' is ambiguous + + res_vull = vec_min(vull, vull); +// CHECK: @llvm.ppc.altivec.vminud +// CHECK-LE: @llvm.ppc.altivec.vminud +// CHECK-PPC: error: call to 'vec_min' is ambiguous + + res_vull = vec_min(vbll, vull); +// CHECK: @llvm.ppc.altivec.vminud +// CHECK-LE: @llvm.ppc.altivec.vminud +// CHECK-PPC: error: call to 'vec_min' is ambiguous + + res_vull = vec_min(vull, vbll); +// CHECK: @llvm.ppc.altivec.vminud +// CHECK-LE: @llvm.ppc.altivec.vminud +// CHECK-PPC: error: call to 'vec_min' is ambiguous + + res_vll = vec_vminsd(vll, vll); +// CHECK: @llvm.ppc.altivec.vminsd +// CHECK-LE: @llvm.ppc.altivec.vminsd +// CHECK-PPC: error: assigning to '__vector long long' (vector of 2 'long long' values) from incompatible type 'int' + + res_vll = vec_vminsd(vbll, vll); +// CHECK: @llvm.ppc.altivec.vminsd +// CHECK-LE: @llvm.ppc.altivec.vminsd +// CHECK-PPC: error: assigning to '__vector long long' (vector of 2 'long long' values) from incompatible type 'int' + + res_vll = vec_vminsd(vll, vbll); +// CHECK: @llvm.ppc.altivec.vminsd +// CHECK-LE: @llvm.ppc.altivec.vminsd +// CHECK-PPC: error: assigning to '__vector long long' (vector of 2 'long long' values) from incompatible type 'int' + + res_vull = vec_vminud(vull, vull); +// CHECK: @llvm.ppc.altivec.vminud +// CHECK-LE: @llvm.ppc.altivec.vminud +// CHECK-PPC: error: assigning to '__vector unsigned long long' (vector of 2 'unsigned long long' values) from incompatible type 'int' + + res_vull = vec_vminud(vbll, vull); +// CHECK: @llvm.ppc.altivec.vminud +// CHECK-LE: @llvm.ppc.altivec.vminud +// CHECK-PPC: error: assigning to '__vector unsigned long long' (vector of 2 'unsigned long long' values) from incompatible type 'int' + + res_vull = vec_vminud(vull, vbll); +// CHECK: @llvm.ppc.altivec.vminud +// CHECK-LE: @llvm.ppc.altivec.vminud +// CHECK-PPC: error: assigning to '__vector unsigned long long' (vector of 2 'unsigned long long' values) from incompatible type 'int' + + /* vec_mule */ + res_vll = vec_mule(vi, vi); +// CHECK: @llvm.ppc.altivec.vmulesw +// CHECK-LE: @llvm.ppc.altivec.vmulosw +// CHECK-PPC: error: call to 'vec_mule' is ambiguous + + res_vull = vec_mule(vui , vui); +// CHECK: @llvm.ppc.altivec.vmuleuw +// CHECK-LE: @llvm.ppc.altivec.vmulouw +// CHECK-PPC: error: call to 'vec_mule' is ambiguous + + res_vll = vec_vmulesw(vi, vi); +// CHECK: @llvm.ppc.altivec.vmulesw +// CHECK-LE: @llvm.ppc.altivec.vmulosw +// CHECK-PPC: error: assigning to '__vector long long' (vector of 2 'long long' values) from incompatible type 'int' + + res_vull = vec_vmuleuw(vui, vui); +// CHECK: @llvm.ppc.altivec.vmuleuw +// CHECK-LE: @llvm.ppc.altivec.vmulouw +// CHECK-PPC: error: assigning to '__vector unsigned long long' (vector of 2 'unsigned long long' values) from incompatible type 'int' + + /* vec_mulo */ + res_vll = vec_mulo(vi, vi); +// CHECK: @llvm.ppc.altivec.vmulosw +// CHECK-LE: @llvm.ppc.altivec.vmulesw +// CHECK-PPC: error: call to 'vec_mulo' is ambiguous + + res_vull = vec_mulo(vui, vui); +// CHECK: @llvm.ppc.altivec.vmulouw +// CHECK-LE: @llvm.ppc.altivec.vmuleuw +// CHECK-PPC: error: call to 'vec_mulo' is ambiguous + + res_vll = vec_vmulosw(vi, vi); +// CHECK: @llvm.ppc.altivec.vmulosw +// CHECK-L1E: @llvm.ppc.altivec.vmulesw +// CHECK-PPC: error: assigning to '__vector long long' (vector of 2 'long long' values) from incompatible type 'int' + + res_vull = vec_vmulouw(vui, vui); +// CHECK: @llvm.ppc.altivec.vmulouw +// CHECK-LE: @llvm.ppc.altivec.vmuleuw +// CHECK-PPC: error: assigning to '__vector unsigned long long' (vector of 2 'unsigned long long' values) from incompatible type 'int' + + res_vi = vec_vmuluwm(vi, vi); +// CHECK: @llvm.ppc.altivec.vmuluwm +// CHECK-LE: @llvm.ppc.altivec.vmuluwm +// CHECK-PPC: error: assigning to '__vector int' (vector of 4 'int' values) from incompatible type 'int' + + /* vec_rl */ + res_vll = vec_rl(vll, vull); +// CHECK: @llvm.ppc.altivec.vrld +// CHECK-LE: @llvm.ppc.altivec.vrld +// CHECK-PPC: error: call to 'vec_rl' is ambiguous + + res_vull = vec_rl(vull, vull); +// CHECK: @llvm.ppc.altivec.vrld +// CHECK-LE: @llvm.ppc.altivec.vrld +// CHECK-PPC: error: call to 'vec_rl' is ambiguous + + res_vll = vec_vrld(vll, vull); +// CHECK: @llvm.ppc.altivec.vrld +// CHECK-LE: @llvm.ppc.altivec.vrld +// CHECK-PPC: error: assigning to '__vector long long' (vector of 2 'long long' values) from incompatible type 'int' + + res_vull = vec_vrld(vull, vull); +// CHECK: @llvm.ppc.altivec.vrld +// CHECK-LE: @llvm.ppc.altivec.vrld +// CHECK-PPC: error: assigning to '__vector unsigned long long' (vector of 2 'unsigned long long' values) from incompatible type 'int' + + /* vec_sl */ + res_vll = vec_sl(vll, vull); +// CHECK: shl <2 x i64> +// CHECK-LE: shl <2 x i64> +// CHECK-PPC: error: call to 'vec_sl' is ambiguous + + res_vull = vec_sl(vull, vull); +// CHECK: shl <2 x i64> +// CHECK-LE: shl <2 x i64> +// CHECK-PPC: error: call to 'vec_sl' is ambiguous + + res_vll = vec_vsld(vll, vull); +// CHECK: shl <2 x i64> +// CHECK-LE: shl <2 x i64> +// CHECK-PPC: error: assigning to '__vector long long' (vector of 2 'long long' values) from incompatible type 'int' + + res_vull = vec_vsld(vull, vull); +// CHECK: shl <2 x i64> +// CHECK-LE: shl <2 x i64> +// CHECK-PPC: error: assigning to '__vector unsigned long long' (vector of 2 'unsigned long long' values) from incompatible type 'int' + + /* vec_sr */ + res_vll = vec_sr(vll, vull); +// CHECK: shr <2 x i64> +// CHECK-LE: shr <2 x i64> +// CHECK-PPC: error: call to 'vec_sr' is ambiguous + + res_vull = vec_sr(vull, vull); +// CHECK: shr <2 x i64> +// CHECK-LE: shr <2 x i64> +// CHECK-PPC: error: call to 'vec_sr' is ambiguous + + res_vll = vec_vsrd(vll, vull); +// CHECK: shr <2 x i64> +// CHECK-LE: shr <2 x i64> +// CHECK-PPC: error: assigning to '__vector long long' (vector of 2 'long long' values) from incompatible type 'int' + + res_vull = vec_vsrd(vull, vull); +// CHECK: shr <2 x i64> +// CHECK-LE: shr <2 x i64> +// CHECK-PPC: error: assigning to '__vector unsigned long long' (vector of 2 'unsigned long long' values) from incompatible type 'int' + + /* vec_sra */ + res_vll = vec_sra(vll, vull); +// CHECK: @llvm.ppc.altivec.vsrad +// CHECK-LE: @llvm.ppc.altivec.vsrad +// CHECK-PPC: error: call to 'vec_sra' is ambiguous + + res_vull = vec_sra(vull, vull); +// CHECK: @llvm.ppc.altivec.vsrad +// CHECK-LE: @llvm.ppc.altivec.vsrad +// CHECK-PPC: error: call to 'vec_sra' is ambiguous + + res_vll = vec_vsrad(vll, vull); +// CHECK: @llvm.ppc.altivec.vsrad +// CHECK-LE: @llvm.ppc.altivec.vsrad +// CHECK-PPC: error: assigning to '__vector long long' (vector of 2 'long long' values) from incompatible type 'int' + + res_vull = vec_vsrad(vull, vull); +// CHECK: @llvm.ppc.altivec.vsrad +// CHECK-LE: @llvm.ppc.altivec.vsrad +// CHECK-PPC: error: assigning to '__vector unsigned long long' (vector of 2 'unsigned long long' values) from incompatible type 'int' +} Index: test/Headers/altivec-intrin.c =================================================================== --- test/Headers/altivec-intrin.c +++ test/Headers/altivec-intrin.c @@ -14,5 +14,5 @@ } // FIXME: As noted in ms-intrin.cpp, it would be nice if we didn't have to // hard-code the line number from altivec.h here. -// expected-note@altivec.h:2389 {{deprecated here}} -// expected-note@altivec.h:2524 {{deprecated here}} +// expected-note@altivec.h:2435 {{deprecated here}} +// expected-note@altivec.h:2570 {{deprecated here}}