[all-commits] [llvm/llvm-project] 221788: [mlir][math] Expand math.ceilf to truncate, compar...

Balaji V. Iyer. via All-commits all-commits at lists.llvm.org
Tue Apr 11 06:54:06 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2217888d2c86f70ced50eba1d68185ccf0fdade3
      https://github.com/llvm/llvm-project/commit/2217888d2c86f70ced50eba1d68185ccf0fdade3
  Author: Balaji V. Iyer <bviyer at gmail.com>
  Date:   2023-04-11 (Tue, 11 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.ceilf to truncate, compares and increments

Ceilf are pushed directly to libm. This is problematic for
situations where libm is not available. This patch will break down
a ceilf function to truncate followed by an increment if the
truncated value is smaller than the input value.

Reviewed By: rsuderman

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




More information about the All-commits mailing list