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

Alexey Bader via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 27 10:03:01 PDT 2017


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) {
    const sampler_t const_smp_func_init = sampler_init_value;
  }

The problem is in the function that handles sampler initialization with integer.
There should no problems with the case you provided as it doesn't require additional function call injection.


https://reviews.llvm.org/D34342





More information about the cfe-commits mailing list