Lines Matching refs:Op0

147   if (BinaryOperator *Op0 = dyn_cast<BinaryOperator>(LHS))  in ExpandBinOp()  local
148 if (Op0->getOpcode() == OpcodeToExpand) { in ExpandBinOp()
150 Value *A = Op0->getOperand(0), *B = Op0->getOperand(1), *C = RHS; in ExpandBinOp()
206 BinaryOperator *Op0 = dyn_cast<BinaryOperator>(LHS); in SimplifyAssociativeBinOp() local
210 if (Op0 && Op0->getOpcode() == Opcode) { in SimplifyAssociativeBinOp()
211 Value *A = Op0->getOperand(0); in SimplifyAssociativeBinOp()
212 Value *B = Op0->getOperand(1); in SimplifyAssociativeBinOp()
252 if (Op0 && Op0->getOpcode() == Opcode) { in SimplifyAssociativeBinOp()
253 Value *A = Op0->getOperand(0); in SimplifyAssociativeBinOp()
254 Value *B = Op0->getOperand(1); in SimplifyAssociativeBinOp()
530 static Value *SimplifyAddInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW, in SimplifyAddInst() argument
532 if (Constant *CLHS = dyn_cast<Constant>(Op0)) { in SimplifyAddInst()
540 std::swap(Op0, Op1); in SimplifyAddInst()
549 return Op0; in SimplifyAddInst()
555 if (match(Op1, m_Sub(m_Value(Y), m_Specific(Op0))) || in SimplifyAddInst()
556 match(Op0, m_Sub(m_Value(Y), m_Specific(Op1)))) in SimplifyAddInst()
560 if (match(Op0, m_Not(m_Specific(Op1))) || in SimplifyAddInst()
561 match(Op1, m_Not(m_Specific(Op0)))) in SimplifyAddInst()
562 return Constant::getAllOnesValue(Op0->getType()); in SimplifyAddInst()
565 if (MaxRecurse && Op0->getType()->isIntegerTy(1)) in SimplifyAddInst()
566 if (Value *V = SimplifyXorInst(Op0, Op1, Q, MaxRecurse-1)) in SimplifyAddInst()
570 if (Value *V = SimplifyAssociativeBinOp(Instruction::Add, Op0, Op1, Q, in SimplifyAddInst()
586 Value *llvm::SimplifyAddInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW, in SimplifyAddInst() argument
590 return ::SimplifyAddInst(Op0, Op1, isNSW, isNUW, Query(DL, TLI, DT, AC, CxtI), in SimplifyAddInst()
662 static Value *SimplifySubInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW, in SimplifySubInst() argument
664 if (Constant *CLHS = dyn_cast<Constant>(Op0)) in SimplifySubInst()
673 if (match(Op0, m_Undef()) || match(Op1, m_Undef())) in SimplifySubInst()
674 return UndefValue::get(Op0->getType()); in SimplifySubInst()
678 return Op0; in SimplifySubInst()
681 if (Op0 == Op1) in SimplifySubInst()
682 return Constant::getNullValue(Op0->getType()); in SimplifySubInst()
685 if (isNUW && match(Op0, m_Zero())) in SimplifySubInst()
686 return Op0; in SimplifySubInst()
691 if (MaxRecurse && match(Op0, m_Add(m_Value(X), m_Value(Y)))) { // (X + Y) - Z in SimplifySubInst()
712 X = Op0; in SimplifySubInst()
734 Z = Op0; in SimplifySubInst()
746 if (MaxRecurse && match(Op0, m_Trunc(m_Value(X))) && in SimplifySubInst()
752 if (Value *W = SimplifyTruncInst(V, Op0->getType(), Q, MaxRecurse-1)) in SimplifySubInst()
757 if (match(Op0, m_PtrToInt(m_Value(X))) && in SimplifySubInst()
760 return ConstantExpr::getIntegerCast(Result, Op0->getType(), true); in SimplifySubInst()
763 if (MaxRecurse && Op0->getType()->isIntegerTy(1)) in SimplifySubInst()
764 if (Value *V = SimplifyXorInst(Op0, Op1, Q, MaxRecurse-1)) in SimplifySubInst()
779 Value *llvm::SimplifySubInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW, in SimplifySubInst() argument
783 return ::SimplifySubInst(Op0, Op1, isNSW, isNUW, Query(DL, TLI, DT, AC, CxtI), in SimplifySubInst()
789 static Value *SimplifyFAddInst(Value *Op0, Value *Op1, FastMathFlags FMF, in SimplifyFAddInst() argument
791 if (Constant *CLHS = dyn_cast<Constant>(Op0)) { in SimplifyFAddInst()
799 std::swap(Op0, Op1); in SimplifyFAddInst()
804 return Op0; in SimplifyFAddInst()
808 (FMF.noSignedZeros() || CannotBeNegativeZero(Op0))) in SimplifyFAddInst()
809 return Op0; in SimplifyFAddInst()
815 if (match(Op1, m_FSub(m_AnyZero(), m_Specific(Op0)))) in SimplifyFAddInst()
817 else if (match(Op0, m_FSub(m_AnyZero(), m_Specific(Op1)))) in SimplifyFAddInst()
818 SubOp = Op0; in SimplifyFAddInst()
823 return Constant::getNullValue(Op0->getType()); in SimplifyFAddInst()
831 static Value *SimplifyFSubInst(Value *Op0, Value *Op1, FastMathFlags FMF, in SimplifyFSubInst() argument
833 if (Constant *CLHS = dyn_cast<Constant>(Op0)) { in SimplifyFSubInst()
843 return Op0; in SimplifyFSubInst()
847 (FMF.noSignedZeros() || CannotBeNegativeZero(Op0))) in SimplifyFSubInst()
848 return Op0; in SimplifyFSubInst()
852 if (match(Op0, m_AnyZero())) { in SimplifyFSubInst()
860 if (FMF.noNaNs() && FMF.noInfs() && Op0 == Op1) in SimplifyFSubInst()
861 return Constant::getNullValue(Op0->getType()); in SimplifyFSubInst()
867 static Value *SimplifyFMulInst(Value *Op0, Value *Op1, in SimplifyFMulInst() argument
871 if (Constant *CLHS = dyn_cast<Constant>(Op0)) { in SimplifyFMulInst()
879 std::swap(Op0, Op1); in SimplifyFMulInst()
884 return Op0; in SimplifyFMulInst()
895 static Value *SimplifyMulInst(Value *Op0, Value *Op1, const Query &Q, in SimplifyMulInst() argument
897 if (Constant *CLHS = dyn_cast<Constant>(Op0)) { in SimplifyMulInst()
905 std::swap(Op0, Op1); in SimplifyMulInst()
910 return Constant::getNullValue(Op0->getType()); in SimplifyMulInst()
918 return Op0; in SimplifyMulInst()
922 if (match(Op0, m_Exact(m_IDiv(m_Value(X), m_Specific(Op1)))) || // (X / Y) * Y in SimplifyMulInst()
923 match(Op1, m_Exact(m_IDiv(m_Value(X), m_Specific(Op0))))) // Y * (X / Y) in SimplifyMulInst()
927 if (MaxRecurse && Op0->getType()->isIntegerTy(1)) in SimplifyMulInst()
928 if (Value *V = SimplifyAndInst(Op0, Op1, Q, MaxRecurse-1)) in SimplifyMulInst()
932 if (Value *V = SimplifyAssociativeBinOp(Instruction::Mul, Op0, Op1, Q, in SimplifyMulInst()
937 if (Value *V = ExpandBinOp(Instruction::Mul, Op0, Op1, Instruction::Add, in SimplifyMulInst()
943 if (isa<SelectInst>(Op0) || isa<SelectInst>(Op1)) in SimplifyMulInst()
944 if (Value *V = ThreadBinOpOverSelect(Instruction::Mul, Op0, Op1, Q, in SimplifyMulInst()
950 if (isa<PHINode>(Op0) || isa<PHINode>(Op1)) in SimplifyMulInst()
951 if (Value *V = ThreadBinOpOverPHI(Instruction::Mul, Op0, Op1, Q, in SimplifyMulInst()
958 Value *llvm::SimplifyFAddInst(Value *Op0, Value *Op1, FastMathFlags FMF, in SimplifyFAddInst() argument
963 return ::SimplifyFAddInst(Op0, Op1, FMF, Query(DL, TLI, DT, AC, CxtI), in SimplifyFAddInst()
967 Value *llvm::SimplifyFSubInst(Value *Op0, Value *Op1, FastMathFlags FMF, in SimplifyFSubInst() argument
972 return ::SimplifyFSubInst(Op0, Op1, FMF, Query(DL, TLI, DT, AC, CxtI), in SimplifyFSubInst()
976 Value *llvm::SimplifyFMulInst(Value *Op0, Value *Op1, FastMathFlags FMF, in SimplifyFMulInst() argument
981 return ::SimplifyFMulInst(Op0, Op1, FMF, Query(DL, TLI, DT, AC, CxtI), in SimplifyFMulInst()
985 Value *llvm::SimplifyMulInst(Value *Op0, Value *Op1, const DataLayout &DL, in SimplifyMulInst() argument
989 return ::SimplifyMulInst(Op0, Op1, Query(DL, TLI, DT, AC, CxtI), in SimplifyMulInst()
995 static Value *SimplifyDiv(Instruction::BinaryOps Opcode, Value *Op0, Value *Op1, in SimplifyDiv() argument
997 if (Constant *C0 = dyn_cast<Constant>(Op0)) { in SimplifyDiv()
1015 if (match(Op0, m_Undef())) in SimplifyDiv()
1016 return Constant::getNullValue(Op0->getType()); in SimplifyDiv()
1019 if (match(Op0, m_Zero())) in SimplifyDiv()
1020 return Op0; in SimplifyDiv()
1024 return Op0; in SimplifyDiv()
1026 if (Op0->getType()->isIntegerTy(1)) in SimplifyDiv()
1028 return Op0; in SimplifyDiv()
1031 if (Op0 == Op1) in SimplifyDiv()
1032 return ConstantInt::get(Op0->getType(), 1); in SimplifyDiv()
1036 if (match(Op0, m_Mul(m_Value(X), m_Value(Y))) && (X == Op1 || Y == Op1)) { in SimplifyDiv()
1038 OverflowingBinaryOperator *Mul = cast<OverflowingBinaryOperator>(Op0); in SimplifyDiv()
1050 if ((isSigned && match(Op0, m_SRem(m_Value(), m_Specific(Op1)))) || in SimplifyDiv()
1051 (!isSigned && match(Op0, m_URem(m_Value(), m_Specific(Op1))))) in SimplifyDiv()
1052 return Constant::getNullValue(Op0->getType()); in SimplifyDiv()
1056 if (!isSigned && match(Op0, m_UDiv(m_Value(X), m_ConstantInt(C1))) && in SimplifyDiv()
1061 return Constant::getNullValue(Op0->getType()); in SimplifyDiv()
1066 if (isa<SelectInst>(Op0) || isa<SelectInst>(Op1)) in SimplifyDiv()
1067 if (Value *V = ThreadBinOpOverSelect(Opcode, Op0, Op1, Q, MaxRecurse)) in SimplifyDiv()
1072 if (isa<PHINode>(Op0) || isa<PHINode>(Op1)) in SimplifyDiv()
1073 if (Value *V = ThreadBinOpOverPHI(Opcode, Op0, Op1, Q, MaxRecurse)) in SimplifyDiv()
1081 static Value *SimplifySDivInst(Value *Op0, Value *Op1, const Query &Q, in SimplifySDivInst() argument
1083 if (Value *V = SimplifyDiv(Instruction::SDiv, Op0, Op1, Q, MaxRecurse)) in SimplifySDivInst()
1089 Value *llvm::SimplifySDivInst(Value *Op0, Value *Op1, const DataLayout &DL, in SimplifySDivInst() argument
1093 return ::SimplifySDivInst(Op0, Op1, Query(DL, TLI, DT, AC, CxtI), in SimplifySDivInst()
1099 static Value *SimplifyUDivInst(Value *Op0, Value *Op1, const Query &Q, in SimplifyUDivInst() argument
1101 if (Value *V = SimplifyDiv(Instruction::UDiv, Op0, Op1, Q, MaxRecurse)) in SimplifyUDivInst()
1107 Value *llvm::SimplifyUDivInst(Value *Op0, Value *Op1, const DataLayout &DL, in SimplifyUDivInst() argument
1111 return ::SimplifyUDivInst(Op0, Op1, Query(DL, TLI, DT, AC, CxtI), in SimplifyUDivInst()
1115 static Value *SimplifyFDivInst(Value *Op0, Value *Op1, FastMathFlags FMF, in SimplifyFDivInst() argument
1118 if (match(Op0, m_Undef())) in SimplifyFDivInst()
1119 return Op0; in SimplifyFDivInst()
1128 if (FMF.noNaNs() && FMF.noSignedZeros() && match(Op0, m_AnyZero())) in SimplifyFDivInst()
1129 return Op0; in SimplifyFDivInst()
1134 Value *llvm::SimplifyFDivInst(Value *Op0, Value *Op1, FastMathFlags FMF, in SimplifyFDivInst() argument
1139 return ::SimplifyFDivInst(Op0, Op1, FMF, Query(DL, TLI, DT, AC, CxtI), in SimplifyFDivInst()
1145 static Value *SimplifyRem(Instruction::BinaryOps Opcode, Value *Op0, Value *Op1, in SimplifyRem() argument
1147 if (Constant *C0 = dyn_cast<Constant>(Op0)) { in SimplifyRem()
1159 if (match(Op0, m_Undef())) in SimplifyRem()
1160 return Constant::getNullValue(Op0->getType()); in SimplifyRem()
1163 if (match(Op0, m_Zero())) in SimplifyRem()
1164 return Op0; in SimplifyRem()
1168 return UndefValue::get(Op0->getType()); in SimplifyRem()
1172 return Constant::getNullValue(Op0->getType()); in SimplifyRem()
1174 if (Op0->getType()->isIntegerTy(1)) in SimplifyRem()
1176 return Constant::getNullValue(Op0->getType()); in SimplifyRem()
1179 if (Op0 == Op1) in SimplifyRem()
1180 return Constant::getNullValue(Op0->getType()); in SimplifyRem()
1184 match(Op0, m_SRem(m_Value(), m_Specific(Op1)))) || in SimplifyRem()
1186 match(Op0, m_URem(m_Value(), m_Specific(Op1))))) in SimplifyRem()
1187 return Op0; in SimplifyRem()
1191 if (isa<SelectInst>(Op0) || isa<SelectInst>(Op1)) in SimplifyRem()
1192 if (Value *V = ThreadBinOpOverSelect(Opcode, Op0, Op1, Q, MaxRecurse)) in SimplifyRem()
1197 if (isa<PHINode>(Op0) || isa<PHINode>(Op1)) in SimplifyRem()
1198 if (Value *V = ThreadBinOpOverPHI(Opcode, Op0, Op1, Q, MaxRecurse)) in SimplifyRem()
1206 static Value *SimplifySRemInst(Value *Op0, Value *Op1, const Query &Q, in SimplifySRemInst() argument
1208 if (Value *V = SimplifyRem(Instruction::SRem, Op0, Op1, Q, MaxRecurse)) in SimplifySRemInst()
1214 Value *llvm::SimplifySRemInst(Value *Op0, Value *Op1, const DataLayout &DL, in SimplifySRemInst() argument
1218 return ::SimplifySRemInst(Op0, Op1, Query(DL, TLI, DT, AC, CxtI), in SimplifySRemInst()
1224 static Value *SimplifyURemInst(Value *Op0, Value *Op1, const Query &Q, in SimplifyURemInst() argument
1226 if (Value *V = SimplifyRem(Instruction::URem, Op0, Op1, Q, MaxRecurse)) in SimplifyURemInst()
1232 Value *llvm::SimplifyURemInst(Value *Op0, Value *Op1, const DataLayout &DL, in SimplifyURemInst() argument
1236 return ::SimplifyURemInst(Op0, Op1, Query(DL, TLI, DT, AC, CxtI), in SimplifyURemInst()
1240 static Value *SimplifyFRemInst(Value *Op0, Value *Op1, FastMathFlags FMF, in SimplifyFRemInst() argument
1243 if (match(Op0, m_Undef())) in SimplifyFRemInst()
1244 return Op0; in SimplifyFRemInst()
1253 if (FMF.noNaNs() && FMF.noSignedZeros() && match(Op0, m_AnyZero())) in SimplifyFRemInst()
1254 return Op0; in SimplifyFRemInst()
1259 Value *llvm::SimplifyFRemInst(Value *Op0, Value *Op1, FastMathFlags FMF, in SimplifyFRemInst() argument
1264 return ::SimplifyFRemInst(Op0, Op1, FMF, Query(DL, TLI, DT, AC, CxtI), in SimplifyFRemInst()
1297 static Value *SimplifyShift(unsigned Opcode, Value *Op0, Value *Op1, in SimplifyShift() argument
1299 if (Constant *C0 = dyn_cast<Constant>(Op0)) { in SimplifyShift()
1307 if (match(Op0, m_Zero())) in SimplifyShift()
1308 return Op0; in SimplifyShift()
1312 return Op0; in SimplifyShift()
1316 return UndefValue::get(Op0->getType()); in SimplifyShift()
1320 if (isa<SelectInst>(Op0) || isa<SelectInst>(Op1)) in SimplifyShift()
1321 if (Value *V = ThreadBinOpOverSelect(Opcode, Op0, Op1, Q, MaxRecurse)) in SimplifyShift()
1326 if (isa<PHINode>(Op0) || isa<PHINode>(Op1)) in SimplifyShift()
1327 if (Value *V = ThreadBinOpOverPHI(Opcode, Op0, Op1, Q, MaxRecurse)) in SimplifyShift()
1335 static Value *SimplifyRightShift(unsigned Opcode, Value *Op0, Value *Op1, in SimplifyRightShift() argument
1338 if (Value *V = SimplifyShift(Opcode, Op0, Op1, Q, MaxRecurse)) in SimplifyRightShift()
1342 if (Op0 == Op1) in SimplifyRightShift()
1343 return Constant::getNullValue(Op0->getType()); in SimplifyRightShift()
1347 if (match(Op0, m_Undef())) in SimplifyRightShift()
1348 return isExact ? Op0 : Constant::getNullValue(Op0->getType()); in SimplifyRightShift()
1352 unsigned BitWidth = Op0->getType()->getScalarSizeInBits(); in SimplifyRightShift()
1355 computeKnownBits(Op0, Op0KnownZero, Op0KnownOne, Q.DL, /*Depth=*/0, Q.AC, in SimplifyRightShift()
1358 return Op0; in SimplifyRightShift()
1366 static Value *SimplifyShlInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW, in SimplifyShlInst() argument
1368 if (Value *V = SimplifyShift(Instruction::Shl, Op0, Op1, Q, MaxRecurse)) in SimplifyShlInst()
1373 if (match(Op0, m_Undef())) in SimplifyShlInst()
1374 return isNSW || isNUW ? Op0 : Constant::getNullValue(Op0->getType()); in SimplifyShlInst()
1378 if (match(Op0, m_Exact(m_Shr(m_Value(X), m_Specific(Op1))))) in SimplifyShlInst()
1383 Value *llvm::SimplifyShlInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW, in SimplifyShlInst() argument
1387 return ::SimplifyShlInst(Op0, Op1, isNSW, isNUW, Query(DL, TLI, DT, AC, CxtI), in SimplifyShlInst()
1393 static Value *SimplifyLShrInst(Value *Op0, Value *Op1, bool isExact, in SimplifyLShrInst() argument
1395 if (Value *V = SimplifyRightShift(Instruction::LShr, Op0, Op1, isExact, Q, in SimplifyLShrInst()
1401 if (match(Op0, m_NUWShl(m_Value(X), m_Specific(Op1)))) in SimplifyLShrInst()
1407 Value *llvm::SimplifyLShrInst(Value *Op0, Value *Op1, bool isExact, in SimplifyLShrInst() argument
1412 return ::SimplifyLShrInst(Op0, Op1, isExact, Query(DL, TLI, DT, AC, CxtI), in SimplifyLShrInst()
1418 static Value *SimplifyAShrInst(Value *Op0, Value *Op1, bool isExact, in SimplifyAShrInst() argument
1420 if (Value *V = SimplifyRightShift(Instruction::AShr, Op0, Op1, isExact, Q, in SimplifyAShrInst()
1425 if (match(Op0, m_AllOnes())) in SimplifyAShrInst()
1426 return Op0; in SimplifyAShrInst()
1430 if (match(Op0, m_NSWShl(m_Value(X), m_Specific(Op1)))) in SimplifyAShrInst()
1434 unsigned NumSignBits = ComputeNumSignBits(Op0, Q.DL, 0, Q.AC, Q.CxtI, Q.DT); in SimplifyAShrInst()
1435 if (NumSignBits == Op0->getType()->getScalarSizeInBits()) in SimplifyAShrInst()
1436 return Op0; in SimplifyAShrInst()
1441 Value *llvm::SimplifyAShrInst(Value *Op0, Value *Op1, bool isExact, in SimplifyAShrInst() argument
1446 return ::SimplifyAShrInst(Op0, Op1, isExact, Query(DL, TLI, DT, AC, CxtI), in SimplifyAShrInst()
1493 static Value *SimplifyAndOfICmps(ICmpInst *Op0, ICmpInst *Op1) { in SimplifyAndOfICmps() argument
1498 if (Value *X = simplifyUnsignedRangeCheck(Op0, Op1, /*IsAnd=*/true)) in SimplifyAndOfICmps()
1501 if (!match(Op0, m_ICmp(Pred0, m_Add(m_Value(V), m_ConstantInt(CI1)), in SimplifyAndOfICmps()
1508 Type *ITy = Op0->getType(); in SimplifyAndOfICmps()
1510 auto *AddInst = cast<BinaryOperator>(Op0->getOperand(0)); in SimplifyAndOfICmps()
1545 static Value *SimplifyAndInst(Value *Op0, Value *Op1, const Query &Q, in SimplifyAndInst() argument
1547 if (Constant *CLHS = dyn_cast<Constant>(Op0)) { in SimplifyAndInst()
1555 std::swap(Op0, Op1); in SimplifyAndInst()
1560 return Constant::getNullValue(Op0->getType()); in SimplifyAndInst()
1563 if (Op0 == Op1) in SimplifyAndInst()
1564 return Op0; in SimplifyAndInst()
1572 return Op0; in SimplifyAndInst()
1575 if (match(Op0, m_Not(m_Specific(Op1))) || in SimplifyAndInst()
1576 match(Op1, m_Not(m_Specific(Op0)))) in SimplifyAndInst()
1577 return Constant::getNullValue(Op0->getType()); in SimplifyAndInst()
1581 if (match(Op0, m_Or(m_Value(A), m_Value(B))) && in SimplifyAndInst()
1587 (A == Op0 || B == Op0)) in SimplifyAndInst()
1588 return Op0; in SimplifyAndInst()
1591 if (match(Op0, m_Neg(m_Specific(Op1))) || in SimplifyAndInst()
1592 match(Op1, m_Neg(m_Specific(Op0)))) { in SimplifyAndInst()
1593 if (isKnownToBeAPowerOfTwo(Op0, Q.DL, /*OrZero*/ true, 0, Q.AC, Q.CxtI, in SimplifyAndInst()
1595 return Op0; in SimplifyAndInst()
1601 if (auto *ICILHS = dyn_cast<ICmpInst>(Op0)) { in SimplifyAndInst()
1611 if (Value *V = SimplifyAssociativeBinOp(Instruction::And, Op0, Op1, Q, in SimplifyAndInst()
1616 if (Value *V = ExpandBinOp(Instruction::And, Op0, Op1, Instruction::Or, in SimplifyAndInst()
1621 if (Value *V = ExpandBinOp(Instruction::And, Op0, Op1, Instruction::Xor, in SimplifyAndInst()
1627 if (isa<SelectInst>(Op0) || isa<SelectInst>(Op1)) in SimplifyAndInst()
1628 if (Value *V = ThreadBinOpOverSelect(Instruction::And, Op0, Op1, Q, in SimplifyAndInst()
1634 if (isa<PHINode>(Op0) || isa<PHINode>(Op1)) in SimplifyAndInst()
1635 if (Value *V = ThreadBinOpOverPHI(Instruction::And, Op0, Op1, Q, in SimplifyAndInst()
1642 Value *llvm::SimplifyAndInst(Value *Op0, Value *Op1, const DataLayout &DL, in SimplifyAndInst() argument
1646 return ::SimplifyAndInst(Op0, Op1, Query(DL, TLI, DT, AC, CxtI), in SimplifyAndInst()
1652 static Value *SimplifyOrOfICmps(ICmpInst *Op0, ICmpInst *Op1) { in SimplifyOrOfICmps() argument
1657 if (Value *X = simplifyUnsignedRangeCheck(Op0, Op1, /*IsAnd=*/false)) in SimplifyOrOfICmps()
1660 if (!match(Op0, m_ICmp(Pred0, m_Add(m_Value(V), m_ConstantInt(CI1)), in SimplifyOrOfICmps()
1667 Type *ITy = Op0->getType(); in SimplifyOrOfICmps()
1669 auto *AddInst = cast<BinaryOperator>(Op0->getOperand(0)); in SimplifyOrOfICmps()
1704 static Value *SimplifyOrInst(Value *Op0, Value *Op1, const Query &Q, in SimplifyOrInst() argument
1706 if (Constant *CLHS = dyn_cast<Constant>(Op0)) { in SimplifyOrInst()
1714 std::swap(Op0, Op1); in SimplifyOrInst()
1719 return Constant::getAllOnesValue(Op0->getType()); in SimplifyOrInst()
1722 if (Op0 == Op1) in SimplifyOrInst()
1723 return Op0; in SimplifyOrInst()
1727 return Op0; in SimplifyOrInst()
1734 if (match(Op0, m_Not(m_Specific(Op1))) || in SimplifyOrInst()
1735 match(Op1, m_Not(m_Specific(Op0)))) in SimplifyOrInst()
1736 return Constant::getAllOnesValue(Op0->getType()); in SimplifyOrInst()
1740 if (match(Op0, m_And(m_Value(A), m_Value(B))) && in SimplifyOrInst()
1746 (A == Op0 || B == Op0)) in SimplifyOrInst()
1747 return Op0; in SimplifyOrInst()
1750 if (match(Op0, m_Not(m_And(m_Value(A), m_Value(B)))) && in SimplifyOrInst()
1756 (A == Op0 || B == Op0)) in SimplifyOrInst()
1757 return Constant::getAllOnesValue(Op0->getType()); in SimplifyOrInst()
1759 if (auto *ICILHS = dyn_cast<ICmpInst>(Op0)) { in SimplifyOrInst()
1769 if (Value *V = SimplifyAssociativeBinOp(Instruction::Or, Op0, Op1, Q, in SimplifyOrInst()
1774 if (Value *V = ExpandBinOp(Instruction::Or, Op0, Op1, Instruction::And, Q, in SimplifyOrInst()
1780 if (isa<SelectInst>(Op0) || isa<SelectInst>(Op1)) in SimplifyOrInst()
1781 if (Value *V = ThreadBinOpOverSelect(Instruction::Or, Op0, Op1, Q, in SimplifyOrInst()
1787 if (match(Op0, m_And(m_Value(A), m_Value(C))) && in SimplifyOrInst()
1823 if (isa<PHINode>(Op0) || isa<PHINode>(Op1)) in SimplifyOrInst()
1824 if (Value *V = ThreadBinOpOverPHI(Instruction::Or, Op0, Op1, Q, MaxRecurse)) in SimplifyOrInst()
1830 Value *llvm::SimplifyOrInst(Value *Op0, Value *Op1, const DataLayout &DL, in SimplifyOrInst() argument
1834 return ::SimplifyOrInst(Op0, Op1, Query(DL, TLI, DT, AC, CxtI), in SimplifyOrInst()
1840 static Value *SimplifyXorInst(Value *Op0, Value *Op1, const Query &Q, in SimplifyXorInst() argument
1842 if (Constant *CLHS = dyn_cast<Constant>(Op0)) { in SimplifyXorInst()
1850 std::swap(Op0, Op1); in SimplifyXorInst()
1859 return Op0; in SimplifyXorInst()
1862 if (Op0 == Op1) in SimplifyXorInst()
1863 return Constant::getNullValue(Op0->getType()); in SimplifyXorInst()
1866 if (match(Op0, m_Not(m_Specific(Op1))) || in SimplifyXorInst()
1867 match(Op1, m_Not(m_Specific(Op0)))) in SimplifyXorInst()
1868 return Constant::getAllOnesValue(Op0->getType()); in SimplifyXorInst()
1871 if (Value *V = SimplifyAssociativeBinOp(Instruction::Xor, Op0, Op1, Q, in SimplifyXorInst()
1887 Value *llvm::SimplifyXorInst(Value *Op0, Value *Op1, const DataLayout &DL, in SimplifyXorInst() argument
1891 return ::SimplifyXorInst(Op0, Op1, Query(DL, TLI, DT, AC, CxtI), in SimplifyXorInst()