fold-const.c (extract_muldiv_1): Do not simplify var * c * c to var.
authorZdenek Dvorak <ook@ucw.cz>
Tue, 11 Sep 2007 13:38:08 +0000 (15:38 +0200)
committerZdenek Dvorak <rakdver@gcc.gnu.org>
Tue, 11 Sep 2007 13:38:08 +0000 (13:38 +0000)
* fold-const.c (extract_muldiv_1): Do not simplify
var * c * c to var.

From-SVN: r128375

gcc/ChangeLog
gcc/fold-const.c

index cc9624210ab99ff593d0ada084aca463b0eb7829..8e4e37ef8df3a4af1cec172827dec5a9593d72e0 100644 (file)
@@ -1,3 +1,8 @@
+2007-09-11  Zdenek Dvorak  <ook@ucw.cz>
+
+       * fold-const.c (extract_muldiv_1): Do not simplify
+       var * c * c to var.
+
 2007-09-11  Jan Hubicka <jh@suse.cz>
 
        * i386.h (ix86_tune_indices): Add X86_TUNE_INTER_UNIT_CONVERSIONS.
index a6fb08b0c64908f05aaf081c90d80087622a0351..fb664fee8be138ea7b6c954107c5fcf7810c365b 100644 (file)
@@ -6273,7 +6273,8 @@ extract_muldiv_1 (tree t, tree c, enum tree_code code, tree wide_type,
          && ((code == MULT_EXPR && tcode == EXACT_DIV_EXPR)
              || (tcode == MULT_EXPR
                  && code != TRUNC_MOD_EXPR && code != CEIL_MOD_EXPR
-                 && code != FLOOR_MOD_EXPR && code != ROUND_MOD_EXPR)))
+                 && code != FLOOR_MOD_EXPR && code != ROUND_MOD_EXPR
+                 && code != MULT_EXPR)))
        {
          if (integer_zerop (const_binop (TRUNC_MOD_EXPR, op1, c, 0)))
            {