[mlir][index] Add folders for `index` ops
authorJeff Niu <jeff@modular.com>
Tue, 11 Oct 2022 16:47:00 +0000 (09:47 -0700)
committerJeff Niu <jeff@modular.com>
Fri, 21 Oct 2022 16:46:12 +0000 (09:46 -0700)
commit83c3eebdec0d3028e9c7f4dfe080071b26621ec8
tree701ecf1de312497312a26b1e909812ac22a6070c
parentddf87d6cd40416b306c55a02f3646018c2293a7c
[mlir][index] Add folders for `index` ops

This patch adds folders for `index` dialect ops. Ths folders are
careful to ensure that fold results are valid on both 32-bit and 64-bit
targets.

Depends on D135689

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D135694
mlir/include/mlir/Dialect/Index/IR/IndexDialect.td
mlir/include/mlir/Dialect/Index/IR/IndexOps.td
mlir/include/mlir/Support/LLVM.h
mlir/lib/Dialect/Index/IR/IndexOps.cpp
mlir/test/Dialect/Index/index-canonicalize.mlir [new file with mode: 0644]