diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-09-19 13:03:07 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-09-19 13:03:07 +0000 |
commit | 1c1ab8f53d91506f0590dc1d2448ae438e00b8c6 (patch) | |
tree | e2ef3309bdeba4c1cb1d3be1c654d2e90e50e288 /lib/Transforms/Utils/IntegerDivision.cpp | |
parent | aa6dad9f40f8054313260f512336021f379156f9 (diff) | |
download | external_llvm-1c1ab8f53d91506f0590dc1d2448ae438e00b8c6.zip external_llvm-1c1ab8f53d91506f0590dc1d2448ae438e00b8c6.tar.gz external_llvm-1c1ab8f53d91506f0590dc1d2448ae438e00b8c6.tar.bz2 |
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
Diffstat (limited to 'lib/Transforms/Utils/IntegerDivision.cpp')
-rw-r--r-- | lib/Transforms/Utils/IntegerDivision.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/Transforms/Utils/IntegerDivision.cpp b/lib/Transforms/Utils/IntegerDivision.cpp index 8589712..afbfe2c 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) { |