<html>
<head>
<base href="https://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 --- - [LV] non-deterministic output related to ext/trunc"
href="https://llvm.org/bugs/show_bug.cgi?id=25490">25490</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[LV] non-deterministic output related to ext/trunc
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</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>Loop Optimizer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mcrosier@codeaurora.org
</td>
</tr>
<tr>
<th>CC</th>
<td>anemet@apple.com, james.molloy@arm.com, llvm-bugs@lists.llvm.org, mssimpso@codeaurora.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Given the below test case I get non-deterministic output from the loop
vectorizer:
void test(unsigned n, unsigned char *a, unsigned char *b, unsigned char *c)
{
for (unsigned i = 0; i < n; ++i) {
int tmp = c[i];
a[i] = (((int)a[i] * ((int)tmp)) >> 8);
b[i] = (((int)b[i] * ((int)tmp)) >> 8);
}
}
Both outputs appear to be correct, but non-determinism is bad in general.
Reproduce with:
clang -S -o test1.ll -O3 --target=aarch64-linux-gnu -mcpu=cortex-a57 test.c
-emit-llvm
Emitting IR seems to work better than emitting assembly.</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>