[LoopUnswitch] Add an else clause to IsTrivialUnswitchCondition() when checking Heade...
[oota-llvm.git] / lib / Transforms / Scalar / LoopUnswitch.cpp
index cbc563bd8998faf04515c7dd44d6e1ba4e313897..ce167d1c657ee5ad7cc105e8bd1689c996affca0 100644 (file)
@@ -641,7 +641,8 @@ bool LoopUnswitch::IsTrivialUnswitchCondition(Value *Cond, Constant **Val,
         break;
       }
     }
-  }
+  } else
+         return false;
 
   // If we didn't find a single unique LoopExit block, or if the loop exit block
   // contains phi nodes, this isn't trivial.