hvdijk added a comment.

In D120254#3419369 <https://reviews.llvm.org/D120254#3419369>, @svenvh wrote:

> In D120254#3419221 <https://reviews.llvm.org/D120254#3419221>, @hvdijk wrote:
>
>> The problem is that this change enables certain built-ins in OpenCL 1.2 that 
>> take a memory_scope argument, but the memory_scope type is not defined in 
>> OpenCL 1.2 mode. When we then process the function, sub_group_barrier in my 
>> example, things break when checking whether the declaration matches the 
>> built-in. I am not sure what the right fix here is. Can we just define the 
>> type if any extension is enabled that requires the type, or is that not 
>> allowed?
>
> Thanks for digging further and providing a reproducer!  I think the fix is to 
> only make the `sub_group_barrier(cl_mem_fence_flags flags, memory_scope)` 
> overload available for OpenCL 2.0 or above.  That would also match 
> `opencl-c.h`.
>
> The following patch seems to fix the issue that you described:

Huh, I could have sworn I saw more builtins than just this one but clearly I 
messed up there, that's the only one. That fix looks good to me, thanks, do you 
want to submit that as a new change along with the test or would you like a 
hand with it?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120254/new/

https://reviews.llvm.org/D120254

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to