[all-commits] [llvm/llvm-project] 0b8cb8: [MLIR][STD] Add safe scalar constant propagation f...
Max Kudryavtsev via All-commits
all-commits at lists.llvm.org
Fri Aug 6 16:32:40 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0b8cb87e0d6b092a9c94f9cc0f16e56e954eddfd
https://github.com/llvm/llvm-project/commit/0b8cb87e0d6b092a9c94f9cc0f16e56e954eddfd
Author: Max Kudryavtsev <makudrya at microsoft.com>
Date: 2021-08-06 (Fri, 06 Aug 2021)
Changed paths:
M mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
M mlir/lib/Dialect/StandardOps/IR/Ops.cpp
M mlir/test/Dialect/Linalg/generalize-named-polymorphic-ops.mlir
M mlir/test/Dialect/Standard/canonicalize.mlir
Log Message:
-----------
[MLIR][STD] Add safe scalar constant propagation for FPTruncOp
Perform scalar constant propagation for FPTruncOp only if the resulting value can be represented without precision loss or rounding.
Example:
%cst = constant 1.000000e+00 : f32
%0 = fptrunc %cst : f32 to bf16
-->
%cst = constant 1.000000e+00 : bf16
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D107518
More information about the All-commits
mailing list