[PATCH] Moving few patterns from visitAnd/visitOr/visitXor to SimplifyUsingDistributiveLaws()
Jingyue Wu
jingyue at google.com
Sat Aug 23 20:38:16 PDT 2014
LGTM. Thanks!
================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:435
@@ -415,2 +434,3 @@
static Instruction::BinaryOps
-getBinOpsForFactorization(BinaryOperator *Op, Value *&LHS, Value *&RHS) {
+getBinOpsForFactorization(Instruction::BinaryOps TopLevelOpcode,
+ BinaryOperator *Op, Value *&LHS, Value *&RHS) {
----------------
Need a comment explaining what TopLevelOpcode means.
================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:560
@@ +559,3 @@
+
+ LHSOpcode = getBinOpsForFactorization(TopLevelOpcode, Op0, A, B);
+ RHSOpcode = getBinOpsForFactorization(TopLevelOpcode, Op1, C, D);
----------------
I'd declare and define LHSOpcode/RHSOpcode together like what you did previously.
http://reviews.llvm.org/D4951
More information about the llvm-commits
mailing list