Fix a node mapping problem that was causing the pool allocator to locally allocate
nodes that were globally live, thus breaking programs.
llvm-svn: 12094
diff --git a/llvm/lib/Analysis/DataStructure/DataStructure.cpp b/llvm/lib/Analysis/DataStructure/DataStructure.cpp
index 270a0bf..3bae138 100644
--- a/llvm/lib/Analysis/DataStructure/DataStructure.cpp
+++ b/llvm/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);
}