[LLVMbugs] [Bug 21290] New: FP intrinsics need to have fast-math-flags too

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Oct 15 13:29:46 PDT 2014


            Bug ID: 21290
           Summary: FP intrinsics need to have fast-math-flags too
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Bitcode Writer
          Assignee: unassignedbugs at nondot.org
          Reporter: spatel+llvm at rotateright.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

http://llvm.org/docs/LangRef.html#fast-math-flags 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

Even without the LTO case, there's reason for intrinsics to have FMF. For
example, see http://reviews.llvm.org/D5787. 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.

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/20141015/9b95d04e/attachment.html>

More information about the llvm-bugs mailing list