<html>
<head>
<base href="http://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 - [ppc] Slow code for rotate shift and add"
href="http://bugs.llvm.org/show_bug.cgi?id=32817">32817</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[ppc] Slow code for rotate shift and add
</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>All
</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>Backend: PowerPC
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>echristo@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Seems to go about 25% slower than the gcc equivalent.
echristo@athyra ~/tmp> cat bar.c
unsigned int bar(int k, unsigned int x) {
return ((1 + (x >> k)) + k);
}
echristo@athyra ~/tmp> clang -target powerpc64le-linux-gnu -S -O2 -o - bar.c
.text
.abiversion 2
.file "bar.c"
.globl bar
.p2align 4
.type bar,@function
bar: # @bar
.Lfunc_begin0:
# BB#0:
srw 4, 4, 3
add 3, 3, 4
addi 3, 3, 1
clrldi 3, 3, 32
blr
.long 0
.quad 0
.Lfunc_end0:
.size bar, .Lfunc_end0-.Lfunc_begin0
.ident "clang version google3-trunk (trunk r301047)"
.section ".note.GNU-stack","",@progbits
echristo@athyra ~/tmp> powerpc64le-linux-gnu-gcc -S -O2 -o - bar.c
.file "bar.c"
.abiversion 2
.section ".toc","aw"
.section ".text"
.machine power8
.align 2
.p2align 4,,15
.globl bar
.type bar, @function
bar:
addi 9,3,1
srw 4,4,3
add 3,9,4
rldicl 3,3,0,32
blr
.long 0
.byte 0,0,0,0,0,0,0,0
.size bar,.-bar
.ident "GCC:
(Google_crosstoolv18-gcc-4.9.x-powerpc64le-grtev4-linux-gnu) 4.9.x-google"
.section .note.GNU-stack,"",@progbits</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>