summaryrefslogtreecommitdiffstats
path: root/lib/Transforms
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-07-14 02:01:53 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-07-14 02:01:53 +0000
commitb468709c917c27059100dc77e6c3b024bdfc3484 (patch)
tree8c962aabe75753871da0ec47899860eb9fa521fc /lib/Transforms
parentf6bc4ae4a1a2dbf986099ab7b74106e8d273cbe1 (diff)
downloadexternal_llvm-b468709c917c27059100dc77e6c3b024bdfc3484.zip
external_llvm-b468709c917c27059100dc77e6c3b024bdfc3484.tar.gz
external_llvm-b468709c917c27059100dc77e6c3b024bdfc3484.tar.bz2
Fix trivial todo in instcombine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75586 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 838b33c..864b2fa 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -2702,7 +2702,8 @@ Instruction *InstCombiner::visitMul(BinaryOperator &I) {
Context->getConstantInt(Op0->getType(), Val.logBase2()));
}
} else if (isa<VectorType>(Op1->getType())) {
- // TODO: If Op1 is all zeros and Op0 is all finite, return all zeros.
+ if (Op1->isNullValue())
+ return ReplaceInstUsesWith(I, Op1);
if (ConstantVector *Op1V = dyn_cast<ConstantVector>(Op1)) {
if (Op1V->isAllOnesValue()) // X * -1 == 0 - X