Skip to content

Commit f735b3a

Browse files
committed
[mlir] Prevent argStorage relocations
This fixes msan reports like https://reviews.llvm.org/P8285 Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D124576
1 parent dca2bc4 commit f735b3a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,7 @@ static LogicalResult simplifyPassThroughSwitch(SwitchOp op,
705705
SmallVector<ValueRange> newCaseOperands;
706706
SmallVector<SmallVector<Value>> argStorage;
707707
auto caseValues = op.getCaseValues();
708+
argStorage.reserve(caseValues->size() + 1);
708709
auto caseDests = op.getCaseDestinations();
709710
bool requiresChange = false;
710711
for (int64_t i = 0, size = caseValues->size(); i < size; ++i) {

0 commit comments

Comments
 (0)