<html>
<head>
<base href="http://llvm.org/bugs/" />
</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 --- - OpenCL errors using vector/scalar conditionals and short integer types"
href="http://llvm.org/bugs/show_bug.cgi?id=15785">15785</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>OpenCL errors using vector/scalar conditionals and short integer types
</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>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>john@multicorewareinc.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=10371" name="attach_10371" title=".cl test file using short integer vector/scalar selection">attachment 10371</a> <a href="attachment.cgi?id=10371&action=edit" title=".cl test file using short integer vector/scalar selection">[details]</a></span>
.cl test file using short integer vector/scalar selection
Using an extended vector conditional on short integer types fails when one of
the operands is a scalar, because it performs usual unary casts before checking
compatibility between the scalar and vector types, causing type
incompatibilities incongruent with the OpenCL 1.1 Specification 6.3.i.
Quick test case attached, which gives the following errors:
test_conditional.cl:10:22: error: can't convert between vector values of
different
size ('int' and 'short4')
avec = conditional ? default_val : avec;
^ ~~~~~~~~~~~ ~~~~
test_conditional.cl:12:22: error: can't convert between vector values of
different
size ('short4' and 'int')
avec = conditional ? avec : default_val;
^ ~~~~ ~~~~~~~~~~~</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>