[llvm] r344738 - DivergenceAnalysisTest: fix use of uninitialized memory
Nicolai Haehnle via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 18 05:54:40 PDT 2018
Author: nha
Date: Thu Oct 18 05:54:39 2018
New Revision: 344738
URL: http://llvm.org/viewvc/llvm-project?rev=344738&view=rev
Log:
DivergenceAnalysisTest: fix use of uninitialized memory
Thanks to Simon Moll for chasing it down.
Change-Id: If188f07c4aaec217f40a7a2ca029818f9202f1cb
Modified:
llvm/trunk/unittests/Analysis/DivergenceAnalysisTest.cpp
Modified: llvm/trunk/unittests/Analysis/DivergenceAnalysisTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Analysis/DivergenceAnalysisTest.cpp?rev=344738&r1=344737&r2=344738&view=diff
==============================================================================
--- llvm/trunk/unittests/Analysis/DivergenceAnalysisTest.cpp (original)
+++ llvm/trunk/unittests/Analysis/DivergenceAnalysisTest.cpp Thu Oct 18 05:54:39 2018
@@ -302,7 +302,7 @@ TEST_F(DivergenceAnalysisTest, DAJoinDiv
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;
More information about the llvm-commits
mailing list