If the vectorizer test pass does not get any affine map, it should output nothing instead of crash.
Issue: https://github.com/llvm/llvm-project/issues/61534
Reviewed By: nicolasvasilache, dcaballe
Differential Revision: https://reviews.llvm.org/D146601
"test_affine_map"() { affine_map = affine_map<(d0, d1)[s0, s1] -> (d0 + 1 + s1, d1 - 1 - s0)> } : () -> ()
return
}
+
+// -----
+
+// CHECK-LABEL: @no_affine_maps
+func.func @no_affine_maps() {
+ // CHECK: return
+ return
+}
.getValue();
maps.push_back(map);
}
+ if (maps.empty())
+ // Nothing to compose
+ return;
AffineMap res;
for (auto m : maps) {
res = res ? res.compose(m) : m;