summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/target-features-error-2.c
Commit message (Collapse)AuthorAgeFilesLines
* [CodeGen] Improve diagnostics related to target attributesGabor Buella2018-06-071-14/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When requirement imposed by __target__ attributes on functions are not satisfied, prefer printing those requirements, which are explicitly mentioned in the attributes. This makes such messages more useful, e.g. printing avx512f instead of avx2 in the following scenario: ``` $ cat foo.c static inline void __attribute__((__always_inline__, __target__("avx512f"))) x(void) { } int main(void) { x(); } $ clang foo.c foo.c:7:2: error: always_inline function 'x' requires target feature 'avx2', but would be inlined into function 'main' that is compiled without support for 'avx2' x(); ^ 1 error generated. ``` bugzilla: https://bugs.llvm.org/show_bug.cgi?id=37338 Reviewers: craig.topper, echristo, dblaikie Reviewed By: craig.topper, echristo Differential Revision: https://reviews.llvm.org/D46541 llvm-svn: 334174
* [X86] Add builtins for vector element insert and extract for different 128 ↵Craig Topper2018-06-061-1/+1
| | | | | | | | | | | | | | and 256 bit vector types. Use them to implement the extract and insert intrinsics. Previously we were just using extended vector operations in the header file. This unfortunately allowed non-constant indices to be used with the intrinsics. This is incompatible with gcc, icc, and MSVC. It also introduces a different performance characteristic because non-constant index gets lowered to a vector store and an element sized load. By adding the builtins we can check for the index to be a constant and ensure its in range of the vector element count. User code still has the option to use extended vector operations themselves if they need non-constant indexing. llvm-svn: 334057
* Revert r301487: Replace HashString algorithm with xxHash64Rui Ueyama2017-04-261-6/+3
| | | | | | This reverts commit r301487 to make buildbots green. llvm-svn: 301491
* Replace HashString algorithm with xxHash64Rui Ueyama2017-04-261-3/+6
| | | | | | | | | | | | The previous algorithm processed one character at a time, which is very painful on a modern CPU. Replace it with xxHash64, which both already exists in the codebase and is fairly fast. Patch from Scott Smith! Differential Revision: https://reviews.llvm.org/D32509 llvm-svn: 301487
* [x86] AVX FP compare builtins should require AVX target feature (PR28112)Sanjay Patel2016-06-211-1/+32
| | | | | | | | | | | | | | | | | This is a fix for PR28112: https://llvm.org/bugs/show_bug.cgi?id=28112 The FP comparison intrinsics that take an immediate parameter (rather than specifying a comparison predicate in the function name) were added with AVX; these are macros in avxintrin.h. This patch makes clang behavior match gcc (error if a program tries to use these without -mavx) and matches the Intel documentation, eg: VCMPPS: m128 _mm_cmp_ps(m128 a, __m128 b, const int imm) 'V' means this is intended to only work with the AVX form of the instruction. Differential Revision: http://reviews.llvm.org/D21306 llvm-svn: 273311
* Add support for the always_inline + target feature diagnostic to printEric Christopher2015-11-141-1/+1
| | | | | | | out the first missing target feature that's required and reword the diagnostic accordingly. llvm-svn: 253121
* Provide a frontend based error for always_inline functions that requireEric Christopher2015-11-121-0/+7
target features that the caller function doesn't provide. This matches the existing backend failure to inline functions that don't have matching target features - and diagnoses earlier in the case of always_inline. Fix up a few test cases that were, in fact, invalid if you tried to generate code from the backend with the specified target features and add a couple of tests to illustrate what's going on. This should fix PR25246. llvm-svn: 252834
OpenPOWER on IntegriCloud