[llvm] [InstCombine] Fold tan(x) * cos(x) => sin(x) (PR #136319)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 22 01:11:33 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,
----------------
amordo wrote:
Do I understand correctly the instruction should only be checked for the `contract` flag?
The diff will be 9d090b2f59535545e4e6d44c2ea2dc414d5addae
https://github.com/llvm/llvm-project/pull/136319
More information about the llvm-commits
mailing list