[all-commits] [llvm/llvm-project] ab2fc9: Fix handling of special and large vals in expand p...
Ramiro Leal-Cavazos via All-commits
all-commits at lists.llvm.org
Thu Apr 20 11:10:04 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ab2fc9521ec606603412645d4a4b3cf456acd153
https://github.com/llvm/llvm-project/commit/ab2fc9521ec606603412645d4a4b3cf456acd153
Author: Ramiro Leal-Cavazos <ramiroleal050 at gmail.com>
Date: 2023-04-20 (Thu, 20 Apr 2023)
Changed paths:
M mlir/lib/Dialect/Math/Transforms/ExpandPatterns.cpp
M mlir/test/Dialect/Math/expand-math.mlir
M mlir/test/mlir-cpu-runner/test-expand-math-approx.mlir
Log Message:
-----------
Fix handling of special and large vals in expand pattern for `round`
The current expand pattern for `math.round` does not handle the
special values -0.0, +-inf, and +-nan correctly. It also does not
properly handle values with magnitude |x| >= 2^23. Lastly, the pattern
generates invalid IR when the input to `math.round` is a vector. This
patch fixes these issues.
Reviewed By: rsuderman
Differential Revision: https://reviews.llvm.org/D148398
More information about the All-commits
mailing list