[all-commits] [llvm/llvm-project] 7042fc: [MLIR][Arith][Resubmit] add fastMathAttr on arith:...

Ivy Zhang via All-commits all-commits at lists.llvm.org
Fri Jun 14 16:42:50 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7042fcc6389c6c103d501b6f39988eafed0d9b5b
      https://github.com/llvm/llvm-project/commit/7042fcc6389c6c103d501b6f39988eafed0d9b5b
  Author: Ivy Zhang <yan3.zhang at intel.com>
  Date:   2024-06-15 (Sat, 15 Jun 2024)

  Changed paths:
    M mlir/include/mlir/Dialect/Arith/IR/ArithOps.td
    M mlir/lib/Dialect/Arith/IR/ArithOps.cpp
    M mlir/lib/Dialect/Arith/Transforms/EmulateUnsupportedFloats.cpp
    M mlir/lib/Dialect/Math/Transforms/LegalizeToF32.cpp
    M mlir/test/Dialect/Arith/canonicalize.mlir
    M mlir/test/Dialect/Arith/emulate-unsupported-floats.mlir

  Log Message:
  -----------
  [MLIR][Arith][Resubmit] add fastMathAttr on arith::extf and arith::truncf (#95346)

Add an `fastMathAttr` on `arith::extf` and `arith::truncf`. If these two
ops are inserted by some promotion passes (like legalize-to-f32 /
emulate-unsupported-floats), they will be labeled as
`FastMathFlags::contract`, denoting that they can be then `eliminated by
canonicalizer`.

The `elimination` can help improve performance, while may introduce some
numerical differences.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list