diff options
author | Duncan Sands <baldrick@free.fr> | 2011-02-01 08:39:12 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2011-02-01 08:39:12 +0000 |
commit | 7681c6da606efcc392f76b8acea8301cb5fc7a0a (patch) | |
tree | c2e5253bcd443580cffc64f2698568c2d3aa3d9d /lib/Analysis/InstructionSimplify.cpp | |
parent | e47023d543aecb8ca558721a0259d83ab2b016a3 (diff) |
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
Diffstat (limited to 'lib/Analysis/InstructionSimplify.cpp')
-rw-r--r-- | lib/Analysis/InstructionSimplify.cpp | 6 |
1 files changed, 0 insertions, 6 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. |