[PATCH] D39129: [OpenCL] Fix generation of constant address space sampler in function scope
Alexey Bader via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 14 03:16:42 PST 2017
bader added a comment.
In https://reviews.llvm.org/D39129#923235, @Anastasia wrote:
> 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.
I'm fine with fixing this test case later, but I assume that patch posted https://reviews.llvm.org/D34342 covers more cases. Is this version able to handle samples declared as `const sampler_t const_smp`?
Are you okay if I commit https://reviews.llvm.org/D34342 instead?
https://reviews.llvm.org/D39129
More information about the cfe-commits
mailing list