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(
2001
2001
}
2002
2002
2003
2003
SmallVector<AffineMap, 4 > lbMaps (rank), ubMaps (rank);
2004
- for (unsigned i = 0 ; i < rank; ++i)
2004
+ for (unsigned i = 0 ; i < rank; ++i) {
2005
2005
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
+ }
2006
2013
2007
2014
const FlatAffineValueConstraints *cst = region.getConstraints ();
2008
2015
// '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>) {
300
300
}
301
301
}
302
302
}
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.
308
305
// CHECK: affine.for
309
306
// CHECK-NEXT: affine.parallel
310
307
// CHECK-NEXT: affine.parallel
308
+ // CHECK-NEXT: affine.for
309
+ // CHECK-NOT: affine.for
310
+
311
+
311
312
return
312
313
}
313
314
You can’t perform that action at this time.
0 commit comments