<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 --- - Interpreter chokes on intrinsics with no fallback"
   href="http://llvm.org/bugs/show_bug.cgi?id=22458">22458</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Interpreter chokes on intrinsics with no fallback
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

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

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>Interpreter
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>pguyot@kallisys.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>Interpreter chokes on intrinsics such as llvm.sadd.with.overflow.i32 which are
perfectly legal on many platforms and that MCJIT is happy with.

This is because IntrinsicLowering doesn't implement every intrinsic.

There does not seem to be any workaround except to modify the function to avoid
using these intrinsics in the first place. Which of course creates additional
problems as the function could also be compiled with intrinsics…

While support for all intrinsics is tedious to maintain, a transform of an
intrinsic into an external call or an API to provide a custom IntrinsicLowering
or something similar would be welcome.

If the external call solution is favored, we probably need to fix <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Interpreter ignores LazyFunctionCreator and always perform symbol search"
   href="show_bug.cgi?id=22457">bug #22457</a>
first (as defining a function called "llvm.sadd.with.overflow.i32" is
difficult).</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>