Lines Matching defs:IsAnd

346     Value *LHS, Value *RHS, bool IsAnd, Value *A, Value *B, Value *D, Value *E,
353 // If IsAnd is false, we get it in negated form:
364 ICmpInst::Predicate NewCC = IsAnd ? ICmpInst::ICMP_EQ : ICmpInst::ICMP_NE;
400 return Builder.CreateFCmp(IsAnd ? FCmpInst::FCMP_UNO : FCmpInst::FCMP_ORD,
458 return ConstantInt::get(LHS->getType(), !IsAnd);
488 return ConstantInt::get(LHS->getType(), !IsAnd);
496 Value *LHS, Value *RHS, bool IsAnd, Value *A, Value *B, Value *C, Value *D,
506 if (!IsAnd) {
512 LHS, RHS, IsAnd, A, B, D, E, PredL, PredR, Builder)) {
517 RHS, LHS, IsAnd, A, D, B, C, PredR, PredL, Builder)) {
526 static Value *foldLogOpOfMaskedICmps(Value *LHS, Value *RHS, bool IsAnd,
545 LHS, RHS, IsAnd, A, B, C, D, E, PredL, PredR, LHSMask, RHSMask,
563 ICmpInst::Predicate NewCC = IsAnd ? ICmpInst::ICMP_EQ : ICmpInst::ICMP_NE;
564 if (!IsAnd) {
662 return IsNot ? nullptr : ConstantInt::get(LHS->getType(), !IsAnd);
772 ICmpInst *LHS, ICmpInst *RHS, bool IsAnd,
774 CmpPredicate Pred = IsAnd ? CmpInst::ICMP_NE : CmpInst::ICMP_EQ;
937 static Value *foldIsPowerOf2OrZero(ICmpInst *Cmp0, ICmpInst *Cmp1, bool IsAnd,
948 if (IsAnd && Pred0 == ICmpInst::ICMP_NE && Pred1 == ICmpInst::ICMP_NE) {
954 if (!IsAnd && Pred0 == ICmpInst::ICMP_EQ && Pred1 == ICmpInst::ICMP_EQ) {
1108 ICmpInst *UnsignedICmp, bool IsAnd,
1136 IsAnd && GetKnownNonZeroAndOther(B, A))
1139 !IsAnd && GetKnownNonZeroAndOther(B, A))
1184 Value *InstCombinerImpl::foldEqOfParts(Value *Cmp0, Value *Cmp1, bool IsAnd) {
1188 CmpInst::Predicate Pred = IsAnd ? CmpInst::ICMP_EQ : CmpInst::ICMP_NE;
1271 bool IsAnd, bool IsLogical,
1282 if ((IsAnd && Pred0 != ICmpInst::ICMP_EQ) ||
1283 (!IsAnd && Pred0 != ICmpInst::ICMP_NE))
1308 return IsAnd ? Builder.CreateLogicalAnd(Cmp0, SubstituteCmp)
1310 return Builder.CreateBinOp(IsAnd ? Instruction::And : Instruction::Or, Cmp0,
1320 bool IsAnd) {
1343 IsAnd ? ICmpInst::getInverseCmpPredicate(Pred1) : Pred1, *C1);
1348 IsAnd ? ICmpInst::getInverseCmpPredicate(Pred2) : Pred2, *C2);
1373 if (IsAnd)
1423 bool IsAnd, bool IsLogicalSelect) {
1451 unsigned NewPred = IsAnd ? FCmpCodeL & FCmpCodeR : FCmpCodeL | FCmpCodeR;
1461 ((PredL == FCmpInst::FCMP_ORD && PredR == FCmpInst::FCMP_ORD && IsAnd) ||
1463 !IsAnd))) {
1478 if (IsAnd && stripSignOnlyFPOps(LHS0) == stripSignOnlyFPOps(RHS0)) {
1499 unsigned CombinedMask = IsAnd ? (ClassMaskLHS & ClassMaskRHS)
1531 if (IsLessThanOrLessEqual(IsAnd ? PredR : PredL)) {
1535 if (IsLessThanOrLessEqual(IsAnd ? PredL : PredR)) {
2351 Instruction &I, bool IsAnd,
2353 Instruction::BinaryOps Opcode = IsAnd ? Instruction::And : Instruction::Or;
2356 if (Value *Res = foldBooleanAndOr(LHS, X, I, IsAnd, /*IsLogical=*/false))
2361 if (Value *Res = foldBooleanAndOr(LHS, Y, I, IsAnd, /*IsLogical=*/false))
2668 foldAndOrOfSelectUsingImpliedCond(Op1, *SI0, /* IsAnd */ true))
2673 foldAndOrOfSelectUsingImpliedCond(Op0, *SI1, /* IsAnd */ true))
2747 foldBooleanAndOr(Op0, Op1, I, /*IsAnd=*/true, /*IsLogical=*/false))
2752 if (auto *V = reassociateBooleanAndOr(Op0, X, Y, I, /*IsAnd=*/true,
2758 if (auto *V = reassociateBooleanAndOr(Op1, X, Y, I, /*IsAnd=*/true,
3262 bool IsAnd, bool IsLogical,
3269 IsAnd ? LHS->getInversePredicate() : LHS->getPredicate();
3271 IsAnd ? RHS->getInversePredicate() : RHS->getPredicate();
3298 IsAnd ? ICmpInst::ICMP_ULT : ICmpInst::ICMP_UGE,
3307 Instruction &I, bool IsAnd,
3327 unsigned Code = IsAnd ? getICmpCode(PredL) & getICmpCode(PredR)
3337 if (Value *V = foldLogOpOfMaskedICmps(LHS, RHS, IsAnd, IsLogical, Builder, Q))
3341 foldAndOrOfICmpEqConstantAndICmp(LHS, RHS, IsAnd, IsLogical, Builder))
3345 if (Value *V = foldAndOrOfICmpEqConstantAndICmp(RHS, LHS, IsAnd,
3350 foldAndOrOfICmpsWithConstEq(LHS, RHS, IsAnd, IsLogical, Builder, Q))
3354 if (Value *V = foldAndOrOfICmpsWithConstEq(RHS, LHS, IsAnd,
3364 if (Value *V = foldIsPowerOf2OrZero(LHS, RHS, IsAnd, Builder, *this))
3366 if (Value *V = foldIsPowerOf2OrZero(RHS, LHS, IsAnd, Builder, *this))
3374 if (Value *V = simplifyRangeCheck(LHS, RHS, /*Inverted=*/!IsAnd))
3379 if (Value *V = simplifyRangeCheck(RHS, LHS, /*Inverted=*/!IsAnd))
3384 if (IsAnd && !IsLogical)
3388 if (Value *V = foldIsPowerOf2(LHS, RHS, IsAnd, Builder, *this))
3391 if (Value *V = foldPowerOf2AndShiftedMask(LHS, RHS, IsAnd, Builder))
3396 if (Value *X = foldUnsignedUnderflowCheck(LHS, RHS, IsAnd, Q, Builder))
3398 if (Value *X = foldUnsignedUnderflowCheck(RHS, LHS, IsAnd, Q, Builder))
3405 if (PredL == (IsAnd ? ICmpInst::ICMP_EQ : ICmpInst::ICMP_NE) &&
3416 if (PredL == (IsAnd ? ICmpInst::ICMP_EQ : ICmpInst::ICMP_NE) &&
3427 foldAndOrOfICmpsWithPow2AndWithZero(Builder, LHS, RHS, IsAnd, Q))
3438 if (PredL == (IsAnd ? ICmpInst::ICMP_EQ : ICmpInst::ICMP_NE) &&
3480 if (IsAnd) {
3503 return foldAndOrOfICmpsUsingRanges(LHS, RHS, IsAnd);
3509 Instruction &I, bool IsAnd,
3516 if (Value *Res = foldAndOrOfICmps(LHSCmp, RHSCmp, I, IsAnd, IsLogical))
3521 if (Value *Res = foldLogicOfFCmps(LHSCmp, RHSCmp, IsAnd, IsLogical))
3524 if (Value *Res = foldEqOfParts(LHS, RHS, IsAnd))
3592 foldAndOrOfSelectUsingImpliedCond(Op1, *SI0, /* IsAnd */ false))
3597 foldAndOrOfSelectUsingImpliedCond(Op0, *SI1, /* IsAnd */ false))
3812 foldBooleanAndOr(Op0, Op1, I, /*IsAnd=*/false, /*IsLogical=*/false))
3817 if (auto *V = reassociateBooleanAndOr(Op0, X, Y, I, /*IsAnd=*/false,
3823 if (auto *V = reassociateBooleanAndOr(Op1, X, Y, I, /*IsAnd=*/false,