llvm-project/clang/lib/Basic
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
..
Attributes.cpp Post-commit review coding style change: renaming HasAttribute to hasAttribute. No functional changes. 2014-03-31 15:26:40 +00:00
Builtins.cpp CodeGen: make target builtins support languages 2014-07-02 17:41:27 +00:00
CMakeLists.txt [CMake] clangBasic: Add Core to LINK_COMPONENTS introduced by r219840. 2014-10-16 00:12:02 +00:00
CharInfo.cpp CharInfo: Add missing "using namespace clang::charinfo" in .cpp file. 2013-02-08 22:37:49 +00:00
Diagnostic.cpp Remove unused DiagnosticsEngine::NumErrorsSuppressed member. 2014-10-22 20:09:12 +00:00
DiagnosticIDs.cpp Remove unused DiagnosticsEngine::NumErrorsSuppressed member. 2014-10-22 20:09:12 +00:00
FileManager.cpp Make VFS and FileManager match the current MemoryBuffer API. 2014-10-26 22:44:13 +00:00
FileSystemStatCache.cpp Make VFS and FileManager match the current MemoryBuffer API. 2014-10-26 22:44:13 +00:00
IdentifierTable.cpp Use enumerators instead of hardcoded integers when we decide if keyword is enabled. 2014-10-29 10:59:18 +00:00
LangOptions.cpp Get rid of SanitizerOptions::Disabled global. NFC. 2014-10-30 19:33:44 +00:00
Makefile Use tabs instead of spaces. 2012-03-02 16:06:37 +00:00
Module.cpp [modules] Add support for 'textual header' directives. 2014-10-22 23:50:56 +00:00
ObjCRuntime.cpp Add a define for the ObjFW runtime ABI version. 2013-09-16 16:31:49 +00:00
OpenMPKinds.cpp [OPENMP] 'omp teams' directive basic support. 2014-10-09 04:18:56 +00:00
OperatorPrecedence.cpp Replace C++0x in a comment with C++11 2013-07-14 17:04:56 +00:00
SanitizerBlacklist.cpp Fixup for r220403: Use getFileLoc() instead of getSpellingLoc() in SanitizerBlacklist. 2014-10-22 19:34:25 +00:00
SourceLocation.cpp Inline function into only use. 2014-08-18 18:17:32 +00:00
SourceManager.cpp Make VFS and FileManager match the current MemoryBuffer API. 2014-10-26 22:44:13 +00:00
TargetInfo.cpp Fix assertion on asm register that are "%" 2014-08-17 13:19:48 +00:00
Targets.cpp [PowerPC] Initial VSX intrinsic support, with min/max for vector double 2014-10-31 19:19:24 +00:00
TokenKinds.cpp [C++11] Use 'nullptr'. 2014-05-08 06:41:40 +00:00
Version.cpp Revert "Revert "Devise a package-private means to determine the LLVM version string"" 2014-06-06 10:36:22 +00:00
VersionTuple.cpp Patch to wrap up '_' as separator in version numbers 2014-10-06 16:46:02 +00:00
VirtualFileSystem.cpp Make VFS and FileManager match the current MemoryBuffer API. 2014-10-26 22:44:13 +00:00
Warnings.cpp Use -Rblah, not -Wblah, to control remark diagnostics. This was always the 2014-08-07 00:24:21 +00:00