Home
last modified time | relevance | path

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

12

/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-10.0/llvm/lib/Transforms/InstCombine/
DInstCombineSelect.cpp544 Value *CmpRHS = IC->getOperand(1); in foldSelectICmpLshrAshr() local
545 if (!CmpRHS->getType()->isIntOrIntVectorTy()) in foldSelectICmpLshrAshr()
549 unsigned Bitwidth = CmpRHS->getType()->getScalarSizeInBits(); in foldSelectICmpLshrAshr()
551 !match(CmpRHS, in foldSelectICmpLshrAshr()
554 !match(CmpRHS, in foldSelectICmpLshrAshr()
597 Value *CmpRHS = IC->getOperand(1); in foldSelectICmpAndOr() local
604 if (!match(CmpRHS, m_Zero())) in foldSelectICmpAndOr()
619 if ((IsEqualZero && !match(CmpRHS, m_AllOnes())) || in foldSelectICmpAndOr()
620 (!IsEqualZero && !match(CmpRHS, m_Zero()))) in foldSelectICmpAndOr()
854 Value *CmpRHS = ICI->getOperand(1); in foldSelectCttzCtlz() local
[all …]
/external/llvm-project/llvm/lib/Transforms/InstCombine/
DInstCombineSelect.cpp524 Value *CmpRHS = IC->getOperand(1); in foldSelectICmpLshrAshr() local
525 if (!CmpRHS->getType()->isIntOrIntVectorTy()) in foldSelectICmpLshrAshr()
529 unsigned Bitwidth = CmpRHS->getType()->getScalarSizeInBits(); in foldSelectICmpLshrAshr()
531 !match(CmpRHS, in foldSelectICmpLshrAshr()
534 !match(CmpRHS, in foldSelectICmpLshrAshr()
577 Value *CmpRHS = IC->getOperand(1); in foldSelectICmpAndOr() local
584 if (!match(CmpRHS, m_Zero())) in foldSelectICmpAndOr()
599 if ((IsEqualZero && !match(CmpRHS, m_AllOnes())) || in foldSelectICmpAndOr()
600 (!IsEqualZero && !match(CmpRHS, m_Zero()))) in foldSelectICmpAndOr()
868 Value *CmpRHS = ICI->getOperand(1); in foldSelectCttzCtlz() local
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Analysis/
DValueTracking.cpp4661 Value *CmpLHS, Value *CmpRHS, in matchFastFloatClamp() argument
4670 if (CmpRHS == FalseVal) { in matchFastFloatClamp()
4680 if (CmpRHS != TrueVal || !match(CmpRHS, m_APFloat(FC1)) || !FC1->isFinite()) in matchFastFloatClamp()
4715 Value *CmpLHS, Value *CmpRHS, in matchClamp() argument
4718 if (CmpRHS != TrueVal) { in matchClamp()
4723 if (CmpRHS == TrueVal && match(CmpRHS, m_APInt(C1))) { in matchClamp()
4751 Value *CmpLHS, Value *CmpRHS, in matchMinMaxOfMinMax() argument
4774 std::swap(CmpLHS, CmpRHS); in matchMinMaxOfMinMax()
4782 std::swap(CmpLHS, CmpRHS); in matchMinMaxOfMinMax()
4790 std::swap(CmpLHS, CmpRHS); in matchMinMaxOfMinMax()
[all …]
DInstructionSimplify.cpp2303 Value *CmpLHS = Cmp->getOperand(0), *CmpRHS = Cmp->getOperand(1); in ExtractEquivalentCondition() local
2304 if (Pred == Cmp->getPredicate() && LHS == CmpLHS && RHS == CmpRHS) in ExtractEquivalentCondition()
2307 LHS == CmpRHS && RHS == CmpLHS) in ExtractEquivalentCondition()
3840 static Value *simplifySelectWithFakeICmpEq(Value *CmpLHS, Value *CmpRHS, in simplifySelectWithFakeICmpEq() argument
3845 if (!decomposeBitTestICmp(CmpLHS, CmpRHS, Pred, X, Mask)) in simplifySelectWithFakeICmpEq()
3858 Value *CmpLHS, *CmpRHS; in simplifySelectWithICmpCond() local
3859 if (!match(CondVal, m_ICmp(Pred, m_Value(CmpLHS), m_Value(CmpRHS)))) in simplifySelectWithICmpCond()
3862 if (ICmpInst::isEquality(Pred) && match(CmpRHS, m_Zero())) { in simplifySelectWithICmpCond()
3911 if (Value *V = simplifySelectWithFakeICmpEq(CmpLHS, CmpRHS, Pred, in simplifySelectWithICmpCond()
3919 if (SimplifyWithOpReplaced(FalseVal, CmpLHS, CmpRHS, Q, MaxRecurse) == in simplifySelectWithICmpCond()
[all …]
/external/llvm-project/llvm/lib/Analysis/
DValueTracking.cpp5267 Value *CmpLHS, Value *CmpRHS, in matchFastFloatClamp() argument
5276 if (CmpRHS == FalseVal) { in matchFastFloatClamp()
5286 if (CmpRHS != TrueVal || !match(CmpRHS, m_APFloat(FC1)) || !FC1->isFinite()) in matchFastFloatClamp()
5321 Value *CmpLHS, Value *CmpRHS, in matchClamp() argument
5324 if (CmpRHS != TrueVal) { in matchClamp()
5329 if (CmpRHS == TrueVal && match(CmpRHS, m_APInt(C1))) { in matchClamp()
5357 Value *CmpLHS, Value *CmpRHS, in matchMinMaxOfMinMax() argument
5380 std::swap(CmpLHS, CmpRHS); in matchMinMaxOfMinMax()
5388 std::swap(CmpLHS, CmpRHS); in matchMinMaxOfMinMax()
5396 std::swap(CmpLHS, CmpRHS); in matchMinMaxOfMinMax()
[all …]
DInstructionSimplify.cpp2363 Value *CmpLHS = Cmp->getOperand(0), *CmpRHS = Cmp->getOperand(1); in ExtractEquivalentCondition() local
2364 if (Pred == Cmp->getPredicate() && LHS == CmpLHS && RHS == CmpRHS) in ExtractEquivalentCondition()
2367 LHS == CmpRHS && RHS == CmpLHS) in ExtractEquivalentCondition()
3962 static Value *simplifySelectWithFakeICmpEq(Value *CmpLHS, Value *CmpRHS, in simplifySelectWithFakeICmpEq() argument
3967 if (!decomposeBitTestICmp(CmpLHS, CmpRHS, Pred, X, Mask)) in simplifySelectWithFakeICmpEq()
3980 Value *CmpLHS, *CmpRHS; in simplifySelectWithICmpCond() local
3981 if (!match(CondVal, m_ICmp(Pred, m_Value(CmpLHS), m_Value(CmpRHS)))) in simplifySelectWithICmpCond()
3990 if (Pred == ICmpInst::ICMP_EQ && match(CmpRHS, m_Zero())) { in simplifySelectWithICmpCond()
4032 if (Value *V = simplifySelectWithFakeICmpEq(CmpLHS, CmpRHS, Pred, in simplifySelectWithICmpCond()
4040 if (SimplifyWithOpReplaced(FalseVal, CmpLHS, CmpRHS, Q, in simplifySelectWithICmpCond()
[all …]
/external/llvm-project/llvm/include/llvm/CodeGen/
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),
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/CodeGen/
DSwitchLoweringUtils.h122 const Value *CmpLHS, *CmpMHS, *CmpRHS; member
144 : CC(cc), CmpLHS(cmplhs), CmpMHS(cmpmiddle), CmpRHS(cmprhs), in CC()
156 CmpRHS(cmprhs), TrueBB(truebb), FalseBB(falsebb), ThisBB(me),
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Scalar/
DAlignmentFromAssumptions.cpp214 Value *CmpRHS = ICI->getOperand(1); in extractAlignmentInfo() local
216 const SCEV *CmpRHSSCEV = SE->getSCEV(CmpRHS); in extractAlignmentInfo()
218 std::swap(CmpLHS, CmpRHS); in extractAlignmentInfo()
DGVN.cpp1511 Value *CmpRHS = CmpI->getOperand(1); in processAssumeIntrinsic() local
1517 if (isa<Constant>(CmpLHS) && !isa<Constant>(CmpRHS)) in processAssumeIntrinsic()
1518 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic()
1519 if (!isa<Instruction>(CmpLHS) && isa<Instruction>(CmpRHS)) in processAssumeIntrinsic()
1520 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic()
1521 if ((isa<Argument>(CmpLHS) && isa<Argument>(CmpRHS)) || in processAssumeIntrinsic()
1522 (isa<Instruction>(CmpLHS) && isa<Instruction>(CmpRHS))) { in processAssumeIntrinsic()
1526 uint32_t RVN = VN.lookupOrAdd(CmpRHS); in processAssumeIntrinsic()
1528 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic()
1533 if (isa<Constant>(CmpLHS) && isa<Constant>(CmpRHS)) in processAssumeIntrinsic()
[all …]
DGuardWidening.cpp601 const Value *CmpLHS = IC->getOperand(0), *CmpRHS = IC->getOperand(1); in parseRangeChecks() local
603 std::swap(CmpLHS, CmpRHS); in parseRangeChecks()
608 CmpLHS, cast<ConstantInt>(ConstantInt::getNullValue(CmpRHS->getType())), in parseRangeChecks()
609 CmpRHS, IC); in parseRangeChecks()
DJumpThreading.cpp772 Value *CmpRHS = Cmp->getOperand(1); in ComputeValueKnownInPredecessorsImpl() local
777 PN = dyn_cast<PHINode>(CmpRHS); in ComputeValueKnownInPredecessorsImpl()
791 RHS = CmpRHS->DoPHITranslation(BB, PredBB); in ComputeValueKnownInPredecessorsImpl()
824 if (isa<Constant>(CmpRHS) && !CmpType->isVectorTy()) { in ComputeValueKnownInPredecessorsImpl()
825 Constant *CmpConst = cast<Constant>(CmpRHS); in ComputeValueKnownInPredecessorsImpl()
/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()
/external/llvm-project/llvm/lib/Transforms/Scalar/
DGuardWidening.cpp601 const Value *CmpLHS = IC->getOperand(0), *CmpRHS = IC->getOperand(1); in parseRangeChecks() local
603 std::swap(CmpLHS, CmpRHS); in parseRangeChecks()
608 CmpLHS, cast<ConstantInt>(ConstantInt::getNullValue(CmpRHS->getType())), in parseRangeChecks()
609 CmpRHS, IC); in parseRangeChecks()
DGVN.cpp1688 Value *CmpRHS = CmpI->getOperand(1); in processAssumeIntrinsic() local
1694 if (isa<Constant>(CmpLHS) && !isa<Constant>(CmpRHS)) in processAssumeIntrinsic()
1695 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic()
1696 if (!isa<Instruction>(CmpLHS) && isa<Instruction>(CmpRHS)) in processAssumeIntrinsic()
1697 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic()
1698 if ((isa<Argument>(CmpLHS) && isa<Argument>(CmpRHS)) || in processAssumeIntrinsic()
1699 (isa<Instruction>(CmpLHS) && isa<Instruction>(CmpRHS))) { in processAssumeIntrinsic()
1703 uint32_t RVN = VN.lookupOrAdd(CmpRHS); in processAssumeIntrinsic()
1705 std::swap(CmpLHS, CmpRHS); in processAssumeIntrinsic()
1710 if (isa<Constant>(CmpLHS) && isa<Constant>(CmpRHS)) in processAssumeIntrinsic()
[all …]
DJumpThreading.cpp810 Value *CmpRHS = Cmp->getOperand(1); in computeValueKnownInPredecessorsImpl() local
815 PN = dyn_cast<PHINode>(CmpRHS); in computeValueKnownInPredecessorsImpl()
825 RHS = CmpRHS->DoPHITranslation(BB, PredBB); in computeValueKnownInPredecessorsImpl()
858 if (isa<Constant>(CmpRHS) && !CmpType->isVectorTy()) { in computeValueKnownInPredecessorsImpl()
859 Constant *CmpConst = cast<Constant>(CmpRHS); in computeValueKnownInPredecessorsImpl()
/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-10.0/llvm/lib/Target/X86/
DX86FastISel.cpp1649 const Value *CmpRHS = CI->getOperand(1); in X86SelectBranch() local
1656 const auto *CmpRHSC = dyn_cast<ConstantFP>(CmpRHS); in X86SelectBranch()
1658 CmpRHS = CmpLHS; in X86SelectBranch()
1689 std::swap(CmpLHS, CmpRHS); in X86SelectBranch()
1692 if (!X86FastEmitCompare(CmpLHS, CmpRHS, VT, CI->getDebugLoc())) in X86SelectBranch()
2059 const Value *CmpRHS = CI->getOperand(1); in X86FastEmitCMoveSelect() local
2061 std::swap(CmpLHS, CmpRHS); in X86FastEmitCMoveSelect()
2065 if (!X86FastEmitCompare(CmpLHS, CmpRHS, CmpVT, CI->getDebugLoc())) in X86FastEmitCMoveSelect()
2161 const Value *CmpRHS = CI->getOperand(1); in X86FastEmitSSESelect() local
2168 const auto *CmpRHSC = dyn_cast<ConstantFP>(CmpRHS); in X86FastEmitSSESelect()
[all …]
/external/llvm-project/llvm/lib/Target/X86/
DX86FastISel.cpp1665 const Value *CmpRHS = CI->getOperand(1); in X86SelectBranch() local
1672 const auto *CmpRHSC = dyn_cast<ConstantFP>(CmpRHS); in X86SelectBranch()
1674 CmpRHS = CmpLHS; in X86SelectBranch()
1705 std::swap(CmpLHS, CmpRHS); in X86SelectBranch()
1708 if (!X86FastEmitCompare(CmpLHS, CmpRHS, VT, CI->getDebugLoc())) in X86SelectBranch()
2075 const Value *CmpRHS = CI->getOperand(1); in X86FastEmitCMoveSelect() local
2077 std::swap(CmpLHS, CmpRHS); in X86FastEmitCMoveSelect()
2081 if (!X86FastEmitCompare(CmpLHS, CmpRHS, CmpVT, CI->getDebugLoc())) in X86FastEmitCMoveSelect()
2177 const Value *CmpRHS = CI->getOperand(1); in X86FastEmitSSESelect() local
2184 const auto *CmpRHSC = dyn_cast<ConstantFP>(CmpRHS); in X86FastEmitSSESelect()
[all …]
/external/llvm-project/llvm/lib/CodeGen/GlobalISel/
DIRTranslator.cpp538 Cases[0].CmpRHS == Cases[1].CmpRHS) || in shouldEmitAsBranches()
539 (Cases[0].CmpRHS == Cases[1].CmpLHS && in shouldEmitAsBranches()
540 Cases[0].CmpLHS == Cases[1].CmpRHS)) { in shouldEmitAsBranches()
546 if (Cases[0].CmpRHS == Cases[1].CmpRHS && in shouldEmitAsBranches()
548 isa<Constant>(Cases[0].CmpRHS) && in shouldEmitAsBranches()
549 cast<Constant>(Cases[0].CmpRHS)->isNullValue()) { in shouldEmitAsBranches()
827 const auto *CI = dyn_cast<ConstantInt>(CB.CmpRHS); in emitSwitchCase()
836 Register CondRHS = getOrCreateVReg(*CB.CmpRHS); in emitSwitchCase()
849 const APInt& High = cast<ConstantInt>(CB.CmpRHS)->getValue(); in emitSwitchCase()
853 Register CondRHS = getOrCreateVReg(*CB.CmpRHS); in emitSwitchCase()
/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/llvm/lib/CodeGen/SelectionDAG/
DSelectionDAGBuilder.h224 : CC(cc), CmpLHS(cmplhs), CmpMHS(cmpmiddle), CmpRHS(cmprhs), in CC()
234 const Value *CmpLHS, *CmpMHS, *CmpRHS; member

12