[llvm] [MIR2Vec] Fix to skip tests in MIR2VecEmbeddingTestFixture (PR #164467)
    S. VenkataKeerthy via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Oct 21 10:51:57 PDT 2025
    
    
  
https://github.com/svkeerthy created https://github.com/llvm/llvm-project/pull/164467
Fixes test failure issues (caused by #162161) in Windows buildbots. 
>From eaf1906f3edf19c41f68878f2d39bd1604125859 Mon Sep 17 00:00:00 2001
From: svkeerthy <venkatakeerthy at google.com>
Date: Tue, 21 Oct 2025 17:50:06 +0000
Subject: [PATCH] Fix to skip tests in MIR2VecEmbeddingTestFixture
---
 llvm/unittests/CodeGen/MIR2VecTest.cpp | 4 ++++
 1 file changed, 4 insertions(+)
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);
    
    
More information about the llvm-commits
mailing list