<html>
<head>
<base href="http://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 --- - MC-JIT generates misbehaving X86 FP code"
href="http://llvm.org/bugs/show_bug.cgi?id=15312">15312</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>MC-JIT generates misbehaving X86 FP code
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>3.2
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</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>Kimon.Hoffmann@gmx.net
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=10045" name="attach_10045" title="C sourcecode of sample (BugDemo.c)">attachment 10045</a> <a href="attachment.cgi?id=10045&action=edit" title="C sourcecode of sample (BugDemo.c)">[details]</a></span>
C sourcecode of sample (BugDemo.c)
When using MC-JIT, either from within my own test program or through lli, to
JIT-compile an run the process function in the attached sample produces an
invalid result.
The problem does *not* occur when:
- Statically compiling the sample
- JIT-compiling and running the sample using lli using the "old" JIT
I have been able to reproduce the problem with LLVM/Clang 3.2 as well as with a
rather recent version from trunk. The (incorrect-)output of the test program
changes when an optimization level greater than 0 is passed to lli.
Steps to reproduce:
clang -O0 -emit-llvm -c BugDemo.c -o BugDemo.bc
# To produce the correct output (-O0 only provided for symmetry with the MC
invocation, level does not matter for the generated output)
lli -O0 BugDemo.bc
# To produce the incorrect output
lli -O0 -use-mcjit BugDemo.bc
# To produce different incorrect output
lli -O1 -use-mcjit BugDemo.bc
System info:
LLVM (<a href="http://llvm.org/">http://llvm.org/</a>):
LLVM version 3.2svn
Optimized build with assertions.
Built Feb 20 2013 (13:24:30).
Default target: x86_64-apple-darwin12.2.0
Host CPU: corei7-avx
LLVM (<a href="http://llvm.org/">http://llvm.org/</a>):
LLVM version 3.3svn
Optimized build with assertions.
Built Feb 9 2013 (15:12:53).
Default target: x86_64-apple-darwin12.2.0
Host CPU: corei7-avx
I tried reducing the problematic code as much as possible, of which the
attached sample is the result. I have tried to utilize bugpoint to futher
reduce the sample, without any luck.
Please let me know if you need further information, I'll be glad to assist!</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>