llvm-project/mlir/test/Transforms/Vectorize
Uday Bondhugula 36a415bcc5 More affine expr simplifications for floordiv and mod
Add one more simplification for floordiv and mod affine expressions.
Examples:
 (2*d0 + 1) floordiv 2 is simplified to d0
 (8*d0 + 4*d1 + d2) floordiv 4 simplified to 4*d0 + d1 + d2 floordiv 4.
 etc.

 Similarly, (4*d1 + 1) mod 2 is simplified to 1,
            (2*d0 + 8*d1) mod 8 simplified to 2*d0 mod 8.

Change getLargestKnownDivisor to return int64_t to be consistent and
to avoid casting at call sites (since the return value is used in expressions
of int64_t/index type).

Signed-off-by: Uday Bondhugula <uday@polymagelabs.com>

Closes tensorflow/mlir#202

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/202 from bondhugula:affine b13fcb2f1c00a39ca5434613a02408e085a80e77
PiperOrigin-RevId: 284866710
2019-12-10 16:00:53 -08:00
..
compose_maps.mlir More affine expr simplifications for floordiv and mod 2019-12-10 16:00:53 -08:00
normalize_maps.mlir Standardize the value numbering in the AsmPrinter. 2019-07-09 10:41:00 -07:00
vector_utils.mlir Modify the syntax of the the ElementsAttrs to print the type as a colon type. 2019-06-25 16:06:58 -07:00
vectorize_1d.mlir Move VectorOps to Tablegen - (almost) NFC 2019-11-14 08:15:23 -08:00
vectorize_2d.mlir Move VectorOps to Tablegen - (almost) NFC 2019-11-14 08:15:23 -08:00
vectorize_3d.mlir Move VectorOps to Tablegen - (almost) NFC 2019-11-14 08:15:23 -08:00
vectorize_outer_loop_2d.mlir Move VectorOps to Tablegen - (almost) NFC 2019-11-14 08:15:23 -08:00
vectorize_outer_loop_transpose_2d.mlir Move VectorOps to Tablegen - (almost) NFC 2019-11-14 08:15:23 -08:00
vectorize_transpose_2d.mlir Move VectorOps to Tablegen - (almost) NFC 2019-11-14 08:15:23 -08:00