[all-commits] [llvm/llvm-project] 9ab2de: [mlir][math] powi with negative exponent should in...

Asher Mancinelli via All-commits all-commits at lists.llvm.org
Tue Apr 15 08:02:34 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9ab2dea61eee82faae8b85c99e889026e8b4f2c1
      https://github.com/llvm/llvm-project/commit/9ab2dea61eee82faae8b85c99e889026e8b4f2c1
  Author: Asher Mancinelli <ashermancinelli at gmail.com>
  Date:   2025-04-15 (Tue, 15 Apr 2025)

  Changed paths:
    M mlir/lib/Dialect/Math/Transforms/AlgebraicSimplification.cpp
    M mlir/test/Dialect/Math/algebraic-simplification.mlir

  Log Message:
  -----------
  [mlir][math] powi with negative exponent should invert at the end (#135735)

Previously, an FPowI operation would invert the base *before* performing
a sequence of multiplications, but this led to discrepancies between
LLVM pow intrinsic folding and that coming from the math dialect.

See compiler-rt's version, which does the inverse at the end of the
calculation: compiler-rt/lib/builtins/powidf2.c



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list