aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2004-07-03 13:45:29 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2004-07-03 09:45:29 -0400
commit580d124fe0265e81154d5fe07a40279418f048f8 (patch)
tree34f13484cf58f62d24730cc46761b0c4d20b7ad2 /gcc/tree-ssa.c
parente30bb772cb02a5b523d036eaaa5a402a471d476b (diff)
downloadgcc-580d124fe0265e81154d5fe07a40279418f048f8.zip
gcc-580d124fe0265e81154d5fe07a40279418f048f8.tar.gz
gcc-580d124fe0265e81154d5fe07a40279418f048f8.tar.bz2
tree-ssa.c (tree_ssa_useless_type_conversion): Also look at VIEW_CONVERT_EXPR and NON_LVALUE_EXPR.
* tree-ssa.c (tree_ssa_useless_type_conversion): Also look at VIEW_CONVERT_EXPR and NON_LVALUE_EXPR. * tree-ssa-ccp.c (fold_stmt): Call just STRIP_USELESS_TYPE_CONVERSION. * tree-ssa-dom.c (local_fold): Likewise. From-SVN: r84054
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r--gcc/tree-ssa.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index 37b83bf..4cdfd3d 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -601,7 +601,9 @@ tree_ssa_useless_type_conversion (tree expr)
the top of the RHS to the type of the LHS and the type conversion
is "safe", then strip away the type conversion so that we can
enter LHS = RHS into the const_and_copies table. */
- if (TREE_CODE (expr) == NOP_EXPR || TREE_CODE (expr) == CONVERT_EXPR)
+ if (TREE_CODE (expr) == NOP_EXPR || TREE_CODE (expr) == CONVERT_EXPR
+ || TREE_CODE (expr) == VIEW_CONVERT_EXPR
+ || TREE_CODE (expr) == NON_LVALUE_EXPR)
return tree_ssa_useless_type_conversion_1 (TREE_TYPE (expr),
TREE_TYPE (TREE_OPERAND (expr,
0)));