diff options
author | Sanjay Patel <spatel@rotateright.com> | 2016-08-22 21:24:29 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2016-08-22 21:24:29 +0000 |
commit | c9196c44883cf3f36efd78994e815a0ef9e0ef46 (patch) | |
tree | 684b116ed0eab0ed854475ea372cc50149b67bb6 /llvm/lib/Transforms/InstCombine/InstCombineInternal.h | |
parent | f2187ed3210377902124b326957f8721bb58733a (diff) | |
download | bcm5719-llvm-c9196c44883cf3f36efd78994e815a0ef9e0ef46.tar.gz bcm5719-llvm-c9196c44883cf3f36efd78994e815a0ef9e0ef46.zip |
[InstCombine] change param type from Instruction to BinaryOperator for icmp helpers; NFCI
This saves some casting in the helper functions and eases some further refactoring.
llvm-svn: 279478
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineInternal.h')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineInternal.h | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h index 7ce5ac17451..f3ee94a9784 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h +++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h @@ -559,30 +559,30 @@ private: Instruction *foldICmpAddOpConst(Instruction &ICI, Value *X, ConstantInt *CI, ICmpInst::Predicate Pred); Instruction *foldICmpWithCastAndCast(ICmpInst &ICI); - Instruction *foldICmpWithConstant(ICmpInst &ICI); - - Instruction *foldICmpTruncConstant(ICmpInst &ICI, Instruction *LHSI, - const APInt *RHSV); - Instruction *foldICmpAndConstant(ICmpInst &ICI, Instruction *LHSI, - const APInt *RHSV); - Instruction *foldICmpXorConstant(ICmpInst &ICI, Instruction *LHSI, - const APInt *RHSV); - Instruction *foldICmpOrConstant(ICmpInst &ICI, Instruction *LHSI, - const APInt *RHSV); - Instruction *foldICmpMulConstant(ICmpInst &ICI, Instruction *LHSI, - const APInt *RHSV); - Instruction *foldICmpShlConstant(ICmpInst &ICI, Instruction *LHSI, - const APInt *RHSV); - Instruction *foldICmpShrConstant(ICmpInst &ICI, Instruction *LHSI, - const APInt *RHSV); - Instruction *foldICmpUDivConstant(ICmpInst &ICI, Instruction *LHSI, - const APInt *RHSV); - Instruction *foldICmpDivConstant(ICmpInst &ICI, Instruction *LHSI, - const APInt *RHSV); - Instruction *foldICmpSubConstant(ICmpInst &ICI, Instruction *LHSI, - const APInt *RHSV); - Instruction *foldICmpAddConstant(ICmpInst &ICI, Instruction *LHSI, - const APInt *RHSV); + Instruction *foldICmpWithConstant(ICmpInst &Cmp); + + Instruction *foldICmpTruncConstant(ICmpInst &Cmp, Instruction *Trunc, + const APInt *C); + Instruction *foldICmpAndConstant(ICmpInst &Cmp, BinaryOperator *And, + const APInt *C); + Instruction *foldICmpXorConstant(ICmpInst &Cmp, BinaryOperator *Xor, + const APInt *C); + Instruction *foldICmpOrConstant(ICmpInst &Cmp, BinaryOperator *Or, + const APInt *C); + Instruction *foldICmpMulConstant(ICmpInst &Cmp, BinaryOperator *Mul, + const APInt *C); + Instruction *foldICmpShlConstant(ICmpInst &Cmp, BinaryOperator *Shl, + const APInt *C); + Instruction *foldICmpShrConstant(ICmpInst &Cmp, BinaryOperator *Shr, + const APInt *C); + Instruction *foldICmpUDivConstant(ICmpInst &Cmp, BinaryOperator *UDiv, + const APInt *C); + Instruction *foldICmpDivConstant(ICmpInst &Cmp, BinaryOperator *Div, + const APInt *C); + Instruction *foldICmpSubConstant(ICmpInst &Cmp, BinaryOperator *Sub, + const APInt *C); + Instruction *foldICmpAddConstant(ICmpInst &Cmp, BinaryOperator *Add, + const APInt *C); Instruction *foldICmpEqualityWithConstant(ICmpInst &ICI); Instruction *foldICmpIntrinsicWithConstant(ICmpInst &ICI); |