diff options
author | Sanjay Patel <spatel@rotateright.com> | 2017-05-08 16:21:55 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2017-05-08 16:21:55 +0000 |
commit | 2df38a80f1d0886907a0578958fd3534c89cb097 (patch) | |
tree | 46fcb62fa14aa6c5f5517da258976f7c60d0c958 /llvm/lib | |
parent | f16634c884b6e3aa1a573d0a1f4727103ca8ccf8 (diff) | |
download | bcm5719-llvm-2df38a80f1d0886907a0578958fd3534c89cb097.tar.gz bcm5719-llvm-2df38a80f1d0886907a0578958fd3534c89cb097.zip |
[InstCombine/InstSimplify] add comments about code duplication; NFC
llvm-svn: 302436
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Analysis/InstructionSimplify.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp index 4e7f2ebf5dd..66a1e745171 100644 --- a/llvm/lib/Analysis/InstructionSimplify.cpp +++ b/llvm/lib/Analysis/InstructionSimplify.cpp @@ -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) { diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp index 34ce235b3fe..d71d0c1c078 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp @@ -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); |