<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - [SystemZ] different -O0 result with -march=z13"
href="https://bugs.llvm.org/show_bug.cgi?id=35289">35289</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[SystemZ] different -O0 result with -march=z13
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: SystemZ
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>paulsson@linux.vnet.ibm.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=19412" name="attach_19412" title="reduced csmith program">attachment 19412</a> <a href="attachment.cgi?id=19412&action=edit" title="reduced csmith program">[details]</a></span>
reduced csmith program
Csmith has generated a program which gives a different checksum with -O0
-march=z13 compared to many other builds:
gcc -O0 -march=z10 w0.c -I/root/csmith/runtime -o a.out -w; ./a.out 1
gcc -O1 -march=z10 w0.c -I/root/csmith/runtime -o a.out -w; ./a.out 1
gcc -O0 -march=z13 w0.c -I/root/csmith/runtime -o a.out -w; ./a.out 1
gcc -O1 -march=z13 w0.c -I/root/csmith/runtime -o a.out -w; ./a.out 1
/root/llvm/build/llvm-dev/bin/clang -O0 -march=z10 w0.c -I/root/csmith/runtime
-o a.out -w; ./a.out 1
/root/llvm/build/llvm-dev/bin/clang -O3 -march=z13 w0.c -I/root/csmith/runtime
-o a.out -w; ./a.out 1
/root/llvm/build/llvm-dev/bin/clang -O3 -march=z10 w0.c -I/root/csmith/runtime
-o a.out -w; ./a.out 1
...checksum after hashing g_670.f1 : 6522DF69
checksum = 6522DF69
/root/llvm/build/llvm-dev/bin/clang -O0 -march=z13 w0.c -I/root/csmith/runtime
-o a.out -w; ./a.out 1
...checksum after hashing g_670.f1 : A988DFF7
checksum = A988DFF7
The program has been reduced and the interesting function (I think) now looks
like:
func_30: func_30:
# BB#0: # BB#0:
stmg %r11, %r15, 88(%r15) stmg %r11, %r15, 88(%r15)
aghi %r15, -184 aghi %r15, -184
lgr %r11, %r15 lgr %r11, %r15
lgr %r0, %r3 lgr %r0, %r3
lgr %r1, %r2 lgr %r1, %r2
stg %r3, 176(%r11) stg %r3, 176(%r11)
larl %r3, g_670 larl %r3, g_670
llgc %r4, 8(%r3) llgc %r4, 8(%r3)
lg %r5, 0(%r3) lg %r5, 0(%r3)
sllg %r14, %r5, 8 sllg %r14, %r5, 8
ogr %r4, %r14 ogr %r4, %r14
| lr %r13, %r4
risbg %r14, %r4, 62, 191, 1 |
lr %r13, %r14 | risbhg %r13, %r13, 30, 159,
xilf %r13, 1 | xihf %r13, 1
llihf %r14, 4288675839 llihf %r14, 4288675839
oilf %r14, 4294967040 oilf %r14, 4294967040
ngr %r4, %r14 ngr %r4, %r14
lr %r14, %r13 | risblg %r14, %r13, 0, 159, 3
rosbg %r4, %r14, 0, 10, 53 rosbg %r4, %r14, 0, 10, 53
risbg %r5, %r4, 8, 63, 56 | risbgn %r5, %r4, 8, 63, 56
stg %r5, 0(%r3) stg %r5, 0(%r3)
larl %r3, g_2235 larl %r3, g_2235
mvc 0(32,%r2), 0(%r3) mvc 0(32,%r2), 0(%r3)
stg %r1, 168(%r11) stg %r1, 168(%r11)
stg %r0, 160(%r11) stg %r0, 160(%r11)
lmg %r11, %r15, 272(%r11) lmg %r11, %r15, 272(%r11)
br %r14 br %r14
.Lfunc_end6: .Lfunc_end6:
bin/clang -O0 -march=z10 w0.i -o a.out; ./a.out
checksum = 6522DF69
bin/clang -O0 -march=z13 w0.i -o a.out; ./a.out
checksum = A988DFF7</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>