[PATCH] D28405: SimplifyLibCalls: Replace fabs libcalls with intrinsics
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 10 14:06:03 PST 2017
efriedma added a comment.
I'd still like to see a test which checks the transform fabsl() -> llvm.fabs.f80().
================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:1644
+ { ExtSrc->getType() });
+ Value *NewFabs = Builder->CreateCall(F, ExtSrc);
+ NewFabs->takeName(II);
----------------
Fast-math flags?
================
Comment at: test/Transforms/InstCombine/fabs.ll:16
; CHECK-NEXT: %mul = fmul float %x, %x
-; CHECK-NEXT: %fabsf = tail call float @fabsf(float %mul)
+; CHECK-NEXT: %fabsf = call float @llvm.fabs.f32(float %mul)
; CHECK-NEXT: ret float %fabsf
----------------
efriedma wrote:
> This is probably going to fail on Windows... maybe change the test to call llvm.fabs rather than fabs?
Still probably going to fail on Windows, where fabsf() doesn't exist.
https://reviews.llvm.org/D28405
More information about the llvm-commits
mailing list