| /llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineSelect.cpp | 624 V = CmpLHS; in foldSelectICmpAndOr() 1045 CmpLHS = TrueVal; in adjustMinMax() 1049 CmpLHS = FalseVal; in adjustMinMax() 1058 CmpLHS = TrueVal; in adjustMinMax() 1062 CmpLHS = FalseVal; in adjustMinMax() 1078 Cmp.setOperand(0, CmpLHS); in adjustMinMax() 1180 if (TrueVal != CmpLHS && in foldSelectValueEquivalence() 1197 if (U == CmpLHS) { in foldSelectValueEquivalence() 1642 X = CmpLHS; in foldSelectInstWithICmp() 1647 X = CmpLHS; in foldSelectInstWithICmp() [all …]
|
| /llvm-project-15.0.7/llvm/lib/Analysis/ |
| H A D | BranchProbabilityInfo.cpp | 589 Instruction *CmpLHS = dyn_cast<Instruction>(CI->getOperand(0)); in computeUnlikelySuccessors() local 590 PHINode *CmpPHI = dyn_cast<PHINode>(CmpLHS); in computeUnlikelySuccessors() 594 while (!CmpPHI && CmpLHS && isa<BinaryOperator>(CmpLHS) && in computeUnlikelySuccessors() 595 isa<Constant>(CmpLHS->getOperand(1))) { in computeUnlikelySuccessors() 597 if (!L->contains(CmpLHS)) in computeUnlikelySuccessors() 599 InstChain.push_back(cast<BinaryOperator>(CmpLHS)); in computeUnlikelySuccessors() 600 CmpLHS = dyn_cast<Instruction>(CmpLHS->getOperand(0)); in computeUnlikelySuccessors() 601 if (CmpLHS) in computeUnlikelySuccessors() 602 CmpPHI = dyn_cast<PHINode>(CmpLHS); in computeUnlikelySuccessors()
|
| H A D | ValueTracking.cpp | 5880 std::swap(CmpLHS, CmpRHS); in matchMinMaxOfMinMax() 5888 std::swap(CmpLHS, CmpRHS); in matchMinMaxOfMinMax() 5896 std::swap(CmpLHS, CmpRHS); in matchMinMaxOfMinMax() 5920 if ((CmpLHS == A && CmpRHS == C) || (match(C, m_Not(m_Specific(CmpLHS))) && in matchMinMaxOfMinMax() 5927 if ((CmpLHS == A && CmpRHS == D) || (match(D, m_Not(m_Specific(CmpLHS))) && in matchMinMaxOfMinMax() 5934 if ((CmpLHS == B && CmpRHS == C) || (match(C, m_Not(m_Specific(CmpLHS))) && in matchMinMaxOfMinMax() 5941 if ((CmpLHS == B && CmpRHS == D) || (match(D, m_Not(m_Specific(CmpLHS))) && in matchMinMaxOfMinMax() 6076 CmpLHS = OutputZeroVal; in matchSelectPattern() 6082 LHS = CmpLHS; in matchSelectPattern() 6143 std::swap(CmpLHS, CmpRHS); in matchSelectPattern() [all …]
|
| H A D | InstructionSimplify.cpp | 2568 Value *CmpLHS = Cmp->getOperand(0), *CmpRHS = Cmp->getOperand(1); in extractEquivalentCondition() local 2569 if (Pred == Cmp->getPredicate() && LHS == CmpLHS && RHS == CmpRHS) in extractEquivalentCondition() 2572 LHS == CmpRHS && RHS == CmpLHS) in extractEquivalentCondition() 4253 if (!decomposeBitTestICmp(CmpLHS, CmpRHS, Pred, X, Mask)) in simplifySelectWithFakeICmpEq() 4267 Value *CmpLHS, *CmpRHS; in simplifySelectWithICmpCond() local 4297 if (match(CmpLHS, m_And(m_Value(X), m_APInt(Y)))) in simplifySelectWithICmpCond() 4308 if (match(TrueVal, isFsh) && FalseVal == X && CmpLHS == ShAmt) in simplifySelectWithICmpCond() 4347 if (simplifyWithOpReplaced(FalseVal, CmpLHS, CmpRHS, Q, in simplifySelectWithICmpCond() 4350 simplifyWithOpReplaced(FalseVal, CmpRHS, CmpLHS, Q, in simplifySelectWithICmpCond() 4354 if (simplifyWithOpReplaced(TrueVal, CmpLHS, CmpRHS, Q, in simplifySelectWithICmpCond() [all …]
|
| /llvm-project-15.0.7/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),
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Scalar/ |
| H A D | GVN.cpp | 1973 Value *CmpLHS = CmpI->getOperand(0); in processAssumeIntrinsic() local 1980 if (isa<Constant>(CmpLHS) && !isa<Constant>(CmpRHS)) in processAssumeIntrinsic() 1981 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic() 1983 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic() 1984 if ((isa<Argument>(CmpLHS) && isa<Argument>(CmpRHS)) || in processAssumeIntrinsic() 1988 uint32_t LVN = VN.lookupOrAdd(CmpLHS); in processAssumeIntrinsic() 1991 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic() 1996 if (isa<Constant>(CmpLHS) && isa<Constant>(CmpRHS)) in processAssumeIntrinsic() 2000 << *CmpLHS << " with " in processAssumeIntrinsic() 2006 if (hasUsersIn(CmpLHS, IntrinsicI->getParent())) in processAssumeIntrinsic() [all …]
|
| H A D | JumpThreading.cpp | 815 Value *CmpLHS = Cmp->getOperand(0); in computeValueKnownInPredecessorsImpl() local 819 PHINode *PN = dyn_cast<PHINode>(CmpLHS); in computeValueKnownInPredecessorsImpl() 829 if (PN == CmpLHS) { in computeValueKnownInPredecessorsImpl() 833 LHS = CmpLHS->DoPHITranslation(BB, PredBB); in computeValueKnownInPredecessorsImpl() 867 if (!isa<Instruction>(CmpLHS) || in computeValueKnownInPredecessorsImpl() 868 cast<Instruction>(CmpLHS)->getParent() != BB) { in computeValueKnownInPredecessorsImpl() 873 LVI->getPredicateOnEdge(Pred, CmpLHS, in computeValueKnownInPredecessorsImpl() 894 match(CmpLHS, m_Add(m_Value(AddLHS), m_ConstantInt(AddConst)))) { in computeValueKnownInPredecessorsImpl() 902 AddLHS, P, BB, CxtI ? CxtI : cast<Instruction>(CmpLHS)); in computeValueKnownInPredecessorsImpl()
|
| H A D | GuardWidening.cpp | 598 const Value *CmpLHS = IC->getOperand(0), *CmpRHS = IC->getOperand(1); in parseRangeChecks() local 600 std::swap(CmpLHS, CmpRHS); in parseRangeChecks() 605 CmpLHS, cast<ConstantInt>(ConstantInt::getNullValue(CmpRHS->getType())), in parseRangeChecks()
|
| H A D | LoopIdiomRecognize.cpp | 2305 Value *CmpLHS, *CmpRHS; in detectShiftUntilBitTestIdiom() local 2308 m_Br(m_ICmp(Pred, m_Value(CmpLHS), m_Value(CmpRHS)), in detectShiftUntilBitTestIdiom() 2318 match(CmpLHS, in detectShiftUntilBitTestIdiom() 2327 match(CmpLHS, m_And(m_Value(CurrX), in detectShiftUntilBitTestIdiom() 2333 return llvm::decomposeBitTestICmp(CmpLHS, CmpRHS, Pred, CurrX, Mask) && in detectShiftUntilBitTestIdiom()
|
| /llvm-project-15.0.7/llvm/lib/Target/X86/ |
| H A D | X86FastISel.cpp | 1662 const Value *CmpLHS = CI->getOperand(0); in X86SelectBranch() local 1672 CmpRHS = CmpLHS; in X86SelectBranch() 1703 std::swap(CmpLHS, CmpRHS); in X86SelectBranch() 2071 const Value *CmpLHS = CI->getOperand(0); in X86FastEmitCMoveSelect() local 2074 std::swap(CmpLHS, CmpRHS); in X86FastEmitCMoveSelect() 2166 const Value *CmpLHS = CI->getOperand(0); in X86FastEmitSSESelect() local 2176 CmpRHS = CmpLHS; in X86FastEmitSSESelect() 2186 std::swap(CmpLHS, CmpRHS); in X86FastEmitSSESelect() 2193 Register CmpLHSReg = getRegForValue(CmpLHS); in X86FastEmitSSESelect() 2305 const Value *CmpLHS = CI->getOperand(0); in X86FastEmitPseudoSelect() local [all …]
|
| H A D | X86ISelLowering.cpp | 45064 SDValue CmpLHS = Cmp.getOperand(0); in combineSetCCAtomicArith() local 45066 EVT CmpVT = CmpLHS.getValueType(); in combineSetCCAtomicArith() 45068 if (!CmpLHS.hasOneUse()) in combineSetCCAtomicArith() 45071 unsigned Opc = CmpLHS.getOpcode(); in combineSetCCAtomicArith() 45075 SDValue OpRHS = CmpLHS.getOperand(2); in combineSetCCAtomicArith() 45121 auto *AN = cast<AtomicSDNode>(CmpLHS.getNode()); in combineSetCCAtomicArith() 45123 ISD::ATOMIC_LOAD_SUB, SDLoc(CmpLHS), CmpVT, in combineSetCCAtomicArith() 45124 /*Chain*/ CmpLHS.getOperand(0), /*LHS*/ CmpLHS.getOperand(1), in combineSetCCAtomicArith() 45149 SDValue LockOp = lowerAtomicArithWithLOCK(CmpLHS, DAG, Subtarget); in combineSetCCAtomicArith() 45150 DAG.ReplaceAllUsesOfValueWith(CmpLHS.getValue(0), DAG.getUNDEF(CmpVT)); in combineSetCCAtomicArith() [all …]
|
| /llvm-project-15.0.7/llvm/lib/CodeGen/GlobalISel/ |
| H A D | IRTranslator.cpp | 544 if ((Cases[0].CmpLHS == Cases[1].CmpLHS && in shouldEmitAsBranches() 546 (Cases[0].CmpRHS == Cases[1].CmpLHS && in shouldEmitAsBranches() 547 Cases[0].CmpLHS == Cases[1].CmpRHS)) { in shouldEmitAsBranches() 817 Register CondLHS = getOrCreateVReg(*CB.CmpLHS); in emitSwitchCase() 858 const APInt& Low = cast<ConstantInt>(CB.CmpLHS)->getValue(); in emitSwitchCase() 862 if (cast<ConstantInt>(CB.CmpLHS)->isMinValue(true)) { in emitSwitchCase()
|
| /llvm-project-15.0.7/llvm/lib/Target/PowerPC/ |
| H A D | PPCISelDAGToDAG.cpp | 4683 SDValue CmpLHS = N->getOperand(2); in tryFoldSWTestBRCC() local 4684 if (CmpLHS.getNumOperands() < 1 || !isSWTestOp(CmpLHS.getOperand(0))) in tryFoldSWTestBRCC() 4689 if (CmpLHS.getOpcode() == ISD::AND && in tryFoldSWTestBRCC() 4690 isa<ConstantSDNode>(CmpLHS.getOperand(1))) in tryFoldSWTestBRCC() 4691 switch (CmpLHS.getConstantOperandVal(1)) { in tryFoldSWTestBRCC() 4707 else if (CmpLHS.getOpcode() == ISD::TRUNCATE && in tryFoldSWTestBRCC() 4708 CmpLHS.getValueType() == MVT::i1) in tryFoldSWTestBRCC() 4713 SDValue Ops[] = {getI32Imm(PCC, dl), CmpLHS.getOperand(0), N->getOperand(4), in tryFoldSWTestBRCC()
|
| /llvm-project-15.0.7/llvm/lib/Target/AMDGPU/ |
| H A D | AMDGPUISelLowering.cpp | 3497 SDValue CmpLHS = Cond.getOperand(0); in performCtlz_CttzCombine() local 3503 RHS.getOperand(0) == CmpLHS && isNegativeOne(LHS)) { in performCtlz_CttzCombine() 3506 return getFFBX_U32(DAG, CmpLHS, SL, Opc); in performCtlz_CttzCombine() 3513 LHS.getOperand(0) == CmpLHS && isNegativeOne(RHS)) { in performCtlz_CttzCombine() 3517 return getFFBX_U32(DAG, CmpLHS, SL, Opc); in performCtlz_CttzCombine()
|
| /llvm-project-15.0.7/llvm/lib/CodeGen/SelectionDAG/ |
| H A D | SelectionDAGBuilder.cpp | 2337 if ((Cases[0].CmpLHS == Cases[1].CmpLHS && in ShouldEmitAsBranches() 2339 (Cases[0].CmpRHS == Cases[1].CmpLHS && in ShouldEmitAsBranches() 2340 Cases[0].CmpLHS == Cases[1].CmpRHS)) { in ShouldEmitAsBranches() 2426 ExportFromCurrentBlock(SL->SwitchCases[i].CmpLHS); in visitBr() 2459 SDValue CondLHS = getValue(CB.CmpLHS); in visitSwitchCase() 2474 EVT MemVT = TLI.getMemValueType(DAG.getDataLayout(), CB.CmpLHS->getType()); in visitSwitchCase() 2502 const APInt& Low = cast<ConstantInt>(CB.CmpLHS)->getValue(); in visitSwitchCase() 2508 if (cast<ConstantInt>(CB.CmpLHS)->isMinValue(true)) { in visitSwitchCase()
|
| H A D | DAGCombiner.cpp | 23703 SDValue CmpLHS; in SimplifySelectOps() local 23708 CmpLHS = TheSelect->getOperand(0); in SimplifySelectOps() 23715 CmpLHS = Cmp.getOperand(0); in SimplifySelectOps() 23720 Sqrt.getOperand(0) == CmpLHS && (CC == ISD::SETOLT || in SimplifySelectOps()
|
| /llvm-project-15.0.7/llvm/lib/Target/AArch64/ |
| H A D | AArch64ISelLowering.cpp | 18687 SDValue CmpLHS = SetCC.getOperand(0); in performVSelectCombine() local 18688 EVT VT = CmpLHS.getValueType(); in performVSelectCombine() 18693 if (CmpLHS.getValueType() == N->getOperand(1).getValueType() && in performVSelectCombine() 18708 auto Shift = DAG.getNode(ISD::SRA, SDLoc(N), VT, CmpLHS, Val); in performVSelectCombine()
|