summaryrefslogtreecommitdiffstats
path: root/mlir/test/Transforms/Vectorize
diff options
context:
space:
mode:
authorNicolas Vasilache <ntv@google.com>2019-01-07 17:40:31 -0800
committerjpienaar <jpienaar@google.com>2019-03-29 15:03:36 -0700
commitc449e46cebb21f08613b314e844456c335b6630c (patch)
tree2545cbfca8218c6efaf82d63330ded81ab471aaa /mlir/test/Transforms/Vectorize
parent21baf86a2f454fb1387f3f670ade7c507a53e2e6 (diff)
downloadbcm5719-llvm-c449e46cebb21f08613b314e844456c335b6630c.tar.gz
bcm5719-llvm-c449e46cebb21f08613b314e844456c335b6630c.zip
Introduce AffineExpr::compose(AffineMap)
This CL is the 1st on the path to simplifying AffineMap composition. This CL uses the now accepted AffineExpr.replaceDimsAndSymbols to implement `AffineExpr::compose(AffineMap)`. Arguably, `simplifyAffineExpr` should be part of IR and not Analysis but this CL does not yet pull the trigger on that. PiperOrigin-RevId: 228265845
Diffstat (limited to 'mlir/test/Transforms/Vectorize')
-rw-r--r--mlir/test/Transforms/Vectorize/compose_maps.mlir7
1 files changed, 7 insertions, 0 deletions
diff --git a/mlir/test/Transforms/Vectorize/compose_maps.mlir b/mlir/test/Transforms/Vectorize/compose_maps.mlir
index c482c1f07b2..6d0e0df3464 100644
--- a/mlir/test/Transforms/Vectorize/compose_maps.mlir
+++ b/mlir/test/Transforms/Vectorize/compose_maps.mlir
@@ -114,4 +114,11 @@ func @symbols1() {
"test_affine_map"() { affine_map: (d0)[s0] -> (d0 + s0, d0 - s0) } : () -> ()
"test_affine_map"() { affine_map: (d0, d1) -> (d0 + 1, d1 - 1) } : () -> ()
return
+}
+
+func @drop() {
+ // CHECK: Composed map: (d0, d1, d2)[s0, s1] -> (d0 * 2 + d1 + d2 + s1)
+ "test_affine_map"() { affine_map: (d0, d1, d2)[s0, s1] -> (d0 + s1, d1 + s0, d0 + d1 + d2) } : () -> ()
+ "test_affine_map"() { affine_map: (d0, d1, d2) -> (d0 + d2) } : () -> ()
+ return
} \ No newline at end of file
OpenPOWER on IntegriCloud