]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* expmed.c (expand_divmod): Fix test of smod_pow2_cheap and sdiv_pow2_cheap
authorJan Hubicka <jh@suse.cz>
Tue, 2 Sep 2008 18:09:05 +0000 (20:09 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Tue, 2 Sep 2008 18:09:05 +0000 (18:09 +0000)
From-SVN: r139897

gcc/ChangeLog
gcc/expmed.c

index 3051b0df736e7d3a610391e6704628417125082a..0feb0a20f74453779848f04b9c139973e290ad3e 100644 (file)
@@ -1,3 +1,7 @@
+2008-09-02  Jan Hubicka  <jh@suse.cz>
+
+       * expmed.c (expand_divmod): Fix test of smod_pow2_cheap and sdiv_pow2_cheap
+
 2008-09-02  H.J. Lu  <hongjiu.lu@intel.com>
 
        * expr.c (emit_group_store): Don't assert stack temp mode size.
index d4306f41a812f7673ed4966a4eee7a5a74e79fe3..0daf7fa31f085e1e0117bbb3e1850c93e9f88e1f 100644 (file)
@@ -4086,8 +4086,8 @@ expand_divmod (int rem_flag, enum tree_code code, enum machine_mode mode,
                      goto fail1;
                  }
                else if (EXACT_POWER_OF_2_OR_ZERO_P (d)
-                        && (rem_flag ? smod_pow2_cheap[compute_mode]
-                                     : sdiv_pow2_cheap[compute_mode])
+                        && (rem_flag ? smod_pow2_cheap[speed][compute_mode]
+                                     : sdiv_pow2_cheap[speed][compute_mode])
                         /* We assume that cheap metric is true if the
                            optab has an expander for this mode.  */
                         && ((optab_handler ((rem_flag ? smod_optab
@@ -4107,7 +4107,7 @@ expand_divmod (int rem_flag, enum tree_code code, enum machine_mode mode,
                          return gen_lowpart (mode, remainder);
                      }
 
-                   if (sdiv_pow2_cheap[compute_mode]
+                   if (sdiv_pow2_cheap[speed][compute_mode]
                        && ((optab_handler (sdiv_optab, compute_mode)->insn_code
                             != CODE_FOR_nothing)
                            || (optab_handler (sdivmod_optab, compute_mode)->insn_code