Skip to content

Commit 7a086fd

Browse files
author
git apple-llvm automerger
committed
Merge commit '40edb37bb370' from llvm.org/main into next
2 parents cd380e6 + 40edb37 commit 7a086fd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/lib/CodeGen/StackSlotColoring.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,10 @@ void StackSlotColoring::InitializeSlots() {
287287

288288
auto StackID = MFI->getStackID(FI);
289289
if (StackID != 0) {
290-
AllColors.resize(StackID + 1);
291-
UsedColors.resize(StackID + 1);
290+
if (StackID >= AllColors.size()) {
291+
AllColors.resize(StackID + 1);
292+
UsedColors.resize(StackID + 1);
293+
}
292294
AllColors[StackID].resize(LastFI);
293295
UsedColors[StackID].resize(LastFI);
294296
}

0 commit comments

Comments
 (0)