OSDN Git Service

[arm+x86] Make GNU variants behave like GNU w.r.t combining sin+cos into sincos.
authorDaniel Sanders <daniel.sanders@imgtec.com>
Tue, 21 Jun 2016 12:29:03 +0000 (12:29 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Tue, 21 Jun 2016 12:29:03 +0000 (12:29 +0000)
commitffc20a90d2e2570ddb5cb5434dee3ca4096a7228
tree9788ec8d547e1744f4469f3ee569ece3665529c0
parent6f247766ed3584b4f1aa33606f62e9896de5a0f2
[arm+x86] Make GNU variants behave like GNU w.r.t combining sin+cos into sincos.

Summary:
canCombineSinCosLibcall() would previously combine sin+cos into sincos for
GNUX32/GNUEABI/GNUEABIHF regardless of whether UnsafeFPMath were set or not.
However, GNU would only combine them for UnsafeFPMath because sincos does not
set errno like sin and cos do. It seems likely that this is an oversight.

Reviewers: t.p.northover

Subscribers: t.p.northover, aemerson, llvm-commits, rengolin

Differential Revision: http://reviews.llvm.org/D21431

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273259 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/Triple.h
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
lib/CodeGen/TargetLoweringBase.cpp
test/CodeGen/ARM/sincos.ll
test/CodeGen/X86/sincos-opt.ll