aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Utils/IntegerDivision.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/Transforms/Utils/IntegerDivision.cpp b/lib/Transforms/Utils/IntegerDivision.cpp
index 8589712200..afbfe2c131 100644
--- a/lib/Transforms/Utils/IntegerDivision.cpp
+++ b/lib/Transforms/Utils/IntegerDivision.cpp
@@ -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) {