fold-const (fold_binary): Call fold_build2 instead of fold (build.
authorJames A. Morrison <phython@gcc.gnu.org>
Sun, 14 Aug 2005 23:19:05 +0000 (23:19 +0000)
committerJames A. Morrison <phython@gcc.gnu.org>
Sun, 14 Aug 2005 23:19:05 +0000 (23:19 +0000)
2005-08-14  James A. Morrison  <phython@gcc.gnu.org>

        * fold-const (fold_binary): Call fold_build2 instead of fold (build.

From-SVN: r103089

gcc/ChangeLog
gcc/fold-const.c

index f7ef0ce0474eccf0aeb021b7f6d46561dfe4f3fa..ae35c9f1be95b95b97c212fa596a6cdd255244b4 100644 (file)
@@ -1,3 +1,7 @@
+2005-08-14  James A. Morrison  <phython@gcc.gnu.org>
+
+       * fold-const (fold_binary): Call fold_build2 instead of fold (build.
+
 2005-08-14  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * config/s390/s390.c (s390_const_ok_for_constraint_p): Add 'P'
index 383bd670d1d4211916a0836d525cf8f74d9c1894..19b5459a03f4d3ca7f87a9bc18984934f4125bd0 100644 (file)
@@ -9310,10 +9310,9 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
                    tree st0, st1;
                    st0 = lang_hooks.types.signed_type (TREE_TYPE (arg0));
                    st1 = lang_hooks.types.signed_type (TREE_TYPE (arg1));
-                   return fold
-                     (build2 (code == LE_EXPR ? GE_EXPR: LT_EXPR,
-                              type, fold_convert (st0, arg0),
-                              fold_convert (st1, integer_zero_node)));
+                   return fold_build2 (code == LE_EXPR ? GE_EXPR: LT_EXPR,
+                                       type, fold_convert (st0, arg0),
+                                       build_int_cst (st1, 0));
                  }
              }
          }