Lines Matching refs:Op0
878 Value *Op0 = LHS->getOperand(0), *Op1 = LHS->getOperand(1); in FoldAndOfICmps() local
881 return getNewICmpValue(isSigned, Code, Op0, Op1, Builder); in FoldAndOfICmps()
1162 Value *Op0 = I.getOperand(0); in matchDeMorgansLaws() local
1165 if (Value *Op0NotVal = dyn_castNotVal(Op0)) in matchDeMorgansLaws()
1167 if (Op0->hasOneUse() && Op1->hasOneUse()) { in matchDeMorgansLaws()
1179 if (match(Op0, m_OneUse(m_Xor(m_ZExt(m_Value(A)), m_ConstantInt(C1)))) && in matchDeMorgansLaws()
1202 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in foldCastedBitwiseLogic() local
1203 CastInst *Cast0 = dyn_cast<CastInst>(Op0); in foldCastedBitwiseLogic()
1221 if ((match(Op0, m_BitCast(m_Value(BC))) && match(Op1, m_Constant(C)))) { in foldCastedBitwiseLogic()
1283 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in foldBoolSextMaskToSelect() local
1287 std::swap(Op0, Op1); in foldBoolSextMaskToSelect()
1292 if (match(Op0, m_SExt(m_Value(X))) && in foldBoolSextMaskToSelect()
1299 if (match(Op0, m_Not(m_SExt(m_Value(X)))) && in foldBoolSextMaskToSelect()
1301 Value *Zero = Constant::getNullValue(Op0->getType()); in foldBoolSextMaskToSelect()
1310 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in visitAnd() local
1315 if (Value *V = SimplifyAndInst(Op0, Op1, DL, TLI, DT, AC)) in visitAnd()
1334 if (BinaryOperator *Op0I = dyn_cast<BinaryOperator>(Op0)) { in visitAnd()
1417 if (match(Op0, m_Trunc(m_And(m_Value(X), m_ConstantInt(YC))))) { in visitAnd()
1430 if (SelectInst *SI = dyn_cast<SelectInst>(Op0)) in visitAnd()
1433 if (isa<PHINode>(Op0)) in visitAnd()
1444 if (match(Op0, m_Or(m_Value(A), m_Value(B))) && in visitAnd()
1451 match(Op0, m_Not(m_And(m_Value(C), m_Value(D)))) && in visitAnd()
1457 Value *tmpOp0 = Op0; in visitAnd()
1459 if (match(Op0, m_OneUse(m_Xor(m_Value(A), m_Value(B))))) { in visitAnd()
1461 tmpOp1 = Op0; in visitAnd()
1481 if (match(Op0, m_Or(m_Not(m_Specific(Op1)), m_Value(A))) || in visitAnd()
1482 match(Op0, m_Or(m_Value(A), m_Not(m_Specific(Op1))))) in visitAnd()
1484 if (match(Op1, m_Or(m_Not(m_Specific(Op0)), m_Value(A))) || in visitAnd()
1485 match(Op1, m_Or(m_Value(A), m_Not(m_Specific(Op0))))) in visitAnd()
1486 return BinaryOperator::CreateAnd(A, Op0); in visitAnd()
1489 if (match(Op0, m_Xor(m_Value(A), m_Value(B)))) in visitAnd()
1492 return BinaryOperator::CreateAnd(Op0, Builder->CreateNot(C)); in visitAnd()
1495 if (match(Op0, m_Xor(m_Xor(m_Value(A), m_Value(C)), m_Value(B)))) in visitAnd()
1497 if (Op0->hasOneUse() || cast<BinaryOperator>(Op0)->hasOneUse()) in visitAnd()
1501 if (match(Op0, m_Or(m_Value(A), m_Value(B))) && in visitAnd()
1506 if (match(Op0, m_Xor(m_Not(m_Value(A)), m_Value(B))) && in visitAnd()
1512 ICmpInst *LHS = dyn_cast<ICmpInst>(Op0); in visitAnd()
1529 if (RHS && match(Op0, m_OneUse(m_And(m_Value(X), m_Value(Y))))) { in visitAnd()
1557 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in MatchBSwap() local
1560 if (Instruction *Ext = dyn_cast<ZExtInst>(Op0)) in MatchBSwap()
1561 Op0 = Ext->getOperand(0); in MatchBSwap()
1567 bool OrOfOrs = match(Op0, m_Or(m_Value(), m_Value())) || in MatchBSwap()
1571 bool OrOfShifts = match(Op0, m_LogicalShift(m_Value(), m_Value())) && in MatchBSwap()
1575 bool OrOfAnds = match(Op0, m_And(m_Value(), m_Value())) && in MatchBSwap()
1782 Value *Op0 = LHS->getOperand(0), *Op1 = LHS->getOperand(1); in FoldOrOfICmps() local
1785 return getNewICmpValue(isSigned, Code, Op0, Op1, Builder); in FoldOrOfICmps()
2124 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in visitOr() local
2129 if (Value *V = SimplifyOrInst(Op0, Op1, DL, TLI, DT, AC)) in visitOr()
2148 if (match(Op0, m_And(m_Value(X), m_ConstantInt(C1))) && in visitOr()
2150 Op0->hasOneUse()) { in visitOr()
2152 Or->takeName(Op0); in visitOr()
2158 if (match(Op0, m_Xor(m_Value(X), m_ConstantInt(C1))) && in visitOr()
2159 Op0->hasOneUse()) { in visitOr()
2161 Or->takeName(Op0); in visitOr()
2167 if (SelectInst *SI = dyn_cast<SelectInst>(Op0)) in visitOr()
2171 if (isa<PHINode>(Op0)) in visitOr()
2184 if (Op0->hasOneUse() && in visitOr()
2185 match(Op0, m_Xor(m_Value(A), m_ConstantInt(C1))) && in visitOr()
2188 NOr->takeName(Op0); in visitOr()
2195 MaskedValueIsZero(Op0, C1->getValue(), 0, &I)) { in visitOr()
2196 Value *NOr = Builder->CreateOr(A, Op0); in visitOr()
2197 NOr->takeName(Op0); in visitOr()
2202 if (match(Op0, m_And(m_Not(m_Value(A)), m_Value(B))) && in visitOr()
2207 if (match(Op0, m_And(m_Value(A), m_Value(B))) && in visitOr()
2212 if (match(Op0, m_And(m_Value(A), m_Not(m_Value(B)))) && in visitOr()
2217 if (match(Op0, m_Xor(m_Value(A), m_Value(B))) && in visitOr()
2223 if (match(Op0, m_And(m_Value(A), m_Value(C))) && in visitOr()
2265 if (Op0->hasOneUse() || Op1->hasOneUse()) { in visitOr()
2311 Instruction *Ret = FoldOrWithConstants(I, Op0, A, V1, D); in visitOr()
2323 Instruction *Ret = FoldXorWithConstants(I, Op0, A, V1, D); in visitOr()
2329 if (match(Op0, m_Xor(m_Value(A), m_Value(B)))) in visitOr()
2332 return BinaryOperator::CreateOr(Op0, C); in visitOr()
2335 if (match(Op0, m_Xor(m_Xor(m_Value(A), m_Value(C)), m_Value(B)))) in visitOr()
2337 if (Op0->hasOneUse() || cast<BinaryOperator>(Op0)->hasOneUse()) in visitOr()
2341 if (match(Op0, m_And(m_Or(m_Specific(Op1), m_Value(C)), m_Value(A)))) in visitOr()
2349 if (match(Op0, m_Xor(m_Value(), m_Value()))) { in visitOr()
2350 std::swap(Op0, Op1); in visitOr()
2358 if (Op0 == A || Op0 == B) in visitOr()
2361 if (match(Op0, m_And(m_Specific(A), m_Specific(B))) || in visitOr()
2362 match(Op0, m_And(m_Specific(B), m_Specific(A)))) in visitOr()
2365 if (Op1->hasOneUse() && match(A, m_Not(m_Specific(Op0)))) { in visitOr()
2367 return BinaryOperator::CreateOr(Not, Op0); in visitOr()
2369 if (Op1->hasOneUse() && match(B, m_Not(m_Specific(Op0)))) { in visitOr()
2371 return BinaryOperator::CreateOr(Not, Op0); in visitOr()
2379 if ((Op0 == B->getOperand(0) || Op0 == B->getOperand(1)) && in visitOr()
2382 Value *NotOp = Op0 == B->getOperand(0) ? B->getOperand(1) : in visitOr()
2385 return BinaryOperator::CreateOr(Not, Op0); in visitOr()
2389 if (match(Op0, m_And(m_Value(A), m_Value(B))) && in visitOr()
2394 if (match(Op0, m_Xor(m_Not(m_Value(A)), m_Value(B))) && in visitOr()
2399 std::swap(Op0, Op1); in visitOr()
2402 ICmpInst *LHS = dyn_cast<ICmpInst>(Op0); in visitOr()
2419 if (RHS && match(Op0, m_OneUse(m_Or(m_Value(X), m_Value(Y))))) { in visitOr()
2439 if (match(Op0, m_OneUse(m_SExt(m_Value(A)))) && in visitOr()
2444 return SelectInst::Create(A, ConstantInt::getSigned(I.getType(), -1), Op0); in visitOr()
2451 if (Op0->hasOneUse() && !isa<ConstantInt>(Op1) && in visitOr()
2452 match(Op0, m_Or(m_Value(A), m_ConstantInt(C1)))) { in visitOr()
2454 Inner->takeName(Op0); in visitOr()
2463 if (Op0->hasOneUse() && Op1->hasOneUse() && in visitOr()
2464 match(Op0, m_Select(m_Value(X), m_Value(A), m_Value(B))) && in visitOr()
2477 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); in visitXor() local
2482 if (Value *V = SimplifyXorInst(Op0, Op1, DL, TLI, DT, AC)) in visitXor()
2539 if (RHS->isAllOnesValue() && Op0->hasOneUse()) in visitXor()
2541 if (CmpInst *CI = dyn_cast<CmpInst>(Op0)) in visitXor()
2549 if (CastInst *Op0C = dyn_cast<CastInst>(Op0)) { in visitXor()
2563 if (BinaryOperator *Op0I = dyn_cast<BinaryOperator>(Op0)) { in visitXor()
2629 if (SelectInst *SI = dyn_cast<SelectInst>(Op0)) in visitXor()
2632 if (isa<PHINode>(Op0)) in visitXor()
2641 if (A == Op0) { // B^(B|A) == (A|B)^B in visitXor()
2644 std::swap(Op0, Op1); in visitXor()
2645 } else if (B == Op0) { // B^(A|B) == (A|B)^B in visitXor()
2647 std::swap(Op0, Op1); in visitXor()
2651 if (A == Op0) { // A^(A&B) -> A^(B&A) in visitXor()
2655 if (B == Op0) { // A^(B&A) -> (B&A)^A in visitXor()
2657 std::swap(Op0, Op1); in visitXor()
2662 BinaryOperator *Op0I = dyn_cast<BinaryOperator>(Op0); in visitXor()
2748 if (match(Op0, m_And(m_Value(A), m_Not(m_Value(B)))) && in visitXor()
2761 Value *Op0 = LHS->getOperand(0), *Op1 = LHS->getOperand(1); in visitXor() local
2765 getNewICmpValue(isSigned, Code, Op0, Op1, in visitXor()