<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 --- - Loop vectorizer seems very reluctant to make use of PMULLD"
href="http://llvm.org/bugs/show_bug.cgi?id=22703">22703</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Loop vectorizer seems very reluctant to make use of PMULLD
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</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>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mats@planetcatfish.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=13946" name="attach_13946" title="Sample code">attachment 13946</a> <a href="attachment.cgi?id=13946&action=edit" title="Sample code">[details]</a></span>
Sample code
I expected the attached code to produce PMULLD on x86-64 (or x86-32) with
SSE4.1 enabled.
Command line used:
clang++ -S -O3 -msse4.1 floop.cpp
Using this:
clang++ -S -O3 -msse4.1 -Rpass-analysis=loop-vectorize floop.cpp
Gives:
floop.cpp:8:5: remark: not beneficial to vectorize and user disabled
interleaving [-Rpass-analysis=loop-vectorize]
for (i=0;i<100;i++) a[i]= (float) (i*i);
Adding these:
#pragma clang loop vectorize(enable)
#pragma clang loop interleave(enable)
it unrolls the loop and uses pmuludq, but still no pmulld.</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>