[llvm] [InstCombine] optimize exp(exp(x)) / exp(x) with fast-math (PR #66177)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 16 09:14:29 PDT 2023
================
@@ -1748,6 +1748,18 @@ Instruction *InstCombinerImpl::visitFDiv(BinaryOperator &I) {
if (Instruction *Mul = foldFDivPowDivisor(I, Builder))
return Mul;
+ Value *ExpX;
+ // exp(exp(X)) / exp(X) -> exp(exp(X) - X)
----------------
nikic wrote:
Not seeing any checks for FMF here? Please add negative tests that the transform is not performed without needed flags.
https://github.com/llvm/llvm-project/pull/66177
More information about the llvm-commits
mailing list