Home | History | Annotate | Download | only in InstCombine

Lines Matching defs:And

10 // This file implements the visitShl, visitLShr, and visitAShr functions.
30 // Try to fold constant and into select arguments.
40 // X shift (A srem B) -> X shift (A and B-1) iff B is a power of 2.
46 // demand the sign bit (and many others) here??
108 case Instruction::And:
123 // We can always turn shl(c)+shr(c) -> and(c2).
128 // We can turn shl(c1)+shr(c2) -> shl(c3)+and(c4), but it isn't
129 // profitable unless we know the and'd out bits are already zero.
147 // We can always turn lshr(c)+shl(c) -> and(c2).
152 // We can always turn lshr(c1)+shl(c2) -> lshr(c3)+and(c4), but it isn't
153 // profitable unless we know the and'd out bits are already zero.
203 case Instruction::And:
231 // We turn shl(c)+lshr(c) -> and(c2) if the input doesn't already have
244 // We turn shl(c1)+shr(c2) -> shl(c3)+and(c4), but only when we know that
245 // the and won't be needed.
271 // We turn lshr(c)+shl(c) -> and(c2) if the input doesn't already have
284 // We turn lshr(c1)+shl(c2) -> lshr(c3)+and(c4), but only when we know that
285 // the and won't be needed.
333 // shl i32 X, 32 = 0 and srl i8 Y, 9 = 0, ... just don't eliminate
351 // Try to fold constant and into select arguments.
375 // part of the register be zeros. Emulate this by inserting an AND to
376 // clear the top bits as needed. This 'and' will usually be zapped by
394 Value *And = Builder->CreateAnd(NSh,
399 return new TruncInst(And, I.getType());
411 And:
480 // If the operand is an bitwise operator with a constant RHS, and the
483 bool isValid = true; // Valid only for And, Or, Xor
495 case Instruction::And:
500 // If this is a signed shift right, and the high bit is modified
532 // by a constant, and it is important that simple arithmetic expressions
539 // Combinations of right and left shifts will still be optimized in
551 // Check for (X << c1) << c2 and (X >> c1) >> c2