<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 --- - Avoid partial SSE register stall"
href="https://llvm.org/bugs/show_bug.cgi?id=27573">27573</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Avoid partial SSE register stall
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>hjl.tools@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>david.l.kreitzer@intel.com, llvm-bugs@lists.llvm.org, zia.ansari@intel.com
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>[hjl@gnu-6 pr57954]$ cat x.c
float
foo1 (int x)
{
return x;
}
double
foo2 (int x)
{
return x;
}
float
foo3 (long long int x)
{
return x;
}
double
foo4 (long long int x)
{
return x;
}
[hjl@gnu-6 pr57954]$ gcc -S -O2 -mtune=haswell x.c
[hjl@gnu-6 pr57954]$ cat x.s
.file "x.c"
.section .text.unlikely,"ax",@progbits
.LCOLDB0:
.text
.LHOTB0:
.p2align 4,,15
.globl foo1
.type foo1, @function
foo1:
.LFB0:
.cfi_startproc
pxor %xmm0, %xmm0
cvtsi2ss %edi, %xmm0
ret
.cfi_endproc
.LFE0:
.size foo1, .-foo1
.section .text.unlikely
.LCOLDE0:
.text
.LHOTE0:
.section .text.unlikely
.LCOLDB1:
.text
.LHOTB1:
.p2align 4,,15
.globl foo2
.type foo2, @function
foo2:
.LFB1:
.cfi_startproc
pxor %xmm0, %xmm0
cvtsi2sd %edi, %xmm0
ret
.cfi_endproc
.LFE1:
.size foo2, .-foo2
.section .text.unlikely
.LCOLDE1:
.text
.LHOTE1:
.section .text.unlikely
.LCOLDB2:
.text
.LHOTB2:
.p2align 4,,15
.globl foo3
.type foo3, @function
foo3:
.LFB2:
.cfi_startproc
pxor %xmm0, %xmm0
cvtsi2ssq %rdi, %xmm0
ret
.cfi_endproc
.LFE2:
.size foo3, .-foo3
.section .text.unlikely
.LCOLDE2:
.text
.LHOTE2:
.section .text.unlikely
.LCOLDB3:
.text
.LHOTB3:
.p2align 4,,15
.globl foo4
.type foo4, @function
foo4:
.LFB3:
.cfi_startproc
pxor %xmm0, %xmm0
cvtsi2sdq %rdi, %xmm0
ret
.cfi_endproc
.LFE3:
.size foo4, .-foo4
.section .text.unlikely
.LCOLDE3:
.text
.LHOTE3:
.ident "GCC: (GNU) 5.3.1 20160406 (Red Hat 5.3.1-6)"
.section .note.GNU-stack,"",@progbits
[hjl@gnu-6 pr57954]$
/export/build/gnu/llvm-clang-x32-bootstrap/stage1/build-x86_64-linux-gnux32/bin/clang
-S -O2 -mtune=haswell x.c
[hjl@gnu-6 pr57954]$ cat x.s
.text
.file "x.c"
.globl foo1
.p2align 4, 0x90
.type foo1,@function
foo1: # @foo1
.cfi_startproc
# BB#0:
cvtsi2ssl %edi, %xmm0
retq
.Lfunc_end0:
.size foo1, .Lfunc_end0-foo1
.cfi_endproc
.globl foo2
.p2align 4, 0x90
.type foo2,@function
foo2: # @foo2
.cfi_startproc
# BB#0:
cvtsi2sdl %edi, %xmm0
retq
.Lfunc_end1:
.size foo2, .Lfunc_end1-foo2
.cfi_endproc
.globl foo3
.p2align 4, 0x90
.type foo3,@function
foo3: # @foo3
.cfi_startproc
# BB#0:
cvtsi2ssq %rdi, %xmm0
retq
.Lfunc_end2:
.size foo3, .Lfunc_end2-foo3
.cfi_endproc
.globl foo4
.p2align 4, 0x90
.type foo4,@function
foo4: # @foo4
.cfi_startproc
# BB#0:
cvtsi2sdq %rdi, %xmm0
retq
.Lfunc_end3:
.size foo4, .Lfunc_end3-foo4
.cfi_endproc
.ident "clang version 3.9.0 (<a href="http://llvm.org/git/clang.git">http://llvm.org/git/clang.git</a>
3e732e176f38a3cd18520fea2dcda89572736d9d) (<a href="http://llvm.org/git/llvm.git">http://llvm.org/git/llvm.git</a>
9c55c367aecce3a03ecf8dde49b2d38508ff2640)"
.section ".note.GNU-stack","",@progbits
[hjl@gnu-6 pr57954]$
Clang should also generate "pxor %xmm0, %xmm0" to avoid partial SSE
register stall.</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>