[mlir][arith] Fold on extension of FP constants using arith.extf
authorVictor Perez <victor.perez@codeplay.com>
Fri, 17 Feb 2023 10:16:42 +0000 (10:16 +0000)
committerVictor Perez <victor.perez@codeplay.com>
Thu, 23 Feb 2023 12:38:55 +0000 (12:38 +0000)
commit6fa26f60c55d4d7ba0bfc5353a8f7583da9d4b9a
tree8d39ebd89afcd4d1dfcb0c76b38330dde552d1fd
parent926746d22abd08490923e197279bc86d5b32db67
[mlir][arith] Fold on extension of FP constants using arith.extf

It is safe to fold when extending, as we will not lose precision.

Differential Revision: https://reviews.llvm.org/D144251
mlir/include/mlir/Dialect/Arith/IR/ArithOps.td
mlir/lib/Dialect/Arith/IR/ArithOps.cpp
mlir/test/Dialect/Arith/canonicalize.mlir