[all-commits] [llvm/llvm-project] a9ddb7: [PowerPC] Fixing implicit castings in altivec for ...

maryammoghadas via All-commits all-commits at lists.llvm.org
Thu Jun 16 15:07:17 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a9ddb7d54e34533ff4af32d720d69177ef0c605d
      https://github.com/llvm/llvm-project/commit/a9ddb7d54e34533ff4af32d720d69177ef0c605d
  Author: Maryam Moghadas <maryammo at ca.ibm.com>
  Date:   2022-06-16 (Thu, 16 Jun 2022)

  Changed paths:
    M clang/include/clang/Basic/BuiltinsPPC.def
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/lib/Headers/altivec.h
    M clang/lib/Sema/SemaChecking.cpp
    M clang/test/CodeGen/PowerPC/altivec-ct.c
    M clang/test/CodeGen/PowerPC/altivec-dss.c
    M clang/test/CodeGen/PowerPC/builtins-ppc-32bit-vec-ll.c
    M clang/test/CodeGen/PowerPC/builtins-ppc-crypto.c
    M clang/test/CodeGen/PowerPC/builtins-ppc-error.c
    M clang/test/CodeGen/PowerPC/builtins-ppc-int128.c
    M clang/test/CodeGen/PowerPC/builtins-ppc-ld-st-rmb.c
    M clang/test/CodeGen/PowerPC/builtins-ppc-p10vector-error.c
    M clang/test/CodeGen/PowerPC/builtins-ppc-p10vector.c
    M clang/test/CodeGen/PowerPC/builtins-ppc-p8vector.c
    M clang/test/CodeGen/PowerPC/builtins-ppc-p9vector.c
    A clang/test/CodeGen/PowerPC/builtins-ppc-quadword-char.c
    M clang/test/CodeGen/PowerPC/builtins-ppc-quadword-noi128.c
    M clang/test/CodeGen/PowerPC/builtins-ppc-quadword.c
    M clang/test/CodeGen/PowerPC/builtins-ppc-vec-ins-error.c
    M clang/test/CodeGen/PowerPC/builtins-ppc-vsx.c
    M clang/test/CodeGen/PowerPC/builtins-ppc-xl-xst.c
    M clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-vec-error.c
    M clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat.c
    M clang/test/CodeGen/PowerPC/ppc-vector-compare.cpp

  Log Message:
  -----------
  [PowerPC] Fixing implicit castings in altivec for -fno-lax-vector-conversions

XL considers different vector types to be incompatible with each other.
For example assignment between variables of types vector float and vector
long long or even vector signed int and vector unsigned int are diagnosed.
clang, however does not diagnose such cases and does a simple bitcast between
the two types. This could easily result in program errors. This patch is to
fix the implicit casts in altivec.h so that there is no incompatible vector
type errors whit -fno-lax-vector-conversions, this is the prerequisite patch
to switch the default to -fno-lax-vector-conversions later.

Reviewed By: nemanjai, amyk

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




More information about the All-commits mailing list