[all-commits] [llvm/llvm-project] 5179f8: [mlir][Arithmetic] Fold NegF in MulF and DivF.

Jianjian Guan via All-commits all-commits at lists.llvm.org
Mon Jun 13 20:29:36 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5179f885d159a01e00c208e3255052fe0fde06bf
      https://github.com/llvm/llvm-project/commit/5179f885d159a01e00c208e3255052fe0fde06bf
  Author: jacquesguan <Jianjian.Guan at streamcomputing.com>
  Date:   2022-06-14 (Tue, 14 Jun 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/Arithmetic/IR/ArithmeticOps.td
    M mlir/lib/Dialect/Arithmetic/IR/ArithmeticCanonicalization.td
    M mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp
    M mlir/test/Dialect/Arithmetic/canonicalize.mlir

  Log Message:
  -----------
  [mlir][Arithmetic] Fold NegF in MulF and DivF.

This patch adds the following combination:

mulf(negf(x), negf(y)) -> mulf(x, y)
divf(negf(x), negf(y)) -> divf(x, y)

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




More information about the All-commits mailing list