<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 --- - FP intrinsics need to have fast-math-flags too"
   href="http://llvm.org/bugs/show_bug.cgi?id=21290">21290</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>FP intrinsics need to have fast-math-flags too
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>PC
          </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>Bitcode Writer
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>spatel+llvm@rotateright.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><a href="http://llvm.org/docs/LangRef.html#fast-math-flags">http://llvm.org/docs/LangRef.html#fast-math-flags</a> says that only some FP
instructions can have fast-math-flags (FMF). That's not good enough.

Voice of god: "In a world with LTO..."

We can end up with intrinsics that should have fast semantics inside a function
that doesn't. But because intrinsics don't have the same privilege of FMF that
instructions do, that info is lost.

The LTO case was apparently one of the design goals of FMF, but this was
overlooked.

Even without the LTO case, there's reason for intrinsics to have FMF. For
example, see <a href="http://reviews.llvm.org/D5787">http://reviews.llvm.org/D5787</a>. In that case, we need to know that
the sqrt can be reassociated. But because there's no way to express that at the
IR-level, we have to use a function attribute.

There's also a big pile of potential libcall optimizations at the bottom of
SimplifyLibCalls.cpp. Some/all of those will need FMF checking.</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>