@@ -41,9 +41,17 @@ TEST_F(VPVerifierTest, VPInstructionUseBeforeDefSameBB) {
4141#endif
4242 EXPECT_FALSE (verifyVPlanIsValid (Plan));
4343#if GTEST_HAS_STREAM_REDIRECTION
44+ #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
45+ EXPECT_STREQ (" Use before def!\n "
46+ " EMIT vp<%1> = sub vp<%2>\n "
47+ " before\n "
48+ " EMIT vp<%2> = add ir<0>\n " ,
49+ ::testing::internal::GetCapturedStderr ().c_str());
50+ #else
4451 EXPECT_STREQ (" Use before def!\n " ,
4552 ::testing::internal::GetCapturedStderr ().c_str());
4653#endif
54+ #endif
4755}
4856
4957TEST_F (VPVerifierTest, VPInstructionUseBeforeDefDifferentBB) {
@@ -72,9 +80,17 @@ TEST_F(VPVerifierTest, VPInstructionUseBeforeDefDifferentBB) {
7280#endif
7381 EXPECT_FALSE (verifyVPlanIsValid (Plan));
7482#if GTEST_HAS_STREAM_REDIRECTION
83+ #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
84+ EXPECT_STREQ (" Use before def!\n "
85+ " EMIT vp<%1> = sub vp<%3>\n "
86+ " before\n "
87+ " EMIT vp<%3> = add ir<0>\n " ,
88+ ::testing::internal::GetCapturedStderr ().c_str());
89+ #else
7590 EXPECT_STREQ (" Use before def!\n " ,
7691 ::testing::internal::GetCapturedStderr ().c_str());
7792#endif
93+ #endif
7894}
7995
8096TEST_F (VPVerifierTest, VPBlendUseBeforeDefDifferentBB) {
@@ -112,8 +128,16 @@ TEST_F(VPVerifierTest, VPBlendUseBeforeDefDifferentBB) {
112128#endif
113129 EXPECT_FALSE (verifyVPlanIsValid (Plan));
114130#if GTEST_HAS_STREAM_REDIRECTION
131+ #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
132+ EXPECT_STREQ (" Use before def!\n "
133+ " BLEND ir<<badref>> = vp<%2>\n "
134+ " before\n "
135+ " EMIT vp<%2> = add ir<0>\n " ,
136+ ::testing::internal::GetCapturedStderr ().c_str());
137+ #else
115138 EXPECT_STREQ (" Use before def!\n " ,
116139 ::testing::internal::GetCapturedStderr ().c_str());
140+ #endif
117141#endif
118142
119143 delete Phi;
0 commit comments