diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyIndVar.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyIndVar.cpp | 7 | 
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp b/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp index 722ed03db3de..42e7c4006b42 100644 --- a/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp @@ -27,6 +27,7 @@  #include "llvm/Transforms/Utils/ScalarEvolutionExpander.h"  using namespace llvm; +using namespace llvm::PatternMatch;  #define DEBUG_TYPE "indvars" @@ -786,8 +787,6 @@ bool SimplifyIndvar::strengthenOverflowingOperation(BinaryOperator *BO,  /// otherwise.  bool SimplifyIndvar::strengthenRightShift(BinaryOperator *BO,                                            Instruction *IVOperand) { -  using namespace llvm::PatternMatch; -    if (BO->getOpcode() == Instruction::Shl) {      bool Changed = false;      ConstantRange IVRange = SE->getUnsignedRange(SE->getSCEV(IVOperand)); @@ -1763,7 +1762,7 @@ Instruction *WidenIV::widenIVUse(WidenIV::NarrowIVDefUse DU, SCEVExpander &Rewri    };    // Our raison d'etre! Eliminate sign and zero extension. -  if ((isa<SExtInst>(DU.NarrowUse) && canWidenBySExt()) || +  if ((match(DU.NarrowUse, m_SExtLike(m_Value())) && canWidenBySExt()) ||        (isa<ZExtInst>(DU.NarrowUse) && canWidenByZExt())) {      Value *NewDef = DU.WideDef;      if (DU.NarrowUse->getType() != WideType) { @@ -2011,8 +2010,6 @@ PHINode *WidenIV::createWideIV(SCEVExpander &Rewriter) {  /// by looking at dominating conditions inside of the loop  void WidenIV::calculatePostIncRange(Instruction *NarrowDef,                                      Instruction *NarrowUser) { -  using namespace llvm::PatternMatch; -    Value *NarrowDefLHS;    const APInt *NarrowDefRHS;    if (!match(NarrowDef, m_NSWAdd(m_Value(NarrowDefLHS),  | 
