diff --git a/lib/Dialect/AIE/Transforms/AIEObjectFifoStatefulTransform.cpp b/lib/Dialect/AIE/Transforms/AIEObjectFifoStatefulTransform.cpp index c46e3d369c..8ecb3ca2cc 100644 --- a/lib/Dialect/AIE/Transforms/AIEObjectFifoStatefulTransform.cpp +++ b/lib/Dialect/AIE/Transforms/AIEObjectFifoStatefulTransform.cpp @@ -464,13 +464,9 @@ struct AIEObjectFifoStatefulTransformPass builder.create(builder.getUnknownLoc(), acqLock, acqLockAction, acqMode); - if (!dims.getValue().empty() && padDimensions) { - if (!padDimensions.getValue().empty()) - builder.create(builder.getUnknownLoc(), buff, offset, len, - dims, padDimensions); - else - builder.create(builder.getUnknownLoc(), buff, offset, len, - dims); + if (!dims.getValue().empty() && !padDimensions.getValue().empty()) { + builder.create(builder.getUnknownLoc(), buff, offset, len, dims, + padDimensions); } else if (!dims.getValue().empty()) { builder.create(builder.getUnknownLoc(), buff, offset, len, dims); } else {