mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
Fix an infinite loop in the loop-vectorizer.
PR14134. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166379 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1175,6 +1175,12 @@ bool LoopVectorizationLegality::AddReductionVar(PHINode *Phi,
|
||||
bool FoundInBlockUser = false;
|
||||
// Did we reach the initial PHI node ?
|
||||
bool FoundStartPHI = false;
|
||||
|
||||
// If the instruction has no users then this is a broken
|
||||
// chain and can't be a reduction variable.
|
||||
if (Iter->use_begin() == Iter->use_end())
|
||||
return false;
|
||||
|
||||
// For each of the *users* of iter.
|
||||
for (Value::use_iterator it = Iter->use_begin(), e = Iter->use_end();
|
||||
it != e; ++it) {
|
||||
|
||||
Reference in New Issue
Block a user