Commit 741233cf by Richard Biener Committed by Richard Biener

tree-eh.c (operation_could_trap_helper_p): Handle conversions like ordinary operations.

2014-11-03  Richard Biener  <rguenther@suse.de>

	* tree-eh.c (operation_could_trap_helper_p): Handle conversions
	like ordinary operations.
	* gimplify.c (gimplify_conversion): Gimplify CONVERT_EXPR
	as NOP_EXPR.

From-SVN: r217048
parent 2f73a6c7
2014-11-03 Richard Biener <rguenther@suse.de>
* tree-eh.c (operation_could_trap_helper_p): Handle conversions
like ordinary operations.
* gimplify.c (gimplify_conversion): Gimplify CONVERT_EXPR
as NOP_EXPR.
2014-11-03 Joseph Myers <joseph@codesourcery.com> 2014-11-03 Joseph Myers <joseph@codesourcery.com>
* configure.ac (TARGET_GLIBC_MAJOR, TARGET_GLIBC_MINOR): Define * configure.ac (TARGET_GLIBC_MAJOR, TARGET_GLIBC_MINOR): Define
...@@ -1739,6 +1739,10 @@ gimplify_conversion (tree *expr_p) ...@@ -1739,6 +1739,10 @@ gimplify_conversion (tree *expr_p)
*expr_p = fold_build1_loc (loc, VIEW_CONVERT_EXPR, TREE_TYPE (*expr_p), *expr_p = fold_build1_loc (loc, VIEW_CONVERT_EXPR, TREE_TYPE (*expr_p),
TREE_OPERAND (*expr_p, 0)); TREE_OPERAND (*expr_p, 0));
/* Canonicalize CONVERT_EXPR to NOP_EXPR. */
if (TREE_CODE (*expr_p) == CONVERT_EXPR)
TREE_SET_CODE (*expr_p, NOP_EXPR);
return GS_OK; return GS_OK;
} }
......
...@@ -2436,11 +2436,6 @@ operation_could_trap_helper_p (enum tree_code op, ...@@ -2436,11 +2436,6 @@ operation_could_trap_helper_p (enum tree_code op,
case UNEQ_EXPR: case UNEQ_EXPR:
return honor_snans; return honor_snans;
case CONVERT_EXPR:
case FIX_TRUNC_EXPR:
/* Conversion of floating point might trap. */
return honor_nans;
case NEGATE_EXPR: case NEGATE_EXPR:
case ABS_EXPR: case ABS_EXPR:
case CONJ_EXPR: case CONJ_EXPR:
......
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