[llvm] [SimplifyLibCalls] Merge sqrt into the power of exp (PR #79146)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 23 16:33:09 PST 2024
================
@@ -2538,6 +2538,70 @@ Value *LibCallSimplifier::optimizeLog(CallInst *Log, IRBuilderBase &B) {
return Ret;
}
+// sqrt(exp(X)) -> exp(X * 0.5)
+Value *LibCallSimplifier::mergeSqrtToExp(CallInst *CI, IRBuilderBase &B) {
+ if (!CI->isFast())
----------------
arsenm wrote:
I think you just need reassoc?
https://github.com/llvm/llvm-project/pull/79146
More information about the llvm-commits
mailing list