diff --git a/lib/Transforms/Utils/BypassSlowDivision.cpp b/lib/Transforms/Utils/BypassSlowDivision.cpp index 0e2a4653353..d74d5299db5 100644 --- a/lib/Transforms/Utils/BypassSlowDivision.cpp +++ b/lib/Transforms/Utils/BypassSlowDivision.cpp @@ -83,10 +83,9 @@ static bool insertFastDiv(Instruction *I, IntegerType *BypassType, Value *Dividend = I->getOperand(0); Value *Divisor = I->getOperand(1); - if (isa(Divisor) || - (isa(Dividend) && isa(Divisor))) { - // Operations with immediate values should have - // been solved and replaced during compile time. + if (isa(Divisor)) { + // Division by a constant should have been been solved and replaced earlier + // in the pipeline. return false; }