[llvm] [InstCombine] Fold tan(x) * cos(x) => sin(x) (PR #136319)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 22 09:07:16 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,
----------------
arsenm wrote:
> I think contract should be more predictable and tied to hardware behavior
This should have no relation to hardware behavior whatsoever
https://github.com/llvm/llvm-project/pull/136319
More information about the llvm-commits
mailing list