pcc added inline comments.
================
Comment at: test/CodeGenOpenCL/constant-addr-space-globals.cl:3
@@ -2,3 +2,3 @@
-// CHECK: @array = addrspace({{[0-9]+}}) constant
+// CHECK: @array = local_unnamed_addr addrspace({{[0-9]+}}) constant
__constant float array[2] = {0.0f, 1.0f};
----------------
rsmith wrote:
> Where does this come from? It doesn't look like Clang adds this, and this
> test does not appear to enable any optimizations.
OpenCL enables optimizations by default in the frontend, see
`getOptimizationLevel` in `lib/Frontend/CompilerInvocation.cpp`.
It does seem a little weird that we're doing this in the frontend, this should
probably be a driver feature. I must apologise for me-from-5-years-ago who
implemented this in r120876.
In the meantime, maybe we should be adding `-cl-opt-disable` to the OpenCL
codegen tests.
http://reviews.llvm.org/D20339
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits