Home
last modified time | relevance | path

Searched refs:CmpInst (Results 1 – 25 of 64) 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()
1673 return CmpInst::makeCmpResultType(Op->getType()); in GetCompareTy()
1679 static Value *ExtractEquivalentCondition(Value *V, CmpInst::Predicate Pred, in ExtractEquivalentCondition()
[all …]
DBranchProbabilityInfo.cpp303 case CmpInst::ICMP_EQ: in calcZeroHeuristics()
307 case CmpInst::ICMP_NE: in calcZeroHeuristics()
311 case CmpInst::ICMP_SLT: in calcZeroHeuristics()
315 case CmpInst::ICMP_SGT: in calcZeroHeuristics()
322 } else if (CV->isOne() && CI->getPredicate() == CmpInst::ICMP_SLT) { in calcZeroHeuristics()
326 } else if (CV->isAllOnesValue() && CI->getPredicate() == CmpInst::ICMP_SGT) { in calcZeroHeuristics()
DDependenceAnalysis.cpp436 if (isKnownPredicate(CmpInst::ICMP_EQ, X->getD(), Y->getD())) in intersectConstraints()
438 if (isKnownPredicate(CmpInst::ICMP_NE, X->getD(), Y->getD())) { in intersectConstraints()
465 if (isKnownPredicate(CmpInst::ICMP_EQ, Prod1, Prod2)) { in intersectConstraints()
470 if (isKnownPredicate(CmpInst::ICMP_EQ, Prod1, Prod2)) in intersectConstraints()
472 if (isKnownPredicate(CmpInst::ICMP_NE, Prod1, Prod2)) { in intersectConstraints()
479 if (isKnownPredicate(CmpInst::ICMP_NE, Prod1, Prod2)) { in intersectConstraints()
551 if (isKnownPredicate(CmpInst::ICMP_EQ, Sum, Y->getC())) in intersectConstraints()
553 if (isKnownPredicate(CmpInst::ICMP_NE, Sum, Y->getC())) { in intersectConstraints()
876 if (Pred == CmpInst::ICMP_EQ || in isKnownPredicate()
877 Pred == CmpInst::ICMP_NE) { in isKnownPredicate()
[all …]
/external/llvm/include/llvm/Transforms/Utils/
DCmpInstAnalysis.h57 CmpInst::Predicate &NewICmpPred);
61 bool PredicatesFoldable(CmpInst::Predicate p1, CmpInst::Predicate p2);
/external/llvm/lib/Target/X86/
DX86FastISel.cpp931 const CmpInst *CI = cast<CmpInst>(I); in X86SelectCmp()
941 case CmpInst::FCMP_OEQ: { in X86SelectCmp()
955 case CmpInst::FCMP_UNE: { in X86SelectCmp()
968 case CmpInst::FCMP_OGT: SwapArgs = false; SetCCOpc = X86::SETAr; break; in X86SelectCmp()
969 case CmpInst::FCMP_OGE: SwapArgs = false; SetCCOpc = X86::SETAEr; break; in X86SelectCmp()
970 case CmpInst::FCMP_OLT: SwapArgs = true; SetCCOpc = X86::SETAr; break; in X86SelectCmp()
971 case CmpInst::FCMP_OLE: SwapArgs = true; SetCCOpc = X86::SETAEr; break; in X86SelectCmp()
972 case CmpInst::FCMP_ONE: SwapArgs = false; SetCCOpc = X86::SETNEr; break; in X86SelectCmp()
973 case CmpInst::FCMP_ORD: SwapArgs = false; SetCCOpc = X86::SETNPr; break; in X86SelectCmp()
974 case CmpInst::FCMP_UNO: SwapArgs = false; SetCCOpc = X86::SETPr; break; in X86SelectCmp()
[all …]
/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 …]
DEarlyCSE.cpp66 isa<GetElementPtrInst>(Inst) || isa<CmpInst>(Inst) || in canHandle()
112 if (CmpInst *CI = dyn_cast<CmpInst>(Inst)) { in getHashValue()
115 CmpInst::Predicate Pred = CI->getPredicate(); in getHashValue()
177 if (CmpInst *LHSCmp = dyn_cast<CmpInst>(LHSI)) { in isEqual()
178 assert(isa<CmpInst>(RHSI) in isEqual()
180 CmpInst *RHSCmp = cast<CmpInst>(RHSI); in isEqual()
DCorrelatedValuePropagation.cpp42 bool processCmp(CmpInst *C);
162 bool CorrelatedValuePropagation::processCmp(CmpInst *C) { in processCmp()
230 LazyValueInfo::Tristate Value = LVI->getPredicateOnEdge(CmpInst::ICMP_EQ, in processSwitch()
301 BBChanged |= processCmp(cast<CmpInst>(II)); in runOnFunction()
DGVN.cpp113 CmpInst::Predicate Predicate,
121 uint32_t lookup_or_add_cmp(unsigned Opcode, CmpInst::Predicate Pred,
177 if (CmpInst *C = dyn_cast<CmpInst>(I)) { in create_expression()
179 CmpInst::Predicate Predicate = C->getPredicate(); in create_expression()
182 Predicate = CmpInst::getSwappedPredicate(Predicate); in create_expression()
195 CmpInst::Predicate Predicate, in create_cmp_expression()
200 e.type = CmpInst::makeCmpResultType(LHS->getType()); in create_cmp_expression()
207 Predicate = CmpInst::getSwappedPredicate(Predicate); in create_cmp_expression()
467 CmpInst::Predicate Predicate, in lookup_or_add_cmp()
2114 if ((isKnownTrue && Cmp->getPredicate() == CmpInst::ICMP_EQ) || in propagateEquality()
[all …]
/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()
801 return ConstantInt::get(CmpInst::makeCmpResultType(LHS->getType()), 0); in FoldAndOfICmps()
809 if (CmpInst::isSigned(LHSCC) || in FoldAndOfICmps()
811 CmpInst::isSigned(RHSCC))) in FoldAndOfICmps()
869 return ConstantInt::get(CmpInst::makeCmpResultType(LHS->getType()), 0); in FoldAndOfICmps()
972 return ConstantInt::get(CmpInst::makeCmpResultType(LHS->getType()), 0); in FoldAndOfFCmps()
984 return ConstantInt::get(CmpInst::makeCmpResultType(LHS->getType()), 0); in FoldAndOfFCmps()
1000 return ConstantInt::get(CmpInst::makeCmpResultType(LHS->getType()), 0); in FoldAndOfFCmps()
1521 if (CmpInst::isSigned(LHSCC) || in FoldOrOfICmps()
[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/include/llvm/IR/
DInstrTypes.h627 class CmpInst : public Instruction {
629 CmpInst() LLVM_DELETED_FUNCTION;
631 CmpInst(Type *ty, Instruction::OtherOps op, unsigned short pred,
635 CmpInst(Type *ty, Instruction::OtherOps op, unsigned short pred,
690 static CmpInst *Create(OtherOps Op,
699 static CmpInst *Create(OtherOps Op, unsigned short predicate, Value *S1,
844 struct OperandTraits<CmpInst> : public FixedNumOperandTraits<CmpInst, 2> {
847 DEFINE_TRANSPARENT_OPERAND_ACCESSORS(CmpInst, Value)
DInstructions.h913 class ICmpInst: public CmpInst {
925 ) : CmpInst(makeCmpResultType(LHS->getType()),
928 assert(pred >= CmpInst::FIRST_ICMP_PREDICATE &&
929 pred <= CmpInst::LAST_ICMP_PREDICATE &&
946 ) : CmpInst(makeCmpResultType(LHS->getType()),
949 assert(pred >= CmpInst::FIRST_ICMP_PREDICATE &&
950 pred <= CmpInst::LAST_ICMP_PREDICATE &&
966 ) : CmpInst(makeCmpResultType(LHS->getType()),
968 assert(pred >= CmpInst::FIRST_ICMP_PREDICATE &&
969 pred <= CmpInst::LAST_ICMP_PREDICATE &&
[all …]
/external/llvm/lib/IR/
DInstruction.cpp294 if (const CmpInst *CI = dyn_cast<CmpInst>(this)) in isIdenticalToWhenDefined()
295 return CI->getPredicate() == cast<CmpInst>(I)->getPredicate(); in isIdenticalToWhenDefined()
367 if (const CmpInst *CI = dyn_cast<CmpInst>(this)) in isSameOperationAs()
368 return CI->getPredicate() == cast<CmpInst>(I)->getPredicate(); in isSameOperationAs()
DInstructions.cpp2855 void CmpInst::anchor() {} in anchor()
2857 CmpInst::CmpInst(Type *ty, OtherOps op, unsigned short predicate, in CmpInst() function in CmpInst
2861 OperandTraits<CmpInst>::op_begin(this), in CmpInst()
2862 OperandTraits<CmpInst>::operands(this), in CmpInst()
2870 CmpInst::CmpInst(Type *ty, OtherOps op, unsigned short predicate, in CmpInst() function in CmpInst
2874 OperandTraits<CmpInst>::op_begin(this), in CmpInst()
2875 OperandTraits<CmpInst>::operands(this), in CmpInst()
2883 CmpInst *
2884 CmpInst::Create(OtherOps Op, unsigned short predicate, in Create()
2889 return new ICmpInst(InsertBefore, CmpInst::Predicate(predicate), in Create()
[all …]
DConstants.cpp1785 case CmpInst::FCMP_FALSE: case CmpInst::FCMP_OEQ: case CmpInst::FCMP_OGT: in getCompare()
1786 case CmpInst::FCMP_OGE: case CmpInst::FCMP_OLT: case CmpInst::FCMP_OLE: in getCompare()
1787 case CmpInst::FCMP_ONE: case CmpInst::FCMP_ORD: case CmpInst::FCMP_UNO: in getCompare()
1788 case CmpInst::FCMP_UEQ: case CmpInst::FCMP_UGT: case CmpInst::FCMP_UGE: in getCompare()
1789 case CmpInst::FCMP_ULT: case CmpInst::FCMP_ULE: case CmpInst::FCMP_UNE: in getCompare()
1790 case CmpInst::FCMP_TRUE: in getCompare()
1793 case CmpInst::ICMP_EQ: case CmpInst::ICMP_NE: case CmpInst::ICMP_UGT: in getCompare()
1794 case CmpInst::ICMP_UGE: case CmpInst::ICMP_ULT: case CmpInst::ICMP_ULE: in getCompare()
1795 case CmpInst::ICMP_SGT: case CmpInst::ICMP_SGE: case CmpInst::ICMP_SLT: in getCompare()
1796 case CmpInst::ICMP_SLE: in getCompare()
[all …]
/external/llvm/lib/Target/ARM/
DARMFastISel.cpp1244 static ARMCC::CondCodes getComparePred(CmpInst::Predicate Pred) { in getComparePred()
1247 case CmpInst::FCMP_ONE: in getComparePred()
1248 case CmpInst::FCMP_UEQ: in getComparePred()
1252 case CmpInst::ICMP_EQ: in getComparePred()
1253 case CmpInst::FCMP_OEQ: in getComparePred()
1255 case CmpInst::ICMP_SGT: in getComparePred()
1256 case CmpInst::FCMP_OGT: in getComparePred()
1258 case CmpInst::ICMP_SGE: in getComparePred()
1259 case CmpInst::FCMP_OGE: in getComparePred()
1261 case CmpInst::ICMP_UGT: in getComparePred()
[all …]
/external/llvm/include/llvm/
DInstVisitor.h172 RetTy visitICmpInst(ICmpInst &I) { DELEGATE(CmpInst);} in visitICmpInst()
173 RetTy visitFCmpInst(FCmpInst &I) { DELEGATE(CmpInst);} in visitFCmpInst()
232 RetTy visitCmpInst(CmpInst &I) { DELEGATE(Instruction);} in visitCmpInst()
/external/llvm/tools/llvm-stress/
Dllvm-stress.cpp596 (CmpInst::LAST_FCMP_PREDICATE - CmpInst::FIRST_FCMP_PREDICATE) + in Act()
597 CmpInst::FIRST_FCMP_PREDICATE; in Act()
600 (CmpInst::LAST_ICMP_PREDICATE - CmpInst::FIRST_ICMP_PREDICATE) + in Act()
601 CmpInst::FIRST_ICMP_PREDICATE; in Act()
604 Value *V = CmpInst::Create(fp ? Instruction::FCmp : Instruction::ICmp, in Act()
/external/llvm/lib/AsmParser/
DLLParser.cpp2452 CmpInst::Predicate Pred = (CmpInst::Predicate)PredVal; in ParseValID()
3294 case lltok::kw_oeq: P = CmpInst::FCMP_OEQ; break; in ParseCmpPredicate()
3295 case lltok::kw_one: P = CmpInst::FCMP_ONE; break; in ParseCmpPredicate()
3296 case lltok::kw_olt: P = CmpInst::FCMP_OLT; break; in ParseCmpPredicate()
3297 case lltok::kw_ogt: P = CmpInst::FCMP_OGT; break; in ParseCmpPredicate()
3298 case lltok::kw_ole: P = CmpInst::FCMP_OLE; break; in ParseCmpPredicate()
3299 case lltok::kw_oge: P = CmpInst::FCMP_OGE; break; in ParseCmpPredicate()
3300 case lltok::kw_ord: P = CmpInst::FCMP_ORD; break; in ParseCmpPredicate()
3301 case lltok::kw_uno: P = CmpInst::FCMP_UNO; break; in ParseCmpPredicate()
3302 case lltok::kw_ueq: P = CmpInst::FCMP_UEQ; break; in ParseCmpPredicate()
[all …]
/external/llvm/include/llvm/Support/
DPatternMatch.h872 return Pred == CmpInst::ICMP_SGT || Pred == CmpInst::ICMP_SGE; in match()
879 return Pred == CmpInst::ICMP_SLT || Pred == CmpInst::ICMP_SLE; in match()
886 return Pred == CmpInst::ICMP_UGT || Pred == CmpInst::ICMP_UGE; in match()
893 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()
DTargetFolder.h218 Constant *CreateICmp(CmpInst::Predicate P, Constant *LHS, in CreateICmp()
222 Constant *CreateFCmp(CmpInst::Predicate P, Constant *LHS, in CreateFCmp()

123