[PATCH] D39129: [OpenCL] Fix generation of constant address space sampler in function scope

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 13 06:00:34 PST 2017


Anastasia added a comment.

In https://reviews.llvm.org/D39129#902848, @bader wrote:

> @Anastasia, during the discussion of similar fix (https://reviews.llvm.org/D34342).
>
> I found another bug in the CodeGen library. Do you have time to fix it too?
>  Here is the reproducer from the old review request:
>
>   int get_sampler_initializer(void);
>   kernel void foo() {
>     const sampler_t const_smp_func_init = get_sampler_initializer();
>   }
>


I am getting an error currently: `error: internal error: could not emit constant value "abstractly"`. It seems very weird and also doesn't seem to be related to constant AS change.  I think this should be allowed to compile though? I can try to investigate but since I don't know the time frame yet and it doesn't seem to be related to constant AS I would prefer to do it as a separate change.


https://reviews.llvm.org/D39129





More information about the cfe-commits mailing list