[LLVMbugs] [Bug 20329] New: Demo Kaleidoscope/MCJIT Produces Incorrect Output on ARM

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jul 16 11:08:47 PDT 2014


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

            Bug ID: 20329
           Summary: Demo Kaleidoscope/MCJIT Produces Incorrect Output on
                    ARM
           Product: new-bugs
           Version: trunk
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: mjllvmbugzilla at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 12778
  --> http://llvm.org/bugs/attachment.cgi?id=12778&action=edit
makefile: originally missing --cxxflags for llvm-config (originally used
-cppflags instead), missing -pthread, -ldl (-rdynamic?)

The MCJIT demo on ARM is giving really weird results. I can make
Kaleidoscope/MCJIT/initial with the modification DataLayout->DataLayoutPass in
toy.cpp:794 (and modifications to the makefile to get it to compile - see
attached). For example, here is the output of running the example in
http://blog.llvm.org/2013/07/using-mcjit-with-kaleidoscope-tutorial.html:

ready> def add(x y) x+y;
ready> Read function definition:
define double @add(double %x, double %y) {
entry:
  %y2 = alloca double
  %x1 = alloca double
  store double %x, double* %x1
  store double %y, double* %y2
  %x3 = load double* %x1
  %y4 = load double* %y2
  %addtmp = fadd double %x3, %y4
  ret double %addtmp
}
ready> add(1, 2);
ready> '+v4' is not a recognized feature for this target (ignoring feature)
'+v4' is not a recognized feature for this target (ignoring feature)
Evaluated to
123768009588030777259092341058613037990372763332928142171424007220604203591862480729676744321330132960305676357606152955695924029595789143784940761219741498249240641872295390588649097646388250067834919016059099656912063430656.000000
ready>

System is an Nvidia Jetson TK1 ARM Cortex A15 running Ubuntu 14.04 LTS. I am
using a CMake build of the LLVM 3.5 trunk revision 212499.

output of clang --version:

clang version 3.5.0 (212499)
Target: armv7l-unknown-linux-gnueabihf
Thread model: posix

I can compile C/C++ code and it runs correctly with clang. I tried searching
around and couldn't find any definitive information about whether JIT
compilation (with the MCJIT or otherwise) is supported on ARM. Bug 17817 seems
to suggest not, but doesn't include as much info as mine (and doesn't mention
the MCJIT) so I can't tell if this is expected or not. Any help appreciated.

-- 
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/20140716/1e0f44d1/attachment.html>


More information about the llvm-bugs mailing list