<html>
<head>
<base href="https://llvm.org/bugs/" />
</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 --- - False dependence breaking fails for ROUNDSSr"
href="https://llvm.org/bugs/show_bug.cgi?id=31143">31143</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>False dependence breaking fails for ROUNDSSr
</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>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</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>mkuper@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>target triple = "x86_64-pc-linux-gnu"
define void @test(float* nocapture %a, <4 x float>* nocapture %b, i32 %k) {
entry:
br label %for.body
for.body:
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%arrayidx = getelementptr inbounds float, float* %a, i64 %indvars.iv
%v = load float, float* %arrayidx, align 4
%floor = call float @floorf(float %v)
%sub = fsub float %floor, %v
%v1 = insertelement <4 x float> undef, float %sub, i32 0
%br = shufflevector <4 x float> %v1, <4 x float> undef, <4 x i32> <i32 0, i32
0, i32 0, i32 0>
store volatile <4 x float> %br, <4 x float>* %b, align 4
%indvars.iv.next = add i64 %indvars.iv, 1
%lftr.wideiv = trunc i64 %indvars.iv.next to i32
%exitcond = icmp eq i32 %lftr.wideiv, %k
br i1 %exitcond, label %for.end, label %for.body
for.end:
ret void
}
declare float @floorf(float) nounwind readnone
When compiled with -msse4.1 (to emit a roundss for the floorf) we get:
.LBB0_1: # %for.body
# =>This Inner Loop Header: Depth=1
movss (%rdi), %xmm0 # xmm0 = mem[0],zero,zero,zero
roundss $9, %xmm0, %xmm1
subss %xmm0, %xmm1
shufps $0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0]
movups %xmm1, (%rsi)
addq $4, %rdi
decl %edx
jne .LBB0_1
# BB#2: # %for.end
retq
The false dependence on %xmm1 is not broken.
As expected, adding the requires xorps makes this loop about 3 times faster.</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>