[InstCombine] add reflection fold for tan(-x)
authorSanjay Patel <spatel@rotateright.com>
Thu, 16 Aug 2018 22:46:20 +0000 (22:46 +0000)
committerSanjay Patel <spatel@rotateright.com>
Thu, 16 Aug 2018 22:46:20 +0000 (22:46 +0000)
commit8ba631d9c8b5f1b4e4e314c1f4b366c58a71b4a5
tree02dee4ae40722150a0e615fa07223949cd10da1a
parent7f9b4af1845b1cb231867c9a03fd848954155b22
[InstCombine] add reflection fold for tan(-x)

This is a follow-up suggested with rL339604.
For tan(), we don't have a corresponding LLVM
intrinsic -- unlike sin/cos -- so this is the
only way/place that we can do this fold currently.

llvm-svn: 339958
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
llvm/test/Transforms/InstCombine/cos-1.ll