llvm-project/clang/lib/Headers
Bill Schmidt 691e01d94e [PowerPC] Initial VSX intrinsic support, with min/max for vector double
Now that we have initial support for VSX, we can begin adding
intrinsics for programmer access to VSX instructions.  This patch
performs the necessary enablement in the front end, and tests it by
implementing intrinsics for minimum and maximum using the vector
double data type.

The main change in the front end is to no longer disallow "vector" and
"double" in the same declaration (lib/Sema/DeclSpec.cpp), but "vector"
and "long double" must still be disallowed.  The new intrinsics are
accessed via vec_max and vec_min with changes in
lib/Headers/altivec.h.  Note that for v4f32, we already access
corresponding VMX builtins, but with VSX enabled we should use the
forms that allow all 64 vector registers.

The new built-ins are defined in include/clang/Basic/BuiltinsPPC.def.

I've added a new test in test/CodeGen/builtins-ppc-vsx.c that is
similar to, but much smaller than, builtins-ppc-altivec.c.  This
allows us to test VSX IR generation without duplicating CHECK lines
for the existing bazillion Altivec tests.

Since vector double is now legal when VSX is available, I've modified
the error message, and changed where we test for it and for vector
long double, since the target machine isn't visible in the old place.
This serendipitously removed a not-pertinent warning about 'long'
being deprecated when used with 'vector', when "vector long double" is
encountered and we just want to issue an error.  The existing tests
test/Parser/altivec.c and test/Parser/cxx-altivec.cpp have been
updated accordingly, and I've added test/Parser/vsx.c to verify that
"vector double" is now legitimate with VSX enabled.

There is a companion patch for LLVM.

llvm-svn: 220989
2014-10-31 19:19:24 +00:00
..
CMakeLists.txt Sort files list in lib/Headers/CMakeLists.txt 2014-10-14 23:15:43 +00:00
Intrin.h CodeGen: add __readfsdword builtin 2014-10-29 16:35:41 +00:00
Makefile Rename lib/Headers/module.map to module.modulemap 2014-04-17 00:52:48 +00:00
__stddef_max_align_t.h Fix interaction of max_align_t and modules. 2014-10-03 00:31:35 +00:00
__wmmintrin_aes.h Split the instrinsic header wmmintrin.h into AES and PCLMUL parts, so 2012-11-05 23:30:26 +00:00
__wmmintrin_pclmul.h Split the instrinsic header wmmintrin.h into AES and PCLMUL parts, so 2012-11-05 23:30:26 +00:00
adxintrin.h [x86] Fixed argument types in intrinsics: 2014-09-24 06:45:23 +00:00
altivec.h [PowerPC] Initial VSX intrinsic support, with min/max for vector double 2014-10-31 19:19:24 +00:00
ammintrin.h
arm_acle.h arm_acle: Fix error in ROR implementation 2014-08-28 15:25:52 +00:00
avx2intrin.h Patched clang to emit x86 blends as shufflevectors. 2014-05-13 02:37:02 +00:00
avx512bwintrin.h [AVX512] Added VPCMPEQ intrinisics to headers. 2014-10-08 17:18:13 +00:00
avx512erintrin.h AVX-512: Added intrinsics to clang. 2014-07-22 11:31:39 +00:00
avx512fintrin.h [AVX512] Added VPCMPEQ intrinisics to headers. 2014-10-08 17:18:13 +00:00
avx512vlbwintrin.h [AVX512] Added VPCMPEQ intrinisics to headers. 2014-10-08 17:18:13 +00:00
avx512vlintrin.h [AVX512] Added VPCMPEQ intrinisics to headers. 2014-10-08 17:18:13 +00:00
avxintrin.h Implement AVX1 vbroadcast intrinsics with vector initializers 2014-05-29 20:47:29 +00:00
bmi2intrin.h Add intrinsic of MULX in BMI2 header 2012-10-05 18:50:09 +00:00
bmiintrin.h added Intel's BMI intrinsic variants 2014-05-28 20:26:57 +00:00
cpuid.h Fix trailing commas in AMD define. 2014-10-01 21:22:17 +00:00
emmintrin.h Fix a SSE2 intrinsics typo 2013-11-23 22:11:57 +00:00
f16cintrin.h Remove some stray underscores from copyright block. Fix first line length to match length of the one after the copyright block. 2013-09-27 03:57:18 +00:00
float.h <float.h>: Don't seek #include_next if -ffreestanding for targeting mingw. 2014-10-22 01:25:49 +00:00
fma4intrin.h
fmaintrin.h
ia32intrin.h [x86] Add Clang support for intrinsic __rdpmc. 2014-06-30 18:23:58 +00:00
immintrin.h [AVX512] Added VPCMPEQ intrinisics to headers. 2014-10-08 17:18:13 +00:00
iso646.h
limits.h Fix two pedantic issues with our builtin headers. The __STDC_VERSION__ 2014-02-19 23:38:18 +00:00
lzcntintrin.h
mm3dnow.h Add PRFCHW intrinsic support 2013-03-26 17:52:08 +00:00
mm_malloc.h PR14964: intrinsic headers using non-reserved identifiers 2013-01-16 23:08:36 +00:00
mmintrin.h
module.modulemap Fix interaction of max_align_t and modules. 2014-10-03 00:31:35 +00:00
nmmintrin.h
pmmintrin.h PR14964: intrinsic headers using non-reserved identifiers 2013-01-16 23:08:36 +00:00
popcntintrin.h
prfchwintrin.h Add include guards to prfchwintrin.h. 2013-05-09 15:07:39 +00:00
rdseedintrin.h Add missing include guards into headers in lib/Headers. While it may appear 2013-07-14 05:41:45 +00:00
rtmintrin.h Add missing include guards into headers in lib/Headers. While it may appear 2013-07-14 05:41:45 +00:00
shaintrin.h Fix ifdef macro missed in previous commit 2013-09-19 14:07:14 +00:00
smmintrin.h Patched clang to emit x86 blends as shufflevectors. 2014-05-13 02:37:02 +00:00
stdalign.h libstdc++'s <cstdalign> #includes <stdalign.h> and expects it to guard against 2013-02-21 02:17:58 +00:00
stdarg.h Added standard macro guard. In case __GNUC_VA_LIST was not 2014-07-02 15:25:03 +00:00
stdatomic.h Add an implementation of C11's stdatomic.h 2014-10-03 04:29:40 +00:00
stdbool.h
stddef.h Fix interaction of max_align_t and modules. 2014-10-03 00:31:35 +00:00
stdint.h Change __INTx_TYPE__ to be always signed. This changes the value for 2014-07-28 21:06:22 +00:00
stdnoreturn.h Parsing support for C11's _Noreturn keyword. No semantics yet. 2013-01-17 22:16:11 +00:00
tbmintrin.h Use logical/arithmetic operations instead of builtins in tbmintrin.h. This way we can remove the intrinsic support from the backend. 2013-10-05 17:08:42 +00:00
tgmath.h Fix the return type of the complex creal functions. Patch by YunZhong Gao, modified to use _Static_assert and to check __STDC_HOSTED__ by me. 2013-05-09 17:41:19 +00:00
tmmintrin.h PR14964: intrinsic headers using non-reserved identifiers 2013-01-16 23:08:36 +00:00
unwind.h Provide inline definitions of _Unwind_GetIP etc. for ARM in unwind.h 2013-09-25 22:34:03 +00:00
vadefs.h vadefs.h: be even more conservative and only define the macros if already defined 2014-10-14 23:20:25 +00:00
varargs.h
wmmintrin.h Split the instrinsic header wmmintrin.h into AES and PCLMUL parts, so 2012-11-05 23:30:26 +00:00
x86intrin.h Replace a few // comments with /**/ comments in headers, for consistency. 2014-07-08 18:29:27 +00:00
xmmintrin.h Replace a few // comments with /**/ comments in headers, for consistency. 2014-07-08 18:29:27 +00:00
xopintrin.h xopintrin.h: Add wrappers for all flavors of _mm_com. 2013-05-09 15:07:46 +00:00