diff --git a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp --- a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp +++ b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp @@ -3807,7 +3807,9 @@ static ParseResult parseAffineMapWithMinMax(OpAsmParser &parser, OperationState &result, MinMaxKind kind) { - constexpr llvm::StringLiteral tmpAttrStrName = "__pseudo_bound_map"; + // Using `const` not `constexpr` below to workaround a MSVC optimizer bug, + // see: https://reviews.llvm.org/D134227#3821753 + const llvm::StringLiteral tmpAttrStrName = "__pseudo_bound_map"; StringRef mapName = kind == MinMaxKind::Min ? AffineParallelOp::getUpperBoundsMapAttrStrName()