[mlir][index] Add shl, shrs, and shru ops
commit9ef31465114dcd226c27f43b73f221e89a4fa83d
authorJeff Niu <jeff@modular.com>
Thu, 3 Nov 2022 18:51:43 +0000 (3 11:51 -0700)
committerJeff Niu <jeff@modular.com>
Thu, 3 Nov 2022 23:29:04 +0000 (3 16:29 -0700)
tree3a3797fefad5bfd5479cf8982927181e34a78fa9
parent374e6462a4c970965d3348bc90a2109056b051c9
[mlir][index] Add shl, shrs, and shru ops

This patch adds the left shift, signed right shift, and unsigned right
shift operations to the index dialects with folders and LLVM lowerings.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D137349
mlir/include/mlir/Dialect/Index/IR/IndexOps.td
mlir/lib/Conversion/IndexToLLVM/IndexToLLVM.cpp
mlir/lib/Dialect/Index/IR/IndexOps.cpp
mlir/test/Conversion/IndexToLLVM/index-to-llvm.mlir
mlir/test/Dialect/Index/index-canonicalize.mlir
mlir/test/Dialect/Index/index-ops.mlir