[all-commits] [llvm/llvm-project] cf2b4d: [MLIR][SPIRVToLLVM] Implemented shift conversion p...
George Mitenkov via All-commits
all-commits at lists.llvm.org
Fri Jun 12 16:08:28 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: cf2b4d5cb64cb0100473fca533edb51c2e6db6bf
https://github.com/llvm/llvm-project/commit/cf2b4d5cb64cb0100473fca533edb51c2e6db6bf
Author: George Mitenkov <georgemitenk0v at gmail.com>
Date: 2020-06-12 (Fri, 12 Jun 2020)
Changed paths:
M mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVM.cpp
A mlir/test/Conversion/SPIRVToLLVM/shifts-to-llvm.mlir
Log Message:
-----------
[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
More information about the All-commits
mailing list