aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/InstructionCombining.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2008-12-02 05:09:00 +0000
committerBill Wendling <isanbard@gmail.com>2008-12-02 05:09:00 +0000
commit236a119dc811552af28e6a9908127b8ad7fb36b0 (patch)
tree40a4f4355be0b90b17a51adafbfd960f23b52435 /lib/Transforms/Scalar/InstructionCombining.cpp
parentfc5b8e67e57fe042e9fba29f20d96eae4fa3188a (diff)
downloadexternal_llvm-236a119dc811552af28e6a9908127b8ad7fb36b0.zip
external_llvm-236a119dc811552af28e6a9908127b8ad7fb36b0.tar.gz
external_llvm-236a119dc811552af28e6a9908127b8ad7fb36b0.tar.bz2
Improve comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60398 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 109e76a..7ad75d2 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -4437,14 +4437,13 @@ Instruction *InstCombiner::FoldOrOfICmps(Instruction &I,
/// FoldOrWithConstants - This helper function folds:
///
-/// ((A | B) & 1) | (B & -2)
+/// ((A | B) & C1) | (B & C2)
///
/// into:
///
-/// (A & 1) | B
+/// (A & C1) | B
///
-/// The constants aren't important. Only that they don't overlap. (I.e., the XOR
-/// of the two constants is "all ones".)
+/// when the XOR of the two constants is "all ones" (-1).
Instruction *InstCombiner::FoldOrWithConstants(BinaryOperator &I, Value *Op,
Value *A, Value *B, Value *C) {
ConstantInt *CI1 = dyn_cast<ConstantInt>(C);