[all-commits] [llvm/llvm-project] 7c349c: [mlir][Arith] Add arith.is_nan and arith.is_inf pr...
Krzysztof Drewniak via All-commits
all-commits at lists.llvm.org
Wed Aug 2 07:42:40 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7c349c369847dc2f1736efb9c90d03521cd44a90
https://github.com/llvm/llvm-project/commit/7c349c369847dc2f1736efb9c90d03521cd44a90
Author: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
Date: 2023-08-02 (Wed, 02 Aug 2023)
Changed paths:
M flang/test/Lower/Intrinsics/ieee_class_queries.f90
M flang/test/Lower/Intrinsics/ieee_is_finite.f90
M flang/test/Lower/Intrinsics/ieee_is_normal.f90
M flang/test/Lower/Intrinsics/ieee_unordered.f90
M flang/test/Lower/Intrinsics/isnan.f90
M mlir/include/mlir/Conversion/ArithCommon/AttrToLLVMConverter.h
M mlir/include/mlir/Dialect/Arith/IR/ArithOps.td
M mlir/include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.td
M mlir/lib/Conversion/ArithToLLVM/ArithToLLVM.cpp
M mlir/lib/Conversion/ArithToSPIRV/ArithToSPIRV.cpp
M mlir/lib/Dialect/Arith/IR/ArithOps.cpp
M mlir/lib/Dialect/Arith/Transforms/ExpandOps.cpp
M mlir/test/Conversion/ArithToLLVM/arith-to-llvm.mlir
M mlir/test/Conversion/ArithToSPIRV/arith-to-spirv.mlir
M mlir/test/Dialect/Arith/canonicalize.mlir
M mlir/test/Dialect/Arith/expand-ops.mlir
M mlir/test/Dialect/Arith/ops.mlir
M mlir/test/Target/LLVMIR/Import/intrinsic.ll
M mlir/test/Target/LLVMIR/llvmir-intrinsics.mlir
Log Message:
-----------
[mlir][Arith] Add arith.is_nan and arith.is_inf predicates
Both LLVM and SPIR-V have some form of "is this float a NaN/Inf"
operation (though LLVM's uses the rather opaque "is.fpclass"
intrinsic), which is not exposed in MLIR.
This has lead to awkward workarounds in -arith-expands-ops where a NaN
test was performed by comparing an operation to itself. This commit
resolves that issue.
Reviewed By: dcaballe, kuhar
Differential Revision: https://reviews.llvm.org/D156169
More information about the All-commits
mailing list