[all-commits] [llvm/llvm-project] af9eb1: [mlir][math] Expand math.floorf to truncate, compa...

Balaji V. Iyer. via All-commits all-commits at lists.llvm.org
Mon Apr 10 14:09:30 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: af9eb1e3845f699a15aef73b6398fc62499fda01
      https://github.com/llvm/llvm-project/commit/af9eb1e3845f699a15aef73b6398fc62499fda01
  Author: Balaji V. Iyer <bviyer at gmail.com>
  Date:   2023-04-10 (Mon, 10 Apr 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Math/Transforms/Passes.h
    M mlir/lib/Dialect/Math/Transforms/ExpandPatterns.cpp
    M mlir/test/Dialect/Math/expand-math.mlir
    M mlir/test/lib/Dialect/Math/TestExpandMath.cpp
    M mlir/test/mlir-cpu-runner/math-polynomial-approx.mlir

  Log Message:
  -----------
  [mlir][math] Expand math.floorf to truncate, compares and increments

Floorf are pushed directly to libm. This is problematic for
situations where libm is not available. This patch will break down
a floorf function to truncate followed by an increment for negative
values, if necessary.

Reviewed By: rsuderman

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




More information about the All-commits mailing list