|
553 | 553 | (simplify (ushr ty (bxor ty x (iconst_u ty c1)) (iconst_u ty c2))) |
554 | 554 | (bxor ty (ushr ty (iconst_u ty c1) (iconst_u ty c2)) (ushr ty x (iconst_u ty c2))) |
555 | 555 | ) |
556 | | -(rule |
557 | | - (simplify (ushr ty (ushr ty (iconst_u ty c1) x) (iconst_u ty c2))) |
558 | | - (ushr ty (udiv (iconst_u ty c1) (ishl ty (iconst_u ty 1) (iconst_u ty c2))) x) |
559 | | -) |
560 | 556 | (rule (simplify (band ty (band ty x y) x)) (band ty x y)) |
561 | 557 | (rule (simplify (band ty (band ty y x) x)) (band ty x y)) |
562 | 558 | (rule (simplify (band ty (iconst_u ty 1) (ushr ty (iconst_u ty 1) x))) (ushr ty (iconst_u ty 1) x)) |
|
714 | 710 | (rule (simplify (isub ty x (isub ty y z))) (iadd ty x (isub ty z y))) |
715 | 711 | (rule (simplify (isub ty x x)) (iconst_u ty 0)) |
716 | 712 | (rule (simplify (isub ty x y)) (bxor ty y x)) |
717 | | -(rule (simplify (select ty (eq cty (iconst_u ty 1) x) (udiv y x) z)) (select ty (eq cty x (iconst_u ty 1)) y z)) |
718 | 713 | (rule (simplify (select ty (eq cty (iconst_u ty c1) x) (iconst_u ty 0) (isub ty (iconst_u ty c1) x))) (isub ty (iconst_u ty c1) x)) |
719 | 714 | (rule (simplify (select ty (eq cty (iconst_u ty c1) x) (imul ty x y) z)) (select ty (eq cty (iconst_u ty c1) x) (imul ty (iconst_u ty c1) y) z)) |
720 | 715 | (rule (simplify (select ty (eq cty (iconst_u ty c1) x) (imul ty y x) z)) (select ty (eq cty (iconst_u ty c1) x) (imul ty (iconst_u ty c1) y) z)) |
721 | 716 | (rule (simplify (select ty (eq cty (iconst_u ty c1) x) (ushr ty y x) z)) (select ty (eq cty (iconst_u ty c1) x) (ushr ty y (iconst_u ty c1)) z)) |
722 | | -(rule (simplify (select ty (eq cty x (iconst_u ty 1)) (udiv y x) z)) (select ty (eq cty x (iconst_u ty 1)) y z)) |
723 | 717 | (rule (simplify (select ty (eq cty x (iconst_u ty c1)) (iconst_u ty 0) (isub ty (iconst_u ty c1) x))) (isub ty (iconst_u ty c1) x)) |
724 | 718 | (rule (simplify (select ty (eq cty x (iconst_u ty c1)) (imul ty x y) z)) (select ty (eq cty (iconst_u ty c1) x) (imul ty (iconst_u ty c1) y) z)) |
725 | 719 | (rule (simplify (select ty (eq cty x (iconst_u ty c1)) (imul ty y x) z)) (select ty (eq cty (iconst_u ty c1) x) (imul ty (iconst_u ty c1) y) z)) |
726 | 720 | (rule (simplify (select ty (eq cty x (iconst_u ty c1)) (ushr ty y x) z)) (select ty (eq cty (iconst_u ty c1) x) (ushr ty y (iconst_u ty c1)) z)) |
727 | 721 | (rule (simplify (select ty (eq cty x y) (isub ty y x) z)) (select ty (eq cty x y) (iconst_u ty 0) z)) |
728 | 722 | (rule (simplify (select ty (eq cty y x) (isub ty y x) z)) (select ty (eq cty x y) (iconst_u ty 0) z)) |
729 | | -(rule (simplify (select ty (ne cty (iconst_u ty 1) x) z (udiv y x))) (select ty (eq cty x (iconst_u ty 1)) y z)) |
730 | 723 | (rule (simplify (select ty (ne cty (iconst_u ty c1) x) (isub ty (iconst_u ty c1) x) (iconst_u ty 0))) (isub ty (iconst_u ty c1) x)) |
731 | 724 | (rule (simplify (select ty (ne cty (iconst_u ty c1) x) z (imul ty x y))) (select ty (eq cty (iconst_u ty c1) x) (imul ty (iconst_u ty c1) y) z)) |
732 | 725 | (rule (simplify (select ty (ne cty (iconst_u ty c1) x) z (imul ty y x))) (select ty (eq cty (iconst_u ty c1) x) (imul ty (iconst_u ty c1) y) z)) |
733 | 726 | (rule (simplify (select ty (ne cty (iconst_u ty c1) x) z (ushr ty y x))) (select ty (eq cty (iconst_u ty c1) x) (ushr ty y (iconst_u ty c1)) z)) |
734 | | -(rule (simplify (select ty (ne cty x (iconst_u ty 1)) z (udiv y x))) (select ty (eq cty x (iconst_u ty 1)) y z)) |
735 | 727 | (rule (simplify (select ty (ne cty x (iconst_u ty c1)) (isub ty (iconst_u ty c1) x) (iconst_u ty 0))) (isub ty (iconst_u ty c1) x)) |
736 | 728 | (rule (simplify (select ty (ne cty x (iconst_u ty c1)) z (imul ty x y))) (select ty (eq cty (iconst_u ty c1) x) (imul ty (iconst_u ty c1) y) z)) |
737 | 729 | (rule (simplify (select ty (ne cty x (iconst_u ty c1)) z (imul ty y x))) (select ty (eq cty (iconst_u ty c1) x) (imul ty (iconst_u ty c1) y) z)) |
|
770 | 762 | (rule (simplify (slt cty x (select ty (sle cty y x) y x))) (iconst_u ty 0)) |
771 | 763 | (rule (simplify (slt cty x (select ty (slt cty x y) x y))) (iconst_u ty 0)) |
772 | 764 | (rule (simplify (slt cty x (select ty (slt cty x y) y x))) (slt cty x y)) |
773 | | -(rule (simplify (udiv x (band ty (ishl ty (iconst_u ty 1) z) y))) (ushr ty x z)) |
774 | | -(rule (simplify (udiv x (band ty y (ishl ty (iconst_u ty 1) z)))) (ushr ty x z)) |
775 | 765 | (rule (simplify (ugt cty (iconst_u ty 1) (ishl ty (iconst_u ty 1) x))) (iconst_u ty 0)) |
776 | | -(rule (simplify (ugt cty (iconst_u ty c1) (udiv (iconst_u ty c1) x))) (if-let true (u64_is_power_of_two c1)) (ult cty (iconst_u ty 1) x)) |
777 | 766 | (rule (simplify (ugt cty x (select ty (uge cty x y) y x))) (ult cty y x)) |
778 | 767 | (rule (simplify (ugt cty x (select ty (ugt cty y x) x y))) (ult cty y x)) |
779 | 768 | (rule (simplify (ugt cty x (select ty (ule cty y x) y x))) (ult cty y x)) |
|
783 | 772 | (rule (simplify (ult cty (select ty (ugt cty y x) x y) x)) (ult cty y x)) |
784 | 773 | (rule (simplify (ult cty (select ty (ule cty y x) y x) x)) (ult cty y x)) |
785 | 774 | (rule (simplify (ult cty (select ty (ult cty x y) x y) x)) (ult cty y x)) |
786 | | -(rule (simplify (ult cty (udiv (iconst_u ty c1) x) (iconst_u ty c1))) (if-let true (u64_is_power_of_two c1)) (ult cty (iconst_u ty 1) x)) |
787 | 775 | (rule (simplify (ushr ty (band ty (ishl ty y z) x) z)) (band ty y (ushr ty x z))) |
788 | 776 | (rule (simplify (ushr ty (band ty x (ishl ty y z)) z)) (band ty y (ushr ty x z))) |
| 777 | +(rule (simplify_skeleton (udiv x (band ty (ishl ty (iconst_u ty 1) z) y))) (ushr ty x z)) |
| 778 | +(rule (simplify_skeleton (udiv x (band ty y (ishl ty (iconst_u ty 1) z)))) (ushr ty x z)) |
0 commit comments