Skip to content

Commit 7dcc4bf

Browse files
committed
update comment
1 parent ffb400c commit 7dcc4bf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2217,9 +2217,11 @@ foldBitwiseLogicWithIntrinsics(BinaryOperator &I,
22172217
}
22182218
}
22192219

2220-
// Try to simplify X | Y by replacing occurrences of Y in X with 0.
2221-
// Similarly, simplify X & Y by replacing occurrences of Y in X with -1.
2220+
// Try to simplify V by replacing occurrences of Op with RepOp, but only look
2221+
// through bitwise operations. In particular, for X | Y we try to replace Y with
2222+
// 0 inside X and for X & Y we try to replace Y with -1 inside X.
22222223
// Return the simplified result of X if successful, and nullptr otherwise.
2224+
// If SimplifyOnly is true, no new instructions will be created.
22232225
static Value *simplifyAndOrWithOpReplaced(Value *V, Value *Op, Value *RepOp,
22242226
bool SimplifyOnly,
22252227
InstCombinerImpl &IC,

0 commit comments

Comments
 (0)