diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Analysis/InstructionSimplify.cpp | 6 | ||||
-rw-r--r-- | lib/VMCore/Constants.cpp | 2 |
2 files changed, 1 insertions, 7 deletions
diff --git a/lib/Analysis/InstructionSimplify.cpp b/lib/Analysis/InstructionSimplify.cpp index a907150b9a..bce9a1fa07 100644 --- a/lib/Analysis/InstructionSimplify.cpp +++ b/lib/Analysis/InstructionSimplify.cpp @@ -785,12 +785,6 @@ static Value *SimplifyDiv(unsigned Opcode, Value *Op0, Value *Op1, // X / 1 -> X if (match(Op1, m_One())) return Op0; - // Vector case. TODO: Have m_One match vectors. - if (ConstantVector *Op1V = dyn_cast<ConstantVector>(Op1)) { - if (ConstantInt *X = cast_or_null<ConstantInt>(Op1V->getSplatValue())) - if (X->isOne()) - return Op0; - } if (Op0->getType()->isIntegerTy(1)) // It can't be division by zero, hence it must be division by one. diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index 3521ee7b16..62117b22e6 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -1033,7 +1033,7 @@ bool ConstantVector::isAllOnesValue() const { /// getSplatValue - If this is a splat constant, where all of the /// elements have the same value, return that value. Otherwise return null. -Constant *ConstantVector::getSplatValue() { +Constant *ConstantVector::getSplatValue() const { // Check out first element. Constant *Elt = getOperand(0); // Then make sure all remaining elements point to the same value. |