[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
https://github.com/nikic requested changes to this pull request.
This pattern is too specific. I assume the motivation here is this special case where `exp(x)` has multiple uses, which means that the `x / exp(y)` to `x * exp(-y)` fold does not trigger. However, you should still be able to handle something more general, such as `exp(x) / exp(y)` to `exp(x - y)` where `exp(x)` has one use. This does not reduce the number of exp calls, but does reduce the number of division.
https://github.com/llvm/llvm-project/pull/66177
More information about the llvm-commits
mailing list