<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 - IR programs printing incorrect results after being compiled with -O0"
href="https://bugs.llvm.org/show_bug.cgi?id=40657">bug 40657</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>CONFIRMED
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Fixed By Commit(s)</td>
<td>
</td>
<td>r353615, r353639
</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 - IR programs printing incorrect results after being compiled with -O0"
href="https://bugs.llvm.org/show_bug.cgi?id=40657#c10">Comment # 10</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - IR programs printing incorrect results after being compiled with -O0"
href="https://bugs.llvm.org/show_bug.cgi?id=40657">bug 40657</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>All attached examples should be fixed after:
<a href="https://reviews.llvm.org/rL353639">https://reviews.llvm.org/rL353639</a>
Feel free to reopen if that's not correct.
Side note about fuzzing for LLVM bugs:
If you're looking for backend bugs, it might be worth trying something like
this:
$ clang -O2 test.c -S -emit-llvm -Xclang -disable-llvm-optzns -o
unoptimized_ir.ll
$ llc -O2 unoptimized_ir.ll -o unoptimized_ir_optimized_asm.s
$ clang unoptimized_ir_optimized_asm.s -o maybe_buggy_executable
$ clang test.c -o reference_executable
$ { compare output of } reference_executable maybe_buggy_executable
A lot of people get that 1st step wrong: you want clang to create an IR file
that allows optimization by the backend, but skip intermediate optimization.
That doesn't happen if you use "-O0 -emit-llvm" with clang.</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>