[PATCH] D28364: SimplifyLibCalls: Remove incorrect optimization of fabs

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 5 09:48:20 PST 2017


arsenm created this revision.
arsenm added reviewers: scanon, efriedma.
arsenm added a subscriber: llvm-commits.
Herald added a subscriber: wdng.

fabs(x * x) is not generally safe to assume x is positive if x is a NaN.
This is also less general than it could be, so this will be replaced
with a transformation on the intrinsic.


https://reviews.llvm.org/D28364

Files:
  lib/Transforms/Utils/SimplifyLibCalls.cpp
  test/Transforms/InstCombine/fabs.ll
  test/Transforms/InstCombine/fast-math.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28364.83268.patch
Type: text/x-patch
Size: 4464 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170105/6ccc0b75/attachment.bin>


More information about the llvm-commits mailing list