[all-commits] [llvm/llvm-project] c3fe84: [Clang] Add option to handle behaviour of vector b...

stefanp-ibm via All-commits all-commits at lists.llvm.org
Mon Jun 28 09:16:50 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c3fe847f9d90de5a6a76fd1d5f5823ab4719accc
      https://github.com/llvm/llvm-project/commit/c3fe847f9d90de5a6a76fd1d5f5823ab4719accc
  Author: Stefan Pintilie <stefanp at ca.ibm.com>
  Date:   2021-06-28 (Mon, 28 Jun 2021)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Basic/LangOptions.def
    M clang/include/clang/Basic/LangOptions.h
    M clang/include/clang/Driver/Options.td
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Sema/SemaExpr.cpp
    A clang/test/CodeGen/vector-compat-pixel-bool-ternary.c
    A clang/test/CodeGen/vector-compat-pixel-bool.c
    A clang/test/CodeGen/vector-compat-ternary.c
    A clang/test/CodeGen/vector-compat.c

  Log Message:
  -----------
  [Clang] Add option to handle behaviour of vector bool/vector pixel.

Added the option `-altivec-src-compat=[mixed,gcc,xl]`. The default at this time is `mixed`.

The default behavior for clang is for all vector compares to return a scalar unless the vectors being
compared are vector bool or vector pixel. In that case the compare returns a
vector. With the gcc case all vector compares return vectors and in the xl case
all vector compares return scalars.

This patch does not change the default behavior of clang.

This option will be used in future patches to implement behaviour compatibility for the vector bool/pixel types.

Reviewed By: bmahjour

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




More information about the All-commits mailing list