[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-11-15 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318290: [OpenCL] Fix code generation of function-scope constant samplers. (authored by bader). Repository: rL LLVM https://reviews.llvm.org/D34342 Files: cfe/trunk/lib/CodeGen/CGDecl.cpp

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-11-14 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. LGTM! Thanks! https://reviews.llvm.org/D34342 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D34342#792350, @bader wrote: > Note: `get_sampler_initializer` from my test case returns integer, not a > sampler, but having function is not relevant to the problem. > Here is a bit simplified test case without function calls that still

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-27 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. Note: `get_sampler_initializer` from my test case returns integer, not a sampler, but having function is not relevant to the problem. Here is a bit simplified test case without function calls that still reproduces the problem: kernel void foo(int sampler_init_value) {

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D34342#786941, @bader wrote: > Added test case reproducing the issue described in the description. > Removed test cases from test/SemaOpenCL/sampler_t.cl covered by > test/CodeGenOpenCL/sampler.cl. > > While I was moving one test case from

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-21 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 103421. bader added a comment. This revision is now accepted and ready to land. Added test case reproducing the issue described in the description. Removed test cases from test/SemaOpenCL/sampler_t.cl covered by test/CodeGenOpenCL/sampler.cl. While I was

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-21 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. I think I found the way to reproduce the issue. There are two pre-requisites: sampler must be declared in the constant address space and clang must be build in Debug mode. I'll fix the test and add the test cases from test/SemaOpenCL/sampler_t.cl as mentioned earlier.

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D34342#785454, @bader wrote: > Wow... > Nice catch. > For some reason I can't reproduce the problem neither. > I will drop source code change, but I'd like to modify the test anyway. I think we probably had this issue at some point...

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-20 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. Wow... Nice catch. For some reason I can't reproduce the problem neither. I will drop source code change, but I'd like to modify the test anyway. https://reviews.llvm.org/rL277024 added test/CodeGenOpenCL/sampler.cl and modified test/SemaOpenCL/sampler_t.cl. I want to move

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/CodeGenOpenCL/sampler.cl:62 + + const sampler_t const_smp = CLK_ADDRESS_CLAMP_TO_EDGE | CLK_NORMALIZED_COORDS_TRUE | CLK_FILTER_LINEAR; + // CHECK: [[CONST_SAMP:%[0-9]+]] = call %opencl.sampler_t addrspace(2)*

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks. https://reviews.llvm.org/D34342 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-19 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: test/CodeGenOpenCL/sampler.cl:62 + + const sampler_t const_smp = CLK_ADDRESS_CLAMP_TO_EDGE | CLK_NORMALIZED_COORDS_TRUE | CLK_FILTER_LINEAR; + // CHECK: [[CONST_SAMP:%[0-9]+]] = call %opencl.sampler_t addrspace(2)*

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: test/CodeGenOpenCL/sampler.cl:62 + + const sampler_t const_smp = CLK_ADDRESS_CLAMP_TO_EDGE | CLK_NORMALIZED_COORDS_TRUE | CLK_FILTER_LINEAR; + // CHECK: [[CONST_SAMP:%[0-9]+]] = call %opencl.sampler_t addrspace(2)*

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-19 Thread Alexey Bader via Phabricator via cfe-commits
bader created this revision. Constant samplers are handled as static variables and clang's code generation library, which leads to llvm::unreachable. We bypass emitting sampler variable as static since it's translated to a function call later. https://reviews.llvm.org/D34342 Files: