diff options
author | Jan Hubicka <jh@suse.cz> | 2005-11-22 16:56:48 +0000 |
---|---|---|
committer | Jan Hubicka <jh@suse.cz> | 2005-11-22 16:56:48 +0000 |
commit | 406dfd8bcd0b07cd134e058961ebb51e9e228ac8 (patch) | |
tree | 4b7573a538ac0b30655647b5a9213b7360751f2d /gcc/tree-ssa-ccp.c | |
parent | 6b8cfad284790f4d99efb93a2342924e2da7258d (diff) |
PR tree-optimization/24653
* tree-ssa-ccp.c (ccp_fold): Strip down useless conversions.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_1-branch@107365 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r-- | gcc/tree-ssa-ccp.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); } |