Commit d3ea1dbd by Bernd Schmidt Committed by Bernd Schmidt

fold-const.c (fold_unary_loc): Use GET_MODE_PRECISION for comparisons against TYPE_PRECISION.

	* fold-const.c (fold_unary_loc): Use GET_MODE_PRECISION for
	comparisons against TYPE_PRECISION.
	* tree-ssa-forwprop.c (combine_conversions): Likewise.

From-SVN: r186350
parent 30235ede
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> 2012-04-11 Xinliang David Li <davidxl@google.com>
* tree-passes.h: Remove TODO_dump_func. * tree-passes.h: Remove TODO_dump_func.
......
...@@ -7820,7 +7820,7 @@ fold_unary_loc (location_t loc, enum tree_code code, tree type, tree op0) ...@@ -7820,7 +7820,7 @@ fold_unary_loc (location_t loc, enum tree_code code, tree type, tree op0)
&& inter_prec >= inside_prec && inter_prec >= inside_prec
&& (inter_float || inter_vec && (inter_float || inter_vec
|| inter_unsignedp == inside_unsignedp) || 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)) && TYPE_MODE (type) == TYPE_MODE (inter_type))
&& ! final_ptr && ! final_ptr
&& (! final_vec || inter_prec == inside_prec)) && (! final_vec || inter_prec == inside_prec))
...@@ -7857,7 +7857,7 @@ fold_unary_loc (location_t loc, enum tree_code code, tree type, tree op0) ...@@ -7857,7 +7857,7 @@ fold_unary_loc (location_t loc, enum tree_code code, tree type, tree op0)
== (final_unsignedp && final_prec > inter_prec)) == (final_unsignedp && final_prec > inter_prec))
&& ! (inside_ptr && inter_prec != final_prec) && ! (inside_ptr && inter_prec != final_prec)
&& ! (final_ptr && inside_prec != inter_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))) && TYPE_MODE (type) == TYPE_MODE (inter_type)))
return fold_build1_loc (loc, code, type, TREE_OPERAND (op0, 0)); return fold_build1_loc (loc, code, type, TREE_OPERAND (op0, 0));
} }
......
/* Forward propagation of expressions for single use variables. /* 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. Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -2274,7 +2274,7 @@ combine_conversions (gimple_stmt_iterator *gsi) ...@@ -2274,7 +2274,7 @@ combine_conversions (gimple_stmt_iterator *gsi)
&& inter_prec >= inside_prec && inter_prec >= inside_prec
&& (inter_float || inter_vec && (inter_float || inter_vec
|| inter_unsignedp == inside_unsignedp) || 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)) && TYPE_MODE (type) == TYPE_MODE (inter_type))
&& ! final_ptr && ! final_ptr
&& (! final_vec || inter_prec == inside_prec)) && (! final_vec || inter_prec == inside_prec))
...@@ -2319,7 +2319,7 @@ combine_conversions (gimple_stmt_iterator *gsi) ...@@ -2319,7 +2319,7 @@ combine_conversions (gimple_stmt_iterator *gsi)
== (final_unsignedp && final_prec > inter_prec)) == (final_unsignedp && final_prec > inter_prec))
&& ! (inside_ptr && inter_prec != final_prec) && ! (inside_ptr && inter_prec != final_prec)
&& ! (final_ptr && inside_prec != inter_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))) && TYPE_MODE (type) == TYPE_MODE (inter_type)))
{ {
gimple_assign_set_rhs1 (stmt, defop0); gimple_assign_set_rhs1 (stmt, defop0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment