aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-sccvn.c
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2008-07-15 23:50:52 +0000
committerDaniel Berlin <dberlin@gcc.gnu.org>2008-07-15 23:50:52 +0000
commit2dfb6ce12f3e9c84d406aa0bba68406eba3f0ce0 (patch)
tree4faecb181c40f295369ac919f9ab5203eed115d8 /gcc/tree-ssa-sccvn.c
parent15e38d0dce922e77304932817a10f1f42579553f (diff)
downloadgcc-2dfb6ce12f3e9c84d406aa0bba68406eba3f0ce0.zip
gcc-2dfb6ce12f3e9c84d406aa0bba68406eba3f0ce0.tar.gz
gcc-2dfb6ce12f3e9c84d406aa0bba68406eba3f0ce0.tar.bz2
tree-ssa-sccvn.c (expressions_equal_p): Check type equality.
2008-07-15 Daniel Berlin <dberlin@dberlin.org> * tree-ssa-sccvn.c (expressions_equal_p): Check type equality. * tree-ssa-pre.c (pre_expr_eq): Ditto (get_constant_for_value_id): Take a type as an argument. (fully_constant_expression): Pass in type. (find_or_generate_expression): Short circuit constant case. (create_expression_by_pieces): Remove special casing of pointer_plus. (do_regular_insertion): Short circuit constant case. (do_partial_partial_insertion): Ditto. From-SVN: r137859
Diffstat (limited to 'gcc/tree-ssa-sccvn.c')
-rw-r--r--gcc/tree-ssa-sccvn.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index f131865..69945a5 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -2582,6 +2582,8 @@ expressions_equal_p (tree e1, tree e2)
te1 = TREE_TYPE (e1);
te2 = TREE_TYPE (e2);
+ if (te1 != te2)
+ return false;
if (TREE_CODE (e1) == TREE_LIST && TREE_CODE (e2) == TREE_LIST)
{