File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -2001,8 +2001,15 @@ static LogicalResult generateCopy(
20012001 }
20022002
20032003 SmallVector<AffineMap, 4 > lbMaps (rank), ubMaps (rank);
2004- for (unsigned i = 0 ; i < rank; ++i)
2004+ for (unsigned i = 0 ; i < rank; ++i) {
20052005 region.getLowerAndUpperBound (i, lbMaps[i], ubMaps[i]);
2006+ if (lbMaps[i].getNumResults () == 0 || ubMaps[i].getNumResults () == 0 ) {
2007+ LLVM_DEBUG (llvm::dbgs ()
2008+ << " Missing lower or upper bound for region along dimension: "
2009+ << i << ' \n ' );
2010+ return failure ();
2011+ }
2012+ }
20062013
20072014 const FlatAffineValueConstraints *cst = region.getConstraints ();
20082015 // 'regionSymbols' hold values that this memory region is symbolic/parametric
Original file line number Diff line number Diff line change @@ -300,14 +300,15 @@ func.func @affine_parallel(%85:memref<2x5x4x2xi64>) {
300300 }
301301 }
302302 }
303- // CHECK: affine.for
304- // CHECK-NEXT: affine.for %{{.*}} = 0 to 5
305- // CHECK-NEXT: affine.for %{{.*}} = 0 to 4
306- // CHECK-NEXT: affine.for %{{.*}} = 0 to 2
307-
303+ // Lower and upper bounds for the region can't be determined for the outermost
304+ // dimension. No fast buffer generation.
308305 // CHECK: affine.for
309306 // CHECK-NEXT: affine.parallel
310307 // CHECK-NEXT: affine.parallel
308+ // CHECK-NEXT: affine.for
309+ // CHECK-NOT: affine.for
310+
311+
311312 return
312313}
313314
You can’t perform that action at this time.
0 commit comments