Lines Matching refs:Op1
890 Value *Op0 = LHS->getOperand(0), *Op1 = LHS->getOperand(1); in FoldAndOfICmps() local
893 return getNewICmpValue(isSigned, Code, Op0, Op1, Builder); in FoldAndOfICmps()
1217 Value *Op1 = I.getOperand(1); in matchDeMorgansLaws() local
1220 if (Value *Op1NotVal = dyn_castNotVal(Op1)) in matchDeMorgansLaws()
1221 if (Op0->hasOneUse() && Op1->hasOneUse()) { in matchDeMorgansLaws()
1234 match(Op1, m_OneUse(m_Xor(m_ZExt(m_Value(B)), m_Specific(C1))))) { in matchDeMorgansLaws()
1252 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in visitAnd() local
1257 if (Value *V = SimplifyAndInst(Op0, Op1, DL, TLI, DT, AC)) in visitAnd()
1272 if (ConstantInt *AndRHS = dyn_cast<ConstantInt>(Op1)) { in visitAnd()
1387 match(Op1, m_Not(m_And(m_Value(C), m_Value(D)))) && in visitAnd()
1392 if (match(Op1, m_Or(m_Value(A), m_Value(B))) && in visitAnd()
1400 Value *tmpOp1 = Op1; in visitAnd()
1403 if (A == Op1 || B == Op1 ) { in visitAnd()
1405 tmpOp0 = Op1; in visitAnd()
1425 if (match(Op0, m_Or(m_Not(m_Specific(Op1)), m_Value(A))) || in visitAnd()
1426 match(Op0, m_Or(m_Value(A), m_Not(m_Specific(Op1))))) in visitAnd()
1427 return BinaryOperator::CreateAnd(A, Op1); in visitAnd()
1428 if (match(Op1, m_Or(m_Not(m_Specific(Op0)), m_Value(A))) || in visitAnd()
1429 match(Op1, m_Or(m_Value(A), m_Not(m_Specific(Op0))))) in visitAnd()
1434 if (match(Op1, m_Xor(m_Xor(m_Specific(B), m_Value(C)), m_Specific(A)))) in visitAnd()
1435 if (Op1->hasOneUse() || cast<BinaryOperator>(Op1)->hasOneUse()) in visitAnd()
1440 if (match(Op1, m_Xor(m_Specific(B), m_Specific(A)))) in visitAnd()
1442 return BinaryOperator::CreateAnd(Op1, Builder->CreateNot(C)); in visitAnd()
1446 match(Op1, m_Xor(m_Not(m_Specific(A)), m_Specific(B)))) in visitAnd()
1451 match(Op1, m_Or(m_Specific(A), m_Specific(B)))) in visitAnd()
1457 ICmpInst *RHS = dyn_cast<ICmpInst>(Op1); in visitAnd()
1465 if (LHS && match(Op1, m_OneUse(m_And(m_Value(X), m_Value(Y))))) { in visitAnd()
1494 if (CastInst *Op1C = dyn_cast<CastInst>(Op1)) { in visitAnd()
1529 match(Op1, m_ConstantInt(CI)) && CI->isMaxValue(true)) { in visitAnd()
1541 if (match(Op1, m_SExt(m_Value())) || in visitAnd()
1542 match(Op1, m_Not(m_Value()))) { in visitAnd()
1543 std::swap(Op0, Op1); in visitAnd()
1550 Value *Zero = Constant::getNullValue(Op1->getType()); in visitAnd()
1551 return SelectInst::Create(X, Op1, Zero); in visitAnd()
1558 return SelectInst::Create(X, Zero, Op1); in visitAnd()
1562 std::swap(Op0, Op1); in visitAnd()
1883 Value *Op0 = LHS->getOperand(0), *Op1 = LHS->getOperand(1); in FoldOrOfICmps() local
1886 return getNewICmpValue(isSigned, Code, Op0, Op1, Builder); in FoldOrOfICmps()
2233 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in visitOr() local
2238 if (Value *V = SimplifyOrInst(Op0, Op1, DL, TLI, DT, AC)) in visitOr()
2253 if (ConstantInt *RHS = dyn_cast<ConstantInt>(Op1)) { in visitOr()
2290 match(Op1, m_Or(m_Value(), m_Value())); in visitOr()
2293 match(Op1, m_LogicalShift(m_Value(), m_Value())); in visitOr()
2296 match(Op1, m_And(m_Value(), m_Value())); in visitOr()
2305 MaskedValueIsZero(Op1, C1->getValue(), 0, &I)) { in visitOr()
2306 Value *NOr = Builder->CreateOr(A, Op1); in visitOr()
2312 if (Op1->hasOneUse() && in visitOr()
2313 match(Op1, m_Xor(m_Value(A), m_ConstantInt(C1))) && in visitOr()
2322 match(Op1, m_Specific(A))) in visitOr()
2327 match(Op1, m_Not(m_Specific(A)))) in visitOr()
2332 match(Op1, m_Xor(m_Specific(A), m_Specific(B)))) in visitOr()
2337 match(Op1, m_And(m_Specific(A), m_Not(m_Specific(B))))) in visitOr()
2343 match(Op1, m_And(m_Value(B), m_Value(D)))) { in visitOr()
2415 Instruction *Ret = FoldOrWithConstants(I, Op1, V1, B, C); in visitOr()
2427 Instruction *Ret = FoldXorWithConstants(I, Op1, V1, B, C); in visitOr()
2440 if (match(Op1, m_Xor(m_Xor(m_Specific(B), m_Value(C)), m_Specific(A)))) in visitOr()
2441 if (Op1->hasOneUse() || cast<BinaryOperator>(Op1)->hasOneUse()) in visitOr()
2446 if (match(Op1, m_Xor(m_Specific(B), m_Specific(A)))) in visitOr()
2448 return BinaryOperator::CreateOr(Op1, C); in visitOr()
2451 if (match(Op0, m_And(m_Or(m_Specific(Op1), m_Value(C)), m_Value(A)))) in visitOr()
2452 return BinaryOperator::CreateOr(Op1, Builder->CreateAnd(A, C)); in visitOr()
2460 std::swap(Op0, Op1); in visitOr()
2467 if (match(Op1, m_Xor(m_Value(A), m_Value(B)))) { in visitOr()
2475 if (Op1->hasOneUse() && match(A, m_Not(m_Specific(Op0)))) { in visitOr()
2479 if (Op1->hasOneUse() && match(B, m_Not(m_Specific(Op0)))) { in visitOr()
2487 if (match(Op1, m_Not(m_Value(A)))) in visitOr()
2490 Op1->hasOneUse() && (B->getOpcode() == Instruction::Or || in visitOr()
2500 match(Op1, m_Xor(m_Not(m_Specific(A)), m_Specific(B)))) in visitOr()
2505 match(Op1, m_And(m_Specific(A), m_Specific(B)))) in visitOr()
2509 std::swap(Op0, Op1); in visitOr()
2513 ICmpInst *RHS = dyn_cast<ICmpInst>(Op1); in visitOr()
2521 if (LHS && match(Op1, m_OneUse(m_Or(m_Value(X), m_Value(Y))))) { in visitOr()
2547 CastInst *Op1C = dyn_cast<CastInst>(Op1); in visitOr()
2583 return SelectInst::Create(A, ConstantInt::getSigned(I.getType(), -1), Op1); in visitOr()
2584 if (match(Op1, m_SExt(m_Value(A))) && A->getType()->isIntegerTy(1)) in visitOr()
2592 if (Op0->hasOneUse() && !isa<ConstantInt>(Op1) && in visitOr()
2594 Value *Inner = Builder->CreateOr(A, Op1); in visitOr()
2604 if (Op0->hasOneUse() && Op1->hasOneUse() && in visitOr()
2606 match(Op1, m_Select(m_Value(Y), m_Value(C), m_Value(D))) && X == Y) { in visitOr()
2618 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in visitXor() local
2623 if (Value *V = SimplifyXorInst(Op0, Op1, DL, TLI, DT, AC)) in visitXor()
2679 if (Constant *RHS = dyn_cast<Constant>(Op1)) { in visitXor()
2688 if (ConstantInt *RHS = dyn_cast<ConstantInt>(Op1)) { in visitXor()
2778 BinaryOperator *Op1I = dyn_cast<BinaryOperator>(Op1); in visitXor()
2785 std::swap(Op0, Op1); in visitXor()
2788 std::swap(Op0, Op1); in visitXor()
2798 std::swap(Op0, Op1); in visitXor()
2808 if (A == Op1) // (B|A)^B == (A|B)^B in visitXor()
2810 if (B == Op1) // (A|B)^B == A & ~B in visitXor()
2811 return BinaryOperator::CreateAnd(A, Builder->CreateNot(Op1)); in visitXor()
2814 if (A == Op1) // (A&B)^A -> (B&A)^A in visitXor()
2816 if (B == Op1 && // (B&A)^A == ~B & A in visitXor()
2817 !isa<ConstantInt>(Op1)) { // Canonical form is (B&C)^C in visitXor()
2818 return BinaryOperator::CreateAnd(Builder->CreateNot(A), Op1); in visitXor()
2890 match(Op1, m_Not(m_Specific(A)))) in visitXor()
2902 Value *Op0 = LHS->getOperand(0), *Op1 = LHS->getOperand(1); in visitXor() local
2906 getNewICmpValue(isSigned, Code, Op0, Op1, in visitXor()
2913 if (CastInst *Op1C = dyn_cast<CastInst>(Op1)) in visitXor()