Home
last modified time | relevance | path

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

/openbsd/src/gnu/llvm/llvm/lib/Transforms/InstCombine/
DInstCombineSelect.cpp580 Value *CmpLHS = IC->getOperand(0); in foldSelectICmpLshrAshr() local
601 match(CmpLHS, m_Specific(X))) { in foldSelectICmpLshrAshr()
633 Value *CmpLHS = IC->getOperand(0); in foldSelectICmpAndOr() local
645 if (!match(CmpLHS, m_And(m_Value(), m_Power2(C1)))) in foldSelectICmpAndOr()
648 V = CmpLHS; in foldSelectICmpAndOr()
660 if (!match(CmpLHS, m_OneUse(m_Trunc(m_Value(V))))) in foldSelectICmpAndOr()
663 C1Log = CmpLHS->getType()->getScalarSizeInBits() - 1; in foldSelectICmpAndOr()
988 Value *CmpLHS = ICI->getOperand(0); in foldSelectCttzCtlz() local
1015 if ((X != CmpLHS || !match(CmpRHS, m_Zero())) && in foldSelectCttzCtlz()
1016 (!match(X, m_Not(m_Specific(CmpLHS))) || !match(CmpRHS, m_AllOnes()))) in foldSelectCttzCtlz()
[all …]
/openbsd/src/gnu/llvm/llvm/lib/Analysis/
DBranchProbabilityInfo.cpp579 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()
DValueTracking.cpp5950 Value *CmpLHS, Value *CmpRHS, in matchFastFloatClamp() argument
5979 m_CombineOr(m_OrdFMin(m_Specific(CmpLHS), m_APFloat(FC2)), in matchFastFloatClamp()
5980 m_UnordFMin(m_Specific(CmpLHS), m_APFloat(FC2)))) && in matchFastFloatClamp()
5989 m_CombineOr(m_OrdFMax(m_Specific(CmpLHS), m_APFloat(FC2)), in matchFastFloatClamp()
5990 m_UnordFMax(m_Specific(CmpLHS), m_APFloat(FC2)))) && in matchFastFloatClamp()
6004 Value *CmpLHS, Value *CmpRHS, in matchClamp() argument
6015 if (match(FalseVal, m_SMin(m_Specific(CmpLHS), m_APInt(C2))) && in matchClamp()
6020 if (match(FalseVal, m_SMax(m_Specific(CmpLHS), m_APInt(C2))) && in matchClamp()
6025 if (match(FalseVal, m_UMin(m_Specific(CmpLHS), m_APInt(C2))) && in matchClamp()
6030 if (match(FalseVal, m_UMax(m_Specific(CmpLHS), m_APInt(C2))) && in matchClamp()
[all …]
DInstructionSimplify.cpp2627 Value *CmpLHS = Cmp->getOperand(0), *CmpRHS = Cmp->getOperand(1); in extractEquivalentCondition() local
2628 if (Pred == Cmp->getPredicate() && LHS == CmpLHS && RHS == CmpRHS) in extractEquivalentCondition()
2631 LHS == CmpRHS && RHS == CmpLHS) in extractEquivalentCondition()
4322 static Value *simplifyCmpSelOfMaxMin(Value *CmpLHS, Value *CmpRHS, in simplifyCmpSelOfMaxMin() argument
4327 std::swap(CmpLHS, CmpRHS); in simplifyCmpSelOfMaxMin()
4332 if (CmpLHS == FVal) { in simplifyCmpSelOfMaxMin()
4339 Value *X = CmpLHS, *Y = CmpRHS; in simplifyCmpSelOfMaxMin()
4396 static Value *simplifySelectWithFakeICmpEq(Value *CmpLHS, Value *CmpRHS, in simplifySelectWithFakeICmpEq() argument
4401 if (!decomposeBitTestICmp(CmpLHS, CmpRHS, Pred, X, Mask)) in simplifySelectWithFakeICmpEq()
4415 Value *CmpLHS, *CmpRHS; in simplifySelectWithICmpCond() local
[all …]
/openbsd/src/gnu/llvm/llvm/include/llvm/CodeGen/
DSwitchLoweringUtils.h127 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),
/openbsd/src/gnu/llvm/llvm/lib/Transforms/Scalar/
DGVN.cpp1958 Value *CmpLHS = CmpI->getOperand(0); in processAssumeIntrinsic() local
1965 if (isa<Constant>(CmpLHS) && !isa<Constant>(CmpRHS)) in processAssumeIntrinsic()
1966 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic()
1967 if (!isa<Instruction>(CmpLHS) && isa<Instruction>(CmpRHS)) in processAssumeIntrinsic()
1968 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic()
1969 if ((isa<Argument>(CmpLHS) && isa<Argument>(CmpRHS)) || in processAssumeIntrinsic()
1970 (isa<Instruction>(CmpLHS) && isa<Instruction>(CmpRHS))) { in processAssumeIntrinsic()
1973 uint32_t LVN = VN.lookupOrAdd(CmpLHS); in processAssumeIntrinsic()
1976 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic()
1981 if (isa<Constant>(CmpLHS) && isa<Constant>(CmpRHS)) in processAssumeIntrinsic()
[all …]
DJumpThreading.cpp838 Value *CmpLHS = Cmp->getOperand(0); in computeValueKnownInPredecessorsImpl() local
842 PHINode *PN = dyn_cast<PHINode>(CmpLHS); in computeValueKnownInPredecessorsImpl()
852 if (PN == CmpLHS) { in computeValueKnownInPredecessorsImpl()
856 LHS = CmpLHS->DoPHITranslation(BB, PredBB); in computeValueKnownInPredecessorsImpl()
890 if (!isa<Instruction>(CmpLHS) || in computeValueKnownInPredecessorsImpl()
891 cast<Instruction>(CmpLHS)->getParent() != BB) { in computeValueKnownInPredecessorsImpl()
896 LVI->getPredicateOnEdge(Pred, CmpLHS, in computeValueKnownInPredecessorsImpl()
917 match(CmpLHS, m_Add(m_Value(AddLHS), m_ConstantInt(AddConst)))) { in computeValueKnownInPredecessorsImpl()
925 AddLHS, P, BB, CxtI ? CxtI : cast<Instruction>(CmpLHS)); in computeValueKnownInPredecessorsImpl()
DGuardWidening.cpp601 const Value *CmpLHS = IC->getOperand(0), *CmpRHS = IC->getOperand(1); in parseRangeChecks() local
603 std::swap(CmpLHS, CmpRHS); in parseRangeChecks()
608 CmpLHS, cast<ConstantInt>(ConstantInt::getNullValue(CmpRHS->getType())), in parseRangeChecks()
DLoopIdiomRecognize.cpp2307 Value *CmpLHS, *CmpRHS; in detectShiftUntilBitTestIdiom() local
2310 m_Br(m_ICmp(Pred, m_Value(CmpLHS), m_Value(CmpRHS)), in detectShiftUntilBitTestIdiom()
2320 match(CmpLHS, in detectShiftUntilBitTestIdiom()
2329 match(CmpLHS, m_And(m_Value(CurrX), in detectShiftUntilBitTestIdiom()
2335 return llvm::decomposeBitTestICmp(CmpLHS, CmpRHS, Pred, CurrX, Mask) && in detectShiftUntilBitTestIdiom()
/openbsd/src/gnu/llvm/llvm/lib/Target/X86/
DX86FastISel.cpp1660 const Value *CmpLHS = CI->getOperand(0); in X86SelectBranch() local
1670 CmpRHS = CmpLHS; in X86SelectBranch()
1701 std::swap(CmpLHS, CmpRHS); in X86SelectBranch()
1704 if (!X86FastEmitCompare(CmpLHS, CmpRHS, VT, CI->getDebugLoc())) in X86SelectBranch()
2069 const Value *CmpLHS = CI->getOperand(0); in X86FastEmitCMoveSelect() local
2072 std::swap(CmpLHS, CmpRHS); in X86FastEmitCMoveSelect()
2074 EVT CmpVT = TLI.getValueType(DL, CmpLHS->getType()); in X86FastEmitCMoveSelect()
2076 if (!X86FastEmitCompare(CmpLHS, CmpRHS, CmpVT, CI->getDebugLoc())) in X86FastEmitCMoveSelect()
2164 const Value *CmpLHS = CI->getOperand(0); in X86FastEmitSSESelect() local
2174 CmpRHS = CmpLHS; in X86FastEmitSSESelect()
[all …]
DX86ISelLowering.cpp46278 SDValue CmpLHS = Cmp.getOperand(0); in combineSetCCAtomicArith() local
46280 EVT CmpVT = CmpLHS.getValueType(); in combineSetCCAtomicArith()
46282 if (!CmpLHS.hasOneUse()) in combineSetCCAtomicArith()
46285 unsigned Opc = CmpLHS.getOpcode(); in combineSetCCAtomicArith()
46289 SDValue OpRHS = CmpLHS.getOperand(2); in combineSetCCAtomicArith()
46335 auto *AN = cast<AtomicSDNode>(CmpLHS.getNode()); in combineSetCCAtomicArith()
46337 ISD::ATOMIC_LOAD_SUB, SDLoc(CmpLHS), CmpVT, in combineSetCCAtomicArith()
46338 /*Chain*/ CmpLHS.getOperand(0), /*LHS*/ CmpLHS.getOperand(1), in combineSetCCAtomicArith()
46342 DAG.ReplaceAllUsesOfValueWith(CmpLHS.getValue(0), DAG.getUNDEF(CmpVT)); in combineSetCCAtomicArith()
46343 DAG.ReplaceAllUsesOfValueWith(CmpLHS.getValue(1), LockOp.getValue(1)); in combineSetCCAtomicArith()
[all …]
/openbsd/src/gnu/llvm/llvm/lib/CodeGen/GlobalISel/
DIRTranslator.cpp549 if ((Cases[0].CmpLHS == Cases[1].CmpLHS && in shouldEmitAsBranches()
551 (Cases[0].CmpRHS == Cases[1].CmpLHS && in shouldEmitAsBranches()
552 Cases[0].CmpLHS == Cases[1].CmpRHS)) { in shouldEmitAsBranches()
822 Register CondLHS = getOrCreateVReg(*CB.CmpLHS); in emitSwitchCase()
863 const APInt& Low = cast<ConstantInt>(CB.CmpLHS)->getValue(); in emitSwitchCase()
867 if (cast<ConstantInt>(CB.CmpLHS)->isMinValue(true)) { in emitSwitchCase()
DCombinerHelper.cpp6098 Register CmpLHS, CmpRHS; in matchFPSelectToMinMax() local
6101 m_GFCmp(m_Pred(Pred), m_Reg(CmpLHS), m_Reg(CmpRHS)))) || in matchFPSelectToMinMax()
6105 computeRetValAgainstNaN(CmpLHS, CmpRHS, CmpInst::isOrdered(Pred)); in matchFPSelectToMinMax()
6108 if (TrueVal == CmpRHS && FalseVal == CmpLHS) { in matchFPSelectToMinMax()
6109 std::swap(CmpLHS, CmpRHS); in matchFPSelectToMinMax()
6116 if (TrueVal != CmpLHS || FalseVal != CmpRHS) in matchFPSelectToMinMax()
6128 auto KnownNonZeroSide = getFConstantVRegValWithLookThrough(CmpLHS, MRI); in matchFPSelectToMinMax()
6136 B.buildInstr(Opc, {Dst}, {CmpLHS, CmpRHS}); in matchFPSelectToMinMax()
/openbsd/src/gnu/llvm/llvm/lib/Target/PowerPC/
DPPCISelDAGToDAG.cpp4702 SDValue CmpLHS = N->getOperand(2); in tryFoldSWTestBRCC() local
4703 if (CmpLHS.getNumOperands() < 1 || !isSWTestOp(CmpLHS.getOperand(0))) in tryFoldSWTestBRCC()
4708 if (CmpLHS.getOpcode() == ISD::AND && in tryFoldSWTestBRCC()
4709 isa<ConstantSDNode>(CmpLHS.getOperand(1))) in tryFoldSWTestBRCC()
4710 switch (CmpLHS.getConstantOperandVal(1)) { in tryFoldSWTestBRCC()
4726 else if (CmpLHS.getOpcode() == ISD::TRUNCATE && in tryFoldSWTestBRCC()
4727 CmpLHS.getValueType() == MVT::i1) in tryFoldSWTestBRCC()
4732 SDValue Ops[] = {getI32Imm(PCC, dl), CmpLHS.getOperand(0), N->getOperand(4), in tryFoldSWTestBRCC()
/openbsd/src/gnu/llvm/llvm/lib/Target/AMDGPU/
DAMDGPUISelLowering.cpp3628 SDValue CmpLHS = Cond.getOperand(0); in performCtlz_CttzCombine() local
3634 RHS.getOperand(0) == CmpLHS && isNegativeOne(LHS)) { in performCtlz_CttzCombine()
3637 return getFFBX_U32(DAG, CmpLHS, SL, Opc); in performCtlz_CttzCombine()
3644 LHS.getOperand(0) == CmpLHS && isNegativeOne(RHS)) { in performCtlz_CttzCombine()
3648 return getFFBX_U32(DAG, CmpLHS, SL, Opc); in performCtlz_CttzCombine()
/openbsd/src/gnu/llvm/llvm/lib/CodeGen/SelectionDAG/
DSelectionDAGBuilder.cpp2393 if ((Cases[0].CmpLHS == Cases[1].CmpLHS && in ShouldEmitAsBranches()
2395 (Cases[0].CmpRHS == Cases[1].CmpLHS && in ShouldEmitAsBranches()
2396 Cases[0].CmpLHS == Cases[1].CmpRHS)) { in ShouldEmitAsBranches()
2482 ExportFromCurrentBlock(SL->SwitchCases[i].CmpLHS); in visitBr()
2515 SDValue CondLHS = getValue(CB.CmpLHS); in visitSwitchCase()
2530 EVT MemVT = TLI.getMemValueType(DAG.getDataLayout(), CB.CmpLHS->getType()); in visitSwitchCase()
2558 const APInt& Low = cast<ConstantInt>(CB.CmpLHS)->getValue(); in visitSwitchCase()
2564 if (cast<ConstantInt>(CB.CmpLHS)->isMinValue(true)) { in visitSwitchCase()
DDAGCombiner.cpp25150 SDValue CmpLHS; in SimplifySelectOps() local
25155 CmpLHS = TheSelect->getOperand(0); in SimplifySelectOps()
25162 CmpLHS = Cmp.getOperand(0); in SimplifySelectOps()
25167 Sqrt.getOperand(0) == CmpLHS && (CC == ISD::SETOLT || in SimplifySelectOps()
/openbsd/src/gnu/llvm/llvm/lib/Target/AArch64/
DAArch64ISelLowering.cpp20127 SDValue CmpLHS = OpCmp.getOperand(0); in foldCSELOfCSEL() local
20131 std::swap(CmpLHS, CmpRHS); in foldCSELOfCSEL()
20132 else if (CmpLHS.getOpcode() != AArch64ISD::CSEL) in foldCSELOfCSEL()
20135 SDValue X = CmpLHS->getOperand(0); in foldCSELOfCSEL()
20136 SDValue Y = CmpLHS->getOperand(1); in foldCSELOfCSEL()
20150 static_cast<AArch64CC::CondCode>(CmpLHS->getConstantOperandVal(2)); in foldCSELOfCSEL()
20151 SDValue Cond = CmpLHS->getOperand(3); in foldCSELOfCSEL()
20575 SDValue CmpLHS = SetCC.getOperand(0); in performVSelectCombine() local
20576 EVT VT = CmpLHS.getValueType(); in performVSelectCombine()
20581 if (CmpLHS.getValueType() == N->getOperand(1).getValueType() && in performVSelectCombine()
[all …]