[PATCH] D20339: Update clang for D20260

Peter Collingbourne via cfe-commits cfe-commits at lists.llvm.org
Tue May 17 16:24:34 PDT 2016

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.


More information about the cfe-commits mailing list