<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 --- - Demo Kaleidoscope/MCJIT Produces Incorrect Output on ARM"
   href="http://llvm.org/bugs/show_bug.cgi?id=20329">20329</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Demo Kaleidoscope/MCJIT Produces Incorrect Output on ARM
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </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>mjllvmbugzilla@gmail.com
          </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=12778" name="attach_12778" title="makefile: originally missing --cxxflags for llvm-config (originally used -cppflags instead), missing -pthread, -ldl (-rdynamic?)">attachment 12778</a> <a href="attachment.cgi?id=12778&action=edit" title="makefile: originally missing --cxxflags for llvm-config (originally used -cppflags instead), missing -pthread, -ldl (-rdynamic?)">[details]</a></span>
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
<a href="http://blog.llvm.org/2013/07/using-mcjit-with-kaleidoscope-tutorial.html">http://blog.llvm.org/2013/07/using-mcjit-with-kaleidoscope-tutorial.html</a>:

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. <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - ARMv7: Kaleidoscope "2" returns "1.000000"."
   href="show_bug.cgi?id=17817">Bug 17817</a> 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.</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>