Home
last modified time | relevance | path

Searched refs:IsAnd (Results 1 – 15 of 15) 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.cpp1509 ICmpInst *UnsignedICmp, bool IsAnd, in simplifyUnsignedRangeCheck() argument
1529 EqPred == ICmpInst::ICMP_NE && !IsAnd) in simplifyUnsignedRangeCheck()
1534 EqPred == ICmpInst::ICMP_EQ && IsAnd) in simplifyUnsignedRangeCheck()
1541 return IsAnd ? UnsignedICmp : ZeroICmp; in simplifyUnsignedRangeCheck()
1547 return IsAnd ? ZeroICmp : UnsignedICmp; in simplifyUnsignedRangeCheck()
1555 if (UnsignedPred == ICmpInst::ICMP_UGE && IsAnd && in simplifyUnsignedRangeCheck()
1558 if (UnsignedPred == ICmpInst::ICMP_ULT && !IsAnd && in simplifyUnsignedRangeCheck()
1578 return IsAnd ? ZeroICmp : UnsignedICmp; in simplifyUnsignedRangeCheck()
1584 return IsAnd ? UnsignedICmp : ZeroICmp; in simplifyUnsignedRangeCheck()
1594 return IsAnd ? UnsignedICmp : ZeroICmp; in simplifyUnsignedRangeCheck()
[all …]
H A DLazyValueInfo.cpp1364 bool IsAnd; in getValueFromCondition() local
1366 IsAnd = true; in getValueFromCondition()
1368 IsAnd = false; in getValueFromCondition()
1385 if (IsTrueDest ^ IsAnd) { in getValueFromCondition()
H A DScalarEvolution.cpp9071 bool IsAnd = false; in computeExitLimitFromCondFromBinOp() local
9073 IsAnd = true; in computeExitLimitFromCondFromBinOp()
9075 IsAnd = false; in computeExitLimitFromCondFromBinOp()
9082 bool EitherMayExit = IsAnd ^ ExitIfTrue; in computeExitLimitFromCondFromBinOp()
9091 const Constant *NeutralElement = ConstantInt::get(ExitCond->getType(), IsAnd); in computeExitLimitFromCondFromBinOp()
H A DValueTracking.cpp983 bool IsAnd = false; in getKnownBitsFromAndXorOr() local
990 IsAnd = true; in getKnownBitsFromAndXorOr()
1039 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.cpp347 Value *LHS, Value *RHS, bool IsAnd, Value *A, Value *B, Value *D, Value *E, in foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed() argument
365 ICmpInst::Predicate NewCC = IsAnd ? ICmpInst::ICMP_EQ : ICmpInst::ICMP_NE; in foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed()
401 return Builder.CreateFCmp(IsAnd ? FCmpInst::FCMP_UNO : FCmpInst::FCMP_ORD, in foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed()
459 return ConstantInt::get(LHS->getType(), !IsAnd); in foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed()
489 return ConstantInt::get(LHS->getType(), !IsAnd); in foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed()
497 Value *LHS, Value *RHS, bool IsAnd, Value *A, Value *B, Value *C, Value *D, in foldLogOpOfMaskedICmpsAsymmetric() argument
507 if (!IsAnd) { in foldLogOpOfMaskedICmpsAsymmetric()
513 LHS, RHS, IsAnd, A, B, D, E, PredL, PredR, Builder)) { in foldLogOpOfMaskedICmpsAsymmetric()
518 RHS, LHS, IsAnd, A, D, B, C, PredR, PredL, Builder)) { in foldLogOpOfMaskedICmpsAsymmetric()
527 static Value *foldLogOpOfMaskedICmps(Value *LHS, Value *RHS, bool IsAnd, in foldLogOpOfMaskedICmps() argument
[all …]
H A DInstCombineInternal.h419 bool IsAnd, bool IsLogical = false);
422 Value *foldEqOfParts(Value *Cmp0, Value *Cmp1, bool IsAnd);
425 bool IsAnd);
430 Value *foldLogicOfFCmps(FCmpInst *LHS, FCmpInst *RHS, bool IsAnd,
436 Value *foldBooleanAndOr(Value *LHS, Value *RHS, Instruction &I, bool IsAnd,
440 bool IsAnd, bool RHSIsLogical);
465 bool IsAnd);
H A DInstCombineSelect.cpp2865 bool IsAnd) { in foldAndOrOfSelectUsingImpliedCond() argument
2870 if (Value *V = simplifyNestedSelectsUsingImpliedCond(SI, Op, IsAnd, DL)) in foldAndOrOfSelectUsingImpliedCond()
2872 IsAnd ? V : ConstantInt::getTrue(Op->getType()), in foldAndOrOfSelectUsingImpliedCond()
2873 IsAnd ? ConstantInt::getFalse(Op->getType()) : V); in foldAndOrOfSelectUsingImpliedCond()
3401 bool IsAnd = match(FalseVal, m_Zero()) ? true : false; in foldSelectOfBools() local
3402 Value *Op1 = IsAnd ? TrueVal : FalseVal; in foldSelectOfBools()
3403 if (isCheckForZeroAndMulWithOverflow(CondVal, Op1, IsAnd, Y)) { in foldSelectOfBools()
3410 if (auto *V = foldBooleanAndOr(CondVal, Op1, SI, IsAnd, in foldSelectOfBools()
4406 auto FoldSelectWithAndOrCond = [&](bool IsAnd, Value *A, in visitSelectInst()
4410 return SelectInst::Create(A, IsAnd ? V : TrueVal, IsAnd ? FalseVal : V); in visitSelectInst()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DConstraintElimination.cpp1204 bool IsAnd = match(Cond, m_LogicalAnd()); in addInfoFor() local
1207 if (IsOr && IsAnd) in addInfoFor()
1208 IsAnd = false; in addInfoFor()
1234 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.cpp7321 bool IsAnd = Logic->getOpcode() == TargetOpcode::G_AND; in tryFoldAndOrOrICmpsUsingRanges() local
7401 IsAnd ? ICmpInst::getInversePredicate(Pred1) : Pred1, C1); in tryFoldAndOrOrICmpsUsingRanges()
7406 IsAnd ? ICmpInst::getInversePredicate(Pred2) : Pred2, C2); in tryFoldAndOrOrICmpsUsingRanges()
7431 if (IsAnd) in tryFoldAndOrOrICmpsUsingRanges()
7483 bool IsAnd = Logic->getOpcode() == TargetOpcode::G_AND; in tryFoldLogicOfFCmps() local
7525 unsigned NewPred = IsAnd ? CmpCodeL & CmpCodeR : CmpCodeL | CmpCodeR; in tryFoldLogicOfFCmps()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/
H A DDAGCombiner.cpp606 SDValue foldLogicOfSetCCs(bool IsAnd, SDValue N0, SDValue N1,
6319 SDValue DAGCombiner::foldLogicOfSetCCs(bool IsAnd, SDValue N0, SDValue N1, in foldLogicOfSetCCs() argument
6351 bool AndEqZero = IsAnd && CC1 == ISD::SETEQ && IsZero; in foldLogicOfSetCCs()
6353 bool AndGtNeg1 = IsAnd && CC1 == ISD::SETGT && IsNeg1; in foldLogicOfSetCCs()
6355 bool OrNeZero = !IsAnd && CC1 == ISD::SETNE && IsZero; in foldLogicOfSetCCs()
6357 bool OrLtZero = !IsAnd && CC1 == ISD::SETLT && IsZero; in foldLogicOfSetCCs()
6370 bool AndEqNeg1 = IsAnd && CC1 == ISD::SETEQ && IsNeg1; in foldLogicOfSetCCs()
6372 bool AndLtZero = IsAnd && CC1 == ISD::SETLT && IsZero; in foldLogicOfSetCCs()
6374 bool OrNeNeg1 = !IsAnd && CC1 == ISD::SETNE && IsNeg1; in foldLogicOfSetCCs()
6376 bool OrGtNeg1 = !IsAnd && CC1 == ISD::SETGT && IsNeg1; in foldLogicOfSetCCs()
[all …]
/freebsd/contrib/llvm-project/clang/lib/Analysis/
H A DCFG.cpp1205 const bool IsAnd = B->getOpcode() == BO_LAnd; in checkIncorrectLogicOperator() local
1206 const bool Combine = IsAnd ? (Res1.isTrue() && Res2.isTrue()) in checkIncorrectLogicOperator()
/freebsd/contrib/llvm-project/llvm/lib/Target/RISCV/
H A DRISCVISelLowering.cpp15544 bool IsAnd = N->getOpcode() == ISD::AND; in combineDeMorganOfBoolean() local
15559 if (!isOneConstant(N11) && !(IsAnd && isAllOnesConstant(N11))) in combineDeMorganOfBoolean()
15563 if (!(IsAnd && isAllOnesConstant(N01))) in combineDeMorganOfBoolean()
15580 unsigned Opc = IsAnd ? ISD::OR : ISD::AND; in combineDeMorganOfBoolean()
18222 bool IsAnd = Cond.getOpcode() == ISD::AND; in tryDemorganOfBooleanCondition() local
18223 if (!IsAnd && Cond.getOpcode() != ISD::OR) in tryDemorganOfBooleanCondition()
18242 if (!isOneConstant(Xor1) && !(IsAnd && isAllOnesConstant(Xor1))) in tryDemorganOfBooleanCondition()
18275 unsigned Opc = IsAnd ? ISD::OR : ISD::AND; in tryDemorganOfBooleanCondition()
/freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/
H A DAArch64ISelLowering.cpp14574 bool IsAnd = And.getOpcode() == ISD::AND; in tryLowerToSLI() local
14597 if (IsAnd) { in tryLowerToSLI()