Home
last modified time | relevance | path

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

12

/external/swiftshader/third_party/LLVM/lib/Transforms/InstCombine/
DInstCombineSelect.cpp348 Value *CmpRHS = ICI->getOperand(1); in visitSelectInstWithICmp() local
356 if (ConstantInt *CI = dyn_cast<ConstantInt>(CmpRHS)) { in visitSelectInstWithICmp()
391 else if (CmpRHS->getType()->getScalarSizeInBits() in visitSelectInstWithICmp()
429 CmpRHS = AdjustedRHS; in visitSelectInstWithICmp()
433 ICI->setOperand(1, CmpRHS); in visitSelectInstWithICmp()
454 if (ConstantInt *Cmp = dyn_cast<ConstantInt>(CmpRHS)) { in visitSelectInstWithICmp()
482 if (SimplifyWithOpReplaced(FalseVal, CmpLHS, CmpRHS, TD) == TrueVal || in visitSelectInstWithICmp()
483 SimplifyWithOpReplaced(FalseVal, CmpRHS, CmpLHS, TD) == TrueVal) in visitSelectInstWithICmp()
485 if (SimplifyWithOpReplaced(TrueVal, CmpLHS, CmpRHS, TD) == FalseVal || in visitSelectInstWithICmp()
486 SimplifyWithOpReplaced(TrueVal, CmpRHS, CmpLHS, TD) == FalseVal) in visitSelectInstWithICmp()
[all …]
DInstCombineCompares.cpp747 ConstantInt *CmpRHS = cast<ConstantInt>(ICI.getOperand(1)); in FoldICmpDivCst() local
748 const APInt &CmpRHSV = CmpRHS->getValue(); in FoldICmpDivCst()
775 Constant *Prod = ConstantExpr::getMul(CmpRHS, DivRHS); in FoldICmpDivCst()
781 ConstantExpr::getUDiv(Prod, DivRHS)) != CmpRHS; in FoldICmpDivCst()
/external/llvm/lib/Transforms/InstCombine/
DInstCombineSelect.cpp317 Value *CmpRHS = IC->getOperand(1); in foldSelectICmpAndOr() local
319 if (!match(CmpRHS, m_Zero())) in foldSelectICmpAndOr()
374 Value *CmpRHS = ICI->getOperand(1); in foldSelectCttzCtlz() local
377 if (!ICI->isEquality() || !match(CmpRHS, m_Zero())) in foldSelectCttzCtlz()
420 Value *CmpRHS = ICI->getOperand(1); in visitSelectInstWithICmp() local
428 if (ConstantInt *CI = dyn_cast<ConstantInt>(CmpRHS)) { in visitSelectInstWithICmp()
455 else if (CmpRHS->getType()->getScalarSizeInBits() in visitSelectInstWithICmp()
493 CmpRHS = AdjustedRHS; in visitSelectInstWithICmp()
497 ICI->setOperand(1, CmpRHS); in visitSelectInstWithICmp()
518 if (ConstantInt *Cmp = dyn_cast<ConstantInt>(CmpRHS)) { in visitSelectInstWithICmp()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/InstCombine/
DInstCombineSelect.cpp507 Value *CmpRHS = IC->getOperand(1); in foldSelectICmpAndOr() local
514 if (!match(CmpRHS, m_Zero())) in foldSelectICmpAndOr()
529 if ((IsEqualZero && !match(CmpRHS, m_AllOnes())) || in foldSelectICmpAndOr()
530 (!IsEqualZero && !match(CmpRHS, m_Zero()))) in foldSelectICmpAndOr()
656 Value *CmpRHS = ICI->getOperand(1); in foldSelectCttzCtlz() local
659 if (!ICI->isEquality() || !match(CmpRHS, m_Zero())) in foldSelectCttzCtlz()
700 Value *CmpRHS = Cmp.getOperand(1); in adjustMinMax() local
706 if (!Cmp.hasOneUse() || !match(CmpRHS, m_APInt(CmpC))) in adjustMinMax()
718 AdjustedRHS = ConstantInt::get(CmpRHS->getType(), *CmpC + 1); in adjustMinMax()
720 AdjustedRHS = ConstantInt::get(CmpRHS->getType(), *CmpC - 1); in adjustMinMax()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Analysis/
DValueTracking.cpp4261 Value *CmpLHS, Value *CmpRHS, in matchFastFloatClamp() argument
4270 if (CmpRHS == FalseVal) { in matchFastFloatClamp()
4280 if (CmpRHS != TrueVal || !match(CmpRHS, m_APFloat(FC1)) || !FC1->isFinite()) in matchFastFloatClamp()
4315 Value *CmpLHS, Value *CmpRHS, in matchClamp() argument
4318 if (CmpRHS != TrueVal) { in matchClamp()
4323 if (CmpRHS == TrueVal && match(CmpRHS, m_APInt(C1))) { in matchClamp()
4351 Value *CmpLHS, Value *CmpRHS, in matchMinMaxOfMinMax() argument
4374 std::swap(CmpLHS, CmpRHS); in matchMinMaxOfMinMax()
4382 std::swap(CmpLHS, CmpRHS); in matchMinMaxOfMinMax()
4390 std::swap(CmpLHS, CmpRHS); in matchMinMaxOfMinMax()
[all …]
DInstructionSimplify.cpp2104 Value *CmpLHS = Cmp->getOperand(0), *CmpRHS = Cmp->getOperand(1); in ExtractEquivalentCondition() local
2105 if (Pred == Cmp->getPredicate() && LHS == CmpLHS && RHS == CmpRHS) in ExtractEquivalentCondition()
2108 LHS == CmpRHS && RHS == CmpLHS) in ExtractEquivalentCondition()
3746 static Value *simplifySelectWithFakeICmpEq(Value *CmpLHS, Value *CmpRHS, in simplifySelectWithFakeICmpEq() argument
3751 if (!decomposeBitTestICmp(CmpLHS, CmpRHS, Pred, X, Mask)) in simplifySelectWithFakeICmpEq()
3764 Value *CmpLHS, *CmpRHS; in simplifySelectWithICmpCond() local
3765 if (!match(CondVal, m_ICmp(Pred, m_Value(CmpLHS), m_Value(CmpRHS)))) in simplifySelectWithICmpCond()
3768 if (ICmpInst::isEquality(Pred) && match(CmpRHS, m_Zero())) { in simplifySelectWithICmpCond()
3778 if (Value *V = simplifySelectWithFakeICmpEq(CmpLHS, CmpRHS, Pred, in simplifySelectWithICmpCond()
3786 if (SimplifyWithOpReplaced(FalseVal, CmpLHS, CmpRHS, Q, MaxRecurse) == in simplifySelectWithICmpCond()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Scalar/
DAlignmentFromAssumptions.cpp216 Value *CmpRHS = ICI->getOperand(1); in extractAlignmentInfo() local
218 const SCEV *CmpRHSSCEV = SE->getSCEV(CmpRHS); in extractAlignmentInfo()
220 std::swap(CmpLHS, CmpRHS); in extractAlignmentInfo()
DGuardWidening.cpp558 Value *CmpLHS = IC->getOperand(0), *CmpRHS = IC->getOperand(1); in parseRangeChecks() local
560 std::swap(CmpLHS, CmpRHS); in parseRangeChecks()
565 CmpLHS, cast<ConstantInt>(ConstantInt::getNullValue(CmpRHS->getType())), in parseRangeChecks()
566 CmpRHS, IC); in parseRangeChecks()
DJumpThreading.cpp752 Value *CmpRHS = Cmp->getOperand(1); in ComputeValueKnownInPredecessors() local
757 PN = dyn_cast<PHINode>(CmpRHS); in ComputeValueKnownInPredecessors()
771 RHS = CmpRHS->DoPHITranslation(BB, PredBB); in ComputeValueKnownInPredecessors()
804 if (isa<Constant>(CmpRHS) && !CmpType->isVectorTy()) { in ComputeValueKnownInPredecessors()
805 Constant *CmpConst = cast<Constant>(CmpRHS); in ComputeValueKnownInPredecessors()
DIndVarSimplify.cpp1655 Value *CmpRHS; in calculatePostIncRange() local
1657 m_Value(CmpRHS)))) in calculatePostIncRange()
1663 auto CmpRHSRange = SE->getSignedRange(SE->getSCEV(CmpRHS)); in calculatePostIncRange()
DGVN.cpp1441 Value *CmpRHS = CmpI->getOperand(1); in processAssumeIntrinsic() local
1443 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic()
1444 auto *RHSConst = dyn_cast<Constant>(CmpRHS); in processAssumeIntrinsic()
/external/llvm/lib/Transforms/Scalar/
DGuardWidening.cpp501 Value *CmpLHS = IC->getOperand(0), *CmpRHS = IC->getOperand(1); in parseRangeChecks() local
503 std::swap(CmpLHS, CmpRHS); in parseRangeChecks()
508 CmpLHS, cast<ConstantInt>(ConstantInt::getNullValue(CmpRHS->getType())), in parseRangeChecks()
509 CmpRHS, IC); in parseRangeChecks()
DAlignmentFromAssumptions.cpp216 Value *CmpRHS = ICI->getOperand(1); in extractAlignmentInfo() local
218 const SCEV *CmpRHSSCEV = SE->getSCEV(CmpRHS); in extractAlignmentInfo()
220 std::swap(CmpLHS, CmpRHS); in extractAlignmentInfo()
DGVN.cpp1726 Value *CmpRHS = CmpI->getOperand(1); in processAssumeIntrinsic() local
1728 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic()
1729 auto *RHSConst = dyn_cast<Constant>(CmpRHS); in processAssumeIntrinsic()
/external/llvm/lib/Target/X86/
DX86FastISel.cpp1579 const Value *CmpRHS = CI->getOperand(1); in X86SelectBranch() local
1586 const auto *CmpRHSC = dyn_cast<ConstantFP>(CmpRHS); in X86SelectBranch()
1588 CmpRHS = CmpLHS; in X86SelectBranch()
1620 std::swap(CmpLHS, CmpRHS); in X86SelectBranch()
1623 if (!X86FastEmitCompare(CmpLHS, CmpRHS, VT, CI->getDebugLoc())) in X86SelectBranch()
1980 const Value *CmpRHS = CI->getOperand(1); in X86FastEmitCMoveSelect() local
1982 std::swap(CmpLHS, CmpRHS); in X86FastEmitCMoveSelect()
1986 if (!X86FastEmitCompare(CmpLHS, CmpRHS, CmpVT, CI->getDebugLoc())) in X86FastEmitCMoveSelect()
2070 const Value *CmpRHS = CI->getOperand(1); in X86FastEmitSSESelect() local
2077 const auto *CmpRHSC = dyn_cast<ConstantFP>(CmpRHS); in X86FastEmitSSESelect()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/X86/
DX86FastISel.cpp1660 const Value *CmpRHS = CI->getOperand(1); in X86SelectBranch() local
1667 const auto *CmpRHSC = dyn_cast<ConstantFP>(CmpRHS); in X86SelectBranch()
1669 CmpRHS = CmpLHS; in X86SelectBranch()
1702 std::swap(CmpLHS, CmpRHS); in X86SelectBranch()
1705 if (!X86FastEmitCompare(CmpLHS, CmpRHS, VT, CI->getDebugLoc())) in X86SelectBranch()
2074 const Value *CmpRHS = CI->getOperand(1); in X86FastEmitCMoveSelect() local
2076 std::swap(CmpLHS, CmpRHS); in X86FastEmitCMoveSelect()
2080 if (!X86FastEmitCompare(CmpLHS, CmpRHS, CmpVT, CI->getDebugLoc())) in X86FastEmitCMoveSelect()
2176 const Value *CmpRHS = CI->getOperand(1); in X86FastEmitSSESelect() local
2183 const auto *CmpRHSC = dyn_cast<ConstantFP>(CmpRHS); in X86FastEmitSSESelect()
[all …]
/external/llvm/lib/Analysis/
DInstructionSimplify.cpp1937 Value *CmpLHS = Cmp->getOperand(0), *CmpRHS = Cmp->getOperand(1); in ExtractEquivalentCondition() local
1938 if (Pred == Cmp->getPredicate() && LHS == CmpLHS && RHS == CmpRHS) in ExtractEquivalentCondition()
1941 LHS == CmpRHS && RHS == CmpLHS) in ExtractEquivalentCondition()
3406 Value *CmpRHS = ICI->getOperand(1); in SimplifySelectInst() local
3414 match(CmpRHS, m_Zero())) { in SimplifySelectInst()
3417 } else if (Pred == ICmpInst::ICMP_SLT && match(CmpRHS, m_Zero())) { in SimplifySelectInst()
3422 } else if (Pred == ICmpInst::ICMP_SGT && match(CmpRHS, m_AllOnes())) { in SimplifySelectInst()
3456 if (match(CmpRHS, m_APInt(C))) { in SimplifySelectInst()
3476 if (SimplifyWithOpReplaced(FalseVal, CmpLHS, CmpRHS, Q, MaxRecurse) == in SimplifySelectInst()
3478 SimplifyWithOpReplaced(FalseVal, CmpRHS, CmpLHS, Q, MaxRecurse) == in SimplifySelectInst()
[all …]
DValueTracking.cpp3708 Value *CmpLHS, Value *CmpRHS, in matchSelectPattern() argument
3712 RHS = CmpRHS; in matchSelectPattern()
3725 !isKnownNonZero(CmpRHS)) in matchSelectPattern()
3739 bool RHSSafe = isKnownNonNaN(CmpRHS, FMF); in matchSelectPattern()
3771 if (TrueVal == CmpRHS && FalseVal == CmpLHS) { in matchSelectPattern()
3772 std::swap(CmpLHS, CmpRHS); in matchSelectPattern()
3782 if (TrueVal == CmpLHS && FalseVal == CmpRHS) { in matchSelectPattern()
3804 if (ConstantInt *C1 = dyn_cast<ConstantInt>(CmpRHS)) { in matchSelectPattern()
3909 Value *CmpRHS = CmpI->getOperand(1); in matchSelectPattern() local
3923 return ::matchSelectPattern(Pred, FMF, CmpLHS, CmpRHS, in matchSelectPattern()
[all …]
/external/swiftshader/third_party/LLVM/lib/CodeGen/SelectionDAG/
DSelectionDAGBuilder.h211 : CC(cc), CmpLHS(cmplhs), CmpMHS(cmpmiddle), CmpRHS(cmprhs), in CC()
221 const Value *CmpLHS, *CmpMHS, *CmpRHS; member
DSelectionDAGBuilder.cpp1424 Cases[0].CmpRHS == Cases[1].CmpRHS) || in ShouldEmitAsBranches()
1425 (Cases[0].CmpRHS == Cases[1].CmpLHS && in ShouldEmitAsBranches()
1426 Cases[0].CmpLHS == Cases[1].CmpRHS)) { in ShouldEmitAsBranches()
1432 if (Cases[0].CmpRHS == Cases[1].CmpRHS && in ShouldEmitAsBranches()
1434 isa<Constant>(Cases[0].CmpRHS) && in ShouldEmitAsBranches()
1435 cast<Constant>(Cases[0].CmpRHS)->isNullValue()) { in ShouldEmitAsBranches()
1507 ExportFromCurrentBlock(SwitchCases[i].CmpRHS); in visitBr()
1546 if (CB.CmpRHS == ConstantInt::getTrue(*DAG.getContext()) && in visitSwitchCase()
1549 else if (CB.CmpRHS == ConstantInt::getFalse(*DAG.getContext()) && in visitSwitchCase()
1554 Cond = DAG.getSetCC(dl, MVT::i1, CondLHS, getValue(CB.CmpRHS), CB.CC); in visitSwitchCase()
[all …]
/external/llvm/lib/CodeGen/SelectionDAG/
DSelectionDAGBuilder.h224 : CC(cc), CmpLHS(cmplhs), CmpMHS(cmpmiddle), CmpRHS(cmprhs), in CC()
234 const Value *CmpLHS, *CmpMHS, *CmpRHS; member
DSelectionDAGBuilder.cpp1763 Cases[0].CmpRHS == Cases[1].CmpRHS) || in ShouldEmitAsBranches()
1764 (Cases[0].CmpRHS == Cases[1].CmpLHS && in ShouldEmitAsBranches()
1765 Cases[0].CmpLHS == Cases[1].CmpRHS)) { in ShouldEmitAsBranches()
1771 if (Cases[0].CmpRHS == Cases[1].CmpRHS && in ShouldEmitAsBranches()
1773 isa<Constant>(Cases[0].CmpRHS) && in ShouldEmitAsBranches()
1774 cast<Constant>(Cases[0].CmpRHS)->isNullValue()) { in ShouldEmitAsBranches()
1843 ExportFromCurrentBlock(SwitchCases[i].CmpRHS); in visitBr()
1882 if (CB.CmpRHS == ConstantInt::getTrue(*DAG.getContext()) && in visitSwitchCase()
1885 else if (CB.CmpRHS == ConstantInt::getFalse(*DAG.getContext()) && in visitSwitchCase()
1890 Cond = DAG.getSetCC(dl, MVT::i1, CondLHS, getValue(CB.CmpRHS), CB.CC); in visitSwitchCase()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/CodeGen/SelectionDAG/
DSelectionDAGBuilder.h235 const Value *CmpLHS, *CmpMHS, *CmpRHS; member
256 : CC(cc), CmpLHS(cmplhs), CmpMHS(cmpmiddle), CmpRHS(cmprhs), in CC()
DSelectionDAGBuilder.cpp1944 Cases[0].CmpRHS == Cases[1].CmpRHS) || in ShouldEmitAsBranches()
1945 (Cases[0].CmpRHS == Cases[1].CmpLHS && in ShouldEmitAsBranches()
1946 Cases[0].CmpLHS == Cases[1].CmpRHS)) { in ShouldEmitAsBranches()
1952 if (Cases[0].CmpRHS == Cases[1].CmpRHS && in ShouldEmitAsBranches()
1954 isa<Constant>(Cases[0].CmpRHS) && in ShouldEmitAsBranches()
1955 cast<Constant>(Cases[0].CmpRHS)->isNullValue()) { in ShouldEmitAsBranches()
2024 ExportFromCurrentBlock(SwitchCases[i].CmpRHS); in visitBr()
2063 if (CB.CmpRHS == ConstantInt::getTrue(*DAG.getContext()) && in visitSwitchCase()
2066 else if (CB.CmpRHS == ConstantInt::getFalse(*DAG.getContext()) && in visitSwitchCase()
2071 Cond = DAG.getSetCC(dl, MVT::i1, CondLHS, getValue(CB.CmpRHS), CB.CC); in visitSwitchCase()
[all …]
/external/swiftshader/third_party/LLVM/lib/Analysis/
DInstructionSimplify.cpp1410 Value *CmpLHS = Cmp->getOperand(0), *CmpRHS = Cmp->getOperand(1); in ExtractEquivalentCondition() local
1411 if (Pred == Cmp->getPredicate() && LHS == CmpLHS && RHS == CmpRHS) in ExtractEquivalentCondition()
1414 LHS == CmpRHS && RHS == CmpLHS) in ExtractEquivalentCondition()

12