Home
last modified time | relevance | path

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

/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineSelect.cpp677 Value *CmpRHS = IC->getOperand(1); in foldSelectICmpLshrAshr() local
678 if (!CmpRHS->getType()->isIntOrIntVectorTy()) in foldSelectICmpLshrAshr()
682 unsigned Bitwidth = CmpRHS->getType()->getScalarSizeInBits(); in foldSelectICmpLshrAshr()
684 !match(CmpRHS, in foldSelectICmpLshrAshr()
687 !match(CmpRHS, in foldSelectICmpLshrAshr()
737 Value *CmpRHS = IC->getOperand(1); in foldSelectICmpAndBinOp() local
743 if (!match(CmpRHS, m_Zero())) in foldSelectICmpAndBinOp()
753 if (!decomposeBitTestICmp(CmpLHS, CmpRHS, Pred, CmpLHS, C1) || in foldSelectICmpAndBinOp()
1138 Value *CmpRHS = ICI->getOperand(1); in foldSelectCttzCtlz() local
1164 if ((X != CmpLHS || !match(CmpRHS, m_Zero())) && in foldSelectCttzCtlz()
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/
H A DSwitchLoweringUtils.h127 const Value *CmpLHS, *CmpMHS, *CmpRHS; member
149 : CC(cc), CmpLHS(cmplhs), CmpMHS(cmpmiddle), CmpRHS(cmprhs), in CC()
161 CmpRHS(cmprhs), TrueBB(truebb), FalseBB(falsebb), ThisBB(me),
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DValueTracking.cpp5010 Value *CmpLHS, *CmpRHS; in computeKnownFPClass() local
5011 if (F && match(Cond, m_FCmp(Pred, m_Value(CmpLHS), m_Value(CmpRHS)))) { in computeKnownFPClass()
5019 fcmpImpliesClass(Pred, *F, CmpLHS, CmpRHS, LookThroughFAbsFNeg); in computeKnownFPClass()
8080 Value *CmpLHS, Value *CmpRHS, in matchFastFloatClamp() argument
8089 if (CmpRHS == FalseVal) { in matchFastFloatClamp()
8099 if (CmpRHS != TrueVal || !match(CmpRHS, m_APFloat(FC1)) || !FC1->isFinite()) in matchFastFloatClamp()
8134 Value *CmpLHS, Value *CmpRHS, in matchClamp() argument
8137 if (CmpRHS != TrueVal) { in matchClamp()
8142 if (CmpRHS == TrueVal && match(CmpRHS, m_APInt(C1))) { in matchClamp()
8170 Value *CmpLHS, Value *CmpRHS, in matchMinMaxOfMinMax() argument
[all …]
H A DInstructionSimplify.cpp2620 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
4537 if (CmpRHS == TVal || CmpRHS == FVal) { in simplifyCmpSelOfMaxMin()
4538 std::swap(CmpLHS, CmpRHS); 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/Scalar/
H A DGVN.cpp2148 Value *CmpRHS = CmpI->getOperand(1); 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()
2163 uint32_t RVN = VN.lookupOrAdd(CmpRHS); in processAssumeIntrinsic()
2165 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic()
2170 if (isa<Constant>(CmpLHS) && isa<Constant>(CmpRHS)) in processAssumeIntrinsic()
[all …]
H A DGuardWidening.cpp816 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()
824 CmpRHS, IC); in parseRangeChecks()
H A DLoopIdiomRecognize.cpp2441 Value *CmpLHS, *CmpRHS; in detectShiftUntilBitTestIdiom() local
2444 m_Br(m_ICmp(Pred, m_Value(CmpLHS), m_Value(CmpRHS)), in detectShiftUntilBitTestIdiom()
2453 return ICmpInst::isEquality(Pred) && match(CmpRHS, m_Zero()) && in detectShiftUntilBitTestIdiom()
2462 return ICmpInst::isEquality(Pred) && match(CmpRHS, m_Zero()) && in detectShiftUntilBitTestIdiom()
2469 return llvm::decomposeBitTestICmp(CmpLHS, CmpRHS, Pred, CurrX, Mask) && in detectShiftUntilBitTestIdiom()
H A DJumpThreading.cpp747 Value *CmpRHS = Cmp->getOperand(1); in computeValueKnownInPredecessorsImpl() local
752 PN = dyn_cast<PHINode>(CmpRHS); in computeValueKnownInPredecessorsImpl()
765 RHS = CmpRHS->DoPHITranslation(BB, PredBB); in computeValueKnownInPredecessorsImpl()
793 if (isa<Constant>(CmpRHS) && !CmpType->isVectorTy()) { in computeValueKnownInPredecessorsImpl()
794 Constant *CmpConst = cast<Constant>(CmpRHS); in computeValueKnownInPredecessorsImpl()
/freebsd/contrib/llvm-project/llvm/lib/Target/X86/
H A DX86FastISel.cpp1659 const Value *CmpRHS = CI->getOperand(1); in X86SelectBranch() local
1666 const auto *CmpRHSC = dyn_cast<ConstantFP>(CmpRHS); in X86SelectBranch()
1668 CmpRHS = CmpLHS; in X86SelectBranch()
1699 std::swap(CmpLHS, CmpRHS); in X86SelectBranch()
1702 if (!X86FastEmitCompare(CmpLHS, CmpRHS, VT, CI->getDebugLoc())) in X86SelectBranch()
2068 const Value *CmpRHS = CI->getOperand(1); in X86FastEmitCMoveSelect() local
2070 std::swap(CmpLHS, CmpRHS); in X86FastEmitCMoveSelect()
2074 if (!X86FastEmitCompare(CmpLHS, CmpRHS, CmpVT, CI->getDebugLoc())) in X86FastEmitCMoveSelect()
2164 const Value *CmpRHS = CI->getOperand(1); in X86FastEmitSSESelect() local
2171 const auto *CmpRHSC = dyn_cast<ConstantFP>(CmpRHS); in X86FastEmitSSESelect()
[all …]
H A DX86ISelLowering.cpp46438 SDValue CmpRHS = Cmp.getOperand(1); in combineSetCCAtomicArith() local
46457 auto *CmpRHSC = dyn_cast<ConstantSDNode>(CmpRHS); in combineSetCCAtomicArith()
46498 /*RHS*/ DAG.getConstant(NegAddend, SDLoc(CmpRHS), CmpVT), in combineSetCCAtomicArith()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/
H A DIRTranslator.cpp554 Cases[0].CmpRHS == Cases[1].CmpRHS) || in shouldEmitAsBranches()
555 (Cases[0].CmpRHS == Cases[1].CmpLHS && in shouldEmitAsBranches()
556 Cases[0].CmpLHS == Cases[1].CmpRHS)) { in shouldEmitAsBranches()
562 if (Cases[0].CmpRHS == Cases[1].CmpRHS && in shouldEmitAsBranches()
564 isa<Constant>(Cases[0].CmpRHS) && in shouldEmitAsBranches()
565 cast<Constant>(Cases[0].CmpRHS)->isNullValue()) { in shouldEmitAsBranches()
921 const auto *CI = dyn_cast<ConstantInt>(CB.CmpRHS); in emitSwitchCase()
929 Register CondRHS = getOrCreateVReg(*CB.CmpRHS); in emitSwitchCase()
942 const APInt& High = cast<ConstantInt>(CB.CmpRHS)->getValue(); in emitSwitchCase()
946 Register CondRHS = getOrCreateVReg(*CB.CmpRHS); in emitSwitchCase()
H A DCombinerHelper.cpp6420 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()
6452 KnownNonZeroSide = getFConstantVRegValWithLookThrough(CmpRHS, MRI); in matchFPSelectToMinMax()
6458 B.buildInstr(Opc, {Dst}, {CmpLHS, CmpRHS}); in matchFPSelectToMinMax()
6917 Register CmpRHS = Cmp->getRHSReg(); in matchSelectIMinMax() local
6920 if (True == CmpRHS && False == CmpLHS) { in matchSelectIMinMax()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DSimplifyIndVar.cpp2172 Value *CmpRHS; in calculatePostIncRange() local
2174 m_Value(CmpRHS)))) in calculatePostIncRange()
2180 auto CmpRHSRange = SE->getSignedRange(SE->getSCEV(CmpRHS)); in calculatePostIncRange()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/
H A DSelectionDAGBuilder.cpp2759 Cases[0].CmpRHS == Cases[1].CmpRHS) || in ShouldEmitAsBranches()
2760 (Cases[0].CmpRHS == Cases[1].CmpLHS && in ShouldEmitAsBranches()
2761 Cases[0].CmpLHS == Cases[1].CmpRHS)) { in ShouldEmitAsBranches()
2767 if (Cases[0].CmpRHS == Cases[1].CmpRHS && in ShouldEmitAsBranches()
2769 isa<Constant>(Cases[0].CmpRHS) && in ShouldEmitAsBranches()
2770 cast<Constant>(Cases[0].CmpRHS)->isNullValue()) { in ShouldEmitAsBranches()
2856 ExportFromCurrentBlock(SL->SwitchCases[i].CmpRHS); in visitBr()
2909 if (CB.CmpRHS == ConstantInt::getTrue(*DAG.getContext()) && in visitSwitchCase()
2912 else if (CB.CmpRHS == ConstantInt::getFalse(*DAG.getContext()) && in visitSwitchCase()
2917 SDValue CondRHS = getValue(CB.CmpRHS); in visitSwitchCase()
[all …]
H A DTargetLowering.cpp5154 SDValue CmpRHS = DAG.getConstant(C1.lshr(ShiftBits), dl, ShValTy); in SimplifySetCC() local
5155 return DAG.getSetCC(dl, VT, Shift, CmpRHS, Cond); in SimplifySetCC()
5183 SDValue CmpRHS = DAG.getConstant(NewC, dl, ShValTy); in SimplifySetCC() local
5184 return DAG.getSetCC(dl, VT, Shift, CmpRHS, NewCond); in SimplifySetCC()
/freebsd/contrib/llvm-project/llvm/lib/Target/PowerPC/
H A DPPCISelDAGToDAG.cpp4849 SDValue CmpRHS = N->getOperand(3); in tryFoldSWTestBRCC() local
4850 if (!isNullConstant(CmpRHS)) in tryFoldSWTestBRCC()
/freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/
H A DAArch64ISelLowering.cpp23751 SDValue CmpRHS = OpCmp.getOperand(1); in foldCSELOfCSEL() local
23753 if (CmpRHS.getOpcode() == AArch64ISD::CSEL) in foldCSELOfCSEL()
23754 std::swap(CmpLHS, CmpRHS); in foldCSELOfCSEL()
23776 if (CmpRHS == Y) in foldCSELOfCSEL()
23778 else if (CmpRHS != X) in foldCSELOfCSEL()
24223 SDNode *CmpRHS = SetCC.getOperand(1).getNode(); in performVSelectCombine() local
24233 SplatLHSVal.isOne() && ISD::isConstantSplatVectorAllOnes(CmpRHS) && in performVSelectCombine()