Home | History | Annotate | Download | only in InstCombine

Lines Matching refs:Op0I

1029     if (BinaryOperator *Op0I = dyn_cast<BinaryOperator>(Op0)) {
1030 Value *Op0LHS = Op0I->getOperand(0);
1031 Value *Op0RHS = Op0I->getOperand(1);
1032 switch (Op0I->getOpcode()) {
1037 if (!Op0I->hasOneUse()) break;
1044 return BinaryOperator::Create(Op0I->getOpcode(), Op0LHS, NewRHS);
1051 return BinaryOperator::Create(Op0I->getOpcode(), NewLHS, Op0RHS);
1075 if (Op0I->hasOneUse() && !match(Op0LHS, m_Zero())) {
1099 if (ConstantInt *Op0CI = dyn_cast<ConstantInt>(Op0I->getOperand(1)))
1100 if (Instruction *Res = OptAndOp(Op0I, Op0CI, AndRHS, I))
2130 if (BinaryOperator *Op0I = dyn_cast<BinaryOperator>(NotOp)) {
2131 if (Op0I->getOpcode() == Instruction::And ||
2132 Op0I->getOpcode() == Instruction::Or) {
2135 if (dyn_castNotVal(Op0I->getOperand(1)))
2136 Op0I->swapOperands();
2137 if (Value *Op0NotVal = dyn_castNotVal(Op0I->getOperand(0))) {
2139 Builder->CreateNot(Op0I->getOperand(1),
2140 Op0I->getOperand(1)->getName()+".not");
2141 if (Op0I->getOpcode() == Instruction::And)
2148 if (isFreeToInvert(Op0I->getOperand(0)) &&
2149 isFreeToInvert(Op0I->getOperand(1))) {
2151 Builder->CreateNot(Op0I->getOperand(0), "notlhs");
2153 Builder->CreateNot(Op0I->getOperand(1), "notrhs");
2154 if (Op0I->getOpcode() == Instruction::And)
2159 } else if (Op0I->getOpcode() == Instruction::AShr) {
2161 if (Value *Op0NotVal = dyn_castNotVal(Op0I->getOperand(0)))
2162 return BinaryOperator::CreateAShr(Op0NotVal, Op0I->getOperand(1));
2191 if (BinaryOperator *Op0I = dyn_cast<BinaryOperator>(Op0)) {
2193 if (Op0I->getOpcode() == Instruction::Sub && RHS->isAllOnesValue())
2194 if (Constant *Op0I0C = dyn_cast<Constant>(Op0I->getOperand(0))) {
2198 return BinaryOperator::CreateAdd(Op0I->getOperand(1), ConstantRHS);
2201 if (ConstantInt *Op0CI = dyn_cast<ConstantInt>(Op0I->getOperand(1))) {
2202 if (Op0I->getOpcode() == Instruction::Add) {
2209 Op0I->getOperand(0));
2213 return BinaryOperator::CreateAdd(Op0I->getOperand(0), C);
2216 } else if (Op0I->getOpcode() == Instruction::Or) {
2218 if (MaskedValueIsZero(Op0I->getOperand(0), Op0CI->getValue())) {
2225 Worklist.Add(Op0I);
2226 I.setOperand(0, Op0I->getOperand(0));
2230 } else if (Op0I->getOpcode() == Instruction::LShr) {
2235 if (Op0I->hasOneUse() &&
2236 (E1 = dyn_cast<BinaryOperator>(Op0I->getOperand(0))) &&
2245 Opnd0->takeName(Op0I);
2289 BinaryOperator *Op0I = dyn_cast<BinaryOperator>(Op0);
2290 if (Op0I) {
2292 if (match(Op0I, m_Or(m_Value(A), m_Value(B))) &&
2293 Op0I->hasOneUse()) {
2298 } else if (match(Op0I, m_And(m_Value(A), m_Value(B))) &&
2299 Op0I->hasOneUse()){
2310 if (Op0I && Op1I && Op0I->isShift() &&
2311 Op0I->getOpcode() == Op1I->getOpcode() &&
2312 Op0I->getOperand(1) == Op1I->getOperand(1) &&
2313 (Op0I->hasOneUse() || Op1I->hasOneUse())) {
2315 Builder->CreateXor(Op0I->getOperand(0), Op1I->getOperand(0),
2316 Op0I->getName());
2321 if (Op0I && Op1I) {
2324 if (match(Op0I, m_And(m_Value(A), m_Value(B))) &&
2330 if (match(Op0I, m_Or(m_Value(A), m_Value(B))) &&