Re: [PATCH] D18713: [OpenCL] Generate bitcast when target address space does not change.

2016-04-12 Thread Yaxun Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL266107: [OpenCL] Handle AddressSpaceConversion when target address space does not… (authored by yaxunl). Changed prior to commit: http://reviews.llvm.org/D18713?vs=52800&id=53439#toc Repository: rL L

Re: [PATCH] D18713: [OpenCL] Generate bitcast when target address space does not change.

2016-04-06 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! http://reviews.llvm.org/D18713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

Re: [PATCH] D18713: [OpenCL] Generate bitcast when target address space does not change.

2016-04-06 Thread Yaxun Liu via cfe-commits
yaxunl updated the summary for this revision. yaxunl updated this revision to Diff 52800. yaxunl added a comment. Add more checks for w/o -ffake-address-space-map to the test. http://reviews.llvm.org/D18713 Files: lib/CodeGen/CGExprScalar.cpp test/CodeGenOpenCL/address-spaces-conversions.cl

Re: [PATCH] D18713: [OpenCL] Generate bitcast when target address space does not change.

2016-04-06 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: test/CodeGenOpenCL/address-spaces-conversions.cl:11 @@ -8,2 +10,3 @@ arg_gen = arg_glob; // implicit cast global -> generic // CHECK: %{{[0-9]+}} = addrspacecast i32 addrspace(1)* %{{[0-9]+}} to i32 addrspace(4)* + --

Re: [PATCH] D18713: [OpenCL] Generate bitcast when target address space does not change.

2016-04-05 Thread Yaxun Liu via cfe-commits
yaxunl added a comment. > If I check online I can still see it on line 1414: > http://clang.llvm.org/doxygen/CGExprScalar_8cpp_source.html This is the only place CreateAddrSpaceCast showing up and being fixed by this patch. http://reviews.llvm.org/D18713 __

Re: [PATCH] D18713: [OpenCL] Generate bitcast when target address space does not change.

2016-04-05 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. In http://reviews.llvm.org/D18713#391406, @yaxunl wrote: > > Btw, there is another place in lib/CodeGen/CGExprScalar.cpp with > > CreateAddrSpaceCast call too. I am wondering if that could have the same > > issue... if yes, may be we should fix it already now. > > > I

Re: [PATCH] D18713: [OpenCL] Generate bitcast when target address space does not change.

2016-04-04 Thread Yaxun Liu via cfe-commits
yaxunl updated this revision to Diff 52607. yaxunl marked an inline comment as done. yaxunl added a comment. Removed 2016-04-01-addrcast.cl and it to address-spaces-conversions.cl. http://reviews.llvm.org/D18713 Files: lib/CodeGen/CGExprScalar.cpp test/CodeGenOpenCL/address-spaces-conversio

Re: [PATCH] D18713: [OpenCL] Generate bitcast when target address space does not change.

2016-04-04 Thread Yaxun Liu via cfe-commits
yaxunl marked an inline comment as done. Comment at: test/CodeGenOpenCL/2016-04-01-addrcast.cl:1 @@ +1,2 @@ +// RUN: %clang_cc1 %s -triple x86_64-unknown-linux-gnu -O0 -cl-std=CL2.0 -emit-llvm -o - | FileCheck %s + Anastasia wrote: > Can we rename the file to jus

Re: [PATCH] D18713: [OpenCL] Generate bitcast when target address space does not change.

2016-04-04 Thread Yaxun Liu via cfe-commits
yaxunl added a comment. > Btw, there is another place in lib/CodeGen/CGExprScalar.cpp with > CreateAddrSpaceCast call too. I am wondering if that could have the same > issue... if yes, may be we should fix it already now. I cannot find another CreateAddrSpaceCast in lib/CodeGen/CGExprScalar.cp

Re: [PATCH] D18713: [OpenCL] Generate bitcast when target address space does not change.

2016-04-04 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. LG, apart from renaming the test file. Btw, there is another place in lib/CodeGen/CGExprScalar.cpp with CreateAddrSpaceCast call too. I am wondering if that could have the same issue... if yes, may be we should fix it already now. Comment at: test/C

Re: [PATCH] D18713: [OpenCL] Generate bitcast when target address space does not change.

2016-04-01 Thread John McCall via cfe-commits
rjmccall added a comment. LGTM, thanks! http://reviews.llvm.org/D18713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18713: [OpenCL] Generate bitcast when target address space does not change.

2016-04-01 Thread Yaxun Liu via cfe-commits
yaxunl updated the summary for this revision. yaxunl updated this revision to Diff 52431. yaxunl added a comment. Use CreatePointerBitCastOrAddrSpaceCast as John suggested. http://reviews.llvm.org/D18713 Files: lib/CodeGen/CGExprScalar.cpp test/CodeGenOpenCL/2016-04-01-addrcast.cl Index: t

Re: [PATCH] D18713: [OpenCL] Generate bitcast when target address space does not change.

2016-04-01 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGExprScalar.cpp:1421 @@ -1415,1 +1420,3 @@ +else + return Builder.CreateBitCast(Src, DstTy); } This is just CreatePointerBitCastOrAddrSpaceCast. http://reviews.llvm.org/D18713 __