llvm-project/mlir/test/Transforms
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
..
Vectorize More affine expr simplifications for floordiv and mod 2019-12-10 16:00:53 -08:00
affine-data-copy.mlir Fix affine data copy generation corner cases/bugs 2019-09-03 11:53:16 -07:00
affine-loop-invariant-code-motion.mlir Implement simple loop-invariant-code-motion based on dialect interfaces. 2019-10-16 04:28:38 -07:00
canonicalize-dce.mlir Merge DCE and unreachable block elimination into a new utility 'simplifyRegions'. 2019-11-20 15:53:19 -08:00
canonicalize.mlir DimOp folding for alloc/view dynamic dimensions 2019-12-06 06:00:54 -08:00
constant-fold.mlir Make std.divis and std.diviu support ElementsAttr folding. 2019-11-25 14:31:43 -08:00
cse.mlir Convert the Canonicalize and CSE passes to generic Operation Passes. 2019-10-24 15:01:09 -07:00
dma-generate.mlir Extend map canonicalization to propagate constant operands 2019-08-29 01:13:29 -07:00
inlining.mlir Add support for canonicalizing callable regions during inlining. 2019-10-10 17:06:33 -07:00
loop-coalescing.mlir Loop coalescing: fix pointer chainsing in use-chain traversal 2019-12-04 07:42:29 -08:00
loop-fusion-dependence-check.mlir Globally change load/store/dma_start/dma_wait operations over to affine.load/store/dma_start/dma_wait. 2019-07-03 14:37:06 -07:00
loop-fusion-slice-computation.mlir Minor spelling tweaks 2019-12-09 09:23:48 -08:00
loop-fusion.mlir AffineLoopFusion: Prevent fusion of multi-out-edge producer loops 2019-12-03 06:09:50 -08:00
loop-invariant-code-motion.mlir Implement simple loop-invariant-code-motion based on dialect interfaces. 2019-10-16 04:28:38 -07:00
loop-tiling.mlir Standardize the value numbering in the AsmPrinter. 2019-07-09 10:41:00 -07:00
lower-affine.mlir Correctly parse empty affine maps. 2019-11-20 18:30:15 -08:00
memref-bound-check.mlir Standardize the value numbering in the AsmPrinter. 2019-07-09 10:41:00 -07:00
memref-dataflow-opt.mlir Upgrade/fix/simplify store to load forwarding 2019-09-21 10:08:56 -07:00
memref-dependence-check.mlir Add @below and @above directives to verify-diagnostics. 2019-10-23 15:56:29 -07:00
memref-normalize.mlir fix simplify-affine-structures bug 2019-10-07 10:04:50 -07:00
parallelism-detection.mlir Affine loop parallelism detection: conservatively handle unknown ops 2019-07-23 10:18:46 -07:00
parametric-mapping.mlir Support lowering of imperfectly nested loops into GPU dialect. 2019-11-01 10:52:06 -07:00
parametric-tiling.mlir Fix minor spelling tweaks (NFC) 2019-10-20 09:44:36 -07:00
pipeline-data-transfer.mlir pipeline-data-transfer: remove dead tag alloc's and improve test coverage for replaceMemRefUsesWith / pipeline-data-transfer 2019-09-04 06:59:09 -07:00
simplify-affine-structures.mlir Fix minor spelling tweaks (NFC) 2019-10-20 09:44:36 -07:00
slicing-utils.mlir Fix backward slice corner case 2019-07-26 03:49:17 -07:00
strip-debuginfo.mlir Replace the implementation of Function and Module with FuncOp and ModuleOp. 2019-07-03 14:37:18 -07:00
test-canonicalize.mlir Convert the Canonicalize and CSE passes to generic Operation Passes. 2019-10-24 15:01:09 -07:00
test-inlining.mlir Add the initial inlining infrastructure. 2019-09-05 12:24:13 -07:00
test-legalize-remapped-value.mlir Add getRemappedValue to ConversionPatternRewriter 2019-11-19 11:09:39 -08:00
test-legalizer-analysis.mlir Add support for multi-level value mapping to DialectConversion. 2019-09-16 10:38:19 -07:00
test-legalizer-full.mlir NFC: Refactor block signature conversion to not erase the original arguments. 2019-11-13 10:27:53 -08:00
test-legalizer.mlir NFC: Refactor block signature conversion to not erase the original arguments. 2019-11-13 10:27:53 -08:00
unroll-jam.mlir unroll and jam: fix order of jammed bodies 2019-10-08 15:13:11 -07:00
unroll.mlir More affine expr simplifications for floordiv and mod 2019-12-10 16:00:53 -08:00