[llvm] [MIR2Vec] Fix to skip tests in MIR2VecEmbeddingTestFixture (PR #164467)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 21 10:52:46 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlgo

Author: S. VenkataKeerthy (svkeerthy)

<details>
<summary>Changes</summary>

Fixes test failure issues (caused by #<!-- -->162161) in Windows buildbots. 

---
Full diff: https://github.com/llvm/llvm-project/pull/164467.diff


1 Files Affected:

- (modified) llvm/unittests/CodeGen/MIR2VecTest.cpp (+4) 


``````````diff
diff --git a/llvm/unittests/CodeGen/MIR2VecTest.cpp b/llvm/unittests/CodeGen/MIR2VecTest.cpp
index 8cd9d5ac9f6be..8710d6b45969a 100644
--- a/llvm/unittests/CodeGen/MIR2VecTest.cpp
+++ b/llvm/unittests/CodeGen/MIR2VecTest.cpp
@@ -255,6 +255,10 @@ class MIR2VecEmbeddingTestFixture : public MIR2VecVocabTestFixture {
 
   void SetUp() override {
     MIR2VecVocabTestFixture::SetUp();
+    // If base class setup was skipped (TII not initialized), skip derived setup
+    if (!TII)
+      GTEST_SKIP() << "Failed to get target instruction info in "
+                      "the base class setup; Skipping test";
 
     // Create a dummy function for MachineFunction
     FunctionType *FT = FunctionType::get(Type::getVoidTy(*Ctx), false);

``````````

</details>


https://github.com/llvm/llvm-project/pull/164467


More information about the llvm-commits mailing list