From 078152a256a43a888048dcec5e2c6d503db5b75c Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Mon, 21 Nov 2005 14:14:02 +0100 Subject: [PATCH] re PR tree-optimization/24653 (EON regressed seriously on x86-64) PR tree-optimization/24653 * tree-ssa-ccp.c (ccp_fold): Strip down useless conversions. From-SVN: r107304 --- gcc/ChangeLog | 5 +++++ gcc/tree-ssa-ccp.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c9e309ad0dd..008444d0bd9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-11-21 Jan Hubicka + + PR tree-optimization/24653 + * tree-ssa-ccp.c (ccp_fold): Strip down useless conversions. + 2005-11-21 Uros Bizjak * config/i386/predicates.md (ax_reg_operand): New predicate. diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index cd446ee63e0..a838ce925cd 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -879,6 +879,10 @@ ccp_fold (tree stmt) op0 = get_value (op0, true)->value; } + if ((code == NOP_EXPR || code == CONVERT_EXPR) + && tree_ssa_useless_type_conversion_1 (TREE_TYPE (rhs), + TREE_TYPE (op0))) + return op0; return fold_unary (code, TREE_TYPE (rhs), op0); }