bader added inline comments.
================
Comment at: test/CodeGenOpenCL/spir_version.cl:13
kernel void foo() {}
+kernel void bar() {}
----------------
Anastasia wrote:
> Would the original code produce duplicate version metadata here or is it just
> for overloaded functions? Would it make sense to add `CHECK-NOT` to make sure
> they are not generated twice?
The original code will duplicate the metadata here. Something like:
```
!opencl.ocl.version = !{!0, !0}
```
One per global value - function in case.
Existing check is already good enough as it checks exactly for one metadata:
```
// CHECK-SPIR-CL10-DAG: !opencl.ocl.version = !{[[OCL:![0-9]+]]}
```
It was passing with buggy code, since test contains exactly one function (i.e.
global value). Now we have two global values and fix is required to pass
existing check.
https://reviews.llvm.org/D34235
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits