Lines Matching full:icmp
95 /// new ICmp instruction. The sign is passed in to determine which kind
96 /// of predicate to use in the new icmp instruction.
386 /// enum for classifying (icmp eq (A & B), C) and (icmp ne (A & B), C)
396 /// Example: (icmp eq (A & 3), 3) -> FoldMskICmp_AMask_AllOnes
399 /// Example: (icmp eq (A & 3), 0) -> FoldMskICmp_Mask_AllZeroes
402 /// Example: (icmp
405 /// Example: (icmp ne (A & 3), 3) -> FoldMskICmp_AMask_NotAllOnes
407 /// (icmp eq (A & B), A) equals (icmp ne (A & B), 0)
408 /// (icmp ne (A & B), A) equals (icmp eq (A & B), 0)
423 /// that (icmp SCC (A & B), C) satisfies
491 /// decomposeBitTestICmp - Decompose an icmp into the form ((X & Y) pred Z)
524 /// handle (icmp(A & B) ==/!= C) &/| (icmp(A & D) ==/!= E)
546 // Check whether the icmp can be decomposed into a bit test.
550 // Look for ANDs in the LHS icmp.
562 // Bail if LHS was a icmp that can't be decomposed into an equality.
587 // Bail if RHS was a icmp that can't be decomposed into an equality.
591 // Look for ANDs in on the right side of the RHS icmp.
619 /// try to fold (icmp(A & B) ==/!= C) &/| (icmp(A & D) ==/!= E)
620 /// into a single (icmp(A & X) ==/!= Y)
636 // (icmp eq (A & B), 0) & (icmp eq (A & D), 0)
637 // -> (icmp eq (A & (B|D)), 0)
641 // (icmp ne (A & B), B) & (icmp ne (A & D), D)
647 // (icmp eq (A & B), B) & (icmp eq (A & D), D)
648 // -> (icmp eq (A & (B|D)), (B|D))
654 // (icmp eq (A & B), A) & (icmp eq (A & D), A)
655 // -> (icmp eq (A & (B&D)), A)
661 // (icmp eq (A & B), C) & (icmp eq (A & D), E)
666 // -> (icmp eq (A & (B|D)), (C|E))
673 // (icmp ne (A & B), B) & (icmp eq (A & D), D)
699 /// FoldAndOfICmps - Fold (icmp)&(icmp) if possible.
717 // handle (roughly): (icmp eq (A & B), C) & (icmp eq (A & D), E)
721 // This only handles icmp of constants: (icmp1 A, C1) & (icmp2 B, C2).
728 // (icmp ult A, C) & (icmp ult B, C) --> (icmp ult (A|B), C)
736 // (icmp eq A, 0) & (icmp eq B, 0) --> (icmp eq (A|B), 0)
789 // Make a constant range that's the intersection of the two icmp ranges.
818 // At this point, we know we have two icmp instructions
821 // icmp eq, icmp ne, icmp [su]lt, and icmp [SU]gt here. We also know
822 // (from the icmp folding check above), that the two constants
1217 // If this is and(cast(icmp), cast(icmp)), try to fold this even if the
1457 /// FoldOrOfICmps - Fold (icmp)|(icmp) if possible.
1476 // (icmp ne (A & B), C) | (icmp ne (A & D), E)
1485 // (icmp eq B, 0) | (icmp ult A, B) -> (icmp ule A, B-1)
1486 // (icmp eq B, 0) | (icmp ugt B, A) -> (icmp ule A, B-1)
1495 // (icmp ult A, B) | (icmp eq B, 0) -> (icmp ule A, B-1)
1496 // (icmp ugt B, A) | (icmp eq B, 0) -> (icmp ule A, B-1)
1510 // This only handles icmp of constants: (icmp1 A, C1) | (icmp2 B, C2).
1514 // (icmp ne A, 0) | (icmp ne B, 0) --> (icmp ne (A|B), 0)
1521 // (icmp ult (X + CA), C1) | (icmp eq X, C2) -> (icmp ule (X + CA), C1)
1560 // At this point, we know we have two icmp instructions
1564 // icmp folding check above), that the two constants are not
2059 // If this is or(cast(icmp), cast(icmp)), try to fold this even if the