Home
last modified time | relevance | path

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

/llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/
H A DInstCombineSelect.cpp564 !match(CmpRHS, in foldSelectICmpLshrAshr()
567 !match(CmpRHS, in foldSelectICmpLshrAshr()
617 if (!match(CmpRHS, m_Zero())) in foldSelectICmpAndOr()
1075 CmpRHS = AdjustedRHS; in adjustMinMax()
1079 Cmp.setOperand(1, CmpRHS); in adjustMinMax()
1202 if (TrueVal != CmpRHS && in foldSelectValueEquivalence()
1598 if (CmpRHS != CmpLHS && isa<Constant>(CmpRHS)) { in foldSelectInstWithICmp()
1601 SI.setOperand(1, CmpRHS); in foldSelectInstWithICmp()
1605 SI.setOperand(2, CmpRHS); in foldSelectInstWithICmp()
1638 match(CmpRHS, m_Zero())) { in foldSelectInstWithICmp()
[all …]
/llvm-project-15.0.7/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),
/llvm-project-15.0.7/llvm/lib/Analysis/
H A DValueTracking.cpp5776 if (CmpRHS == FalseVal) { in matchFastFloatClamp()
5786 if (CmpRHS != TrueVal || !match(CmpRHS, m_APFloat(FC1)) || !FC1->isFinite()) in matchFastFloatClamp()
5824 if (CmpRHS != TrueVal) { in matchClamp()
5829 if (CmpRHS == TrueVal && match(CmpRHS, m_APInt(C1))) { in matchClamp()
5880 std::swap(CmpLHS, CmpRHS); in matchMinMaxOfMinMax()
5888 std::swap(CmpLHS, CmpRHS); in matchMinMaxOfMinMax()
5896 std::swap(CmpLHS, CmpRHS); in matchMinMaxOfMinMax()
5904 std::swap(CmpLHS, CmpRHS); in matchMinMaxOfMinMax()
6078 CmpRHS = OutputZeroVal; in matchSelectPattern()
6083 RHS = CmpRHS; in matchSelectPattern()
[all …]
H A DInstructionSimplify.cpp2568 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
4268 if (!match(CondVal, m_ICmp(Pred, m_Value(CmpLHS), m_Value(CmpRHS)))) in simplifySelectWithICmpCond()
4294 if (Pred == ICmpInst::ICMP_EQ && match(CmpRHS, m_Zero())) { 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/lib/Transforms/Scalar/
H A DGuardWidening.cpp598 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()
606 CmpRHS, IC); in parseRangeChecks()
H A DGVN.cpp1974 Value *CmpRHS = CmpI->getOperand(1); in processAssumeIntrinsic() local
1980 if (isa<Constant>(CmpLHS) && !isa<Constant>(CmpRHS)) in processAssumeIntrinsic()
1981 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic()
1982 if (!isa<Instruction>(CmpLHS) && isa<Instruction>(CmpRHS)) in processAssumeIntrinsic()
1983 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic()
1984 if ((isa<Argument>(CmpLHS) && isa<Argument>(CmpRHS)) || in processAssumeIntrinsic()
1989 uint32_t RVN = VN.lookupOrAdd(CmpRHS); in processAssumeIntrinsic()
1991 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic()
1996 if (isa<Constant>(CmpLHS) && isa<Constant>(CmpRHS)) in processAssumeIntrinsic()
2001 << *CmpRHS << " in block " in processAssumeIntrinsic()
[all …]
H A DJumpThreading.cpp816 Value *CmpRHS = Cmp->getOperand(1); in computeValueKnownInPredecessorsImpl() local
821 PN = dyn_cast<PHINode>(CmpRHS); in computeValueKnownInPredecessorsImpl()
831 RHS = CmpRHS->DoPHITranslation(BB, PredBB); in computeValueKnownInPredecessorsImpl()
864 if (isa<Constant>(CmpRHS) && !CmpType->isVectorTy()) { in computeValueKnownInPredecessorsImpl()
865 Constant *CmpConst = cast<Constant>(CmpRHS); in computeValueKnownInPredecessorsImpl()
H A DLoopIdiomRecognize.cpp2305 Value *CmpLHS, *CmpRHS; in detectShiftUntilBitTestIdiom() local
2308 m_Br(m_ICmp(Pred, m_Value(CmpLHS), m_Value(CmpRHS)), in detectShiftUntilBitTestIdiom()
2317 return ICmpInst::isEquality(Pred) && match(CmpRHS, m_Zero()) && in detectShiftUntilBitTestIdiom()
2326 return ICmpInst::isEquality(Pred) && match(CmpRHS, m_Zero()) && in detectShiftUntilBitTestIdiom()
2333 return llvm::decomposeBitTestICmp(CmpLHS, CmpRHS, Pred, CurrX, Mask) && in detectShiftUntilBitTestIdiom()
/llvm-project-15.0.7/llvm/lib/Target/X86/
H A DX86FastISel.cpp1663 const Value *CmpRHS = CI->getOperand(1); in X86SelectBranch() local
1672 CmpRHS = CmpLHS; in X86SelectBranch()
1703 std::swap(CmpLHS, CmpRHS); in X86SelectBranch()
2072 const Value *CmpRHS = CI->getOperand(1); in X86FastEmitCMoveSelect() local
2074 std::swap(CmpLHS, CmpRHS); in X86FastEmitCMoveSelect()
2167 const Value *CmpRHS = CI->getOperand(1); in X86FastEmitSSESelect() local
2176 CmpRHS = CmpLHS; in X86FastEmitSSESelect()
2186 std::swap(CmpLHS, CmpRHS); in X86FastEmitSSESelect()
2194 Register CmpRHSReg = getRegForValue(CmpRHS); in X86FastEmitSSESelect()
2306 const Value *CmpRHS = CI->getOperand(1); in X86FastEmitPseudoSelect() local
[all …]
H A DX86ISelLowering.cpp45065 SDValue CmpRHS = Cmp.getOperand(1); in combineSetCCAtomicArith() local
45084 auto *CmpRHSC = dyn_cast<ConstantSDNode>(CmpRHS); in combineSetCCAtomicArith()
45125 /*RHS*/ DAG.getConstant(NegAddend, SDLoc(CmpRHS), CmpVT), in combineSetCCAtomicArith()
/llvm-project-15.0.7/llvm/lib/CodeGen/GlobalISel/
H A DIRTranslator.cpp545 Cases[0].CmpRHS == Cases[1].CmpRHS) || in shouldEmitAsBranches()
546 (Cases[0].CmpRHS == Cases[1].CmpLHS && in shouldEmitAsBranches()
547 Cases[0].CmpLHS == Cases[1].CmpRHS)) { in shouldEmitAsBranches()
553 if (Cases[0].CmpRHS == Cases[1].CmpRHS && in shouldEmitAsBranches()
555 isa<Constant>(Cases[0].CmpRHS) && in shouldEmitAsBranches()
556 cast<Constant>(Cases[0].CmpRHS)->isNullValue()) { in shouldEmitAsBranches()
838 const auto *CI = dyn_cast<ConstantInt>(CB.CmpRHS); in emitSwitchCase()
846 Register CondRHS = getOrCreateVReg(*CB.CmpRHS); in emitSwitchCase()
859 const APInt& High = cast<ConstantInt>(CB.CmpRHS)->getValue(); in emitSwitchCase()
863 Register CondRHS = getOrCreateVReg(*CB.CmpRHS); in emitSwitchCase()
/llvm-project-15.0.7/llvm/lib/Transforms/Utils/
H A DSimplifyIndVar.cpp1998 Value *CmpRHS; in calculatePostIncRange() local
2000 m_Value(CmpRHS)))) in calculatePostIncRange()
2006 auto CmpRHSRange = SE->getSignedRange(SE->getSCEV(CmpRHS)); in calculatePostIncRange()
/llvm-project-15.0.7/llvm/lib/CodeGen/SelectionDAG/
H A DSelectionDAGBuilder.cpp2338 Cases[0].CmpRHS == Cases[1].CmpRHS) || in ShouldEmitAsBranches()
2339 (Cases[0].CmpRHS == Cases[1].CmpLHS && in ShouldEmitAsBranches()
2340 Cases[0].CmpLHS == Cases[1].CmpRHS)) { in ShouldEmitAsBranches()
2346 if (Cases[0].CmpRHS == Cases[1].CmpRHS && in ShouldEmitAsBranches()
2348 isa<Constant>(Cases[0].CmpRHS) && in ShouldEmitAsBranches()
2349 cast<Constant>(Cases[0].CmpRHS)->isNullValue()) { in ShouldEmitAsBranches()
2427 ExportFromCurrentBlock(SL->SwitchCases[i].CmpRHS); in visitBr()
2480 if (CB.CmpRHS == ConstantInt::getTrue(*DAG.getContext()) && in visitSwitchCase()
2483 else if (CB.CmpRHS == ConstantInt::getFalse(*DAG.getContext()) && in visitSwitchCase()
2488 SDValue CondRHS = getValue(CB.CmpRHS); in visitSwitchCase()
[all …]
H A DTargetLowering.cpp4794 SDValue CmpRHS = DAG.getConstant(C1.lshr(ShiftBits), dl, ShValTy); in SimplifySetCC() local
4795 return DAG.getSetCC(dl, VT, Shift, CmpRHS, Cond); in SimplifySetCC()
4822 SDValue CmpRHS = DAG.getConstant(NewC, dl, ShValTy); in SimplifySetCC() local
4823 return DAG.getSetCC(dl, VT, Shift, CmpRHS, NewCond); in SimplifySetCC()
/llvm-project-15.0.7/llvm/lib/Target/PowerPC/
H A DPPCISelDAGToDAG.cpp4678 SDValue CmpRHS = N->getOperand(3); in tryFoldSWTestBRCC() local
4679 if (!isa<ConstantSDNode>(CmpRHS) || in tryFoldSWTestBRCC()
4680 cast<ConstantSDNode>(CmpRHS)->getSExtValue() != 0) in tryFoldSWTestBRCC()
/llvm-project-15.0.7/llvm/lib/Target/AArch64/
H A DAArch64ISelLowering.cpp18689 SDNode *CmpRHS = SetCC.getOperand(1).getNode(); in performVSelectCombine() local
18700 SplatLHSVal.isOne() && ISD::isConstantSplatVectorAllOnes(CmpRHS) && in performVSelectCombine()