llvm-project/clang/lib
Eric Christopher 15709991d0 Add an error when calling a builtin that requires features that don't
match the feature set of the function that they're being called from.

This ensures that we can effectively diagnose some[1] code that would
instead ICE in the backend with a failure to select message.

Example:

__m128d foo(__m128d a, __m128d b) {
  return __builtin_ia32_addsubps(b, a);
}

compiled for normal x86_64 via:

clang -target x86_64-linux-gnu -c

would fail to compile in the back end because the normal subtarget
features for x86_64 only include sse2 and the builtin requires sse3.

[1] We're still not erroring on:

__m128i bar(__m128i const *p) { return _mm_lddqu_si128(p); }

where we should fail and error on an always_inline function being
inlined into a function that doesn't support the subtarget features
required.

llvm-svn: 250473
2015-10-15 23:47:11 +00:00
..
ARCMigrate Replace double negation of !FileID.isInvalid() with FileID.isValid(). 2015-10-03 10:46:20 +00:00
AST [ATTR] Automatic line feed after pragma-like attribute. 2015-10-12 06:59:48 +00:00
ASTMatchers Add decayedType and hasDecayedType AST matchers 2015-10-12 21:46:07 +00:00
Analysis Fix Clang-tidy modernize-use-nullptr warnings in source directories; other minor cleanups 2015-10-06 23:40:43 +00:00
Basic Add support for CloudABI/aarch64. 2015-10-15 15:07:07 +00:00
CodeGen Add an error when calling a builtin that requires features that don't 2015-10-15 23:47:11 +00:00
Driver Recommit "Clang support for -flto=thin." 2015-10-15 20:35:53 +00:00
Edit Replace double negation of !FileID.isInvalid() with FileID.isValid(). 2015-10-03 10:46:20 +00:00
Format clang-format/java: Break after annotations on fields in Chromium style. 2015-10-15 16:03:01 +00:00
Frontend Recommit "Clang support for -flto=thin." 2015-10-15 20:35:53 +00:00
FrontendTool Provide a BuryPointer for unique_ptrs. 2014-08-29 16:53:14 +00:00
Headers Headers: Switch some headers to LF line endings for consistency. 2015-10-15 10:33:27 +00:00
Index [VFS] Port SimpleFormatContext to InMemoryFileSystem. 2015-10-06 10:23:34 +00:00
Lex Parse and ignore #pragma runtime_checks in MS extensions mode (PR25138) 2015-10-12 20:47:58 +00:00
Parse Parse and ignore #pragma runtime_checks in MS extensions mode (PR25138) 2015-10-12 20:47:58 +00:00
Rewrite Make local function isWhitespaceExceptNL static instead of in anonymous namespace 2015-07-28 04:54:03 +00:00
Sema [MSVC] Fix for http://llvm.org/PR24132: __declspec(property): double invocations of foo() when compiling foo()->propertyName 2015-10-14 04:05:42 +00:00
Serialization [modules] Improve error message on failed module load due to a missing file to 2015-10-13 01:26:26 +00:00
StaticAnalyzer [analyzer] Don’t invalidate CXXThis when conservatively evaluating const methods (PR 21606) 2015-10-13 22:20:52 +00:00
Tooling [VFS] Wire up driver VFS through tooling. 2015-10-09 13:03:25 +00:00
CMakeLists.txt Fix build with various feature flag combinations 2014-07-14 22:17:22 +00:00
Makefile Make clang's rewrite engine a core feature 2014-07-16 16:48:33 +00:00