[llvm-commits] [llvm] r60398 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Bill Wendling
isanbard at gmail.com
Mon Dec 1 21:09:00 PST 2008
Author: void
Date: Mon Dec 1 23:09:00 2008
New Revision: 60398
URL: http://llvm.org/viewvc/llvm-project?rev=60398&view=rev
Log:
Improve comment.
Modified:
llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=60398&r1=60397&r2=60398&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Mon Dec 1 23:09:00 2008
@@ -4437,14 +4437,13 @@
/// 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);
More information about the llvm-commits
mailing list