summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/SCCP.cpp
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2017-01-19 21:07:42 +0000
committerDavide Italiano <davide@freebsd.org>2017-01-19 21:07:42 +0000
commitf3e9b57b208415cdbeea3f950209f79710860536 (patch)
treee77a83a2e564821a0f7dff4865d800373907203f /lib/Transforms/Scalar/SCCP.cpp
parent9a63b871bd87eef8eca931cd60879509ec0cc55b (diff)
[SCCP] Update comment in visitBinaryOp() after recent changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292519 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/SCCP.cpp')
-rw-r--r--lib/Transforms/Scalar/SCCP.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp
index 34be9069248..9c5fa5c1426 100644
--- a/lib/Transforms/Scalar/SCCP.cpp
+++ b/lib/Transforms/Scalar/SCCP.cpp
@@ -910,9 +910,10 @@ void SCCPSolver::visitBinaryOperator(Instruction &I) {
// Otherwise, one of our operands is overdefined. Try to produce something
// better than overdefined with some tricks.
-
- // If this is an AND or OR with 0 or -1, it doesn't matter that the other
- // operand is overdefined.
+ // If this is:
+ // -> AND/MUL with 0
+ // -> OR with -1
+ // it doesn't matter that the other operand is overdefined.
if (I.getOpcode() == Instruction::And || I.getOpcode() == Instruction::Mul ||
I.getOpcode() == Instruction::Or) {
LatticeVal *NonOverdefVal = nullptr;