[PATCH] D11001: Add support for System z vector language extensions

Ulrich Weigand ulrich.weigand at de.ibm.com
Tue Jul 7 10:06:47 PDT 2015


uweigand added reviewers: rsmith, hfinkel.
uweigand added a subscriber: cfe-commits.

The z13 vector facility has an associated language extension,
closely modeled on AltiVec/VSX.  The main differences are:

- vector long, vector float and vector pixel are not supported

- vector long long and vector double are supported (like VSX)

- comparison operators return a vector rather than a scalar integer

- shift operators behave like the OpenCL shift operators

- vector bool is only supported as argument to certain operators;
  some operators allow mixing a bool with a non-bool vector

This patch adds clang support for the extension.  It is closely modelled
on the AltiVec support.  As with AltiVec, there's a separate -m option
(-mzvector) that is only supported for z (just as -maltivec is only
supported for PowerPC).  There's also a separate LangOpt.

The extension as implemented here is intended to be compatible with
the -mzvector extension recently implemented by GCC.

Based on a patch by Richard Sandiford.


http://reviews.llvm.org/D11001

Files:
  include/clang/Basic/DiagnosticParseKinds.td
  include/clang/Basic/LangOptions.def
  include/clang/Basic/TokenKinds.def
  include/clang/Driver/Options.td
  include/clang/Parse/Parser.h
  include/clang/Sema/Sema.h
  lib/Basic/IdentifierTable.cpp
  lib/Basic/Module.cpp
  lib/Basic/Targets.cpp
  lib/CodeGen/CGExprScalar.cpp
  lib/Driver/Tools.cpp
  lib/Frontend/CompilerInvocation.cpp
  lib/Parse/Parser.cpp
  lib/Sema/DeclSpec.cpp
  lib/Sema/SemaExpr.cpp
  lib/Sema/SemaExprCXX.cpp
  lib/Sema/SemaLookup.cpp
  test/CodeGen/zvector.c
  test/Preprocessor/predefined-arch-macros.c
  test/Sema/zvector.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11001.29188.patch
Type: text/x-patch
Size: 192523 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150707/8bf3d74d/attachment.bin>


More information about the cfe-commits mailing list