]> granicus.if.org Git - llvm/commitdiff
[InstCombine/InstSimplify] add comments about code duplication; NFC
authorSanjay Patel <spatel@rotateright.com>
Mon, 8 May 2017 16:21:55 +0000 (16:21 +0000)
committerSanjay Patel <spatel@rotateright.com>
Mon, 8 May 2017 16:21:55 +0000 (16:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302436 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/InstructionSimplify.cpp
lib/Transforms/InstCombine/InstCombineCompares.cpp

index 4e7f2ebf5dd39c1cb44176c7c19460bc0b91ab0a..66a1e74517106697eb8bed78c5f5ad18a27a7485 100644 (file)
@@ -2535,6 +2535,9 @@ static Value *simplifyICmpWithConstant(CmpInst::Predicate Pred, Value *LHS,
   return nullptr;
 }
 
+/// TODO: A large part of this logic is duplicated in InstCombine's
+/// foldICmpBinOp(). We should be able to share that and avoid the code
+/// duplication.
 static Value *simplifyICmpWithBinOp(CmpInst::Predicate Pred, Value *LHS,
                                     Value *RHS, const SimplifyQuery &Q,
                                     unsigned MaxRecurse) {
index 34ce235b3fe23d64190bac4fb8df444810c306a0..d71d0c1c078ce93ef82c15b4ce5a6c20aa27c90c 100644 (file)
@@ -2785,6 +2785,9 @@ Instruction *InstCombiner::foldICmpInstWithConstantNotInt(ICmpInst &I) {
 }
 
 /// Try to fold icmp (binop), X or icmp X, (binop).
+/// TODO: A large part of this logic is duplicated in InstSimplify's
+/// simplifyICmpWithBinOp(). We should be able to share that and avoid the code
+/// duplication.
 Instruction *InstCombiner::foldICmpBinOp(ICmpInst &I) {
   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);