<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:hiraditya@msn.com" title="hiraditya <hiraditya@msn.com>"> <span class="fn">hiraditya</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Really bad codegen for libc++ vector"
href="https://bugs.llvm.org/show_bug.cgi?id=35637">bug 35637</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>hiraditya@msn.com
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>FIXED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Really bad codegen for libc++ vector"
href="https://bugs.llvm.org/show_bug.cgi?id=35637#c11">Comment # 11</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Really bad codegen for libc++ vector"
href="https://bugs.llvm.org/show_bug.cgi?id=35637">bug 35637</a>
from <span class="vcard"><a class="email" href="mailto:hiraditya@msn.com" title="hiraditya <hiraditya@msn.com>"> <span class="fn">hiraditya</span></a>
</span></b>
<pre>This bug is fixed with Eric's patch.
clang trunk -O3 generates:
```
f1(): # @f1()
push r14
push rbx
push rax
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi + 16], 0
mov edi, 8294400
call operator new(unsigned long)
mov qword ptr [rbx], rax
lea r14, [rax + 8294400]
mov qword ptr [rbx + 16], r14
mov edx, 8294400
mov rdi, rax
xor esi, esi
call memset@PLT
mov qword ptr [rbx + 8], r14
mov rax, rbx
add rsp, 8
pop rbx
pop r14
ret
f2(): # @f2()
push r15
push r14
push rbx
mov edi, 24
call operator new(unsigned long)
mov r15, rax
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax + 16], 0
mov edi, 8294400
call operator new(unsigned long)
mov qword ptr [r15], rax
mov rbx, rax
add rbx, 8294400
mov qword ptr [r15 + 16], rbx
mov edx, 8294400
mov rdi, rax
xor esi, esi
call memset@PLT
mov qword ptr [r15 + 8], rbx
mov rax, r15
pop rbx
pop r14
pop r15
ret
mov r14, rax
mov rdi, r15
call operator delete(void*)
mov rdi, r14
call _Unwind_Resume@PLT
main: # @main
xor eax, eax
ret
```</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>