mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-18 11:24:01 +00:00
IntegerDivision: Style cleanups, avoid warning about mixing || and && without parens.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164216 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -266,16 +266,14 @@ static Value* GenerateUnsignedDivisionCode(Value* Dividend, Value* Divisor,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool llvm::expandDivision(BinaryOperator* Div) {
|
bool llvm::expandDivision(BinaryOperator* Div) {
|
||||||
assert(Div->getOpcode() == Instruction::SDiv ||
|
assert((Div->getOpcode() == Instruction::SDiv ||
|
||||||
Div->getOpcode() == Instruction::UDiv
|
Div->getOpcode() == Instruction::UDiv) &&
|
||||||
&& "Trying to expand division from a non-division function");
|
"Trying to expand division from a non-division function");
|
||||||
|
|
||||||
IRBuilder<> Builder(Div);
|
IRBuilder<> Builder(Div);
|
||||||
|
|
||||||
if (Div->getType()->isVectorTy()) {
|
if (Div->getType()->isVectorTy())
|
||||||
assert(0 && "Div over vectors not supported");
|
llvm_unreachable("Div over vectors not supported");
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// First prepare the sign if it's a signed division
|
// First prepare the sign if it's a signed division
|
||||||
if (Div->getOpcode() == Instruction::SDiv) {
|
if (Div->getOpcode() == Instruction::SDiv) {
|
||||||
|
Reference in New Issue
Block a user