[InstCombine] add reflection fold for tan(-x)
commitf4e3ea870eb485d82b6338217fed3e33337887eb
authorSanjay Patel <spatel@rotateright.com>
Thu, 16 Aug 2018 22:46:20 +0000 (16 22:46 +0000)
committerSanjay Patel <spatel@rotateright.com>
Thu, 16 Aug 2018 22:46:20 +0000 (16 22:46 +0000)
tree2b4b31a83ed64353a38c6526119c220fa7d32519
parent9cf421eee41e4b6446421a657fdb2071054a4e97
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339958 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/SimplifyLibCalls.cpp
test/Transforms/InstCombine/cos-1.ll