Fix merging of nodes whose incoming offset is not zero. This unbreaks DSA on

several mallocbench programs, including perl.

llvm-svn: 14342
This commit is contained in:
Chris Lattner 2004-06-23 06:29:59 +00:00
parent 1ea8447089
commit 0441388aff
1 changed files with 1 additions and 2 deletions

View File

@ -825,8 +825,7 @@ DSNodeHandle ReachabilityCloner::getClonedNH(const DSNodeHandle &SrcNH) {
unsigned MergeOffset = 0;
DSNode *CN = NH.getNode();
if (CN->getSize() != 1)
MergeOffset = ((i << DS::PointerShift)+NH.getOffset()
- SrcNH.getOffset()) %CN->getSize();
MergeOffset = ((i << DS::PointerShift)+NH.getOffset()) % CN->getSize();
CN->addEdgeTo(MergeOffset, DestEdge);
}
}