HomePhabricator

[InstCombine] Missed optimization in math expression: sin(x) / cos(x) => tan(x)

Description

[InstCombine] Missed optimization in math expression: sin(x) / cos(x) => tan(x)

Summary: This patch enables folding sin(x) / cos(x) -> tan(x), cos(x) / sin(x) -> 1 / tan(x) under -ffast-math flag

Reviewers: hfinkel, spatel

Reviewed By: spatel

Subscribers: andrew.w.kaylor, efriedma, scanon, llvm-commits

Differential Revision: https://reviews.llvm.org/D41286

Details

Committed
QuolykJan 10 2018, 10:33 PM
Reviewer
spatel
Differential Revision
D41286: [InstCombine] Missed optimization in math expression: sin(x) / cos(x) => tan(x)
Parents
rL322254: [X86] Optimize v2i32/v2f32 scatters.
Branches
Unknown
Tags
Unknown