[PATCH] D25866: [Sema] Support implicit scalar to vector conversions

Simon Dardis via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 21 02:58:44 PDT 2016


sdardis created this revision.
sdardis added subscribers: rnk, bruno, ahatanak, cfe-commits.
Herald added a reviewer: vkalintiris.

This patch teaches clang to perform implicit scalar to vector conversions
when one of the operands to a binary vector expression is a scalar like GCC.

The scalar is implicitly casted to the vector elements type and splatted to
produce a vector of the same type.


https://reviews.llvm.org/D25866

Files:
  lib/Sema/SemaExpr.cpp
  test/Sema/vector-cast.c
  test/Sema/vector-scalar-implict-conv.c
  test/Sema/zvector.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25866.75401.patch
Type: text/x-patch
Size: 8175 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161021/b613b454/attachment.bin>


More information about the cfe-commits mailing list