[all-commits] [llvm/llvm-project] 53fd8d: [Clang][AArch64][SVE] Allow subscript operator for...

David Truby via All-commits all-commits at lists.llvm.org
Thu Apr 14 05:21:07 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 53fd8db79192f38feaec11c761e0d0fbdf1516b0
      https://github.com/llvm/llvm-project/commit/53fd8db79192f38feaec11c761e0d0fbdf1516b0
  Author: David Truby <david.truby at arm.com>
  Date:   2022-04-14 (Thu, 14 Apr 2022)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/AST/ExprConstant.cpp
    M clang/lib/CodeGen/CGExprScalar.cpp
    M clang/lib/Sema/SemaExpr.cpp
    A clang/test/CodeGen/aarch64-sve-vector-subscript-ops.c
    A clang/test/Sema/aarch64-sve-vector-subscript-ops.c

  Log Message:
  -----------
  [Clang][AArch64][SVE] Allow subscript operator for SVE types

Undefined behaviour is just passed on to extract_element when the
index is out of bounds. Subscript on svbool_t is not allowed as
this doesn't really have meaningful semantics.

Differential Revision: https://reviews.llvm.org/D122732


  Commit: 66c44b20b4a538fbb1bae8bc9533c25f5a006bd5
      https://github.com/llvm/llvm-project/commit/66c44b20b4a538fbb1bae8bc9533c25f5a006bd5
  Author: David Truby <david.truby at arm.com>
  Date:   2022-04-14 (Thu, 14 Apr 2022)

  Changed paths:
    M clang/lib/Sema/SemaExpr.cpp
    A clang/test/CodeGen/aarch64-sve-vector-shift-ops.c
    A clang/test/Sema/aarch64-sve-vector-shift-ops.c
    M clang/test/Sema/sizeless-1.c
    M clang/test/SemaCXX/sizeless-1.cpp

  Log Message:
  -----------
  [Clang][AArch64][SVE] Add shift operators for SVE vector types

This patch enables shift operators on SVE vector types, as well as
supporting vector-scalar shift operations.
Shifts by a scalar that is wider than the contained type in the
vector are permitted but as in the C standard if the value is larger
than the width of the type the behavior is undefined.

Differential Revision: https://reviews.llvm.org/D123303


Compare: https://github.com/llvm/llvm-project/compare/d064c4801c92...66c44b20b4a5


More information about the All-commits mailing list