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.
The case when Base has a greater bit width than Shift is not very common, but I think it should be handled for consistency with SPIR-V spec?
This can return success(); immediately, so there's no need to have a long "else" block.