[PATCH] D88905: [Clang] Allow "ext_vector_type" applied to Booleans

Simon Moll via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 6 08:27:51 PDT 2020


simoll created this revision.
simoll added reviewers: hfinkel, erichkeane, craig.topper, rsandifo-arm, kaz7, k-ishizaka, rengolin.
Herald added subscribers: cfe-commits, pengfei, kristof.beyls.
Herald added a project: clang.
simoll requested review of this revision.

This is the `ext_vector_type` alternative to D81083 <https://reviews.llvm.org/D81083>.

This patch extends Clang to allow 'bool' as a valid vector element type (attribute ext_vector_type) in C/C++.

This is intended as the canonical type for SIMD masks and facilitates clean vector intrinsic declarations.
Vectors of i1 are supported on IR level and below down to many SIMD ISAs, such as AVX512, ARM SVE (fixed vector length) and the VE target (NEC SX-Aurora TSUBASA).

The RFC on cfe-dev: https://lists.llvm.org/pipermail/cfe-dev/2020-May/065434.html


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88905

Files:
  clang/docs/LanguageExtensions.rst
  clang/include/clang/AST/Type.h
  clang/include/clang/Sema/Sema.h
  clang/lib/AST/ASTContext.cpp
  clang/lib/AST/TypePrinter.cpp
  clang/lib/CodeGen/CGDebugInfo.cpp
  clang/lib/CodeGen/CGExpr.cpp
  clang/lib/CodeGen/CGExprScalar.cpp
  clang/lib/CodeGen/CodeGenFunction.cpp
  clang/lib/CodeGen/CodeGenFunction.h
  clang/lib/CodeGen/CodeGenTypes.cpp
  clang/lib/Sema/SemaExpr.cpp
  clang/lib/Sema/SemaExprCXX.cpp
  clang/lib/Sema/SemaType.cpp
  clang/test/AST/ast-print-vector-size-bool.c
  clang/test/CodeGen/debug-info-vector-bool.c
  clang/test/CodeGen/vector-alignment.c
  clang/test/Sema/ext_vector_casts.c
  clang/test/SemaCXX/constexpr-vectors.cpp
  clang/test/SemaCXX/vector-bool.cpp
  clang/test/SemaCXX/vector-conditional.cpp
  clang/test/SemaOpenCL/ext_vectors.cl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88905.296470.patch
Type: text/x-patch
Size: 50891 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201006/18d4a2c5/attachment-0001.bin>


More information about the cfe-commits mailing list