Skip to content

Commit 7052cb3

Browse files
committed
DivergenceAnalysisTest: fix use of uninitialized memory
Thanks to Simon Moll for chasing it down. Change-Id: If188f07c4aaec217f40a7a2ca029818f9202f1cb llvm-svn: 344738
1 parent 2c30fbc commit 7052cb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/unittests/Analysis/DivergenceAnalysisTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ TEST_F(DivergenceAnalysisTest, DAJoinDivergence) {
302302
if (!Phi)
303303
continue;
304304

305-
if (&BB == *ItDivJoins) {
305+
if (ItDivJoins != ItCase.second.end() && &BB == *ItDivJoins) {
306306
EXPECT_TRUE(DA.isDivergent(*Phi));
307307
// Advance to next block with expected divergent PHI node.
308308
++ItDivJoins;

0 commit comments

Comments
 (0)