[llvm] [InstCombine] Add log-pow simplification for FP exponent edge case. (PR #76641)
Andy Kaylor via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 12 11:03:23 PST 2024
================
@@ -12,6 +12,75 @@ define double @log_pow(double %x, double %y) {
ret double %log
}
+define double @log_powi_const(double %x) {
+; CHECK-LABEL: @log_powi_const(
+; CHECK-NEXT: [[LOG1:%.*]] = call fast double @llvm.log.f64(double [[X:%.*]])
----------------
andykaylor wrote:
> @andykaylor Since this is my 2nd PR to llvm, I'm slightly out of my depth here. Are you proposing I drop all the tests with a call to log() directly?
No. The tests should stay. I was just pointing out that the transformation shouldn't be converting the libcall to an intrinsic, as @arsenm described. That's not something that needs to be changed in the PR though. It's an existing problem.
https://github.com/llvm/llvm-project/pull/76641
More information about the llvm-commits
mailing list