[mlir][spirv] Do not truncate i/f64 -> i/f32 in SPIRVConversion
authorJakub Kuderski <kubak@google.com>
Fri, 4 Nov 2022 19:10:18 +0000 (15:10 -0400)
committerJakub Kuderski <kubak@google.com>
Fri, 4 Nov 2022 19:10:28 +0000 (15:10 -0400)
commitc064545403917bedd450e07209e7870f1773f90f
tree52ebd6e8f267c176870387cf5df0e1f561e65435
parent9a456b7ad3125834377b8aab1598785e8559c224
[mlir][spirv] Do not truncate i/f64 -> i/f32 in SPIRVConversion

This truncation can be unexpected and break program behavior.
Dedicated emulation passes should be used instead.

Also rename pass options to "emulate-lt-32-bit-scalar-types".

Fixes: https://github.com/llvm/llvm-project/issues/57917

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D137115
mlir/include/mlir/Conversion/Passes.td
mlir/include/mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h
mlir/lib/Conversion/ArithToSPIRV/ArithToSPIRV.cpp
mlir/lib/Conversion/ControlFlowToSPIRV/ControlFlowToSPIRVPass.cpp
mlir/lib/Conversion/FuncToSPIRV/FuncToSPIRVPass.cpp
mlir/lib/Conversion/TensorToSPIRV/TensorToSPIRVPass.cpp
mlir/lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp
mlir/test/Conversion/ArithToSPIRV/arith-to-spirv-unsupported.mlir
mlir/test/Conversion/ArithToSPIRV/arith-to-spirv.mlir
mlir/test/Conversion/FuncToSPIRV/types-to-spirv.mlir