[NFC] A loop can never contain Ret instruction
authorMax Kazantsev <max.kazantsev@azul.com>
Tue, 28 Aug 2018 09:26:28 +0000 (09:26 +0000)
committerMax Kazantsev <max.kazantsev@azul.com>
Tue, 28 Aug 2018 09:26:28 +0000 (09:26 +0000)
llvm-svn: 340808

llvm/lib/Transforms/Scalar/IndVarSimplify.cpp

index 8656e88..e2c2ff2 100644 (file)
@@ -625,7 +625,7 @@ void IndVarSimplify::rewriteLoopExitValues(Loop *L, SCEVExpander &Rewriter) {
             unsigned Opc = UseInstr->getOpcode();
             NumUses++;
             if (L->contains(UseInstr)) {
-              if (Opc == Instruction::Call || Opc == Instruction::Ret)
+              if (Opc == Instruction::Call)
                 NumHardInternalUses++;
             } else {
               if (Opc == Instruction::PHI) {