Home
last modified time | relevance | path

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

/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 …]
DInstCombineCompares.cpp1188 ConstantInt *CmpRHS = cast<ConstantInt>(ICI.getOperand(1)); in FoldICmpDivCst() local
1189 const APInt &CmpRHSV = CmpRHS->getValue(); in FoldICmpDivCst()
1216 Constant *Prod = ConstantExpr::getMul(CmpRHS, DivRHS); in FoldICmpDivCst()
1222 ConstantExpr::getUDiv(Prod, DivRHS)) != CmpRHS; in FoldICmpDivCst()
/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 …]
DX86ISelLowering.cpp26960 SDValue CmpRHS = Cmp.getOperand(1); in combineSetCCAtomicArith() local
26965 auto *CmpRHSC = dyn_cast<ConstantSDNode>(CmpRHS); in combineSetCCAtomicArith()
/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 …]
DTargetLowering.cpp1872 SDValue CmpRHS = DAG.getConstant(C1.lshr(ShiftBits), dl, CmpTy); in SimplifySetCC() local
1873 return DAG.getSetCC(dl, VT, Shift, CmpRHS, Cond); in SimplifySetCC()
1903 SDValue CmpRHS = DAG.getConstant(NewC, dl, CmpTy); in SimplifySetCC() local
1904 return DAG.getSetCC(dl, VT, Shift, CmpRHS, NewCond); in SimplifySetCC()
/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()