Fix a node mapping problem that was causing the pool allocator to locally allocate
nodes that were globally live, thus breaking programs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12094 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp
index 270a0bf..3bae138 100644
--- a/lib/Analysis/DataStructure/DataStructure.cpp
+++ b/lib/Analysis/DataStructure/DataStructure.cpp
@@ -1847,4 +1847,7 @@
for (unsigned i = 0, e = N1->getSize(); i < e; i += DS::PointerSize)
if (unsigned(N2Idx)+i < N2Size)
computeNodeMapping(N1->getLink(i), N2->getLink(N2Idx+i), NodeMap);
+ else
+ computeNodeMapping(N1->getLink(i),
+ N2->getLink(unsigned(N2Idx+i) % N2Size), NodeMap);
}