<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 - LLVM 12 generates poor PowerPC-SPE code"
href="https://bugs.llvm.org/show_bug.cgi?id=50088">50088</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>LLVM 12 generates poor PowerPC-SPE code
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>patrick.oppenlander@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>For the following test case:
extern float bar(float);
float foo(float a, float b)
{
return bar(a) * b;
}
GCC 8.4.0 generates
00000000 <foo>:
0: 94 21 ff f0 stwu r1,-16(r1)
4: 7c 08 02 a6 mflr r0
8: 93 e1 00 0c stw r31,12(r1)
c: 7c 9f 23 78 mr r31,r4
10: 90 01 00 14 stw r0,20(r1)
14: 48 00 00 01 bl 14 <foo+0x14>
18: 80 01 00 14 lwz r0,20(r1)
1c: 10 63 fa c8 efsmul r3,r3,r31
20: 83 e1 00 0c lwz r31,12(r1)
24: 38 21 00 10 addi r1,r1,16
28: 7c 08 03 a6 mtlr r0
2c: 4e 80 00 20 blr
LLVM 12.0.0 generates
00000000 <foo>:
0: 7c 08 02 a6 mflr r0
4: 90 01 00 04 stw r0,4(r1)
8: 94 21 ff d0 stwu r1,-48(r1)
c: 93 c1 00 28 stw r30,40(r1)
10: 93 a1 00 24 stw r29,36(r1)
14: 13 a1 0b 21 evstdd r29,8(r1)
18: 7c 9d 23 78 mr r29,r4
1c: 13 c1 13 21 evstdd r30,16(r1)
20: 48 00 00 05 bl 24 <foo+0x24>
24: 7f c8 02 a6 mflr r30
28: 3f de 00 00 addis r30,r30,0
2c: 3b de 00 00 addi r30,r30,0
30: 48 00 00 01 bl 30 <foo+0x30>
34: 10 63 ea c8 efsmul r3,r3,r29
38: 13 c1 13 01 evldd r30,16(r1)
3c: 13 a1 0b 01 evldd r29,8(r1)
40: 83 a1 00 24 lwz r29,36(r1)
44: 80 01 00 34 lwz r0,52(r1)
48: 83 c1 00 28 lwz r30,40(r1)
4c: 38 21 00 30 addi r1,r1,48
50: 7c 08 03 a6 mtlr r0
54: 4e 80 00 20 blr
It looks like the biggest problem is that LLVM is unnecessarily storing the
extended (64-bit) versions of r29 and r30.</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>