From 8564db8424b6988dd1b665e29f579c732a6001dc Mon Sep 17 00:00:00 2001 From: bstarynk Date: Fri, 22 Feb 2013 11:51:54 +0000 Subject: 2013-02-22 Basile Starynkevitch MELT branch merged with trunk rev 196218 using svnmerge.py git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@196219 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree-ssa-sccvn.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'gcc/tree-ssa-sccvn.c') diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index 81a07aefb4f..202980c19ef 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -2401,10 +2401,8 @@ vn_phi_compute_hash (vn_phi_t vp1) /* If all PHI arguments are constants we need to distinguish the PHI node via its type. */ - type = TREE_TYPE (vp1->phiargs[0]); - result += (INTEGRAL_TYPE_P (type) - + (INTEGRAL_TYPE_P (type) - ? TYPE_PRECISION (type) + TYPE_UNSIGNED (type) : 0)); + type = vp1->type; + result += vn_hash_type (type); FOR_EACH_VEC_ELT (vp1->phiargs, i, phi1op) { @@ -2443,8 +2441,7 @@ vn_phi_eq (const void *p1, const void *p2) /* If the PHI nodes do not have compatible types they are not the same. */ - if (!types_compatible_p (TREE_TYPE (vp1->phiargs[0]), - TREE_TYPE (vp2->phiargs[0]))) + if (!types_compatible_p (vp1->type, vp2->type)) return false; /* Any phi in the same block will have it's arguments in the @@ -2484,6 +2481,7 @@ vn_phi_lookup (gimple phi) def = TREE_CODE (def) == SSA_NAME ? SSA_VAL (def) : def; shared_lookup_phiargs.safe_push (def); } + vp1.type = TREE_TYPE (gimple_phi_result (phi)); vp1.phiargs = shared_lookup_phiargs; vp1.block = gimple_bb (phi); vp1.hashcode = vn_phi_compute_hash (&vp1); @@ -2516,6 +2514,7 @@ vn_phi_insert (gimple phi, tree result) args.safe_push (def); } vp1->value_id = VN_INFO (result)->value_id; + vp1->type = TREE_TYPE (gimple_phi_result (phi)); vp1->phiargs = args; vp1->block = gimple_bb (phi); vp1->result = result; -- cgit v1.2.1