IntegerDivision: Style cleanups, avoid warning about mixing || and && without parens.
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 19 Sep 2012 13:03:07 +0000 (13:03 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 19 Sep 2012 13:03:07 +0000 (13:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164216 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/IntegerDivision.cpp

index 8589712200ffb3649ffc2d22d9e969049c23c73b..afbfe2c1310e7c0eb239a09571217d97ef1d4be6 100644 (file)
@@ -266,16 +266,14 @@ static Value* GenerateUnsignedDivisionCode(Value* Dividend, Value* Divisor,
 }
 
 bool llvm::expandDivision(BinaryOperator* Div) {
-  assert(Div->getOpcode() == Instruction::SDiv ||
-         Div->getOpcode() == Instruction::UDiv
-         && "Trying to expand division from a non-division function");
+  assert((Div->getOpcode() == Instruction::SDiv ||
+          Div->getOpcode() == Instruction::UDiv) &&
+         "Trying to expand division from a non-division function");
 
   IRBuilder<> Builder(Div);
 
-  if (Div->getType()->isVectorTy()) {
-    assert(0 && "Div over vectors not supported");
-    return false;
-  }
+  if (Div->getType()->isVectorTy())
+    llvm_unreachable("Div over vectors not supported");
 
   // First prepare the sign if it's a signed division
   if (Div->getOpcode() == Instruction::SDiv) {