[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-12 Thread Andrew Savonichev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348919: [OpenCL] Fix for TBAA information of pointer after addresspacecast (authored by asavonic, committed by ). Changed prior to commit: https://reviews.llvm.org/D55262?vs=177012&id=177827#toc Reposi

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-11 Thread Romanov Vlad via Phabricator via cfe-commits
romanovvlad added a comment. @Anastasia Could you, please, merge the patch if it's OK with you? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55262/new/ https://reviews.llvm.org/D55262 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-07 Thread Romanov Vlad via Phabricator via cfe-commits
romanovvlad marked an inline comment as done. romanovvlad added a comment. Could you merge it? I have no rights to do it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55262/new/ https://reviews.llvm.org/D55262 ___ cfe-commits mailing list

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-06 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. Thanks, LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55262/new/ https://reviews.llvm.org/D55262 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-06 Thread Romanov Vlad via Phabricator via cfe-commits
romanovvlad updated this revision to Diff 177012. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55262/new/ https://reviews.llvm.org/D55262 Files: lib/CodeGen/CGExpr.cpp test/CodeGenOpenCLCXX/address-space-deduction2.cl Index: test/CodeGenOpenCLCXX/address-space-deduction2.cl ==

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-06 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D55262#1321682 , @rjmccall wrote: > Sorry. Can you post the result of passing `-ast-dump` instead of > `-emit-llvm` to the compiler? Actually, nevermind, I don't need that. If you can fix the address-space issue I pointed

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-06 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Sorry. Can you post the result of passing `-ast-dump` instead of `-emit-llvm` to the compiler? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55262/new/ https://reviews.llvm.org/D55262 ___ cfe-commits mailing list

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-06 Thread Romanov Vlad via Phabricator via cfe-commits
romanovvlad added a comment. Backtrace: F7656050: stack CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55262/new/ https://reviews.llvm.org/D55262 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-06 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D55262#1321641 , @romanovvlad wrote: > Yes it's 1, but after addrspacecast alignment becomes not struct A but > alignment of the pointer Oh! Yes, that's even more broken than I thought. Comment at: lib/C

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-06 Thread Romanov Vlad via Phabricator via cfe-commits
romanovvlad added a comment. Yes it's 1, but after addrspacecast alignment becomes not struct A but alignment of the pointer CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55262/new/ https://reviews.llvm.org/D55262 ___ cfe-commits mailing l

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-06 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D55262#1321048 , @romanovvlad wrote: > I'm getting the same IR for both examples you provided. And for both load of > X value is aligned on 4 bytes wo patch and on 1 byte with. That's odd, because the natural type alignment

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-06 Thread Romanov Vlad via Phabricator via cfe-commits
romanovvlad added a comment. I'm getting the same IR for both examples you provided. And for both load of X value is aligned on 4 bytes wo patch and on 1 byte with. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55262/new/ https://reviews.llvm.org/D55262 _

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-05 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Oh, sorry, that wasn't a good example because that's still the natural alignment for `A`. It should be `static_cast<__generic int &>(GPtr->X)`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55262/new/ https://reviews.llvm.org/D55262 ___

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-05 Thread Romanov Vlad via Phabricator via cfe-commits
romanovvlad updated this revision to Diff 176850. romanovvlad added a comment. Added new test case + formatting. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55262/new/ https://reviews.llvm.org/D55262 Files: lib/CodeGen/CGExpr.cpp test/CodeGenOpenCLCXX/address-space-deduction2.cl

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-05 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. The code was dropping all the original l-value information, which includes alignment. So if you start with an l-value that refers to under-aligned memory (or over-aligned), we were losing that information on the resulting l-value. The test case would be something lik

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-05 Thread Romanov Vlad via Phabricator via cfe-commits
romanovvlad added a comment. What bugs with unaligned pointers do you mean? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55262/new/ https://reviews.llvm.org/D55262 ___ cfe-commits mailing list cfe-commits@lists.llvm

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-04 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM. Although this also fixes bugs with unaligned pointers that you might consider adding tests for. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55262/

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-04 Thread Romanov Vlad via Phabricator via cfe-commits
romanovvlad created this revision. romanovvlad added reviewers: rjmccall, yaxunl, Anastasia. Herald added a subscriber: kosarev. When addresspacecast is generated resulting pointer should preserve TBAA information from original value. Repository: rC Clang https://reviews.llvm.org/D55262 Fil