[libFuzzer] when a single mutation fails try a few more times with other mutations...
[oota-llvm.git] / lib / Transforms / InstCombine / InstCombineShifts.cpp
index a414ec600abcf6fae86ecd1c11d4e5c483d9ec74..d04ed58b014f486adb2bd41fc2fabb2207e189b3 100644 (file)
@@ -175,8 +175,8 @@ static bool CanEvaluateShifted(Value *V, unsigned NumBits, bool isLeftShift,
     // get into trouble with cyclic PHIs here because we only consider
     // instructions with a single use.
     PHINode *PN = cast<PHINode>(I);
-    for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i)
-      if (!CanEvaluateShifted(PN->getIncomingValue(i), NumBits, isLeftShift,
+    for (Value *IncValue : PN->incoming_values())
+      if (!CanEvaluateShifted(IncValue, NumBits, isLeftShift,
                               IC, PN))
         return false;
     return true;