PR optimization/1823
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 5 Sep 2003 18:28:48 +0000 (18:28 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 5 Sep 2003 18:28:48 +0000 (18:28 +0000)
* expmed.c (expand_divmod <EXACT_DIV_EXPR>): Use an unsigned
multiplication to implement division by constant integer.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71116 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/expmed.c

index fe1f21b..c0b2e2b 100644 (file)
@@ -1,3 +1,10 @@
+2003-09-05  Roger Sayle  <roger@eyesopen.com>
+           Richard Henderson  <rth@redhat.com>
+
+       PR optimization/1823
+       * expmed.c (expand_divmod <EXACT_DIV_EXPR>): Use an unsigned
+       multiplication to implement division by constant integer.
+
 Fri Sep  5 07:35:16 CEST 2003  Jan Hubicka  <jh@suse.cz>
 
        * opts.c (decode_options): Enable unit-at-a-time at -O2.
index 8ccd238..c59f865 100644 (file)
@@ -3824,7 +3824,7 @@ expand_divmod (int rem_flag, enum tree_code code, enum machine_mode mode,
                               build_int_2 (pre_shift, 0), NULL_RTX, unsignedp);
            quotient = expand_mult (compute_mode, t1,
                                    gen_int_mode (ml, compute_mode),
-                                   NULL_RTX, 0);
+                                   NULL_RTX, 1);
 
            insn = get_last_insn ();
            set_unique_reg_note (insn,