DivergenceAnalysisTest: fix use of uninitialized memory

Thanks to Simon Moll for chasing it down.

Change-Id: If188f07c4aaec217f40a7a2ca029818f9202f1cb
llvm-svn: 344738
This commit is contained in:
Nicolai Haehnle 2018-10-18 12:54:39 +00:00
parent 2c30fbcac5
commit 7052cb35a1
1 changed files with 1 additions and 1 deletions

View File

@ -302,7 +302,7 @@ TEST_F(DivergenceAnalysisTest, DAJoinDivergence) {
if (!Phi)
continue;
if (&BB == *ItDivJoins) {
if (ItDivJoins != ItCase.second.end() && &BB == *ItDivJoins) {
EXPECT_TRUE(DA.isDivergent(*Phi));
// Advance to next block with expected divergent PHI node.
++ItDivJoins;