[PATCH] D28405: SimplifyLibCalls: Replace fabs libcalls with intrinsics

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 9 12:39:50 PST 2017


efriedma added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:1646
+      NewFabs->takeName(II);
+      return new FPExtInst(NewFabs, II->getType());
+    }
----------------
arsenm wrote:
> efriedma wrote:
> > Do we need to preserve fast-math flags here?
> I don't think fpext supports fast math flags
Sorry, I meant fast-math flags on the call.


================
Comment at: test/Transforms/InstCombine/double-float-shrink-2.ll:91
+  ; --> fabsf
+  %E = call fast double @fabs(double %D)
+  %F = fptrunc double %E to float
----------------
arsenm wrote:
> arsenm wrote:
> > efriedma wrote:
> > > We allow putting fast-math flags on arbitrary calls...?  Please update LangRef with an explanation of what this means.
> > FMF on calls was added in r255555
> This seems to already be noted in the langref for call
Oh, I was looking in the wrong place; it looks like there's a missing note in the section on fast-math flags.


https://reviews.llvm.org/D28405





More information about the llvm-commits mailing list