llvm-project/mlir/lib/Conversion/SPIRVToLLVM
George Mitenkov cf2b4d5cb6 [MLIR][SPIRVToLLVM] Implemented shift conversion pattern
This patch has shift ops conversion implementation. In SPIR-V dialect,
`Shift` and `Base` may have different bit width. On the contrary,
in LLVM dialect both `Base` and `Shift` have to be of the same bit width.
This leads to the following cases:
- if `Base` has the same bit width as `Shift`, the conversion is
  straightforward.
- if `Base` has a greater bit width than `Shift`, shift is sign/zero
  extended first. Then the extended value is passed to the shift.
- otherwise the conversion is considered to be illegal.

Differential Revision: https://reviews.llvm.org/D81546
2020-06-12 19:04:30 -04:00
..
CMakeLists.txt
ConvertSPIRVToLLVM.cpp [MLIR][SPIRVToLLVM] Implemented shift conversion pattern 2020-06-12 19:04:30 -04:00
ConvertSPIRVToLLVMPass.cpp