* fold-const.c (fold_unary_loc): Use GET_MODE_PRECISION for
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 11 Apr 2012 18:07:39 +0000 (18:07 +0000)
committerbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 11 Apr 2012 18:07:39 +0000 (18:07 +0000)
comparisons against TYPE_PRECISION.
* tree-ssa-forwprop.c (combine_conversions): Likewise.

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

gcc/ChangeLog
gcc/fold-const.c
gcc/tree-ssa-forwprop.c

index b7ed7b1..9ea90db 100644 (file)
@@ -1,3 +1,9 @@
+2012-04-11  Bernd Schmidt  <bernds@codesourcery.com>
+
+       * fold-const.c (fold_unary_loc): Use GET_MODE_PRECISION for
+       comparisons against TYPE_PRECISION.
+       * tree-ssa-forwprop.c (combine_conversions): Likewise.
+
 2012-04-11  Xinliang David Li  <davidxl@google.com>
 
        * tree-passes.h: Remove TODO_dump_func.
index df0c05c..dcd64a0 100644 (file)
@@ -7820,7 +7820,7 @@ fold_unary_loc (location_t loc, enum tree_code code, tree type, tree op0)
              && inter_prec >= inside_prec
              && (inter_float || inter_vec
                  || inter_unsignedp == inside_unsignedp)
-             && ! (final_prec != GET_MODE_BITSIZE (TYPE_MODE (type))
+             && ! (final_prec != GET_MODE_PRECISION (TYPE_MODE (type))
                    && TYPE_MODE (type) == TYPE_MODE (inter_type))
              && ! final_ptr
              && (! final_vec || inter_prec == inside_prec))
@@ -7857,7 +7857,7 @@ fold_unary_loc (location_t loc, enum tree_code code, tree type, tree op0)
                  == (final_unsignedp && final_prec > inter_prec))
              && ! (inside_ptr && inter_prec != final_prec)
              && ! (final_ptr && inside_prec != inter_prec)
-             && ! (final_prec != GET_MODE_BITSIZE (TYPE_MODE (type))
+             && ! (final_prec != GET_MODE_PRECISION (TYPE_MODE (type))
                    && TYPE_MODE (type) == TYPE_MODE (inter_type)))
            return fold_build1_loc (loc, code, type, TREE_OPERAND (op0, 0));
        }
index c99af1a..57b93ce 100644 (file)
@@ -1,5 +1,5 @@
 /* Forward propagation of expressions for single use variables.
-   Copyright (C) 2004, 2005, 2007, 2008, 2009, 2010, 2011
+   Copyright (C) 2004, 2005, 2007, 2008, 2009, 2010, 2011, 2012
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -2274,7 +2274,7 @@ combine_conversions (gimple_stmt_iterator *gsi)
          && inter_prec >= inside_prec
          && (inter_float || inter_vec
              || inter_unsignedp == inside_unsignedp)
-         && ! (final_prec != GET_MODE_BITSIZE (TYPE_MODE (type))
+         && ! (final_prec != GET_MODE_PRECISION (TYPE_MODE (type))
                && TYPE_MODE (type) == TYPE_MODE (inter_type))
          && ! final_ptr
          && (! final_vec || inter_prec == inside_prec))
@@ -2319,7 +2319,7 @@ combine_conversions (gimple_stmt_iterator *gsi)
              == (final_unsignedp && final_prec > inter_prec))
          && ! (inside_ptr && inter_prec != final_prec)
          && ! (final_ptr && inside_prec != inter_prec)
-         && ! (final_prec != GET_MODE_BITSIZE (TYPE_MODE (type))
+         && ! (final_prec != GET_MODE_PRECISION (TYPE_MODE (type))
                && TYPE_MODE (type) == TYPE_MODE (inter_type)))
        {
          gimple_assign_set_rhs1 (stmt, defop0);