This revision was automatically updated to reflect the committed changes.
Closed by commit rG66b112d624a5: [OpenCL] Fix reinterpret_cast of vectors
(authored by olestrohm).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101519/new/
https://reviews.ll
Anastasia accepted this revision.
Anastasia added a comment.
This revision is now accepted and ready to land.
LGTM! Thanks!
Just remember to reflect your final change in the commit message description. :)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101519/new/
https://reviews.llvm.or
olestrohm updated this revision to Diff 345442.
olestrohm added a comment.
Fixed the code style and added some comments to the tests.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101519/new/
https://reviews.llvm.org/D101519
Files:
clang/include/clang/Sema/Sema.h
clang/lib/Sema/Sem
Anastasia added inline comments.
Comment at: clang/lib/Sema/SemaCast.cpp:2333
+ if (DestType->isExtVectorType() || SrcType->isExtVectorType()) {
+// FIXME: Allow for reinterpret cast between 3 and 4 element vectors
+if (Self.areVectorTypesSameSize(SrcType, De
olestrohm updated this revision to Diff 344408.
olestrohm added a comment.
I tried to add a special case for 3 and 4 element vectors, but that caused
issues in codgen, so I've left it as a FIXME for now.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101519/new/
https://reviews.llvm.org
Anastasia added inline comments.
Comment at: clang/test/SemaOpenCLCXX/reinterpret-cast.clcpp:15
+ int4 i4;
+ auto i4_to_i3 = reinterpret_cast(i4); //
expected-error{{reinterpret_cast from vector 'int4' (vector of 4 'int' values)
to vector 'int3' (vector of 3 'int' values) of
olestrohm updated this revision to Diff 343647.
olestrohm retitled this revision from "[C++4OpenCL] Fix reinterpret_cast of
vectors and types with address spaces" to "[C++4OpenCL] Fix reinterpret_cast of
vectors".
olestrohm set the repository for this revision to rG LLVM Github Monorepo.
olestroh
Anastasia added inline comments.
Comment at: clang/test/SemaOpenCLCXX/reinterpret-cast.clcpp:1
+// RUN: %clang_cc1 %s -pedantic -verify -fsyntax-only
+
olestrohm wrote:
> Anastasia wrote:
> > Btw I assume your patch also allows reinterpret_cast between vectors? W
olestrohm added inline comments.
Comment at: clang/test/SemaOpenCLCXX/reinterpret-cast.clcpp:1
+// RUN: %clang_cc1 %s -pedantic -verify -fsyntax-only
+
Anastasia wrote:
> Btw I assume your patch also allows reinterpret_cast between vectors? What
> happens if we
Anastasia added a subscriber: rjmccall.
Anastasia added inline comments.
Comment at: clang/lib/Sema/SemaCast.cpp:2352
+ if (SrcType == DestType ||
+ (Self.LangOpts.OpenCL &&
+ Self.Context.removeAddrSpaceQualType(SrcType) ==
I am thinking of whether w
olestrohm updated this revision to Diff 341844.
olestrohm added a comment.
Fixed formatting.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101519/new/
https://reviews.llvm.org/D101519
Files:
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaCast.cpp
clang/lib/Sema/SemaExpr.cpp
olestrohm created this revision.
olestrohm added reviewers: Anastasia, svenvh.
olestrohm added a project: clang.
Herald added subscribers: ldrumm, yaxunl.
olestrohm requested review of this revision.
Herald added a subscriber: cfe-commits.
This fixes two issues with reinterpret_cast in C++ for Ope
12 matches
Mail list logo