Home
last modified time | relevance | path

Searched refs:CmpRHS (Results 1 – 18 of 18) sorted by relevance

/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineSelect.cpp576 const Value *CmpRHS = Cmp->getOperand(1); in foldSelectICmpMinMax() local
583 if (CmpRHS == TVal) { in foldSelectICmpMinMax()
584 std::swap(CmpLHS, CmpRHS); in foldSelectICmpMinMax()
594 match(FVal, m_NSWAdd(m_Specific(CmpRHS), m_One()))) { in foldSelectICmpMinMax()
600 match(FVal, m_NSWAdd(m_Specific(CmpRHS), m_AllOnes()))) { in foldSelectICmpMinMax()
606 match(FVal, m_NUWAdd(m_Specific(CmpRHS), m_One()))) { in foldSelectICmpMinMax()
614 match(FVal, m_Add(m_Specific(CmpRHS), m_AllOnes())) && in foldSelectICmpMinMax()
615 isKnownNonZero(CmpRHS, SQ)) { in foldSelectICmpMinMax()
723 Value *CmpRHS = IC->getOperand(1); in foldSelectICmpLshrAshr() local
724 if (!CmpRHS->getType()->isIntOrIntVectorTy()) in foldSelectICmpLshrAshr()
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/
H A DSwitchLoweringUtils.h127 const Value *CmpLHS, *CmpMHS, *CmpRHS; member
151 : CC(cc), CmpLHS(cmplhs), CmpMHS(cmpmiddle), CmpRHS(cmprhs), in CC()
165 CmpRHS(cmprhs), TrueBB(truebb), FalseBB(falsebb), ThisBB(me),
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DValueTracking.cpp4828 Value *CmpLHS, *CmpRHS; in computeKnownFPClass() local
4829 if (F && match(Cond, m_FCmp(Pred, m_Value(CmpLHS), m_Value(CmpRHS)))) { in computeKnownFPClass()
4837 fcmpImpliesClass(Pred, *F, CmpLHS, CmpRHS, LookThroughFAbsFNeg); in computeKnownFPClass()
8186 Value *CmpLHS, Value *CmpRHS, in matchFastFloatClamp() argument
8195 if (CmpRHS == FalseVal) { in matchFastFloatClamp()
8205 if (CmpRHS != TrueVal || !match(CmpRHS, m_APFloat(FC1)) || !FC1->isFinite()) in matchFastFloatClamp()
8236 Value *CmpLHS, Value *CmpRHS, in matchClamp() argument
8239 if (CmpRHS != TrueVal) { in matchClamp()
8244 if (CmpRHS == TrueVal && match(CmpRHS, m_APInt(C1))) { in matchClamp()
8272 Value *CmpLHS, Value *CmpRHS, in matchMinMaxOfMinMax() argument
[all …]
H A DInstructionSimplify.cpp2582 Value *CmpLHS = Cmp->getOperand(0), *CmpRHS = Cmp->getOperand(1); in extractEquivalentCondition() local
2583 if (Pred == Cmp->getPredicate() && LHS == CmpLHS && RHS == CmpRHS) in extractEquivalentCondition()
2586 LHS == CmpRHS && RHS == CmpLHS) in extractEquivalentCondition()
4543 static Value *simplifyCmpSelOfMaxMin(Value *CmpLHS, Value *CmpRHS, in simplifyCmpSelOfMaxMin() argument
4547 if (CmpRHS == TVal || CmpRHS == FVal) { in simplifyCmpSelOfMaxMin()
4548 std::swap(CmpLHS, CmpRHS); in simplifyCmpSelOfMaxMin()
4560 Value *X = CmpLHS, *Y = CmpRHS; in simplifyCmpSelOfMaxMin()
4658 Value *CmpLHS, *CmpRHS; in simplifySelectWithICmpCond() local
4659 if (!match(CondVal, m_ICmp(Pred, m_Value(CmpLHS), m_Value(CmpRHS)))) in simplifySelectWithICmpCond()
4662 if (Value *V = simplifyCmpSelOfMaxMin(CmpLHS, CmpRHS, Pred, TrueVal, FalseVal)) in simplifySelectWithICmpCond()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DGVN.cpp2189 Value *CmpRHS = CmpI->getOperand(1); in processAssumeIntrinsic() local
2195 if (isa<Constant>(CmpLHS) && !isa<Constant>(CmpRHS)) in processAssumeIntrinsic()
2196 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic()
2197 if (!isa<Instruction>(CmpLHS) && isa<Instruction>(CmpRHS)) in processAssumeIntrinsic()
2198 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic()
2199 if ((isa<Argument>(CmpLHS) && isa<Argument>(CmpRHS)) || in processAssumeIntrinsic()
2200 (isa<Instruction>(CmpLHS) && isa<Instruction>(CmpRHS))) { in processAssumeIntrinsic()
2204 uint32_t RVN = VN.lookupOrAdd(CmpRHS); in processAssumeIntrinsic()
2206 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic()
2211 if (isa<Constant>(CmpLHS) && isa<Constant>(CmpRHS)) in processAssumeIntrinsic()
[all …]
H A DGuardWidening.cpp815 const Value *CmpLHS = IC->getOperand(0), *CmpRHS = IC->getOperand(1); in parseRangeChecks() local
817 std::swap(CmpLHS, CmpRHS); in parseRangeChecks()
822 CmpLHS, cast<ConstantInt>(ConstantInt::getNullValue(CmpRHS->getType())), in parseRangeChecks()
823 CmpRHS, IC); in parseRangeChecks()
H A DJumpThreading.cpp744 Value *CmpRHS = Cmp->getOperand(1); in computeValueKnownInPredecessorsImpl() local
749 PN = dyn_cast<PHINode>(CmpRHS); in computeValueKnownInPredecessorsImpl()
762 RHS = CmpRHS->DoPHITranslation(BB, PredBB); in computeValueKnownInPredecessorsImpl()
790 if (isa<Constant>(CmpRHS) && !CmpType->isVectorTy()) { in computeValueKnownInPredecessorsImpl()
791 Constant *CmpConst = cast<Constant>(CmpRHS); in computeValueKnownInPredecessorsImpl()
H A DLoopIdiomRecognize.cpp2746 Value *CmpLHS, *CmpRHS; in detectShiftUntilBitTestIdiom() local
2749 m_Br(m_ICmp(Pred, m_Value(CmpLHS), m_Value(CmpRHS)), in detectShiftUntilBitTestIdiom()
2758 return ICmpInst::isEquality(Pred) && match(CmpRHS, m_Zero()) && in detectShiftUntilBitTestIdiom()
2769 CmpLHS, CmpRHS, Pred, /*LookThroughTrunc=*/true, in detectShiftUntilBitTestIdiom()
/freebsd/contrib/llvm-project/llvm/lib/Target/X86/
H A DX86FastISel.cpp1660 const Value *CmpRHS = CI->getOperand(1); in X86SelectBranch() local
1667 const auto *CmpRHSC = dyn_cast<ConstantFP>(CmpRHS); in X86SelectBranch()
1669 CmpRHS = CmpLHS; in X86SelectBranch()
1700 std::swap(CmpLHS, CmpRHS); in X86SelectBranch()
1703 if (!X86FastEmitCompare(CmpLHS, CmpRHS, VT, CI->getDebugLoc())) in X86SelectBranch()
2074 const Value *CmpRHS = CI->getOperand(1); in X86FastEmitCMoveSelect() local
2076 std::swap(CmpLHS, CmpRHS); in X86FastEmitCMoveSelect()
2080 if (!X86FastEmitCompare(CmpLHS, CmpRHS, CmpVT, CI->getDebugLoc())) in X86FastEmitCMoveSelect()
2170 const Value *CmpRHS = CI->getOperand(1); in X86FastEmitSSESelect() local
2177 const auto *CmpRHSC = dyn_cast<ConstantFP>(CmpRHS); in X86FastEmitSSESelect()
[all …]
H A DX86ISelLowering.cpp48190 SDValue CmpRHS = Cmp.getOperand(1); in combineSetCCAtomicArith() local
48209 auto *CmpRHSC = dyn_cast<ConstantSDNode>(CmpRHS); in combineSetCCAtomicArith()
48250 /*RHS*/ DAG.getConstant(NegAddend, SDLoc(CmpRHS), CmpVT), in combineSetCCAtomicArith()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/
H A DIRTranslator.cpp568 Cases[0].CmpRHS == Cases[1].CmpRHS) || in shouldEmitAsBranches()
569 (Cases[0].CmpRHS == Cases[1].CmpLHS && in shouldEmitAsBranches()
570 Cases[0].CmpLHS == Cases[1].CmpRHS)) { in shouldEmitAsBranches()
576 if (Cases[0].CmpRHS == Cases[1].CmpRHS && in shouldEmitAsBranches()
578 isa<Constant>(Cases[0].CmpRHS) && in shouldEmitAsBranches()
579 cast<Constant>(Cases[0].CmpRHS)->isNullValue()) { in shouldEmitAsBranches()
935 const auto *CI = dyn_cast<ConstantInt>(CB.CmpRHS); in emitSwitchCase()
943 Register CondRHS = getOrCreateVReg(*CB.CmpRHS); in emitSwitchCase()
956 const APInt& High = cast<ConstantInt>(CB.CmpRHS)->getValue(); in emitSwitchCase()
960 Register CondRHS = getOrCreateVReg(*CB.CmpRHS); in emitSwitchCase()
H A DGISelValueTracking.cpp850 Register CmpLHS, CmpRHS; in computeKnownFPClass() local
852 m_GFCmp(m_Pred(Pred), m_Reg(CmpLHS), m_Reg(CmpRHS)))) { in computeKnownFPClass()
860 fcmpImpliesClass(Pred, *MF, CmpLHS, CmpRHS, LookThroughFAbsFNeg); in computeKnownFPClass()
H A DCombinerHelper.cpp6666 Register CmpLHS, CmpRHS; in matchFPSelectToMinMax() local
6669 m_GFCmp(m_Pred(Pred), m_Reg(CmpLHS), m_Reg(CmpRHS)))) || in matchFPSelectToMinMax()
6673 computeRetValAgainstNaN(CmpLHS, CmpRHS, CmpInst::isOrdered(Pred)); in matchFPSelectToMinMax()
6676 if (TrueVal == CmpRHS && FalseVal == CmpLHS) { in matchFPSelectToMinMax()
6677 std::swap(CmpLHS, CmpRHS); in matchFPSelectToMinMax()
6684 if (TrueVal != CmpLHS || FalseVal != CmpRHS) in matchFPSelectToMinMax()
6698 KnownNonZeroSide = getFConstantVRegValWithLookThrough(CmpRHS, MRI); in matchFPSelectToMinMax()
6704 B.buildInstr(Opc, {Dst}, {CmpLHS, CmpRHS}); in matchFPSelectToMinMax()
7226 Register CmpRHS = Cmp->getRHSReg(); in matchSelectIMinMax() local
7229 if (True == CmpRHS && False == CmpLHS) { in matchSelectIMinMax()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DSimplifyIndVar.cpp2181 Value *CmpRHS; in calculatePostIncRange() local
2183 m_Value(CmpRHS)))) in calculatePostIncRange()
2188 auto CmpRHSRange = SE->getSignedRange(SE->getSCEV(CmpRHS)); in calculatePostIncRange()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/
H A DSelectionDAGBuilder.cpp2725 Cases[0].CmpRHS == Cases[1].CmpRHS) || in ShouldEmitAsBranches()
2726 (Cases[0].CmpRHS == Cases[1].CmpLHS && in ShouldEmitAsBranches()
2727 Cases[0].CmpLHS == Cases[1].CmpRHS)) { in ShouldEmitAsBranches()
2733 if (Cases[0].CmpRHS == Cases[1].CmpRHS && in ShouldEmitAsBranches()
2735 isa<Constant>(Cases[0].CmpRHS) && in ShouldEmitAsBranches()
2736 cast<Constant>(Cases[0].CmpRHS)->isNullValue()) { in ShouldEmitAsBranches()
2823 ExportFromCurrentBlock(SL->SwitchCases[i].CmpRHS); in visitBr()
2878 if (CB.CmpRHS == ConstantInt::getTrue(*DAG.getContext()) && in visitSwitchCase()
2881 else if (CB.CmpRHS == ConstantInt::getFalse(*DAG.getContext()) && in visitSwitchCase()
2886 SDValue CondRHS = getValue(CB.CmpRHS); in visitSwitchCase()
[all …]
H A DTargetLowering.cpp5368 SDValue CmpRHS = DAG.getConstant(C1.lshr(ShiftBits), dl, ShValTy); in SimplifySetCC() local
5369 return DAG.getSetCC(dl, VT, Shift, CmpRHS, Cond); in SimplifySetCC()
5397 SDValue CmpRHS = DAG.getConstant(NewC, dl, ShValTy); in SimplifySetCC() local
5398 return DAG.getSetCC(dl, VT, Shift, CmpRHS, NewCond); in SimplifySetCC()
/freebsd/contrib/llvm-project/llvm/lib/Target/PowerPC/
H A DPPCISelDAGToDAG.cpp4848 SDValue CmpRHS = N->getOperand(3); in tryFoldSWTestBRCC() local
4849 if (!isNullConstant(CmpRHS)) in tryFoldSWTestBRCC()
/freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/
H A DAArch64ISelLowering.cpp24920 SDValue CmpRHS = OpCmp.getOperand(1); in foldCSELOfCSEL() local
24922 if (CmpRHS.getOpcode() == AArch64ISD::CSEL) in foldCSELOfCSEL()
24923 std::swap(CmpLHS, CmpRHS); in foldCSELOfCSEL()
24945 if (CmpRHS == Y) in foldCSELOfCSEL()
24947 else if (CmpRHS != X) in foldCSELOfCSEL()
25629 SDNode *CmpRHS = SetCC.getOperand(1).getNode(); in performVSelectCombine() local
25639 SplatLHSVal.isOne() && ISD::isConstantSplatVectorAllOnes(CmpRHS) && in performVSelectCombine()