<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 --- - codegen difference at -O0 depending on whether -g is specified"
href="https://llvm.org/bugs/show_bug.cgi?id=31319">31319</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>codegen difference at -O0 depending on whether -g is specified
</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>Windows NT
</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>greg_bedwell@sn.scee.net
</td>
</tr>
<tr>
<th>CC</th>
<td>Florian.Hahn@arm.com, llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Since "r288794 - [framelowering] Improve tracking of first CS pop instruction."
we've spotted the following codegen difference depending on whether -g is
specified or not using the tools/clang/utils/check_cfc tool:
$ clang --version
clang version 4.0.0 (<a href="http://llvm.org/git/clang.git">http://llvm.org/git/clang.git</a>
45e06a61601c5455359b9a4810b0c26937417bac) (<a href="http://llvm.org/git/llvm.git">http://llvm.org/git/llvm.git</a>
c153f037fe7028dc845c23c93056ef89ec7074f0)
Target: x86_64-scei-ps4
Thread model: posix
InstalledDir:
c:\work\public-git\upstream-llvm\build-vs2015-ps4-master\Release\bin
$ cat test.c
struct Buffer {
char flags;
} __attribute__((aligned(64)));
void fn1(struct Buffer p1) {}
$ cat test.sh
#!/bin/bash -xe
CFLAGS=-O0
clang -c $CFLAGS test.c -o test.o
llvm-objdump -d test.o > test.od
clang -c $CFLAGS test.c -o test.o -g
llvm-objdump -d test.o > testg.od
diff test.od testg.od
$ sh test.sh
9,11c9,12
< 8: 48 89 ec movq %rbp, %rsp
< b: 5d popq %rbp
< c: c3 retq
---
<span class="quote">> 8: 48 83 ec 40 subq $64, %rsp
> c: 48 89 ec movq %rbp, %rsp
> f: 5d popq %rbp
> 10: c3 retq</span >
$
~~
With the previous revision:
$ clang --version
clang version 4.0.0 (<a href="http://llvm.org/git/clang.git">http://llvm.org/git/clang.git</a>
45e06a61601c5455359b9a4810b0c26937417bac) (<a href="http://llvm.org/git/llvm.git">http://llvm.org/git/llvm.git</a>
ec5ae20d531eef4431e99534f68813980836220e)
Target: x86_64-scei-ps4
Thread model: posix
InstalledDir:
c:\work\public-git\upstream-llvm\build-vs2015-ps4-master\Release\bin
$ sh test.sh
$</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>