Skip to content

Commit 5824130

Browse files
authored
Make latency test more consistent
Ensure the same value is used to set the latency and test the result
1 parent 37d0734 commit 5824130

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/unittests/tools/llvm-mca/X86/TestIncrementalMCA.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ TEST_F(X86TestBase, TestInstructionCustomization) {
245245
.addReg(X86::RAX);
246246
MCIs.push_back(InstructionToAdd);
247247
SmallVector<std::pair<StringRef, StringRef>> InstrDescs;
248-
InstrDescs.push_back(std::make_pair(StringRef("LATENCY"), StringRef("100")));
248+
auto LatStr = std::to_string(ExplicitLatency);
249+
InstrDescs.push_back(std::make_pair(StringRef("LATENCY"), StringRef(LatStr)));
249250

250251
// Run the baseline.
251252
json::Object BaselineResult;

0 commit comments

Comments
 (0)