[all-commits] [llvm/llvm-project] 9bf793: [mlir][Arith] Let integer range narrowing handle n...
Krzysztof Drewniak via All-commits
all-commits at lists.llvm.org
Fri Dec 13 15:39:08 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9bf79308b893e8998e7efd752835636038c2db4f
https://github.com/llvm/llvm-project/commit/9bf79308b893e8998e7efd752835636038c2db4f
Author: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
Date: 2024-12-13 (Fri, 13 Dec 2024)
Changed paths:
M mlir/lib/Dialect/Arith/Transforms/IntRangeOptimizations.cpp
M mlir/test/Dialect/Arith/int-range-narrowing.mlir
Log Message:
-----------
[mlir][Arith] Let integer range narrowing handle negative values (#119642)
Update integer range narrowing to handle negative values.
The previous restriction to only narrowing known-non-negative values
wasn't needed, as both the signed and unsigned ranges represent bounds
on the values of each variable in the program ... except that one might
be more accurate than the other. So, if either the signed or unsigned
interpretetation of the inputs and outputs allows for integer narrowing,
the narrowing is permitted.
This commit also updates the integer optimization rewrites to preserve
the stae of constant-like operations and those that are narrowed so that
rewrites of other operations don't lose that range information.
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