OSDN Git Service

[SimplifyLibCalls] Only consider sinpi/cospi functions within the same function
authorDavid Majnemer <david.majnemer@gmail.com>
Sat, 19 Mar 2016 04:53:02 +0000 (04:53 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Sat, 19 Mar 2016 04:53:02 +0000 (04:53 +0000)
commit649040b838de11ee003a59d8e59bdc4c112390be
treed45e54ec788e2195b457eb745f096d6da63022cb
parent20e3af6f8ab6e8ecd16507044f9a0dfd40f1bb40
[SimplifyLibCalls] Only consider sinpi/cospi functions within the same function

The sinpi/cospi can be replaced with sincospi to remove unnecessary
computations.  However, we need to make sure that the calls are within
the same function!

This fixes PR26993.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263875 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/SimplifyLibCalls.h
lib/Transforms/Utils/SimplifyLibCalls.cpp
test/Transforms/InstCombine/pr26993.ll [new file with mode: 0644]