[flang-commits] [flang] [Flang][OpenACC][OpenMP] Always add extent to acc/omp.BoundsOp (PR #73790)

via flang-commits flang-commits at lists.llvm.org
Fri Dec 1 10:44:59 PST 2023


================
@@ -819,6 +819,13 @@ genBoundsOps(fir::FirOpBuilder &builder, mlir::Location loc,
         extent = fir::factory::readExtent(builder, loc, dataExv, dimension);
         if (mlir::isa<fir::UndefOp>(extent.getDefiningOp())) {
           extent = zero;
+          if (ubound && lbound &&
+              mlir::isa<mlir::arith::ConstantOp>(ubound.getDefiningOp()) &&
+              mlir::isa<mlir::arith::ConstantOp>(lbound.getDefiningOp())) {
----------------
agozillon wrote:

Sounds good, I'll remove the constant check!

https://github.com/llvm/llvm-project/pull/73790


More information about the flang-commits mailing list