[LLVMbugs] [Bug 15312] New: MC-JIT generates misbehaving X86 FP code

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Feb 20 05:18:11 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=15312

            Bug ID: 15312
           Summary: MC-JIT generates misbehaving X86 FP code
           Product: new-bugs
           Version: 3.2
          Hardware: PC
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: Kimon.Hoffmann at gmx.net
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 10045
  --> http://llvm.org/bugs/attachment.cgi?id=10045&action=edit
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 (http://llvm.org/):
  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 (http://llvm.org/):
  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!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130220/1f4bd739/attachment.html>


More information about the llvm-bugs mailing list