Lines Matching refs:Instruction

123 Instruction *InstCombiner::OptAndOp(Instruction *Op,
133 case Instruction::Xor:
141 case Instruction::Or:
163 case Instruction::Add:
197 case Instruction::Shl: {
216 case Instruction::LShr: {
236 case Instruction::AShr:
334 Instruction &I) {
335 Instruction *LHSI = dyn_cast<Instruction>(LHS);
343 case Instruction::And:
363 case Instruction::Or:
364 case Instruction::Xor:
1105 Instruction *InstCombiner::visitAnd(BinaryOperator &I) {
1133 case Instruction::Xor:
1134 case Instruction::Or: {
1155 case Instruction::Add:
1165 case Instruction::Sub:
1186 case Instruction::Shl:
1187 case Instruction::LShr:
1199 if (Instruction *Res = OptAndOp(Op0I, Op0CI, AndRHS, I))
1221 if (Instruction *R = FoldOpIntoSelect(I, SI))
1224 if (Instruction *NV = FoldOpIntoPhi(I))
1402 if (Instruction *I = dyn_cast<Instruction>(V)) {
1404 if (I->getOpcode() == Instruction::Or) {
1421 if (I->getOpcode() == Instruction::Shl) {
1441 if (I->getOpcode() == Instruction::And &&
1501 Instruction *InstCombiner::MatchBSwap(BinaryOperator &I) {
1534 static Instruction *MatchSelectFromAndOr(Value *A, Value *B,
1571 LAnd->getOpcode() == Instruction::And &&
1572 RAnd->getOpcode() == Instruction::And) {
1889 Instruction *InstCombiner::FoldOrWithConstants(BinaryOperator &I, Value *Op,
1909 Instruction *InstCombiner::visitOr(BinaryOperator &I) {
1952 if (Instruction *R = FoldOpIntoSelect(I, SI))
1956 if (Instruction *NV = FoldOpIntoPhi(I))
1969 if (Instruction *BSwap = MatchBSwap(I))
2032 if (Instruction *Match = MatchSelectFromAndOr(A, B, C, D))
2034 if (Instruction *Match = MatchSelectFromAndOr(B, A, D, C))
2036 if (Instruction *Match = MatchSelectFromAndOr(C, B, A, D))
2038 if (Instruction *Match = MatchSelectFromAndOr(D, A, B, C))
2062 Instruction *Ret = FoldOrWithConstants(I, Op1, V1, B, C);
2068 Instruction *Ret = FoldOrWithConstants(I, Op0, A, V1, D);
2128 Op1->hasOneUse() && (B->getOpcode() == Instruction::Or ||
2129 B->getOpcode() == Instruction::Xor)) {
2221 Instruction *InstCombiner::visitXor(BinaryOperator &I) {
2243 if (Op0I->getOpcode() == Instruction::And ||
2244 Op0I->getOpcode() == Instruction::Or) {
2253 if (Op0I->getOpcode() == Instruction::And)
2266 if (Op0I->getOpcode() == Instruction::And)
2271 } else if (Op0I->getOpcode() == Instruction::AShr) {
2292 Instruction::CastOps Opcode = Op0C->getOpcode();
2293 if ((Opcode == Instruction::ZExt || Opcode == Instruction::SExt) &&
2305 if (Op0I->getOpcode() == Instruction::Sub && RHS->isAllOnesValue())
2314 if (Op0I->getOpcode() == Instruction::Add) {
2328 } else if (Op0I->getOpcode() == Instruction::Or) {
2342 } else if (Op0I->getOpcode() == Instruction::LShr) {
2349 E1->getOpcode() == Instruction::Xor &&
2358 cast<Instruction>(Opnd0)->setDebugLoc(I.getDebugLoc());
2369 if (Instruction *R = FoldOpIntoSelect(I, SI))
2372 if (Instruction *NV = FoldOpIntoPhi(I))