Home
last modified time | relevance | path

Searched refs:CmpInst (Results 1 – 25 of 57) sorted by relevance

123

/external/llvm/lib/Transforms/Utils/
DCmpInstAnalysis.cpp73 CmpInst::Predicate &NewICmpPred) { in getICmpValue()
77 return ConstantInt::get(CmpInst::makeCmpResultType(LHS->getType()), 0); in getICmpValue()
85 return ConstantInt::get(CmpInst::makeCmpResultType(LHS->getType()), 1); in getICmpValue()
93 return (CmpInst::isSigned(p1) == CmpInst::isSigned(p2)) || in PredicatesFoldable()
94 (CmpInst::isSigned(p1) && ICmpInst::isEquality(p2)) || in PredicatesFoldable()
95 (CmpInst::isSigned(p2) && ICmpInst::isEquality(p1)); in PredicatesFoldable()
/external/llvm/lib/Analysis/
DInstructionSimplify.cpp79 static bool isSameCompare(Value *V, CmpInst::Predicate Pred, Value *LHS, in isSameCompare()
81 CmpInst *Cmp = dyn_cast<CmpInst>(V); in isSameCompare()
84 CmpInst::Predicate CPred = Cmp->getPredicate(); in isSameCompare()
88 return CPred == CmpInst::getSwappedPredicate(Pred) && CLHS == RHS && in isSameCompare()
430 static Value *ThreadCmpOverSelect(CmpInst::Predicate Pred, Value *LHS, in ThreadCmpOverSelect()
440 Pred = CmpInst::getSwappedPredicate(Pred); in ThreadCmpOverSelect()
555 static Value *ThreadCmpOverPHI(CmpInst::Predicate Pred, Value *LHS, Value *RHS, in ThreadCmpOverPHI()
564 Pred = CmpInst::getSwappedPredicate(Pred); in ThreadCmpOverPHI()
1571 return CmpInst::makeCmpResultType(Op->getType()); in GetCompareTy()
1577 static Value *ExtractEquivalentCondition(Value *V, CmpInst::Predicate Pred, in ExtractEquivalentCondition()
[all …]
DBranchProbabilityInfo.cpp294 case CmpInst::ICMP_EQ: in calcZeroHeuristics()
298 case CmpInst::ICMP_NE: in calcZeroHeuristics()
302 case CmpInst::ICMP_SLT: in calcZeroHeuristics()
306 case CmpInst::ICMP_SGT: in calcZeroHeuristics()
313 } else if (CV->isOne() && CI->getPredicate() == CmpInst::ICMP_SLT) { in calcZeroHeuristics()
317 } else if (CV->isAllOnesValue() && CI->getPredicate() == CmpInst::ICMP_SGT) { in calcZeroHeuristics()
/external/llvm/lib/Target/X86/
DX86FastISel.cpp909 const CmpInst *CI = cast<CmpInst>(I); in X86SelectCmp()
919 case CmpInst::FCMP_OEQ: { in X86SelectCmp()
933 case CmpInst::FCMP_UNE: { in X86SelectCmp()
946 case CmpInst::FCMP_OGT: SwapArgs = false; SetCCOpc = X86::SETAr; break; in X86SelectCmp()
947 case CmpInst::FCMP_OGE: SwapArgs = false; SetCCOpc = X86::SETAEr; break; in X86SelectCmp()
948 case CmpInst::FCMP_OLT: SwapArgs = true; SetCCOpc = X86::SETAr; break; in X86SelectCmp()
949 case CmpInst::FCMP_OLE: SwapArgs = true; SetCCOpc = X86::SETAEr; break; in X86SelectCmp()
950 case CmpInst::FCMP_ONE: SwapArgs = false; SetCCOpc = X86::SETNEr; break; in X86SelectCmp()
951 case CmpInst::FCMP_ORD: SwapArgs = false; SetCCOpc = X86::SETNPr; break; in X86SelectCmp()
952 case CmpInst::FCMP_UNO: SwapArgs = false; SetCCOpc = X86::SETPr; break; in X86SelectCmp()
[all …]
/external/llvm/include/llvm/Transforms/Utils/
DCmpInstAnalysis.h57 CmpInst::Predicate &NewICmpPred);
61 bool PredicatesFoldable(CmpInst::Predicate p1, CmpInst::Predicate p2);
/external/llvm/lib/Transforms/Scalar/
DIndVarSimplify.cpp306 CmpInst::Predicate NewPred = CmpInst::BAD_ICMP_PREDICATE; in HandleFloatingPointIV()
309 case CmpInst::FCMP_OEQ: in HandleFloatingPointIV()
310 case CmpInst::FCMP_UEQ: NewPred = CmpInst::ICMP_EQ; break; in HandleFloatingPointIV()
311 case CmpInst::FCMP_ONE: in HandleFloatingPointIV()
312 case CmpInst::FCMP_UNE: NewPred = CmpInst::ICMP_NE; break; in HandleFloatingPointIV()
313 case CmpInst::FCMP_OGT: in HandleFloatingPointIV()
314 case CmpInst::FCMP_UGT: NewPred = CmpInst::ICMP_SGT; break; in HandleFloatingPointIV()
315 case CmpInst::FCMP_OGE: in HandleFloatingPointIV()
316 case CmpInst::FCMP_UGE: NewPred = CmpInst::ICMP_SGE; break; in HandleFloatingPointIV()
317 case CmpInst::FCMP_OLT: in HandleFloatingPointIV()
[all …]
DCorrelatedValuePropagation.cpp40 bool processCmp(CmpInst *C);
143 bool CorrelatedValuePropagation::processCmp(CmpInst *C) { in processCmp()
211 LazyValueInfo::Tristate Value = LVI->getPredicateOnEdge(CmpInst::ICMP_EQ, in processSwitch()
277 BBChanged |= processCmp(cast<CmpInst>(II)); in runOnFunction()
DGVN.cpp107 CmpInst::Predicate Predicate,
115 uint32_t lookup_or_add_cmp(unsigned Opcode, CmpInst::Predicate Pred,
171 if (CmpInst *C = dyn_cast<CmpInst>(I)) { in create_expression()
173 CmpInst::Predicate Predicate = C->getPredicate(); in create_expression()
176 Predicate = CmpInst::getSwappedPredicate(Predicate); in create_expression()
189 CmpInst::Predicate Predicate, in create_cmp_expression()
194 e.type = CmpInst::makeCmpResultType(LHS->getType()); in create_cmp_expression()
201 Predicate = CmpInst::getSwappedPredicate(Predicate); in create_cmp_expression()
461 CmpInst::Predicate Predicate, in lookup_or_add_cmp()
2061 if ((isKnownTrue && Cmp->getPredicate() == CmpInst::ICMP_EQ) || in propagateEquality()
[all …]
DEarlyCSE.cpp65 isa<GetElementPtrInst>(Inst) || isa<CmpInst>(Inst) || in canHandle()
101 else if (CmpInst *CI = dyn_cast<CmpInst>(Inst)) in getHashValue()
DCodeGenPrepare.cpp473 static bool OptimizeCmpExpression(CmpInst *CI) { in OptimizeCmpExpression()
477 DenseMap<BasicBlock*, CmpInst*> InsertedCmps; in OptimizeCmpExpression()
499 CmpInst *&InsertedCmp = InsertedCmps[UserBB]; in OptimizeCmpExpression()
504 CmpInst::Create(CI->getOpcode(), in OptimizeCmpExpression()
1128 if (CmpInst *CI = dyn_cast<CmpInst>(I)) in OptimizeInst()
/external/llvm/lib/Transforms/InstCombine/
DInstCombinePHI.cpp26 assert(isa<BinaryOperator>(FirstInst) || isa<CmpInst>(FirstInst)); in FoldPHIArgBinOpIntoPHI()
54 if (CmpInst *CI = dyn_cast<CmpInst>(I)) in FoldPHIArgBinOpIntoPHI()
55 if (CI->getPredicate() != cast<CmpInst>(FirstInst)->getPredicate()) in FoldPHIArgBinOpIntoPHI()
113 if (CmpInst *CIOp = dyn_cast<CmpInst>(FirstInst)) { in FoldPHIArgBinOpIntoPHI()
114 CmpInst *NewCI = CmpInst::Create(CIOp->getOpcode(), CIOp->getPredicate(), in FoldPHIArgBinOpIntoPHI()
416 } else if (isa<BinaryOperator>(FirstInst) || isa<CmpInst>(FirstInst)) { in FoldPHIArgOpIntoPHI()
499 CmpInst *CIOp = cast<CmpInst>(FirstInst); in FoldPHIArgOpIntoPHI()
500 CmpInst *NewCI = CmpInst::Create(CIOp->getOpcode(), CIOp->getPredicate(), in FoldPHIArgOpIntoPHI()
DInstCombineAndOrXor.cpp45 if (CmpInst *CI = dyn_cast<CmpInst>(V)) in isFreeToInvert()
111 CmpInst::Predicate Pred; in getFCmpValue()
808 return ConstantInt::get(CmpInst::makeCmpResultType(LHS->getType()), 0); in FoldAndOfICmps()
816 if (CmpInst::isSigned(LHSCC) || in FoldAndOfICmps()
818 CmpInst::isSigned(RHSCC))) in FoldAndOfICmps()
876 return ConstantInt::get(CmpInst::makeCmpResultType(LHS->getType()), 0); in FoldAndOfICmps()
979 return ConstantInt::get(CmpInst::makeCmpResultType(LHS->getType()), 0); in FoldAndOfFCmps()
1003 return ConstantInt::get(CmpInst::makeCmpResultType(LHS->getType()), 0); in FoldAndOfFCmps()
1496 if (CmpInst::isSigned(LHSCC) || in FoldOrOfICmps()
1498 CmpInst::isSigned(RHSCC))) in FoldOrOfICmps()
[all …]
/external/llvm/include/llvm/
DInstrTypes.h629 class CmpInst : public Instruction {
631 CmpInst(); // do not implement
633 CmpInst(Type *ty, Instruction::OtherOps op, unsigned short pred,
637 CmpInst(Type *ty, Instruction::OtherOps op, unsigned short pred,
692 static CmpInst *Create(OtherOps Op,
701 static CmpInst *Create(OtherOps Op, unsigned short predicate, Value *S1,
819 static inline bool classof(const CmpInst *) { return true; }
847 struct OperandTraits<CmpInst> : public FixedNumOperandTraits<CmpInst, 2> {
850 DEFINE_TRANSPARENT_OPERAND_ACCESSORS(CmpInst, Value)
DInstructions.h899 class ICmpInst: public CmpInst {
911 ) : CmpInst(makeCmpResultType(LHS->getType()),
914 assert(pred >= CmpInst::FIRST_ICMP_PREDICATE &&
915 pred <= CmpInst::LAST_ICMP_PREDICATE &&
932 ) : CmpInst(makeCmpResultType(LHS->getType()),
935 assert(pred >= CmpInst::FIRST_ICMP_PREDICATE &&
936 pred <= CmpInst::LAST_ICMP_PREDICATE &&
952 ) : CmpInst(makeCmpResultType(LHS->getType()),
954 assert(pred >= CmpInst::FIRST_ICMP_PREDICATE &&
955 pred <= CmpInst::LAST_ICMP_PREDICATE &&
[all …]
/external/llvm/lib/Support/
DConstantRange.cpp59 case CmpInst::ICMP_EQ: in makeICmpRegion()
61 case CmpInst::ICMP_NE: in makeICmpRegion()
65 case CmpInst::ICMP_ULT: { in makeICmpRegion()
71 case CmpInst::ICMP_SLT: { in makeICmpRegion()
77 case CmpInst::ICMP_ULE: { in makeICmpRegion()
83 case CmpInst::ICMP_SLE: { in makeICmpRegion()
89 case CmpInst::ICMP_UGT: { in makeICmpRegion()
95 case CmpInst::ICMP_SGT: { in makeICmpRegion()
101 case CmpInst::ICMP_UGE: { in makeICmpRegion()
107 case CmpInst::ICMP_SGE: { in makeICmpRegion()
/external/llvm/lib/VMCore/
DInstruction.cpp204 if (const CmpInst *CI = dyn_cast<CmpInst>(this)) in isIdenticalToWhenDefined()
205 return CI->getPredicate() == cast<CmpInst>(I)->getPredicate(); in isIdenticalToWhenDefined()
259 if (const CmpInst *CI = dyn_cast<CmpInst>(this)) in isSameOperationAs()
260 return CI->getPredicate() == cast<CmpInst>(I)->getPredicate(); in isSameOperationAs()
DInstructions.cpp2833 void CmpInst::Anchor() const {} in Anchor()
2835 CmpInst::CmpInst(Type *ty, OtherOps op, unsigned short predicate, in CmpInst() function in CmpInst
2839 OperandTraits<CmpInst>::op_begin(this), in CmpInst()
2840 OperandTraits<CmpInst>::operands(this), in CmpInst()
2848 CmpInst::CmpInst(Type *ty, OtherOps op, unsigned short predicate, in CmpInst() function in CmpInst
2852 OperandTraits<CmpInst>::op_begin(this), in CmpInst()
2853 OperandTraits<CmpInst>::operands(this), in CmpInst()
2861 CmpInst *
2862 CmpInst::Create(OtherOps Op, unsigned short predicate, in Create()
2867 return new ICmpInst(InsertBefore, CmpInst::Predicate(predicate), in Create()
[all …]
DConstants.cpp1709 case CmpInst::FCMP_FALSE: case CmpInst::FCMP_OEQ: case CmpInst::FCMP_OGT: in getCompare()
1710 case CmpInst::FCMP_OGE: case CmpInst::FCMP_OLT: case CmpInst::FCMP_OLE: in getCompare()
1711 case CmpInst::FCMP_ONE: case CmpInst::FCMP_ORD: case CmpInst::FCMP_UNO: in getCompare()
1712 case CmpInst::FCMP_UEQ: case CmpInst::FCMP_UGT: case CmpInst::FCMP_UGE: in getCompare()
1713 case CmpInst::FCMP_ULT: case CmpInst::FCMP_ULE: case CmpInst::FCMP_UNE: in getCompare()
1714 case CmpInst::FCMP_TRUE: in getCompare()
1717 case CmpInst::ICMP_EQ: case CmpInst::ICMP_NE: case CmpInst::ICMP_UGT: in getCompare()
1718 case CmpInst::ICMP_UGE: case CmpInst::ICMP_ULT: case CmpInst::ICMP_ULE: in getCompare()
1719 case CmpInst::ICMP_SGT: case CmpInst::ICMP_SGE: case CmpInst::ICMP_SLT: in getCompare()
1720 case CmpInst::ICMP_SLE: in getCompare()
/external/llvm/lib/Target/ARM/
DARMFastISel.cpp1211 static ARMCC::CondCodes getComparePred(CmpInst::Predicate Pred) { in getComparePred()
1214 case CmpInst::FCMP_ONE: in getComparePred()
1215 case CmpInst::FCMP_UEQ: in getComparePred()
1219 case CmpInst::ICMP_EQ: in getComparePred()
1220 case CmpInst::FCMP_OEQ: in getComparePred()
1222 case CmpInst::ICMP_SGT: in getComparePred()
1223 case CmpInst::FCMP_OGT: in getComparePred()
1225 case CmpInst::ICMP_SGE: in getComparePred()
1226 case CmpInst::FCMP_OGE: in getComparePred()
1228 case CmpInst::ICMP_UGT: in getComparePred()
[all …]
/external/llvm/include/llvm/Support/
DInstVisitor.h167 RetTy visitICmpInst(ICmpInst &I) { DELEGATE(CmpInst);} in visitICmpInst()
168 RetTy visitFCmpInst(FCmpInst &I) { DELEGATE(CmpInst);} in visitFCmpInst()
213 RetTy visitCmpInst(CmpInst &I) { DELEGATE(Instruction);} in visitCmpInst()
DPatternMatch.h772 return Pred == CmpInst::ICMP_SGT || Pred == CmpInst::ICMP_SGE; in match()
779 return Pred == CmpInst::ICMP_SLT || Pred == CmpInst::ICMP_SLE; in match()
786 return Pred == CmpInst::ICMP_UGT || Pred == CmpInst::ICMP_UGE; in match()
793 return Pred == CmpInst::ICMP_ULT || Pred == CmpInst::ICMP_ULE; in match()
DConstantFolder.h194 Constant *CreateICmp(CmpInst::Predicate P, Constant *LHS, in CreateICmp()
198 Constant *CreateFCmp(CmpInst::Predicate P, Constant *LHS, in CreateFCmp()
DNoFolder.h241 Instruction *CreateICmp(CmpInst::Predicate P, in CreateICmp()
245 Instruction *CreateFCmp(CmpInst::Predicate P, in CreateFCmp()
/external/llvm/tools/llvm-stress/
Dllvm-stress.cpp588 (CmpInst::LAST_FCMP_PREDICATE - CmpInst::FIRST_FCMP_PREDICATE) + in Act()
589 CmpInst::FIRST_FCMP_PREDICATE; in Act()
592 (CmpInst::LAST_ICMP_PREDICATE - CmpInst::FIRST_ICMP_PREDICATE) + in Act()
593 CmpInst::FIRST_ICMP_PREDICATE; in Act()
596 Value *V = CmpInst::Create(fp ? Instruction::FCmp : Instruction::ICmp, in Act()
/external/llvm/lib/AsmParser/
DLLParser.cpp2156 CmpInst::Predicate Pred = (CmpInst::Predicate)PredVal; in ParseValID()
2973 case lltok::kw_oeq: P = CmpInst::FCMP_OEQ; break; in ParseCmpPredicate()
2974 case lltok::kw_one: P = CmpInst::FCMP_ONE; break; in ParseCmpPredicate()
2975 case lltok::kw_olt: P = CmpInst::FCMP_OLT; break; in ParseCmpPredicate()
2976 case lltok::kw_ogt: P = CmpInst::FCMP_OGT; break; in ParseCmpPredicate()
2977 case lltok::kw_ole: P = CmpInst::FCMP_OLE; break; in ParseCmpPredicate()
2978 case lltok::kw_oge: P = CmpInst::FCMP_OGE; break; in ParseCmpPredicate()
2979 case lltok::kw_ord: P = CmpInst::FCMP_ORD; break; in ParseCmpPredicate()
2980 case lltok::kw_uno: P = CmpInst::FCMP_UNO; break; in ParseCmpPredicate()
2981 case lltok::kw_ueq: P = CmpInst::FCMP_UEQ; break; in ParseCmpPredicate()
[all …]

123