llvm-project/mlir/lib/Conversion/StandardToSPIRV
Lei Zhang e27197f360 [mlir][spirv] Define spv.IsNan/spv.IsInf and add lowerings
spv.Ordered/spv.Unordered are meant for OpenCL Kernel capability.
For Vulkan Shader capability, we should use spv.IsNan to check
whether a number is NaN.

Add a new pattern for converting `std.cmpf ord|uno` to spv.IsNan
and bumped the pattern converting to spv.Ordered/spv.Unordered
to a higher benefit. The SPIR-V target environment will properly
select between these two patterns.

Reviewed By: mravishankar

Differential Revision: https://reviews.llvm.org/D95237
2021-01-22 13:09:33 -05:00
..
CMakeLists.txt [mlir][spirv] NFC: rename SPIR-V conversion files for consistency 2020-12-23 14:36:46 -05:00
LegalizeStandardForSPIRV.cpp [mlir][spirv] NFC: rename SPIR-V conversion files for consistency 2020-12-23 14:36:46 -05:00
StandardToSPIRV.cpp [mlir][spirv] Define spv.IsNan/spv.IsInf and add lowerings 2021-01-22 13:09:33 -05:00
StandardToSPIRVPass.cpp [mlir][spirv] NFC: rename SPIR-V conversion files for consistency 2020-12-23 14:36:46 -05:00