| /freebsd-14.2/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 | 4434 Value *CmpLHS, *CmpRHS; in computeKnownFPClass() local 4441 bool LookThroughFAbsFNeg = CmpLHS != LHS && CmpLHS != RHS; in computeKnownFPClass() 7510 if ((CmpLHS == A && CmpRHS == C) || (match(C, m_Not(m_Specific(CmpLHS))) && in matchMinMaxOfMinMax() 7517 if ((CmpLHS == A && CmpRHS == D) || (match(D, m_Not(m_Specific(CmpLHS))) && in matchMinMaxOfMinMax() 7524 if ((CmpLHS == B && CmpRHS == C) || (match(C, m_Not(m_Specific(CmpLHS))) && in matchMinMaxOfMinMax() 7531 if ((CmpLHS == B && CmpRHS == D) || (match(D, m_Not(m_Specific(CmpLHS))) && in matchMinMaxOfMinMax() 7666 if (match(CmpLHS, m_AnyZeroFP()) && CmpLHS != OutputZeroVal) { in matchSelectPattern() 7668 CmpLHS = OutputZeroVal; in matchSelectPattern() 7677 LHS = CmpLHS; in matchSelectPattern() 7742 std::swap(CmpLHS, CmpRHS); in matchSelectPattern() [all …]
|
| H A D | InstructionSimplify.cpp | 2617 LHS == CmpRHS && RHS == CmpLHS) in extractEquivalentCondition() 4512 std::swap(CmpLHS, CmpRHS); in simplifyCmpSelOfMaxMin() 4517 if (CmpLHS == FVal) { in simplifyCmpSelOfMaxMin() 4524 Value *X = CmpLHS, *Y = CmpRHS; in simplifyCmpSelOfMaxMin() 4586 if (!decomposeBitTestICmp(CmpLHS, CmpRHS, Pred, X, Mask)) in simplifySelectWithFakeICmpEq() 4599 if (simplifyWithOpReplaced(FalseVal, CmpLHS, CmpRHS, Q, in simplifySelectWithICmpEq() 4603 if (simplifyWithOpReplaced(TrueVal, CmpLHS, CmpRHS, Q, in simplifySelectWithICmpEq() 4618 Value *CmpLHS, *CmpRHS; in simplifySelectWithICmpCond() local 4651 if (match(CmpLHS, m_And(m_Value(X), m_APInt(Y)))) in simplifySelectWithICmpCond() 4709 if (match(CmpLHS, m_Or(m_Value(X), m_Value(Y))) && in simplifySelectWithICmpCond() [all …]
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineSelect.cpp | 660 Value *CmpLHS = IC->getOperand(0); in foldSelectICmpLshrAshr() local 681 match(CmpLHS, m_Specific(X))) { in foldSelectICmpLshrAshr() 720 Value *CmpLHS = IC->getOperand(0); in foldSelectICmpAndBinOp() local 737 if (!decomposeBitTestICmp(CmpLHS, CmpRHS, Pred, CmpLHS, C1) || in foldSelectICmpAndBinOp() 745 Value *Y, *V = CmpLHS; in foldSelectICmpAndBinOp() 1121 Value *CmpLHS = ICI->getOperand(0); in foldSelectCttzCtlz() local 1283 if (TrueVal != CmpLHS && in foldSelectValueEquivalence() 1709 if (CmpRHS != CmpLHS && isa<Constant>(CmpRHS) && !isa<Constant>(CmpLHS)) { in foldSelectInstWithICmp() 1753 X = CmpLHS; in foldSelectInstWithICmp() 1758 X = CmpLHS; in foldSelectInstWithICmp() [all …]
|
| /freebsd-14.2/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-14.2/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
| H A D | GVN.cpp | 2081 Value *CmpLHS = CmpI->getOperand(0); in processAssumeIntrinsic() local 2088 if (isa<Constant>(CmpLHS) && !isa<Constant>(CmpRHS)) in processAssumeIntrinsic() 2089 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic() 2091 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic() 2092 if ((isa<Argument>(CmpLHS) && isa<Argument>(CmpRHS)) || in processAssumeIntrinsic() 2096 uint32_t LVN = VN.lookupOrAdd(CmpLHS); in processAssumeIntrinsic() 2099 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic() 2104 if (isa<Constant>(CmpLHS) && isa<Constant>(CmpRHS)) in processAssumeIntrinsic() 2108 << *CmpLHS << " with " in processAssumeIntrinsic() 2114 if (hasUsersIn(CmpLHS, IntrinsicI->getParent())) in processAssumeIntrinsic() [all …]
|
| H A D | JumpThreading.cpp | 749 Value *CmpLHS = Cmp->getOperand(0); in computeValueKnownInPredecessorsImpl() local 753 PHINode *PN = dyn_cast<PHINode>(CmpLHS); in computeValueKnownInPredecessorsImpl() 766 if (PN == CmpLHS) { in computeValueKnownInPredecessorsImpl() 770 LHS = CmpLHS->DoPHITranslation(BB, PredBB); in computeValueKnownInPredecessorsImpl() 804 if (!isa<Instruction>(CmpLHS) || in computeValueKnownInPredecessorsImpl() 805 cast<Instruction>(CmpLHS)->getParent() != BB) { in computeValueKnownInPredecessorsImpl() 810 LVI->getPredicateOnEdge(Pred, CmpLHS, in computeValueKnownInPredecessorsImpl() 831 match(CmpLHS, m_Add(m_Value(AddLHS), m_ConstantInt(AddConst)))) { in computeValueKnownInPredecessorsImpl() 839 AddLHS, P, BB, CxtI ? CxtI : cast<Instruction>(CmpLHS)); in computeValueKnownInPredecessorsImpl()
|
| H A D | GuardWidening.cpp | 811 const Value *CmpLHS = IC->getOperand(0), *CmpRHS = IC->getOperand(1); in parseRangeChecks() local 813 std::swap(CmpLHS, CmpRHS); in parseRangeChecks() 818 CmpLHS, cast<ConstantInt>(ConstantInt::getNullValue(CmpRHS->getType())), in parseRangeChecks()
|
| H A D | LoopIdiomRecognize.cpp | 2224 Value *CmpLHS, *CmpRHS; in detectShiftUntilBitTestIdiom() local 2227 m_Br(m_ICmp(Pred, m_Value(CmpLHS), m_Value(CmpRHS)), in detectShiftUntilBitTestIdiom() 2237 match(CmpLHS, in detectShiftUntilBitTestIdiom() 2246 match(CmpLHS, m_And(m_Value(CurrX), in detectShiftUntilBitTestIdiom() 2252 return llvm::decomposeBitTestICmp(CmpLHS, CmpRHS, Pred, CurrX, Mask) && in detectShiftUntilBitTestIdiom()
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Target/X86/ |
| H A D | X86FastISel.cpp | 1657 const Value *CmpLHS = CI->getOperand(0); in X86SelectBranch() local 1667 CmpRHS = CmpLHS; in X86SelectBranch() 1698 std::swap(CmpLHS, CmpRHS); in X86SelectBranch() 2066 const Value *CmpLHS = CI->getOperand(0); in X86FastEmitCMoveSelect() local 2069 std::swap(CmpLHS, CmpRHS); in X86FastEmitCMoveSelect() 2161 const Value *CmpLHS = CI->getOperand(0); in X86FastEmitSSESelect() local 2171 CmpRHS = CmpLHS; in X86FastEmitSSESelect() 2181 std::swap(CmpLHS, CmpRHS); in X86FastEmitSSESelect() 2188 Register CmpLHSReg = getRegForValue(CmpLHS); in X86FastEmitSSESelect() 2300 const Value *CmpLHS = CI->getOperand(0); in X86FastEmitPseudoSelect() local [all …]
|
| H A D | X86ISelLowering.cpp | 45369 SDValue CmpLHS = Cmp.getOperand(0); in combineSetCCAtomicArith() local 45371 EVT CmpVT = CmpLHS.getValueType(); in combineSetCCAtomicArith() 45373 if (!CmpLHS.hasOneUse()) in combineSetCCAtomicArith() 45376 unsigned Opc = CmpLHS.getOpcode(); in combineSetCCAtomicArith() 45380 SDValue OpRHS = CmpLHS.getOperand(2); in combineSetCCAtomicArith() 45426 auto *AN = cast<AtomicSDNode>(CmpLHS.getNode()); in combineSetCCAtomicArith() 45428 ISD::ATOMIC_LOAD_SUB, SDLoc(CmpLHS), CmpVT, in combineSetCCAtomicArith() 45429 /*Chain*/ CmpLHS.getOperand(0), /*LHS*/ CmpLHS.getOperand(1), in combineSetCCAtomicArith() 45454 SDValue LockOp = lowerAtomicArithWithLOCK(CmpLHS, DAG, Subtarget); in combineSetCCAtomicArith() 45455 DAG.ReplaceAllUsesOfValueWith(CmpLHS.getValue(0), DAG.getUNDEF(CmpVT)); in combineSetCCAtomicArith() [all …]
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/ |
| H A D | CombinerHelper.cpp | 6137 Register CmpLHS, CmpRHS; in matchFPSelectToMinMax() local 6140 m_GFCmp(m_Pred(Pred), m_Reg(CmpLHS), m_Reg(CmpRHS)))) || in matchFPSelectToMinMax() 6144 computeRetValAgainstNaN(CmpLHS, CmpRHS, CmpInst::isOrdered(Pred)); in matchFPSelectToMinMax() 6147 if (TrueVal == CmpRHS && FalseVal == CmpLHS) { in matchFPSelectToMinMax() 6148 std::swap(CmpLHS, CmpRHS); in matchFPSelectToMinMax() 6155 if (TrueVal != CmpLHS || FalseVal != CmpRHS) in matchFPSelectToMinMax() 6175 B.buildInstr(Opc, {Dst}, {CmpLHS, CmpRHS}); in matchFPSelectToMinMax() 6582 Register CmpLHS = Cmp->getLHSReg(); in tryFoldSelectToIntMinMax() local 6586 if (True == CmpRHS && False == CmpLHS) { in tryFoldSelectToIntMinMax() 6587 std::swap(CmpLHS, CmpRHS); in tryFoldSelectToIntMinMax() [all …]
|
| 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() 902 Register CondLHS = getOrCreateVReg(*CB.CmpLHS); in emitSwitchCase() 943 const APInt& Low = cast<ConstantInt>(CB.CmpLHS)->getValue(); in emitSwitchCase() 947 if (cast<ConstantInt>(CB.CmpLHS)->isMinValue(true)) { in emitSwitchCase()
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Target/PowerPC/ |
| H A D | PPCISelDAGToDAG.cpp | 4866 SDValue CmpLHS = N->getOperand(2); in tryFoldSWTestBRCC() local 4867 if (CmpLHS.getNumOperands() < 1 || !isSWTestOp(CmpLHS.getOperand(0))) in tryFoldSWTestBRCC() 4872 if (CmpLHS.getOpcode() == ISD::AND && in tryFoldSWTestBRCC() 4873 isa<ConstantSDNode>(CmpLHS.getOperand(1))) in tryFoldSWTestBRCC() 4874 switch (CmpLHS.getConstantOperandVal(1)) { in tryFoldSWTestBRCC() 4890 else if (CmpLHS.getOpcode() == ISD::TRUNCATE && in tryFoldSWTestBRCC() 4891 CmpLHS.getValueType() == MVT::i1) in tryFoldSWTestBRCC() 4896 SDValue Ops[] = {getI32Imm(PCC, dl), CmpLHS.getOperand(0), N->getOperand(4), in tryFoldSWTestBRCC()
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/ |
| H A D | SelectionDAGBuilder.cpp | 2571 if ((Cases[0].CmpLHS == Cases[1].CmpLHS && in ShouldEmitAsBranches() 2573 (Cases[0].CmpRHS == Cases[1].CmpLHS && in ShouldEmitAsBranches() 2574 Cases[0].CmpLHS == Cases[1].CmpRHS)) { in ShouldEmitAsBranches() 2663 ExportFromCurrentBlock(SL->SwitchCases[i].CmpLHS); in visitBr() 2696 SDValue CondLHS = getValue(CB.CmpLHS); in visitSwitchCase() 2711 EVT MemVT = TLI.getMemValueType(DAG.getDataLayout(), CB.CmpLHS->getType()); in visitSwitchCase() 2739 const APInt& Low = cast<ConstantInt>(CB.CmpLHS)->getValue(); in visitSwitchCase() 2745 if (cast<ConstantInt>(CB.CmpLHS)->isMinValue(true)) { in visitSwitchCase()
|
| H A D | DAGCombiner.cpp | 26862 SDValue CmpLHS; in SimplifySelectOps() local 26867 CmpLHS = TheSelect->getOperand(0); in SimplifySelectOps() 26874 CmpLHS = Cmp.getOperand(0); in SimplifySelectOps() 26879 Sqrt.getOperand(0) == CmpLHS && (CC == ISD::SETOLT || in SimplifySelectOps()
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
| H A D | AMDGPUISelLowering.cpp | 4440 SDValue CmpLHS = Cond.getOperand(0); in performCtlz_CttzCombine() local 4446 RHS.getOperand(0) == CmpLHS && isAllOnesConstant(LHS)) { in performCtlz_CttzCombine() 4449 return getFFBX_U32(DAG, CmpLHS, SL, Opc); in performCtlz_CttzCombine() 4456 LHS.getOperand(0) == CmpLHS && isAllOnesConstant(RHS)) { in performCtlz_CttzCombine() 4460 return getFFBX_U32(DAG, CmpLHS, SL, Opc); in performCtlz_CttzCombine()
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Target/AArch64/ |
| H A D | AArch64ISelLowering.cpp | 22316 SDValue CmpLHS = OpCmp.getOperand(0); in foldCSELOfCSEL() local 22320 std::swap(CmpLHS, CmpRHS); in foldCSELOfCSEL() 22321 else if (CmpLHS.getOpcode() != AArch64ISD::CSEL) in foldCSELOfCSEL() 22324 SDValue X = CmpLHS->getOperand(0); in foldCSELOfCSEL() 22325 SDValue Y = CmpLHS->getOperand(1); in foldCSELOfCSEL() 22339 static_cast<AArch64CC::CondCode>(CmpLHS->getConstantOperandVal(2)); in foldCSELOfCSEL() 22340 SDValue Cond = CmpLHS->getOperand(3); in foldCSELOfCSEL() 22787 SDValue CmpLHS = SetCC.getOperand(0); in performVSelectCombine() local 22788 EVT VT = CmpLHS.getValueType(); in performVSelectCombine() 22793 if (CmpLHS.getValueType() == N->getOperand(1).getValueType() && in performVSelectCombine() [all …]
|