summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
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
commit14379df4e60b2d18e724569ea6d1fc44c42b16e4 (patch)
tree81185d298506d7e746841909d7f91d04d9e28db0 /llvm/lib/Transforms/Scalar/InstructionCombining.cpp
parentbd9ba429ca72fead328e47bcc96623fa0692b8f2 (diff)
downloadbcm5719-llvm-14379df4e60b2d18e724569ea6d1fc44c42b16e4.tar.gz
bcm5719-llvm-14379df4e60b2d18e724569ea6d1fc44c42b16e4.zip
Fix trivial todo in instcombine.
llvm-svn: 75586
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 838b33cb23c..864b2fa5ee0 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud