[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 19 07:44:12 PDT 2017


yaxunl added inline comments.


================
Comment at: test/CodeGenOpenCL/sampler.cl:62
+
+  const sampler_t const_smp = CLK_ADDRESS_CLAMP_TO_EDGE | CLK_NORMALIZED_COORDS_TRUE | CLK_FILTER_LINEAR;
+  // CHECK: [[CONST_SAMP:%[0-9]+]] = call %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 35)
----------------
what if address of const_smp is taken and assigned to a pointer to sampler_t ? Do we have diagnosis in place?


https://reviews.llvm.org/D34342





More information about the cfe-commits mailing list