<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 - Extract value from vector - dynamic index"
href="https://bugs.llvm.org/show_bug.cgi?id=47608">47608</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Extract value from vector - dynamic index
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: X86
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>david.bolvansky@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>craig.topper@gmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, spatel+llvm@rotateright.com
</td>
</tr></table>
<p>
<div>
<pre>typedef double v2df __attribute__((vector_size(16)));
double bar (v2df x, int y)
{
return x[y+1];
}
Clang -Ofast:
bar(double __vector(2), int): # @bar(double
__vector(2), int)
add edi, 1
movaps xmmword ptr [rsp - 24], xmm0
and edi, 1
movsd xmm0, qword ptr [rsp + 8*rdi - 24] # xmm0 = mem[0],zero
ret
GCC:
bar(double __vector(2), int):
movsxd rdi, edi #4.1
movups XMMWORD PTR [-24+rsp], xmm0 #4.1
movsd xmm0, QWORD PTR [-16+rsp+rdi*8] #5.14
ret
<a href="https://gcc.godbolt.org/z/Eab687">https://gcc.godbolt.org/z/Eab687</a></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>