[PATCH] D32472: [InstCombine] Remove redundant code from SimplifyUsingDistributiveLaws
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 25 11:07:10 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL301341: [InstCombine] Remove redundant code from SimplifyUsingDistributiveLaws (authored by ctopper).
Changed prior to commit:
https://reviews.llvm.org/D32472?vs=96503&id=96607#toc
Repository:
rL LLVM
https://reviews.llvm.org/D32472
Files:
llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
Index: llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
===================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -641,14 +641,6 @@
if (Value *R = SimplifyBinOp(TopLevelOpcode, B, C, DL)) {
// They do! Return "L op' R".
++NumExpand;
- // If "L op' R" equals "A op' B" then "L op' R" is just the LHS.
- if ((L == A && R == B) ||
- (Instruction::isCommutative(InnerOpcode) && L == B && R == A))
- return Op0;
- // Otherwise return "L op' R" if it simplifies.
- if (Value *V = SimplifyBinOp(InnerOpcode, L, R, DL))
- return V;
- // Otherwise, create a new instruction.
C = Builder->CreateBinOp(InnerOpcode, L, R);
C->takeName(&I);
return C;
@@ -666,14 +658,6 @@
if (Value *R = SimplifyBinOp(TopLevelOpcode, A, C, DL)) {
// They do! Return "L op' R".
++NumExpand;
- // If "L op' R" equals "B op' C" then "L op' R" is just the RHS.
- if ((L == B && R == C) ||
- (Instruction::isCommutative(InnerOpcode) && L == C && R == B))
- return Op1;
- // Otherwise return "L op' R" if it simplifies.
- if (Value *V = SimplifyBinOp(InnerOpcode, L, R, DL))
- return V;
- // Otherwise, create a new instruction.
A = Builder->CreateBinOp(InnerOpcode, L, R);
A->takeName(&I);
return A;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32472.96607.patch
Type: text/x-patch
Size: 1558 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170425/8d0e2345/attachment.bin>
More information about the llvm-commits
mailing list