[llvm-bugs] [Bug 47608] New: Extract value from vector - dynamic index
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Sep 22 04:24:21 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=47608
Bug ID: 47608
Summary: Extract value from vector - dynamic index
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: david.bolvansky at gmail.com
CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
llvm-dev at redking.me.uk, spatel+llvm at rotateright.com
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
https://gcc.godbolt.org/z/Eab687
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200922/67d0cc29/attachment.html>
More information about the llvm-bugs
mailing list