[PATCH] D14302: [SimplifyLibCalls] Add a new transform: tan(atan(x)) -> x

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 3 13:22:28 PST 2015


davide created this revision.
davide added reviewers: majnemer, scanon, escha, resistor.
davide added a subscriber: llvm-commits.

To put things into context, I did some basic research trying to understand which lib calls transformation gcc does but llvm does not under -ffast-math, and started writing code to reduce the difference. Probably I should've explained this in my previous pow() patch, but, anyway.

This is the second one of a series of local patches I'll try to submit over the next weeks. It may at this point considered a WIP (still need to add more comprehensive tests, among others). I'm not completely sure if we should remove the call to atan (I wasn't confident on how to do that) or let subsequent passes deal with that. Ideas? Thanks!

http://reviews.llvm.org/D14302

Files:
  include/llvm/Transforms/Utils/SimplifyLibCalls.h
  lib/Transforms/Utils/SimplifyLibCalls.cpp
  test/Transforms/InstCombine/tan.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14302.39109.patch
Type: text/x-patch
Size: 3685 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151103/1f9cc502/attachment.bin>


More information about the llvm-commits mailing list