From 7681c6da606efcc392f76b8acea8301cb5fc7a0a Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Tue, 1 Feb 2011 08:39:12 +0000 Subject: Have m_One also match constant vectors for which every element is 1. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124655 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/InstructionSimplify.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'lib/Analysis/InstructionSimplify.cpp') 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(Op1)) { - if (ConstantInt *X = cast_or_null(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. -- cgit v1.2.3