diff options
author | Owen Anderson <resistor@mac.com> | 2007-07-07 20:13:57 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2007-07-07 20:13:57 +0000 |
commit | 36a07daabd1919d6c12b8f55b101d54c3d7171cd (patch) | |
tree | 28c12a611db2e9cf6dd0067e8462b02dedbd957e /lib/Transforms/Scalar/GVNPRE.cpp | |
parent | 8f5149e002b28568a87c591e82a9371fc0a7dd47 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37967 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/GVNPRE.cpp')
-rw-r--r-- | lib/Transforms/Scalar/GVNPRE.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/GVNPRE.cpp b/lib/Transforms/Scalar/GVNPRE.cpp index 0661c94dbd..44846cb0df 100644 --- a/lib/Transforms/Scalar/GVNPRE.cpp +++ b/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); } |