/freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
H A D | BranchProbabilityInfo.cpp | 579 Instruction *CmpLHS = dyn_cast<Instruction>(CI->getOperand(0)); in computeUnlikelySuccessors() local 580 PHINode *CmpPHI = dyn_cast<PHINode>(CmpLHS); in computeUnlikelySuccessors() 584 while (!CmpPHI && CmpLHS && isa<BinaryOperator>(CmpLHS) && in computeUnlikelySuccessors() 585 isa<Constant>(CmpLHS->getOperand(1))) { in computeUnlikelySuccessors() 587 if (!L->contains(CmpLHS)) in computeUnlikelySuccessors() 589 InstChain.push_back(cast<BinaryOperator>(CmpLHS)); in computeUnlikelySuccessors() 590 CmpLHS = dyn_cast<Instruction>(CmpLHS->getOperand(0)); in computeUnlikelySuccessors() 591 if (CmpLHS) in computeUnlikelySuccessors() 592 CmpPHI = dyn_cast<PHINode>(CmpLHS); in computeUnlikelySuccessors()
|
H A D | ValueTracking.cpp | 5010 Value *CmpLHS, *CmpRHS; in computeKnownFPClass() local 5011 if (F && match(Cond, m_FCmp(Pred, m_Value(CmpLHS), m_Value(CmpRHS)))) { in computeKnownFPClass() 5017 bool LookThroughFAbsFNeg = CmpLHS != LHS && CmpLHS != RHS; in computeKnownFPClass() 5019 fcmpImpliesClass(Pred, *F, CmpLHS, CmpRHS, LookThroughFAbsFNeg); in computeKnownFPClass() 8080 Value *CmpLHS, Value *CmpRHS, in matchFastFloatClamp() argument 8109 m_CombineOr(m_OrdFMin(m_Specific(CmpLHS), m_APFloat(FC2)), in matchFastFloatClamp() 8110 m_UnordFMin(m_Specific(CmpLHS), m_APFloat(FC2)))) && in matchFastFloatClamp() 8119 m_CombineOr(m_OrdFMax(m_Specific(CmpLHS), m_APFloat(FC2)), in matchFastFloatClamp() 8120 m_UnordFMax(m_Specific(CmpLHS), m_APFloat(FC2)))) && in matchFastFloatClamp() 8134 Value *CmpLHS, Value *CmpRHS, in matchClamp() argument [all …]
|
H A D | InstructionSimplify.cpp | 2620 Value *CmpLHS = Cmp->getOperand(0), *CmpRHS = Cmp->getOperand(1); in extractEquivalentCondition() local 2621 if (Pred == Cmp->getPredicate() && LHS == CmpLHS && RHS == CmpRHS) in extractEquivalentCondition() 2624 LHS == CmpRHS && RHS == CmpLHS) in extractEquivalentCondition() 4533 static Value *simplifyCmpSelOfMaxMin(Value *CmpLHS, Value *CmpRHS, in simplifyCmpSelOfMaxMin() argument 4538 std::swap(CmpLHS, CmpRHS); in simplifyCmpSelOfMaxMin() 4543 if (CmpLHS == FVal) { in simplifyCmpSelOfMaxMin() 4550 Value *X = CmpLHS, *Y = CmpRHS; in simplifyCmpSelOfMaxMin() 4607 static Value *simplifySelectWithFakeICmpEq(Value *CmpLHS, Value *CmpRHS, in simplifySelectWithFakeICmpEq() argument 4612 if (!decomposeBitTestICmp(CmpLHS, CmpRHS, Pred, X, Mask)) in simplifySelectWithFakeICmpEq() 4621 static Value *simplifySelectWithICmpEq(Value *CmpLHS, Value *CmpRHS, in simplifySelectWithICmpEq() argument [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
H A D | InstCombineSelect.cpp | 676 Value *CmpLHS = IC->getOperand(0); in foldSelectICmpLshrAshr() local 697 match(CmpLHS, m_Specific(X))) { in foldSelectICmpLshrAshr() 736 Value *CmpLHS = IC->getOperand(0); in foldSelectICmpAndBinOp() local 747 if (!match(CmpLHS, m_And(m_Value(), m_Power2(C1)))) in foldSelectICmpAndBinOp() 753 if (!decomposeBitTestICmp(CmpLHS, CmpRHS, Pred, CmpLHS, C1) || in foldSelectICmpAndBinOp() 761 Value *Y, *V = CmpLHS; in foldSelectICmpAndBinOp() 1137 Value *CmpLHS = ICI->getOperand(0); in foldSelectCttzCtlz() local 1164 if ((X != CmpLHS || !match(CmpRHS, m_Zero())) && in foldSelectCttzCtlz() 1165 (!match(X, m_Not(m_Specific(CmpLHS))) || !match(CmpRHS, m_AllOnes()))) in foldSelectCttzCtlz() 1299 Value *CmpLHS = Cmp.getOperand(0), *CmpRHS = Cmp.getOperand(1); in foldSelectValueEquivalence() local [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/ |
H A D | SwitchLoweringUtils.h | 127 const Value *CmpLHS, *CmpMHS, *CmpRHS; member 149 : CC(cc), CmpLHS(cmplhs), CmpMHS(cmpmiddle), CmpRHS(cmprhs), in CC() 160 : PredInfo({pred, nocmp}), CmpLHS(cmplhs), CmpMHS(cmpmiddle),
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
H A D | GVN.cpp | 2147 Value *CmpLHS = CmpI->getOperand(0); in processAssumeIntrinsic() local 2154 if (isa<Constant>(CmpLHS) && !isa<Constant>(CmpRHS)) in processAssumeIntrinsic() 2155 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic() 2156 if (!isa<Instruction>(CmpLHS) && isa<Instruction>(CmpRHS)) in processAssumeIntrinsic() 2157 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic() 2158 if ((isa<Argument>(CmpLHS) && isa<Argument>(CmpRHS)) || in processAssumeIntrinsic() 2159 (isa<Instruction>(CmpLHS) && isa<Instruction>(CmpRHS))) { in processAssumeIntrinsic() 2162 uint32_t LVN = VN.lookupOrAdd(CmpLHS); in processAssumeIntrinsic() 2165 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic() 2170 if (isa<Constant>(CmpLHS) && isa<Constant>(CmpRHS)) in processAssumeIntrinsic() [all …]
|
H A D | JumpThreading.cpp | 746 Value *CmpLHS = Cmp->getOperand(0); in computeValueKnownInPredecessorsImpl() local 750 PHINode *PN = dyn_cast<PHINode>(CmpLHS); in computeValueKnownInPredecessorsImpl() 763 if (PN == CmpLHS) { in computeValueKnownInPredecessorsImpl() 767 LHS = CmpLHS->DoPHITranslation(BB, PredBB); in computeValueKnownInPredecessorsImpl() 796 if (!isa<Instruction>(CmpLHS) || in computeValueKnownInPredecessorsImpl() 797 cast<Instruction>(CmpLHS)->getParent() != BB) { in computeValueKnownInPredecessorsImpl() 801 Constant *Res = LVI->getPredicateOnEdge(Pred, CmpLHS, CmpConst, P, BB, in computeValueKnownInPredecessorsImpl() 819 match(CmpLHS, m_Add(m_Value(AddLHS), m_ConstantInt(AddConst)))) { in computeValueKnownInPredecessorsImpl() 827 AddLHS, P, BB, CxtI ? CxtI : cast<Instruction>(CmpLHS)); in computeValueKnownInPredecessorsImpl()
|
H A D | GuardWidening.cpp | 816 const Value *CmpLHS = IC->getOperand(0), *CmpRHS = IC->getOperand(1); in parseRangeChecks() local 818 std::swap(CmpLHS, CmpRHS); in parseRangeChecks() 823 CmpLHS, cast<ConstantInt>(ConstantInt::getNullValue(CmpRHS->getType())), in parseRangeChecks()
|
H A D | LoopIdiomRecognize.cpp | 2441 Value *CmpLHS, *CmpRHS; in detectShiftUntilBitTestIdiom() local 2444 m_Br(m_ICmp(Pred, m_Value(CmpLHS), m_Value(CmpRHS)), in detectShiftUntilBitTestIdiom() 2454 match(CmpLHS, in detectShiftUntilBitTestIdiom() 2463 match(CmpLHS, m_And(m_Value(CurrX), in detectShiftUntilBitTestIdiom() 2469 return llvm::decomposeBitTestICmp(CmpLHS, CmpRHS, Pred, CurrX, Mask) && in detectShiftUntilBitTestIdiom()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/X86/ |
H A D | X86FastISel.cpp | 1658 const Value *CmpLHS = CI->getOperand(0); in X86SelectBranch() local 1668 CmpRHS = CmpLHS; in X86SelectBranch() 1699 std::swap(CmpLHS, CmpRHS); in X86SelectBranch() 1702 if (!X86FastEmitCompare(CmpLHS, CmpRHS, VT, CI->getDebugLoc())) in X86SelectBranch() 2067 const Value *CmpLHS = CI->getOperand(0); in X86FastEmitCMoveSelect() local 2070 std::swap(CmpLHS, CmpRHS); in X86FastEmitCMoveSelect() 2072 EVT CmpVT = TLI.getValueType(DL, CmpLHS->getType()); in X86FastEmitCMoveSelect() 2074 if (!X86FastEmitCompare(CmpLHS, CmpRHS, CmpVT, CI->getDebugLoc())) in X86FastEmitCMoveSelect() 2163 const Value *CmpLHS = CI->getOperand(0); in X86FastEmitSSESelect() local 2173 CmpRHS = CmpLHS; in X86FastEmitSSESelect() [all …]
|
H A D | X86ISelLowering.cpp | 46437 SDValue CmpLHS = Cmp.getOperand(0); in combineSetCCAtomicArith() local 46439 EVT CmpVT = CmpLHS.getValueType(); in combineSetCCAtomicArith() 46441 if (!CmpLHS.hasOneUse()) in combineSetCCAtomicArith() 46444 unsigned Opc = CmpLHS.getOpcode(); in combineSetCCAtomicArith() 46448 SDValue OpRHS = CmpLHS.getOperand(2); in combineSetCCAtomicArith() 46494 auto *AN = cast<AtomicSDNode>(CmpLHS.getNode()); in combineSetCCAtomicArith() 46496 ISD::ATOMIC_LOAD_SUB, SDLoc(CmpLHS), CmpVT, in combineSetCCAtomicArith() 46497 /*Chain*/ CmpLHS.getOperand(0), /*LHS*/ CmpLHS.getOperand(1), in combineSetCCAtomicArith() 46501 DAG.ReplaceAllUsesOfValueWith(CmpLHS.getValue(0), DAG.getUNDEF(CmpVT)); in combineSetCCAtomicArith() 46502 DAG.ReplaceAllUsesOfValueWith(CmpLHS.getValue(1), LockOp.getValue(1)); in combineSetCCAtomicArith() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/ |
H A D | IRTranslator.cpp | 553 if ((Cases[0].CmpLHS == Cases[1].CmpLHS && in shouldEmitAsBranches() 555 (Cases[0].CmpRHS == Cases[1].CmpLHS && in shouldEmitAsBranches() 556 Cases[0].CmpLHS == Cases[1].CmpRHS)) { in shouldEmitAsBranches() 900 Register CondLHS = getOrCreateVReg(*CB.CmpLHS); in emitSwitchCase() 941 const APInt& Low = cast<ConstantInt>(CB.CmpLHS)->getValue(); in emitSwitchCase() 945 if (cast<ConstantInt>(CB.CmpLHS)->isMinValue(true)) { in emitSwitchCase()
|
H A D | CombinerHelper.cpp | 6420 Register CmpLHS, CmpRHS; in matchFPSelectToMinMax() local 6423 m_GFCmp(m_Pred(Pred), m_Reg(CmpLHS), m_Reg(CmpRHS)))) || in matchFPSelectToMinMax() 6427 computeRetValAgainstNaN(CmpLHS, CmpRHS, CmpInst::isOrdered(Pred)); in matchFPSelectToMinMax() 6430 if (TrueVal == CmpRHS && FalseVal == CmpLHS) { in matchFPSelectToMinMax() 6431 std::swap(CmpLHS, CmpRHS); in matchFPSelectToMinMax() 6438 if (TrueVal != CmpLHS || FalseVal != CmpRHS) in matchFPSelectToMinMax() 6450 auto KnownNonZeroSide = getFConstantVRegValWithLookThrough(CmpLHS, MRI); in matchFPSelectToMinMax() 6458 B.buildInstr(Opc, {Dst}, {CmpLHS, CmpRHS}); in matchFPSelectToMinMax() 6916 Register CmpLHS = Cmp->getLHSReg(); in matchSelectIMinMax() local 6920 if (True == CmpRHS && False == CmpLHS) { in matchSelectIMinMax() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/PowerPC/ |
H A D | PPCISelDAGToDAG.cpp | 4853 SDValue CmpLHS = N->getOperand(2); in tryFoldSWTestBRCC() local 4854 if (CmpLHS.getNumOperands() < 1 || !isSWTestOp(CmpLHS.getOperand(0))) in tryFoldSWTestBRCC() 4859 if (CmpLHS.getOpcode() == ISD::AND && in tryFoldSWTestBRCC() 4860 isa<ConstantSDNode>(CmpLHS.getOperand(1))) in tryFoldSWTestBRCC() 4861 switch (CmpLHS.getConstantOperandVal(1)) { in tryFoldSWTestBRCC() 4877 else if (CmpLHS.getOpcode() == ISD::TRUNCATE && in tryFoldSWTestBRCC() 4878 CmpLHS.getValueType() == MVT::i1) in tryFoldSWTestBRCC() 4883 SDValue Ops[] = {getI32Imm(PCC, dl), CmpLHS.getOperand(0), N->getOperand(4), in tryFoldSWTestBRCC()
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/ |
H A D | SelectionDAGBuilder.cpp | 2758 if ((Cases[0].CmpLHS == Cases[1].CmpLHS && in ShouldEmitAsBranches() 2760 (Cases[0].CmpRHS == Cases[1].CmpLHS && in ShouldEmitAsBranches() 2761 Cases[0].CmpLHS == Cases[1].CmpRHS)) { in ShouldEmitAsBranches() 2855 ExportFromCurrentBlock(SL->SwitchCases[i].CmpLHS); in visitBr() 2888 SDValue CondLHS = getValue(CB.CmpLHS); in visitSwitchCase() 2903 EVT MemVT = TLI.getMemValueType(DAG.getDataLayout(), CB.CmpLHS->getType()); in visitSwitchCase() 2931 const APInt& Low = cast<ConstantInt>(CB.CmpLHS)->getValue(); in visitSwitchCase() 2937 if (cast<ConstantInt>(CB.CmpLHS)->isMinValue(true)) { in visitSwitchCase()
|
H A D | DAGCombiner.cpp | 27256 SDValue CmpLHS; in SimplifySelectOps() local 27261 CmpLHS = TheSelect->getOperand(0); in SimplifySelectOps() 27268 CmpLHS = Cmp.getOperand(0); in SimplifySelectOps() 27273 Sqrt.getOperand(0) == CmpLHS && (CC == ISD::SETOLT || in SimplifySelectOps()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
H A D | AMDGPUISelLowering.cpp | 4494 SDValue CmpLHS = Cond.getOperand(0); in performCtlz_CttzCombine() local 4500 RHS.getOperand(0) == CmpLHS && isAllOnesConstant(LHS)) { in performCtlz_CttzCombine() 4503 return getFFBX_U32(DAG, CmpLHS, SL, Opc); in performCtlz_CttzCombine() 4510 LHS.getOperand(0) == CmpLHS && isAllOnesConstant(RHS)) { in performCtlz_CttzCombine() 4514 return getFFBX_U32(DAG, CmpLHS, SL, Opc); in performCtlz_CttzCombine()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/ |
H A D | AArch64ISelLowering.cpp | 23750 SDValue CmpLHS = OpCmp.getOperand(0); in foldCSELOfCSEL() local 23754 std::swap(CmpLHS, CmpRHS); in foldCSELOfCSEL() 23755 else if (CmpLHS.getOpcode() != AArch64ISD::CSEL) in foldCSELOfCSEL() 23758 SDValue X = CmpLHS->getOperand(0); in foldCSELOfCSEL() 23759 SDValue Y = CmpLHS->getOperand(1); in foldCSELOfCSEL() 23773 static_cast<AArch64CC::CondCode>(CmpLHS->getConstantOperandVal(2)); in foldCSELOfCSEL() 23774 SDValue Cond = CmpLHS->getOperand(3); in foldCSELOfCSEL() 24221 SDValue CmpLHS = SetCC.getOperand(0); in performVSelectCombine() local 24222 EVT VT = CmpLHS.getValueType(); in performVSelectCombine() 24227 if (CmpLHS.getValueType() == N->getOperand(1).getValueType() && in performVSelectCombine() [all …]
|