Lines Matching refs:IsAnd
329 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()
519 ICmpInst::Predicate NewCC = IsAnd ? ICmpInst::ICMP_EQ : ICmpInst::ICMP_NE; in foldLogOpOfMaskedICmps()
520 if (!IsAnd) { in foldLogOpOfMaskedICmps()
623 return IsNot ? nullptr : ConstantInt::get(LHS->getType(), !IsAnd); in foldLogOpOfMaskedICmps()
709 bool IsAnd, in foldAndOrOfICmpsOfAndWithPow2() argument
711 CmpInst::Predicate Pred = IsAnd ? CmpInst::ICMP_NE : CmpInst::ICMP_EQ; in foldAndOrOfICmpsOfAndWithPow2()
736 auto NewPred = IsAnd ? CmpInst::ICMP_EQ : CmpInst::ICMP_NE; in foldAndOrOfICmpsOfAndWithPow2()
871 static Value *foldIsPowerOf2OrZero(ICmpInst *Cmp0, ICmpInst *Cmp1, bool IsAnd, in foldIsPowerOf2OrZero() argument
881 if (IsAnd && Pred0 == ICmpInst::ICMP_NE && Pred1 == ICmpInst::ICMP_NE) in foldIsPowerOf2OrZero()
883 if (!IsAnd && Pred0 == ICmpInst::ICMP_EQ && Pred1 == ICmpInst::ICMP_EQ) in foldIsPowerOf2OrZero()
1025 ICmpInst *UnsignedICmp, bool IsAnd, in foldUnsignedUnderflowCheck() argument
1057 IsAnd && GetKnownNonZeroAndOther(B, A)) in foldUnsignedUnderflowCheck()
1060 !IsAnd && GetKnownNonZeroAndOther(B, A)) in foldUnsignedUnderflowCheck()
1106 bool IsAnd) { in foldEqOfParts() argument
1110 CmpInst::Predicate Pred = IsAnd ? CmpInst::ICMP_EQ : CmpInst::ICMP_NE; in foldEqOfParts()
1179 bool IsAnd, bool IsLogical, in foldAndOrOfICmpsWithConstEq() argument
1190 if ((IsAnd && Pred0 != ICmpInst::ICMP_EQ) || in foldAndOrOfICmpsWithConstEq()
1191 (!IsAnd && Pred0 != ICmpInst::ICMP_NE)) in foldAndOrOfICmpsWithConstEq()
1216 return IsAnd ? Builder.CreateLogicalAnd(Cmp0, SubstituteCmp) in foldAndOrOfICmpsWithConstEq()
1218 return Builder.CreateBinOp(IsAnd ? Instruction::And : Instruction::Or, Cmp0, in foldAndOrOfICmpsWithConstEq()
1228 bool IsAnd) { in foldAndOrOfICmpsUsingRanges() argument
1251 IsAnd ? ICmpInst::getInversePredicate(Pred1) : Pred1, *C1); in foldAndOrOfICmpsUsingRanges()
1256 IsAnd ? ICmpInst::getInversePredicate(Pred2) : Pred2, *C2); in foldAndOrOfICmpsUsingRanges()
1281 if (IsAnd) in foldAndOrOfICmpsUsingRanges()
1335 bool IsAnd, bool IsLogicalSelect) { in foldLogicOfFCmps() argument
1363 unsigned NewPred = IsAnd ? FCmpCodeL & FCmpCodeR : FCmpCodeL | FCmpCodeR; in foldLogicOfFCmps()
1377 ((PredL == FCmpInst::FCMP_ORD && PredR == FCmpInst::FCMP_ORD && IsAnd) || in foldLogicOfFCmps()
1379 !IsAnd))) { in foldLogicOfFCmps()
1392 if (IsAnd && stripSignOnlyFPOps(LHS0) == stripSignOnlyFPOps(RHS0)) { in foldLogicOfFCmps()
1413 unsigned CombinedMask = IsAnd ? (ClassMaskLHS & ClassMaskRHS) in foldLogicOfFCmps()
3102 bool IsAnd, bool IsLogical, in foldAndOrOfICmpEqConstantAndICmp() argument
3109 IsAnd ? LHS->getInversePredicate() : LHS->getPredicate(); in foldAndOrOfICmpEqConstantAndICmp()
3111 IsAnd ? RHS->getInversePredicate() : RHS->getPredicate(); in foldAndOrOfICmpEqConstantAndICmp()
3138 IsAnd ? ICmpInst::ICMP_ULT : ICmpInst::ICMP_UGE, in foldAndOrOfICmpEqConstantAndICmp()
3147 Instruction &I, bool IsAnd, in foldAndOrOfICmps() argument
3154 if (Value *V = foldAndOrOfICmpsOfAndWithPow2(LHS, RHS, &I, IsAnd, IsLogical)) in foldAndOrOfICmps()
3172 unsigned Code = IsAnd ? getICmpCode(PredL) & getICmpCode(PredR) in foldAndOrOfICmps()
3182 if (Value *V = foldLogOpOfMaskedICmps(LHS, RHS, IsAnd, IsLogical, Builder)) in foldAndOrOfICmps()
3186 foldAndOrOfICmpEqConstantAndICmp(LHS, RHS, IsAnd, IsLogical, Builder)) in foldAndOrOfICmps()
3190 if (Value *V = foldAndOrOfICmpEqConstantAndICmp(RHS, LHS, IsAnd, in foldAndOrOfICmps()
3195 foldAndOrOfICmpsWithConstEq(LHS, RHS, IsAnd, IsLogical, Builder, Q)) in foldAndOrOfICmps()
3199 if (Value *V = foldAndOrOfICmpsWithConstEq(RHS, LHS, IsAnd, in foldAndOrOfICmps()
3203 if (Value *V = foldIsPowerOf2OrZero(LHS, RHS, IsAnd, Builder)) in foldAndOrOfICmps()
3205 if (Value *V = foldIsPowerOf2OrZero(RHS, LHS, IsAnd, Builder)) in foldAndOrOfICmps()
3213 if (Value *V = simplifyRangeCheck(LHS, RHS, /*Inverted=*/!IsAnd)) in foldAndOrOfICmps()
3218 if (Value *V = simplifyRangeCheck(RHS, LHS, /*Inverted=*/!IsAnd)) in foldAndOrOfICmps()
3223 if (IsAnd && !IsLogical) in foldAndOrOfICmps()
3227 if (Value *V = foldIsPowerOf2(LHS, RHS, IsAnd, Builder)) in foldAndOrOfICmps()
3230 if (Value *V = foldPowerOf2AndShiftedMask(LHS, RHS, IsAnd, Builder)) in foldAndOrOfICmps()
3235 if (Value *X = foldUnsignedUnderflowCheck(LHS, RHS, IsAnd, Q, Builder)) in foldAndOrOfICmps()
3237 if (Value *X = foldUnsignedUnderflowCheck(RHS, LHS, IsAnd, Q, Builder)) in foldAndOrOfICmps()
3241 if (Value *X = foldEqOfParts(LHS, RHS, IsAnd)) in foldAndOrOfICmps()
3247 if (!IsLogical && PredL == (IsAnd ? ICmpInst::ICMP_EQ : ICmpInst::ICMP_NE) && in foldAndOrOfICmps()
3257 if (!IsLogical && PredL == (IsAnd ? ICmpInst::ICMP_EQ : ICmpInst::ICMP_NE) && in foldAndOrOfICmps()
3273 if (PredL == (IsAnd ? ICmpInst::ICMP_EQ : ICmpInst::ICMP_NE) && in foldAndOrOfICmps()
3315 if (IsAnd) { in foldAndOrOfICmps()
3338 return foldAndOrOfICmpsUsingRanges(LHS, RHS, IsAnd); in foldAndOrOfICmps()