[llvm] [InstCombine] Fold tan(x) * cos(x) => sin(x) (PR #136319)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 20 22:13:04 PDT 2025
================
@@ -947,6 +947,14 @@ Instruction *InstCombinerImpl::foldFMulReassoc(BinaryOperator &I) {
return BinaryOperator::CreateFMulFMF(XX, Y, &I);
}
+ // tan(X) * cos(X) -> sin(X)
+ if (match(&I,
----------------
dtcxzyw wrote:
reassoc/afn may be required, but I am not sure.
https://github.com/llvm/llvm-project/pull/136319
More information about the llvm-commits
mailing list