Home
last modified time | relevance | path

Searched refs:IsAnd (Results 1 – 14 of 14) sorted by relevance

/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DOverflowInstAnalysis.cpp21 bool llvm::isCheckForZeroAndMulWithOverflow(Value *Op0, Value *Op1, bool IsAnd, in isCheckForZeroAndMulWithOverflow() argument
55 (IsAnd && Pred == ICmpInst::Predicate::ICMP_NE && in isCheckForZeroAndMulWithOverflow()
57 (!IsAnd && Pred == ICmpInst::Predicate::ICMP_EQ && in isCheckForZeroAndMulWithOverflow()
68 bool IsAnd) { in isCheckForZeroAndMulWithOverflow() argument
70 return isCheckForZeroAndMulWithOverflow(Op0, Op1, IsAnd, Y); in isCheckForZeroAndMulWithOverflow()
H A DInstructionSimplify.cpp1558 ICmpInst *UnsignedICmp, bool IsAnd, in simplifyUnsignedRangeCheck() argument
1578 EqPred == ICmpInst::ICMP_NE && !IsAnd) in simplifyUnsignedRangeCheck()
1583 EqPred == ICmpInst::ICMP_EQ && IsAnd) in simplifyUnsignedRangeCheck()
1590 return IsAnd ? UnsignedICmp : ZeroICmp; in simplifyUnsignedRangeCheck()
1596 return IsAnd ? ZeroICmp : UnsignedICmp; in simplifyUnsignedRangeCheck()
1604 if (UnsignedPred == ICmpInst::ICMP_UGE && IsAnd && in simplifyUnsignedRangeCheck()
1607 if (UnsignedPred == ICmpInst::ICMP_ULT && !IsAnd && in simplifyUnsignedRangeCheck()
1627 return IsAnd ? ZeroICmp : UnsignedICmp; in simplifyUnsignedRangeCheck()
1633 return IsAnd ? UnsignedICmp : ZeroICmp; in simplifyUnsignedRangeCheck()
1643 return IsAnd ? UnsignedICmp : ZeroICmp; in simplifyUnsignedRangeCheck()
[all …]
H A DLazyValueInfo.cpp1288 bool IsAnd; in getValueFromCondition() local
1290 IsAnd = true; in getValueFromCondition()
1292 IsAnd = false; in getValueFromCondition()
1309 if (IsTrueDest ^ IsAnd) { in getValueFromCondition()
H A DScalarEvolution.cpp9035 bool IsAnd = false; in computeExitLimitFromCondFromBinOp() local
9037 IsAnd = true; in computeExitLimitFromCondFromBinOp()
9039 IsAnd = false; in computeExitLimitFromCondFromBinOp()
9046 bool EitherMayExit = IsAnd ^ ExitIfTrue; in computeExitLimitFromCondFromBinOp()
9055 const Constant *NeutralElement = ConstantInt::get(ExitCond->getType(), IsAnd); in computeExitLimitFromCondFromBinOp()
H A DValueTracking.cpp903 bool IsAnd = false; in getKnownBitsFromAndXorOr() local
910 IsAnd = true; in getKnownBitsFromAndXorOr()
959 if (IsAnd) in getKnownBitsFromAndXorOr()
/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DOverflowInstAnalysis.h38 bool isCheckForZeroAndMulWithOverflow(Value *Op0, Value *Op1, bool IsAnd,
40 bool isCheckForZeroAndMulWithOverflow(Value *Op0, Value *Op1, bool IsAnd);
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineAndOrXor.cpp329 ICmpInst *LHS, ICmpInst *RHS, bool IsAnd, Value *A, Value *B, Value *C, in foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed() argument
347 ICmpInst::Predicate NewCC = IsAnd ? ICmpInst::ICMP_EQ : ICmpInst::ICMP_NE; in foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed()
421 return ConstantInt::get(LHS->getType(), !IsAnd); in foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed()
443 return ConstantInt::get(LHS->getType(), !IsAnd); in foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed()
451 ICmpInst *LHS, ICmpInst *RHS, bool IsAnd, Value *A, Value *B, Value *C, in foldLogOpOfMaskedICmpsAsymmetric() argument
461 if (!IsAnd) { in foldLogOpOfMaskedICmpsAsymmetric()
467 LHS, RHS, IsAnd, A, B, C, D, E, in foldLogOpOfMaskedICmpsAsymmetric()
473 RHS, LHS, IsAnd, A, D, E, B, C, in foldLogOpOfMaskedICmpsAsymmetric()
483 static Value *foldLogOpOfMaskedICmps(ICmpInst *LHS, ICmpInst *RHS, bool IsAnd, in foldLogOpOfMaskedICmps() argument
501 LHS, RHS, IsAnd, A, B, C, D, E, PredL, PredR, LHSMask, RHSMask, in foldLogOpOfMaskedICmps()
[all …]
H A DInstCombineInternal.h414 bool IsAnd, bool IsLogical = false);
417 Value *foldEqOfParts(ICmpInst *Cmp0, ICmpInst *Cmp1, bool IsAnd);
420 bool IsAnd);
425 Value *foldLogicOfFCmps(FCmpInst *LHS, FCmpInst *RHS, bool IsAnd,
435 Instruction *CxtI, bool IsAnd,
453 bool IsAnd);
H A DInstCombineSelect.cpp2811 bool IsAnd) { in foldAndOrOfSelectUsingImpliedCond() argument
2816 if (Value *V = simplifyNestedSelectsUsingImpliedCond(SI, Op, IsAnd, DL)) in foldAndOrOfSelectUsingImpliedCond()
2818 IsAnd ? V : ConstantInt::getTrue(Op->getType()), in foldAndOrOfSelectUsingImpliedCond()
2819 IsAnd ? ConstantInt::getFalse(Op->getType()) : V); in foldAndOrOfSelectUsingImpliedCond()
3308 bool IsAnd = match(FalseVal, m_Zero()) ? true : false; in foldSelectOfBools() local
3309 Value *Op1 = IsAnd ? TrueVal : FalseVal; in foldSelectOfBools()
3310 if (isCheckForZeroAndMulWithOverflow(CondVal, Op1, IsAnd, Y)) { in foldSelectOfBools()
3319 if (auto *V = foldAndOrOfICmps(ICmp0, ICmp1, SI, IsAnd, in foldSelectOfBools()
4040 auto FoldSelectWithAndOrCond = [&](bool IsAnd, Value *A, in visitSelectInst()
4044 return SelectInst::Create(A, IsAnd ? V : TrueVal, IsAnd ? FalseVal : V); in visitSelectInst()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DConstraintElimination.cpp1143 bool IsAnd = match(Cond, m_LogicalAnd()); in addInfoFor() local
1146 if (IsOr && IsAnd) in addInfoFor()
1147 IsAnd = false; in addInfoFor()
1174 if (IsAnd && match(Cur, m_LogicalAnd(m_Value(Op0), m_Value(Op1)))) { in addInfoFor()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/
H A DCombinerHelper.cpp6984 bool IsAnd = Logic->getOpcode() == TargetOpcode::G_AND; in tryFoldAndOrOrICmpsUsingRanges() local
7064 IsAnd ? ICmpInst::getInversePredicate(Pred1) : Pred1, C1); in tryFoldAndOrOrICmpsUsingRanges()
7069 IsAnd ? ICmpInst::getInversePredicate(Pred2) : Pred2, C2); in tryFoldAndOrOrICmpsUsingRanges()
7094 if (IsAnd) in tryFoldAndOrOrICmpsUsingRanges()
7146 bool IsAnd = Logic->getOpcode() == TargetOpcode::G_AND; in tryFoldLogicOfFCmps() local
7188 unsigned NewPred = IsAnd ? CmpCodeL & CmpCodeR : CmpCodeL | CmpCodeR; in tryFoldLogicOfFCmps()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/
H A DDAGCombiner.cpp602 SDValue foldLogicOfSetCCs(bool IsAnd, SDValue N0, SDValue N1,
5941 SDValue DAGCombiner::foldLogicOfSetCCs(bool IsAnd, SDValue N0, SDValue N1, in foldLogicOfSetCCs() argument
5973 bool AndEqZero = IsAnd && CC1 == ISD::SETEQ && IsZero; in foldLogicOfSetCCs()
5975 bool AndGtNeg1 = IsAnd && CC1 == ISD::SETGT && IsNeg1; in foldLogicOfSetCCs()
5977 bool OrNeZero = !IsAnd && CC1 == ISD::SETNE && IsZero; in foldLogicOfSetCCs()
5979 bool OrLtZero = !IsAnd && CC1 == ISD::SETLT && IsZero; in foldLogicOfSetCCs()
5992 bool AndEqNeg1 = IsAnd && CC1 == ISD::SETEQ && IsNeg1; in foldLogicOfSetCCs()
5994 bool AndLtZero = IsAnd && CC1 == ISD::SETLT && IsZero; in foldLogicOfSetCCs()
5996 bool OrNeNeg1 = !IsAnd && CC1 == ISD::SETNE && IsNeg1; in foldLogicOfSetCCs()
5998 bool OrGtNeg1 = !IsAnd && CC1 == ISD::SETGT && IsNeg1; in foldLogicOfSetCCs()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/RISCV/
H A DRISCVISelLowering.cpp13554 bool IsAnd = N->getOpcode() == ISD::AND; in combineDeMorganOfBoolean()
13569 if (!isOneConstant(N11) && !(IsAnd && isAllOnesConstant(N11))) in combineDeMorganOfBoolean()
13573 if (!(IsAnd && isAllOnesConstant(N01))) in combineDeMorganOfBoolean()
13590 unsigned Opc = IsAnd ? ISD::OR : ISD::AND; in combineDeMorganOfBoolean()
15717 bool IsAnd = Cond.getOpcode() == ISD::AND; in tryDemorganOfBooleanCondition()
15718 if (!IsAnd && Cond.getOpcode() != ISD::OR) in tryDemorganOfBooleanCondition()
15737 if (!isOneConstant(Xor1) && !(IsAnd && isAllOnesConstant(Xor1))) in tryDemorganOfBooleanCondition()
15770 unsigned Opc = IsAnd ? ISD::OR : ISD::AND;
13551 bool IsAnd = N->getOpcode() == ISD::AND; combineDeMorganOfBoolean() local
15714 bool IsAnd = Cond.getOpcode() == ISD::AND; tryDemorganOfBooleanCondition() local
/freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/
H A DAArch64ISelLowering.cpp13724 bool IsAnd = And.getOpcode() == ISD::AND; in tryLowerToSLI() local
13747 if (IsAnd) { in tryLowerToSLI()