diff options
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 58a1a746555..88e76dabfb5 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -2432,6 +2432,10 @@ bool LoopVectorizationLegality::canVectorizeWithIfConvert() {        return false;    } +  // Check that we can actually speculate the hoistable loads. +  if (!LoadSpeculation.canHoistAllLoads()) +    return false; +    // We can if-convert this loop.    return true;  } @@ -3369,10 +3373,6 @@ bool LoopVectorizationLegality::blockCanBePredicated(BasicBlock *BB) {      }    } -  // Check that we can actually speculate the hoistable loads. -  if (!LoadSpeculation.canHoistAllLoads()) -    return false; -    return true;  } | 

