[all-commits] [llvm/llvm-project] 44baa6: Revert "Revert "Fix handling of special and large ...

Ramiro Leal-Cavazos via All-commits all-commits at lists.llvm.org
Sat Apr 22 07:16:16 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 44baa65589683dd441594d74625bb0b3ac265dc8
      https://github.com/llvm/llvm-project/commit/44baa65589683dd441594d74625bb0b3ac265dc8
  Author: Ramiro Leal-Cavazos <ramiroleal050 at gmail.com>
  Date:   2023-04-22 (Sat, 22 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/test-expand-math-approx.mlir

  Log Message:
  -----------
  Revert "Revert "Fix handling of special and large vals in expand pattern for `round`" and "Add pattern that expands `math.roundeven` into `math.round` + arith""

This reverts commit 87cef78fa1c7bf6efc544e990894a6062d56abec.

The issue in the original revert is that a lit test expecting a `-nan`
as an output was failing on M2. Since the IEEE 754-2008 standard does
not require the sign to be printed when displaying a `nan`, this
commit changes the `CHECK` for `-nan` to one that checks the result
value bitcasted to an `i32` to ensure that input is being left
unchanged. This check should now be independent of platform being used
to run test.

Reviewed By: jpienaar, mehdi_amini

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




More information about the All-commits mailing list