<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - IMAGE_SUPPORT macro should not be automatically defined for spir"
href="https://bugs.llvm.org/show_bug.cgi?id=39208">39208</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>IMAGE_SUPPORT macro should not be automatically defined for spir
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>OpenCL
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>omer.paparo.bivas@intel.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, yaxun.liu@amd.com
</td>
</tr></table>
<p>
<div>
<pre>The differential revision <a href="https://reviews.llvm.org/D40252">https://reviews.llvm.org/D40252</a> introduced an
automatic definition of the macro IMAGE_SUPPORT when "spir" or "spir64" is
present in the triple, forcing that macro to be present.
I'm working on a non-published device which follows the 1.2 spec and does not
support images (i.e. when queried using
<a href="https://www.khronos.org/registry/OpenCL/sdk/1.2/docs/man/xhtml/clGetDeviceInfo.html">https://www.khronos.org/registry/OpenCL/sdk/1.2/docs/man/xhtml/clGetDeviceInfo.html</a>
for CL_DEVICE_IMAGE_SUPPORT it returns false). spir is my default target, and
when compiling the IMAGE_SUPPORT is defined although the device does not
support images. This causes some conformance tests to fail, most notably the
test "kernel_preprocessor_macros" from the basic suite, with the message
"FAILURE: __IMAGE_SUPPORT__ defined to value 1 even though images aren't
supported".
I believe that this macro should not be added in the manner it is done today.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>