Skip to content

Commit c025bd1

Browse files
committed
[TableGen,GlobalISel] Use MapVector to stabilize iteration order
Otherwise llvm/test/TableGen/GlobalISelCombinerEmitter/type-inference.td could fail when llvm::hash_value(StringRef) changes. Fix #66377
1 parent 6d340e4 commit c025bd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ void CombineRuleOperandTypeChecker::getInstEqClasses(
529529
const auto MCOITypes = getMCOIOperandTypes(*CGP);
530530
assert(MCOITypes.size() == P.operands_size());
531531

532-
DenseMap<StringRef, std::vector<unsigned>> TyToOpIdx;
532+
MapVector<StringRef, SmallVector<unsigned, 0>> TyToOpIdx;
533533
for (const auto &[Idx, Ty] : enumerate(MCOITypes))
534534
TyToOpIdx[Ty].push_back(Idx);
535535

0 commit comments

Comments
 (0)