Lines Matching refs:Op0

1841   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
1846 if (getComplexity(Op0) < getComplexity(Op1)) {
1848 std::swap(Op0, Op1);
1852 if (Value *V = SimplifyICmpInst(I.getPredicate(), Op0, Op1, TD))
1860 if (match(Op0, m_Select(m_Value(Cond), m_Value(SelectTrue),
1873 Type *Ty = Op0->getType();
1880 Value *Xor = Builder->CreateXor(Op0, Op1, I.getName()+"tmp");
1884 return BinaryOperator::CreateXor(Op0, Op1);
1887 std::swap(Op0, Op1); // Change icmp ugt -> icmp ult
1890 Value *Not = Builder->CreateNot(Op0, I.getName()+"tmp");
1894 std::swap(Op0, Op1); // Change icmp sgt -> icmp slt
1898 return BinaryOperator::CreateAnd(Not, Op0);
1901 std::swap(Op0, Op1); // Change icmp uge -> icmp ule
1904 Value *Not = Builder->CreateNot(Op0, I.getName()+"tmp");
1908 std::swap(Op0, Op1); // Change icmp sge -> icmp sle
1912 return BinaryOperator::CreateOr(Not, Op0);
1944 match(Op0, m_Add(m_Add(m_Value(A), m_Value(B)), m_ConstantInt(CI2))))
1951 match(Op0, m_Sub(m_Value(A), m_Value(B)))) {
1964 return new ICmpInst(ICmpInst::ICMP_ULT, Op0,
1968 return new ICmpInst(ICmpInst::ICMP_SLT, Op0,
1972 return new ICmpInst(ICmpInst::ICMP_UGT, Op0,
1976 return new ICmpInst(ICmpInst::ICMP_SGT, Op0,
2021 if (!isa<Constant>(Op0) && Op0Min == Op0Max)
2023 ConstantInt::get(Op0->getType(), Op0Min), Op1);
2025 return new ICmpInst(I.getPredicate(), Op0,
2044 if (!match(Op0, m_And(m_Value(LHS), m_ConstantInt(LHSC))) ||
2046 LHS = Op0;
2081 if (!match(Op0, m_And(m_Value(LHS), m_ConstantInt(LHSC))) ||
2083 LHS = Op0;
2112 return new ICmpInst(ICmpInst::ICMP_NE, Op0, Op1);
2115 return new ICmpInst(ICmpInst::ICMP_EQ, Op0,
2120 return new ICmpInst(ICmpInst::ICMP_SGT, Op0,
2121 Constant::getAllOnesValue(Op0->getType()));
2131 return new ICmpInst(ICmpInst::ICMP_NE, Op0, Op1);
2134 return new ICmpInst(ICmpInst::ICMP_EQ, Op0,
2139 return new ICmpInst(ICmpInst::ICMP_SLT, Op0,
2140 Constant::getNullValue(Op0->getType()));
2149 return new ICmpInst(ICmpInst::ICMP_NE, Op0, Op1);
2152 return new ICmpInst(ICmpInst::ICMP_EQ, Op0,
2163 return new ICmpInst(ICmpInst::ICMP_NE, Op0, Op1);
2166 return new ICmpInst(ICmpInst::ICMP_EQ, Op0,
2205 return new ICmpInst(I.getUnsignedPredicate(), Op0, Op1);
2217 if ((SI->getOperand(1) == Op0 && SI->getOperand(2) == Op1) ||
2218 (SI->getOperand(2) == Op0 && SI->getOperand(1) == Op1))
2227 if (Instruction *LHSI = dyn_cast<Instruction>(Op0))
2234 if (Instruction *LHSI = dyn_cast<Instruction>(Op0))
2302 if (GEPOperator *GEP = dyn_cast<GEPOperator>(Op0))
2306 if (Instruction *NI = FoldGEPICmp(GEP, Op0,
2313 if (BitCastInst *CI = dyn_cast<BitCastInst>(Op0)) {
2314 if (Op0->getType()->isPointerTy() &&
2318 Op0 = CI->getOperand(0);
2326 if (Op0->getType() != Op1->getType()) {
2328 Op1 = ConstantExpr::getBitCast(Op1C, Op0->getType());
2331 Op1 = Builder->CreateBitCast(Op1, Op0->getType());
2334 return new ICmpInst(I.getPredicate(), Op0, Op1);
2338 if (isa<CastInst>(Op0)) {
2351 BinaryOperator *BO0 = dyn_cast<BinaryOperator>(Op0);
2365 // Analyze the case when either Op0 or Op1 is an add instruction.
2366 // Op0 = A + B (or A and B are null); Op1 = C + D (or C and D are null).
2379 if ((C == Op0 || D == Op0) && NoOp1WrapProblem)
2380 return new ICmpInst(Pred, Constant::getNullValue(Op0->getType()),
2381 C == Op0 ? D : C);
2411 // Analyze the case when either Op0 or Op1 is a sub instruction.
2412 // Op0 = A - B (or A and B are null); Op1 = C - D (or C and D are null).
2424 if (C == Op0 && NoOp1WrapProblem)
2425 return new ICmpInst(Pred, D, Constant::getNullValue(Op0->getType()));
2446 Op0 == BO1->getOperand(1))
2546 if (match(Op0, m_Not(m_Value(A)))) {
2556 match(Op0, m_Add(m_Value(A), m_Value(B))) &&
2558 if (Instruction *R = ProcessUAddIdiom(I, Op0, *this))
2565 (Op0 == A || Op0 == B))
2573 if (match(Op0, m_Xor(m_Value(A), m_Value(B)))) {
2600 (A == Op0 || B == Op0)) {
2602 Value *OtherVal = A == Op0 ? B : A;
2608 if (match(Op0, m_OneUse(m_And(m_Value(A), m_Value(B)))) &&
2634 if ((Op0->hasOneUse() &&
2635 match(Op0, m_ZExt(m_Value(A))) &&
2638 match(Op0, m_And(m_Value(B), m_ConstantInt(Cst1))) &&
2650 if (Op0->hasOneUse() &&
2651 match(Op0, m_Trunc(m_OneUse(m_LShr(m_Value(A),
2661 APInt::getLowBitsSet(ASize, Op0->getType()->getPrimitiveSizeInBits());
2676 if (match(Op0, m_Add(m_Value(X), m_ConstantInt(Cst))) && Op1 == X)
2677 return FoldICmpAddOpCst(I, X, Cst, I.getPredicate(), Op0);
2680 if (match(Op1, m_Add(m_Value(X), m_ConstantInt(Cst))) && Op0 == X)
2905 Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
2907 if (Value *V = SimplifyFCmpInst(I.getPredicate(), Op0, Op1, TD))
2911 if (Op0 == Op1) {
2920 I.setOperand(1, Constant::getNullValue(Op0->getType()));
2929 I.setOperand(1, Constant::getNullValue(Op0->getType()));
2936 if (Instruction *LHSI = dyn_cast<Instruction>(Op0))
3077 if (match(Op0, m_FNeg(m_Value(X))) && match(Op1, m_FNeg(m_Value(Y))))
3081 if (FPExtInst *LHSExt = dyn_cast<FPExtInst>(Op0))