[all-commits] [llvm/llvm-project] 9d0b90: [mlir][Math] Add TruncOp.

Jianjian Guan via All-commits all-commits at lists.llvm.org
Thu Sep 8 19:01:49 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9d0b90e9332d8224155554459cb07723f9880a04
      https://github.com/llvm/llvm-project/commit/9d0b90e9332d8224155554459cb07723f9880a04
  Author: jacquesguan <Jianjian.Guan at streamcomputing.com>
  Date:   2022-09-09 (Fri, 09 Sep 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.td
    M mlir/include/mlir/Dialect/Math/IR/MathOps.td
    M mlir/lib/Conversion/MathToLLVM/MathToLLVM.cpp
    M mlir/lib/Conversion/MathToLibm/MathToLibm.cpp
    M mlir/lib/Dialect/Math/IR/MathOps.cpp
    M mlir/test/Conversion/MathToLLVM/math-to-llvm.mlir
    M mlir/test/Conversion/MathToLibm/convert-to-libm.mlir
    M mlir/test/Dialect/Math/canonicalize.mlir
    M mlir/test/Dialect/Math/ops.mlir

  Log Message:
  -----------
  [mlir][Math] Add TruncOp.

This patch adds TruncOp for Math, it returns the operand rounded to the nearest integer not larger in magnitude than the operand. And this patch also adds the correspond llvm intrinsic op.

Reviewed By: Mogball

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




More information about the All-commits mailing list