IntegerDivision: Style cleanups, avoid warning about mixing || and && without parens.

llvm-svn: 164216
This commit is contained in:
Benjamin Kramer 2012-09-19 13:03:07 +00:00
parent a36f387181
commit 47196e6cd5
1 changed files with 5 additions and 7 deletions

View 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) {