[all-commits] [llvm/llvm-project] 998a3a: Add a math.cbrt instruction and lowering to libm.

Johannes Reifferscheid via All-commits all-commits at lists.llvm.org
Mon Jan 2 23:44:26 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 998a3a38948c9d220ddc759b8a6eee987e3ad320
      https://github.com/llvm/llvm-project/commit/998a3a38948c9d220ddc759b8a6eee987e3ad320
  Author: Johannes Reifferscheid <jreiffers at google.com>
  Date:   2023-01-03 (Tue, 03 Jan 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Math/IR/MathOps.td
    M mlir/lib/Conversion/MathToLibm/MathToLibm.cpp
    M mlir/test/Conversion/MathToLibm/convert-to-libm.mlir
    M mlir/test/Dialect/Math/ops.mlir

  Log Message:
  -----------
  Add a math.cbrt instruction and lowering to libm.

There's currently no way to get accurate cube roots in the math dialect.
powf(x, 1/3.0) is too inaccurate in some cases.

Reviewed By: akuegel

Differential Revision: https://reviews.llvm.org/D140842




More information about the All-commits mailing list