summaryrefslogtreecommitdiffstats
path: root/clang/test/Headers
Commit message (Collapse)AuthorAgeFilesLines
...
* [OpenCL] Remove tests without triple from test/Headers/opencl-c-header.cl.Yaxun Liu2016-05-301-4/+0
| | | | | | This test requires triples with Itanium C++ ABI whereas triples with MSVC environment uses Microsoft C++ ABI. llvm-svn: 271198
* [OpenCL] Add the default header file opencl-c.h for OpenCL C languageYaxun Liu2016-05-301-0/+37
| | | | | | | | | | | | OpenCL has large number of "builtin" functions ("builtin" in the sense of OpenCL spec) which are defined in header files. To compile OpenCL kernels using these builtin functions, a header file is needed. This header file is based on the Khronos implementation (https://github.com/KhronosGroup/SPIR/blob/spirv-1.0/lib/Headers/opencl.h) with heavy refactoring. Re-commit after fixing failures on ppc64/systemz etc. Differential Revision: http://reviews.llvm.org/D18369 llvm-svn: 271197
* Revert r271136 [OpenCL] Add the default header file opencl-c.h for OpenCL C ↵Yaxun Liu2016-05-281-9/+0
| | | | | | language due to build failure on ppc64/hexagon/systemz. llvm-svn: 271144
* [OpenCL] Add the default header file opencl-c.h for OpenCL C languageYaxun Liu2016-05-281-0/+9
| | | | | | | | | | OpenCL has large number of "builtin" functions ("builtin" in the sense of OpenCL spec) which are defined in header files. To compile OpenCL kernels using these builtin functions, a header file is needed. This header file is based on the Khronos implementation (https://github.com/KhronosGroup/SPIR/blob/spirv-1.0/lib/Headers/opencl.h) with heavy refactoring. Differential Revision: http://reviews.llvm.org/D18369 llvm-svn: 271136
* [AVX512] _m512_setzero_qi/hi should return __m512i.Craig Topper2016-05-171-1/+1
| | | | llvm-svn: 269733
* [modules] Don't expose *intrin.h headers that cannot be included standalone asRichard Smith2016-04-161-0/+1
| | | | | | separate modules. These cause build breakage with -fmodules-local-submodule-visibility. llvm-svn: 266501
* D18325: Added mm_malloc module export.John Thompson2016-03-221-0/+4
| | | | llvm-svn: 264092
* test/Headers/float.c: fix theoretical edge valuesHubert Tong2016-02-121-11/+11
| | | | | | | | | | For *_MANT_DIG, *_MAX_EXP and *_MIN_EXP, the C Standard does not list the least requirements directly. This patch adjusts the test values with refined ones. Patch by Jorge Teixeira! llvm-svn: 260710
* <float.h>: do not define DECIMAL_DIG in -std=c89 mode; this macro was added ↵Richard Smith2016-02-121-6/+20
| | | | | | | | in C99. Patch by Jorge Teixeira! llvm-svn: 260639
* Remove bogus check that larger floating point types have smaller minimumRichard Smith2016-02-111-8/+0
| | | | | | normalized exponents. That's not true for double versus double double. llvm-svn: 260610
* XFAIL this test for PPC64 for now. It looks like the *_MIN_EXP macros are in ↵Richard Smith2016-02-111-0/+2
| | | | | | fact defined incorrectly for that target. llvm-svn: 260583
* In C11, provide macros FLT_DECIMAL_DIG, DBL_DECIMAL_DIG, and ↵Richard Smith2016-02-111-0/+211
| | | | | | | | LDBL_DECIMAL_DIG in <float.h>. Patch by Jorge Teixeira! llvm-svn: 260577
* Make ms-intrin.cpp test require the x86 target.Nico Weber2015-09-231-0/+2
| | | | llvm-svn: 248355
* Add bug number to FIXME comment.Nico Weber2015-09-221-1/+1
| | | | llvm-svn: 248235
* ms Intrin.h: Fix __movsw's and __stosw's inline asm.Nico Weber2015-09-221-2/+34
| | | | | | | | | | | Before, clang's internal assembler would reject the inline asm in clang's Intrin.h. To make sure this doesn't happen for other Intrin.h functions using __asm__ blocks, add 32-bit and 64-bit codegen tests for Intrin.h. Sadly, these tests discovered that __readcr3 and __writecr3 have bad implementations in 64-bit builds. This will have to be fixed in a follow-up. llvm-svn: 248234
* Revert "Revert r241620 and follow-up commits" and move the initializationAdrian Prantl2015-07-081-1/+1
| | | | | | of the llvm targets from clang/CodeGen into ClangCheck.cpp and CIndex.cpp. llvm-svn: 241653
* Revert r241620 and follow-up commits while investigating linux buildbot ↵Adrian Prantl2015-07-071-1/+1
| | | | | | failures. llvm-svn: 241642
* Update testcases that use precompiled headers to require a target afterAdrian Prantl2015-07-071-1/+1
| | | | | | r241620. llvm-svn: 241623
* Move xtest to its own file to match the gcc header organization.Eric Christopher2015-06-171-0/+4
| | | | llvm-svn: 239926
* Fix clang/test/Headers/x86intrin-2.c. _readfsbase_u32() is provided in not ↵NAKAMURA Takumi2015-06-171-0/+2
| | | | | | i686 but x86-64. llvm-svn: 239896
* Update the intel intrinsic headers to use the target attribute support.Eric Christopher2015-06-173-120/+144
| | | | | | | | | | | | | | | | | | | This involved removing the conditional inclusion and replacing them with target attributes matching the original conditional inclusion and checks. The testcase update removes the macro checks for each file and replaces them with usage of the __target__ attribute, e.g.: int __attribute__((__target__(("sse3")))) foo(int a) { _mm_mwait(0, 0); return 4; } This usage does require the enclosing function have the requisite __target__ attribute for inlining and code generation - also for any macro intrinsic uses in the enclosing function. There's no change for existing uses of the intrinsic headers. llvm-svn: 239883
* Commit some test changes somehow missed in r239789.Richard Smith2015-06-161-1/+1
| | | | llvm-svn: 239791
* [PowerPC] This revision adds 68 of the missing "Predefined Functions for ↵Bill Seurer2015-06-041-2/+2
| | | | | | | | | | | | Vector Programming" from appendix A of the OpenPOWER ABI for Linux Supplement document. I also added tests for the new functions and updated another test that was looking for specific line numbers in error messages from altivec.h. https://llvm.org/bugs/show_bug.cgi?id=23679 http://reviews.llvm.org/D10131 llvm-svn: 239066
* This patch adds support for the vector quadword add/sub instructions introducedKit Barton2015-05-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | in POWER8. These are the Clang-related changes for http://reviews.llvm.org/D9081 vadduqm vaddeuqm vaddcuq vaddecuq vsubuqm vsubeuqm vsubcuq vsubecuq All builtins are added in altivec.h, and guarded with the POWER8_VECTOR and powerpc64 macros. http://reviews.llvm.org/D9903 llvm-svn: 238145
* [PPC64] Add vector pack/unpack support from ISA 2.07Bill Schmidt2015-05-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the following new instructions in the Power ISA 2.07: vpksdss vpksdus vpkudus vpkudum vupkhsw vupklsw These instructions are available through the vec_packs, vec_packsu, vec_unpackh, and vec_unpackl built-in interfaces. These are lane-sensitive instructions, so the built-ins have different implementations for big- and little-endian, and the instructions must be marked as killing the vector swap optimization for now. The first three instructions perform saturating pack operations. The fourth performs a modulo pack operation, which means it can be represented with a vector shuffle, and conversely the appropriate vector shuffles may cause this instruction to be generated. The other instructions are only generated via built-in support for now. I noticed during patch preparation that the macro __VSX__ was not previously predefined when the power8-vector or direct-move features are requested. This is an error, and I've corrected that here as well. Appropriate tests have been added. There is a companion patch to llvm for the rest of this support. llvm-svn: 237500
* [modules] Fix a #include cycle when building a module for our builtin headers.Richard Smith2015-05-142-0/+14
| | | | | | | | | | xmmintrin.h includes emmintrin.h and vice versa if SSE2 is enabled. We break this cycle for a modules build, and instead make the xmmintrin.h module re-export the immintrin.h module. Also included is a fix for an assert in the serialization code if a module exports another module that was declared later in the same module map. llvm-svn: 237321
* Make this test not rely on a backend being registered.Eric Christopher2015-04-031-9/+5
| | | | llvm-svn: 233993
* Add builtins for the 64-bit vector integer arithmetic instructions added in ↵Kit Barton2015-03-111-2/+2
| | | | | | | | | | POWER8. These are the Clang-related changes for the instructions added to LLVM in http://reviews.llvm.org/D7959. Phabricator review: http://reviews.llvm.org/D8041 llvm-svn: 231931
* Restore the libc++ definition of max_align_t on Apple platformsDmitri Gribenko2015-02-243-0/+249
| | | | | | | | | | | | | Clang has introduced ::max_align_t in stddef.h in r201729, but libc++ was already defining std::max_align_t on Darwin because there was none in the global namespace. After that Clang commit though, libc++ started defining std::max_align_t to be a typedef for ::max_align_t, which has a different definition. This changed the ABI. This commit restores the previous definition. rdar://19919394 rdar://18557982 llvm-svn: 230292
* Add more feature flags to the x86 instrinsic test.Craig Topper2014-12-271-0/+27
| | | | llvm-svn: 224878
* [PowerPC] Add VSX builtins for vec_divBill Schmidt2014-11-141-2/+2
| | | | | | | | | | | | This patch adds builtin support for xvdivdp and xvdivsp, along with a new test case. The builtins are accessed using vec_div in altivec.h. Builtins are listed (mostly) alphabetically there, so inserting these changed the line numbers for deprecation warnings tested in test/Headers/altivec-intrin.c. There is a companion patch for LLVM. llvm-svn: 221984
* Remove definitions from Intrin.h that already exist in one of the other x86 ↵Craig Topper2014-11-031-0/+5
| | | | | | intrinsic headers. Add a run line with Broadwell as the cpu type to ms-intrin.cpp test to catch some of these in the future. llvm-svn: 221127
* Update for llvm api change.Rafael Espindola2014-10-151-0/+1
| | | | llvm-svn: 219797
* [AVX512] Added VPCMPEQ intrinisics to headers.Robert Khasanov2014-10-081-0/+6
| | | | | | | | Added tests. Patch by Maxim Blumenthal <maxim.blumenthal@intel.com> llvm-svn: 219319
* [PATCH][Power] Fix (and deprecate) vec_lvsl and vec_lvsr for little endianBill Schmidt2014-10-061-0/+18
| | | | | | | | | | | | | | | | | | | | | The use of the vec_lvsl and vec_lvsr interfaces are discouraged for little endian targets since Power8 hardware is a minimum requirement, and Power8 provides reasonable performance for unaligned vector loads and stores. Up till now we have not provided "correct" (i.e., big- endian-compatible) code generation for these interfaces, as to do so produces poorly performing code. However, this has become the source of too many questions. With this patch, LLVM will now produce compatible code for these interfaces, but will also produce a deprecation warning message for PPC64LE when one of them is used. This should make the porting direction clearer to programmers. A similar patch has recently been committed to GCC. This patch includes a test for the warning message. There is a companion patch that adds two unit tests to projects/test-suite. llvm-svn: 219137
* Fix interaction of max_align_t and modules.Richard Smith2014-10-031-1/+1
| | | | | | | | | When building with modules enabled, we were defining max_align_t as a typedef for a different anonymous struct type each time it was included, resulting in an error if <stddef.h> is not covered by a module map and is included more than once in the same modules-enabled compilation of C11 or C++11 code. llvm-svn: 218931
* Fix bugs in cpuid.h.Akira Hatanaka2014-09-201-0/+18
| | | | | | | | | | | | | | | This commit makes two changes: - Remove the push and pop instructions that were saving and restoring %ebx before and after cpuid in 32-bit pic mode. We were doing this to ensure we don't lose the GOT address in pic register %ebx, but this isn't necessary because the GOT address is kept in a virtual register. - In 64-bit mode, preserve base register %rbx around cpuid. This fixes PR20311 and rdar://problem/17686779. llvm-svn: 218173
* Add a module cache path to test/Headers/cxx11Ben Langmuir2014-08-121-1/+2
| | | | | | Don't depend on the serialization format remaining the same. llvm-svn: 215454
* AVX-512: Added intrinsics to clang.Elena Demikhovsky2014-07-221-0/+6
| | | | | | | The set is small, that what I have right now. Everybody is welcome to add more. llvm-svn: 213641
* Driver: bifurcate extended and basic MSC versioningSaleem Abdulrasool2014-07-163-6/+6
| | | | | | | | | | | | | | | | | | | | | | | This restores the original behaviour of -fmsc-version. The older option remains as a mechanism for specifying the basic version information. A secondary option, -fms-compatibility-version permits the user to specify an extended version to the driver. The new version takes the value as a dot-separated value rather than the major * 100 + minor format that -fmsc-version format. This makes it easier to specify the value as well as a more flexible manner for specifying the value. Specifying both values is considered an error. The older parameter is left solely as a driver option, which is normalised into the newer parameter. This allows us to retain a single code path in the compiler itself whilst preserving the semantics of the old parameter as well as avoid having to determine which of two formats are being used by the invocation. The test changes are due to the fact that the compiler no longer supports the old option, and is a direct conversion to the new option. llvm-svn: 213119
* Headers: add hint intrinsics to arm_acle.hSaleem Abdulrasool2014-07-121-4/+6
| | | | | | | | This adds the ARM ACLE hint intrinsic wrappers to arm_acle.h. These need to be protected with a !defined(_MSC_VER) since MSVC (and thus clang in compatibility mode) provide these wrappers as proper builtin intrinsics. llvm-svn: 212891
* test: merge arm-intrin into ms-intrin, fix invocationSaleem Abdulrasool2014-07-082-6/+5
| | | | | | | | This merges the two tests into one since there is no real reason to separate them. It also fixes the test invocation to specify -fms-compatibility without which we would end up without an Intrin.h header. llvm-svn: 212563
* Headers: conditionalise more declarationsSaleem Abdulrasool2014-07-081-0/+6
| | | | | | | | Protect MMX specific declarations under a __MMX__ guard. This header can be included on non-x86 architectures (e.g. ARM) which do not support the MMX ISA. Use the preprocessor to prevent these declarations from being processed. llvm-svn: 212512
* Introduce arm_acle.h supporting existing LLVM builtin intrinsicsYi Kong2014-06-271-0/+7
| | | | | | | | | | | | | | Summary: This patch introduces ACLE header file, implementing extensions that can be directly mapped to existing Clang intrinsics. It implements for both AArch32 and AArch64. Reviewers: t.p.northover, compnerd, rengolin Reviewed By: compnerd, rengolin Subscribers: rnk, echristo, compnerd, aemerson, mroth, cfe-commits Differential Revision: http://reviews.llvm.org/D4296 llvm-svn: 211962
* Recommit r209532 with -ffreestanding.Akira Hatanaka2014-05-231-0/+13
| | | | | | This is a test case for r209489. llvm-svn: 209559
* Remove test while I investigate why the test is breaking the bots.Akira Hatanaka2014-05-231-14/+0
| | | | llvm-svn: 209558
* XFAIL test which is breaking some of the build bots.Akira Hatanaka2014-05-231-0/+1
| | | | llvm-svn: 209556
* Test case for r209489.Akira Hatanaka2014-05-231-0/+13
| | | | llvm-svn: 209532
* Split out header integration testsAlp Toker2014-05-043-42/+0
| | | | | | | | | | | | These are somewhat arbitrary tests that check if "thing goes fine" when processing various platform-specific headers. Also move warn-sysheader.cpp to Misc where the other diagnostics infrastructure tests live. File moves only. llvm-svn: 207936
* Add a triple to new test.Nico Weber2014-04-301-1/+1
| | | | | | NULL is just 0 on Windows, so the Wsentinel part of the test doesn't pass there. llvm-svn: 207607
OpenPOWER on IntegriCloud