summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-09-10 15:03:44 +0000
committerSanjay Patel <spatel@rotateright.com>2016-09-10 15:03:44 +0000
commitf58f68c891e813e487dd548f40f326e2a433f7a2 (patch)
treec3dfaaf48a1c2658d59c66d833414e6706d49309 /llvm/lib/Transforms/InstCombine/InstCombineInternal.h
parent112ff66505c9102fedf0a40fb2f44ce97afaabb0 (diff)
downloadbcm5719-llvm-f58f68c891e813e487dd548f40f326e2a433f7a2.tar.gz
bcm5719-llvm-f58f68c891e813e487dd548f40f326e2a433f7a2.zip
[InstCombine] rename and reorganize some icmp folding functions; NFC
Everything under foldICmpInstWithConstant() should now be working for splat vectors via m_APInt matchers. Ie, I've removed all of the FIXMEs that I added while cleaning that section up. Note that not all of the associated FIXMEs in the regression tests are gone though, because some of the tests require earlier folds that are still scalar-only. llvm-svn: 281139
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineInternal.h')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineInternal.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
index c8825b821d8..591015e3ce2 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
@@ -555,7 +555,8 @@ private:
Instruction *foldICmpAddOpConst(Instruction &ICI, Value *X, ConstantInt *CI,
ICmpInst::Predicate Pred);
Instruction *foldICmpWithCastAndCast(ICmpInst &ICI);
- Instruction *foldICmpWithConstant(ICmpInst &Cmp);
+
+ Instruction *foldICmpInstWithConstant(ICmpInst &Cmp);
Instruction *foldICmpTruncConstant(ICmpInst &Cmp, Instruction *Trunc,
const APInt *C);
@@ -584,8 +585,10 @@ private:
Instruction *foldICmpAndShift(ICmpInst &Cmp, BinaryOperator *And,
const APInt *C1, const APInt *C2);
- Instruction *foldICmpEqualityWithConstant(ICmpInst &ICI);
- Instruction *foldICmpIntrinsicWithConstant(ICmpInst &ICI);
+ Instruction *foldICmpBinOpEqualityWithConstant(ICmpInst &Cmp,
+ BinaryOperator *BO,
+ const APInt *C);
+ Instruction *foldICmpIntrinsicWithConstant(ICmpInst &ICI, const APInt *C);
Instruction *OptAndOp(Instruction *Op, ConstantInt *OpRHS,
ConstantInt *AndRHS, BinaryOperator &TheAnd);
OpenPOWER on IntegriCloud