[llvm] [MCA] Parameterize variant scheduling classes by explicit variable (PR #92849)
Michael Maitland via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 28 06:54:42 PDT 2024
================
@@ -185,3 +188,49 @@ TEST_F(X86TestBase, TestInstructionRecycling) {
ASSERT_EQ(*BV, *V) << "Value of '" << F << "' does not match";
}
}
+
+// Test that we do not depend upon the MCInst address for variant description
+// construction. This test creates two instructions that will use variant
+// description as they are both zeroing idioms, but write to different
+// registers. If the key used to access the variant instruction description is
+// the same between the descriptions (like the MCInst pointer), we will run into
+// an assertion failure due to the different writes.
----------------
michaelmaitland wrote:
I checked out these changes, replaced `hashMCInst` with `&MCI` and ran the tests. All were passing. I don't think this is intended.
https://github.com/llvm/llvm-project/pull/92849
More information about the llvm-commits
mailing list