[llvm] 3e579d9 - [VPlan] Fix unit test without LLVM_ENABLE_DUMP. NFC

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 31 09:17:58 PDT 2025


Author: Luke Lau
Date: 2025-08-01T00:17:47+08:00
New Revision: 3e579d93ab50952628a51bda05f3a39f6a5a631c

URL: https://github.com/llvm/llvm-project/commit/3e579d93ab50952628a51bda05f3a39f6a5a631c
DIFF: https://github.com/llvm/llvm-project/commit/3e579d93ab50952628a51bda05f3a39f6a5a631c.diff

LOG: [VPlan] Fix unit test without LLVM_ENABLE_DUMP. NFC

Without dumping the faulty recipe isn't printed, so account for that
like in the other tests. Fixes the buildbot failure at
https://lab.llvm.org/buildbot/#/builders/2/builds/30229

Added: 
    

Modified: 
    llvm/unittests/Transforms/Vectorize/VPlanVerifierTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/Transforms/Vectorize/VPlanVerifierTest.cpp b/llvm/unittests/Transforms/Vectorize/VPlanVerifierTest.cpp
index 20912200bf653..9e06c42997d5e 100644
--- a/llvm/unittests/Transforms/Vectorize/VPlanVerifierTest.cpp
+++ b/llvm/unittests/Transforms/Vectorize/VPlanVerifierTest.cpp
@@ -312,9 +312,14 @@ TEST_F(VPVerifierTest, NonHeaderPHIInHeader) {
 #endif
   EXPECT_FALSE(verifyVPlanIsValid(Plan));
 #if GTEST_HAS_STREAM_REDIRECTION
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
   EXPECT_STREQ(
       "Found non-header PHI recipe in header VPBB: IR   <badref> = phi i32 \n",
       ::testing::internal::GetCapturedStderr().c_str());
+#else
+  EXPECT_STREQ("Found non-header PHI recipe in header VPBB",
+               ::testing::internal::GetCapturedStderr().c_str());
+#endif
 #endif
 }
 


        


More information about the llvm-commits mailing list