Richard Biener wrote:
Why sink the !host_integerp check?  Please keep it where it is now.
Then

+                 if (real_minus_onep (arg0)
+                     && TREE_CODE (TREE_TYPE (arg1)) == INTEGER_TYPE

this check is redundant, too.

Good point - I will commit the patch below after another bootstrap and regtesting.

Tobias

--- a/gcc/tree-ssa-math-opts.c
+++ b/gcc/tree-ssa-math-opts.c
@@ -1448,7 +1448,9 @@ execute_cse_sincos (void)
                  loc = gimple_location (stmt);

-                 if (real_minus_onep (arg0)
-                     && TREE_CODE (TREE_TYPE (arg1)) == INTEGER_TYPE
-                     && !host_integerp (arg1,0))
+                 if (!host_integerp (arg1, 0))
+                   break;
+
+
+                 if (real_minus_onep (arg0))
                    {
                       tree t0, t1, cond, one, minus_one;
@@ -1477,7 +1479,4 @@ execute_cse_sincos (void)
                  else
                    {
-                     if (!host_integerp (arg1, 0))
-                       break;
-
                      n = TREE_INT_CST_LOW (arg1);
result = gimple_expand_builtin_powi (&gsi, loc, arg0, n);

Reply via email to