<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:spatel+llvm@rotateright.com" title="Sanjay Patel <spatel+llvm@rotateright.com>"> <span class="fn">Sanjay Patel</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - failed to hoist load through select-of-pointers?"
href="https://bugs.llvm.org/show_bug.cgi?id=34603">bug 34603</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;">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 - failed to hoist load through select-of-pointers?"
href="https://bugs.llvm.org/show_bug.cgi?id=34603#c29">Comment # 29</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - failed to hoist load through select-of-pointers?"
href="https://bugs.llvm.org/show_bug.cgi?id=34603">bug 34603</a>
from <span class="vcard"><a class="email" href="mailto:spatel+llvm@rotateright.com" title="Sanjay Patel <spatel+llvm@rotateright.com>"> <span class="fn">Sanjay Patel</span></a>
</span></b>
<pre>After <a href="https://reviews.llvm.org/rL320749">https://reviews.llvm.org/rL320749</a> :
define double @max_of_loads(double* nocapture readonly %x, double* nocapture
readonly %y, i32 %i) local_unnamed_addr #0 {
entry:
%idxprom = sext i32 %i to i64
%arrayidx = getelementptr inbounds double, double* %x, i64 %idxprom
%0 = load double, double* %arrayidx, align 8, !tbaa !3
%arrayidx2 = getelementptr inbounds double, double* %y, i64 %idxprom
%1 = load double, double* %arrayidx2, align 8, !tbaa !3
%cmp = fcmp ogt double %0, %1
%. = select i1 %cmp, double %0, double %1
ret double %.
}
And the max is back for x86:
$ ./clang -O2 -fomit-frame-pointer maxload.c -S -o -
movslq %edx, %rax
movsd (%rdi,%rax,8), %xmm0 ## xmm0 = mem[0],zero
maxsd (%rsi,%rax,8), %xmm0
retq</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>