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 > 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. This seems like a valid code which should be compiled in my view. At least I don't see anything in the spec that disallows this. This is not an interesting use case though, however it becomes more interesting with the use of ternary operator. Do you see any issues fixing the CodeGen for it? https://reviews.llvm.org/D34342 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits