summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2007-07-07 20:13:57 +0000
committerOwen Anderson <resistor@mac.com>2007-07-07 20:13:57 +0000
commit8b99e0ab206f8aa4c9d18392fc973f821c218655 (patch)
tree6a062695c8af7d7a54acf604cefffe27b3ef7f57 /llvm/lib
parent9b2252c6f06ad399703571c84dfb12465a2cd9e8 (diff)
downloadbcm5719-llvm-8b99e0ab206f8aa4c9d18392fc973f821c218655.tar.gz
bcm5719-llvm-8b99e0ab206f8aa4c9d18392fc973f821c218655.zip
Fix an error where ANTIC_OUT was ending up with more than one expression of
the same value number. This fixes an infinite loop on 444.namd. llvm-svn: 37967
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/GVNPRE.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVNPRE.cpp b/llvm/lib/Transforms/Scalar/GVNPRE.cpp
index 0661c94dbd7..44846cb0df4 100644
--- a/llvm/lib/Transforms/Scalar/GVNPRE.cpp
+++ b/llvm/lib/Transforms/Scalar/GVNPRE.cpp
@@ -1370,7 +1370,7 @@ unsigned GVNPRE::buildsets_anticin(BasicBlock* BB,
unsigned num = VN.lookup_or_add(*I);
numbers.resize(VN.size());
- if (isa<Instruction>(*I)) {
+ if (isa<Instruction>(*I) && !numbers.test(num)) {
anticIn.insert(*I);
numbers.set(num);
}
OpenPOWER on IntegriCloud