Lines Matching defs:Or
68 /// operands into either a constant true or false, or a brand new ICmp
105 /// \return Pointer to node that must replace the original binary operator, or
115 if (Op != Instruction::And && Op != Instruction::Or &&
148 else if (Op == Instruction::Or)
178 case Instruction::Or:
182 Value *Or = Builder->CreateOr(X, Together);
183 Or->takeName(Op);
184 return BinaryOperator::CreateAnd(Or, AndRHS);
298 /// whether to treat the V, Lo and HI as signed or not. IB is the location to
399 case Instruction::Or:
416 /// described as the "AMask" or "BMask" part of the enum. If the enum
419 /// is trivial if C == A, or C == 0. If both A and C are constants, this
423 /// if (A & B) == A, or all bits of A are set in B.
426 /// if (A & B) == 0, or all bits of A are cleared in B.
428 /// The part "Mixed" declares, that (A & B) == C and C might or might not
540 /// The returned predicate is either == or !=. Returns false if
769 // -> (icmp ne (A & B), 0) or (icmp ne (A & D), 0)
771 // the same as either B or D).
781 // -> (icmp ne (A & B), A) or (icmp ne (A & D), A)
783 // the same as either B or D).
838 // Accept x > -1 or x >= 0 (after potentially inverting the predicate).
1208 assert((Opcode == Instruction::And || Opcode == Instruction::Or) &&
1209 or");
1212 Opcode = Instruction::Or;
1282 case Instruction::Or: {
1416 // A is originally -1 (or a vector of -1 and undefs), then we enter
1540 // Canonicalize SExt or Not to the LHS
1570 /// pieces of a bswap or bitreverse. The subexpression provides a potential
1571 /// piece of a bswap or bitreverse if it can be proven that each non-zero bit in
1576 /// mapping is correct for a bswap or bitreverse.
1599 // If this is an or instruction, it may be an inner node of the bswap.
1600 if (I->getOpcode() == Instruction::Or)
1664 // Okay, we got to something that isn't a shift, 'or' or 'and'. This must be
1665 // the input value to the bswap/bitreverse. To be part of a bswap or
1680 // If the destination bit value is already defined, the values are or'd
1681 // together, which isn't a bswap/bitreverse (unless it's an or of the same
1707 /// Given an OR instruction, check to see if this is a bswap or bitreverse
1733 // Now, is the bit permutation correct for a bswap or a bitreverse? We can
1755 /// and either B or D is ~(cond?-1,0) or (cond?0,-1), then we can simplify this
1756 /// expression to "cond ? C : D or B".
1981 // comparing a value against two constants and or'ing the result
2002 Value *Or = Builder->CreateOr(LHS->getOperand(0), Cst);
2003 return Builder->CreateICmp(ICmpInst::ICMP_EQ, Or, RHSCst);
2162 // If both are ordered or unordered, return a new fcmp with
2163 // or'ed predicates.
2260 Value *Or = Builder->CreateOr(X, RHS);
2261 Or->takeName(Op0);
2262 return BinaryOperator::CreateAnd(Or,
2269 Value *Or = Builder->CreateOr(X, RHS);
2270 Or->takeName(Op0);
2271 return BinaryOperator::CreateXor(Or,
2358 // Or commutes, try both ways.
2490 Op1->hasOneUse() && (B->getOpcode() == Instruction::Or ||
2519 // number of 'or' instructions might have to be created.
2545 // fold (or (cast A), (cast B)) -> (cast (or A, B))
2563 // If this is or(cast(icmp), cast(icmp)), try to fold this even if the
2570 // If this is or(cast(fcmp), cast(fcmp)), try to fold this even if the
2580 // or(sext(A), B) -> A ? -1 : B where A is an i1
2581 // or(A, sext(B)) -> B ? -1 : A where B is an i1
2587 // Note: If we've gotten to the point of visiting the outer OR, then the
2599 // Change (or (bool?A:B),(bool?C:D)) --> (bool?(or A,C):(or B,D))
2600 // Since this OR statement hasn't been optimized further yet, we hope
2642 Op0I->getOpcode() == Instruction::Or) {
2729 } else if (Op0I->getOpcode() == Instruction::Or) {