[PATCH] D106120: [PowerPC] Implement vector bool/pixel initialization under -faltivec-src-compat=xl

Amy Kwan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 15 19:15:56 PDT 2021


amyk created this revision.
amyk added reviewers: PowerPC, nemanjai, stefanp, power-llvm-team, bmahjour.
amyk added projects: LLVM, PowerPC, clang.
Herald added a subscriber: shchenz.
amyk requested review of this revision.

This patch implements the initialization of vectors under the `-faltivec-src-compat=xl` option
introduced in https://reviews.llvm.org/D103615.

Under this option, the initialization of scalar vectors, `vector bool`, and `vector pixel` are
treated the same, where the initialization value is splatted across the whole vector.

This patch does not change the behaviour of the `-faltivec-src-compat=mixed` option, 
which is the current default for Clang.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D106120

Files:
  clang/include/clang/Sema/Sema.h
  clang/lib/Sema/SemaCast.cpp
  clang/lib/Sema/SemaExpr.cpp
  clang/test/CodeGen/vector-bool-pixel-altivec-init.c
  clang/test/CodeGen/vector-bool-pixel-altivec-init2.c
  clang/test/CodeGen/vector-scalar-altivec-init.c
  clang/test/CodeGen/vector-scalar-altivec-init2.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106120.359188.patch
Type: text/x-patch
Size: 22599 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210716/b89c3bbf/attachment-0001.bin>


More information about the cfe-commits mailing list