mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-02 02:22:31 +00:00
InstCombine: Remove unused argument. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191112 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d48bd3ca37
commit
19a6f1133f
@ -158,8 +158,8 @@ public:
|
|||||||
ConstantInt *DivRHS);
|
ConstantInt *DivRHS);
|
||||||
Instruction *FoldICmpShrCst(ICmpInst &ICI, BinaryOperator *DivI,
|
Instruction *FoldICmpShrCst(ICmpInst &ICI, BinaryOperator *DivI,
|
||||||
ConstantInt *DivRHS);
|
ConstantInt *DivRHS);
|
||||||
Instruction *FoldICmpAddOpCst(ICmpInst &ICI, Value *X, ConstantInt *CI,
|
Instruction *FoldICmpAddOpCst(Instruction &ICI, Value *X, ConstantInt *CI,
|
||||||
ICmpInst::Predicate Pred, Value *TheAdd);
|
ICmpInst::Predicate Pred);
|
||||||
Instruction *FoldGEPICmp(GEPOperator *GEPLHS, Value *RHS,
|
Instruction *FoldGEPICmp(GEPOperator *GEPLHS, Value *RHS,
|
||||||
ICmpInst::Predicate Cond, Instruction &I);
|
ICmpInst::Predicate Cond, Instruction &I);
|
||||||
Instruction *FoldShiftByConstant(Value *Op0, ConstantInt *Op1,
|
Instruction *FoldShiftByConstant(Value *Op0, ConstantInt *Op1,
|
||||||
|
@ -739,10 +739,9 @@ Instruction *InstCombiner::FoldGEPICmp(GEPOperator *GEPLHS, Value *RHS,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// FoldICmpAddOpCst - Fold "icmp pred (X+CI), X".
|
/// FoldICmpAddOpCst - Fold "icmp pred (X+CI), X".
|
||||||
Instruction *InstCombiner::FoldICmpAddOpCst(ICmpInst &ICI,
|
Instruction *InstCombiner::FoldICmpAddOpCst(Instruction &ICI,
|
||||||
Value *X, ConstantInt *CI,
|
Value *X, ConstantInt *CI,
|
||||||
ICmpInst::Predicate Pred,
|
ICmpInst::Predicate Pred) {
|
||||||
Value *TheAdd) {
|
|
||||||
// If we have X+0, exit early (simplifying logic below) and let it get folded
|
// If we have X+0, exit early (simplifying logic below) and let it get folded
|
||||||
// elsewhere. icmp X+0, X -> icmp X, X
|
// elsewhere. icmp X+0, X -> icmp X, X
|
||||||
if (CI->isZero()) {
|
if (CI->isZero()) {
|
||||||
@ -2977,20 +2976,15 @@ Instruction *InstCombiner::visitICmpInst(ICmpInst &I) {
|
|||||||
Value *X; ConstantInt *Cst;
|
Value *X; ConstantInt *Cst;
|
||||||
// icmp X+Cst, X
|
// icmp X+Cst, X
|
||||||
if (match(Op0, m_Add(m_Value(X), m_ConstantInt(Cst))) && Op1 == X)
|
if (match(Op0, m_Add(m_Value(X), m_ConstantInt(Cst))) && Op1 == X)
|
||||||
return FoldICmpAddOpCst(I, X, Cst, I.getPredicate(), Op0);
|
return FoldICmpAddOpCst(I, X, Cst, I.getPredicate());
|
||||||
|
|
||||||
// icmp X, X+Cst
|
// icmp X, X+Cst
|
||||||
if (match(Op1, m_Add(m_Value(X), m_ConstantInt(Cst))) && Op0 == X)
|
if (match(Op1, m_Add(m_Value(X), m_ConstantInt(Cst))) && Op0 == X)
|
||||||
return FoldICmpAddOpCst(I, X, Cst, I.getSwappedPredicate(), Op1);
|
return FoldICmpAddOpCst(I, X, Cst, I.getSwappedPredicate());
|
||||||
}
|
}
|
||||||
return Changed ? &I : 0;
|
return Changed ? &I : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// FoldFCmp_IntToFP_Cst - Fold fcmp ([us]itofp x, cst) if possible.
|
/// FoldFCmp_IntToFP_Cst - Fold fcmp ([us]itofp x, cst) if possible.
|
||||||
///
|
///
|
||||||
Instruction *InstCombiner::FoldFCmp_IntToFP_Cst(FCmpInst &I,
|
Instruction *InstCombiner::FoldFCmp_IntToFP_Cst(FCmpInst &I,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user