Commit 7fc1dad6 by Richard Guenther Committed by Richard Biener

tree-ssa-pre.c (eliminate): Handle PHI elimination to constants.

2010-06-15  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-pre.c (eliminate): Handle PHI elimination to constants.

	* gcc.dg/tree-ssa/ssa-sccvn-4.c: Adjust.

From-SVN: r160793
parent 8a86e760
2010-06-15 Richard Guenther <rguenther@suse.de>
* tree-ssa-pre.c (eliminate): Handle PHI elimination to constants.
2010-06-15 Paul Brook <paul@codesourcery.com>
* config/arm/arm.c (use_vfp_abi): Add sorry() for Thumb-1
......
2010-06-15 Richard Guenther <rguenther@suse.de>
* gcc.dg/tree-ssa/ssa-sccvn-4.c: Adjust.
2010-06-15 Richard Guenther <rguenther@suse.de>
* gcc.dg/vect/bb-slp-21.c: Adjust.
* gcc.dg/vect/bb-slp-13.c: Likewise
* gcc.dg/vect/bb-slp-4.c: Likewise
......
......@@ -23,5 +23,5 @@ int vnum_test8(int *data)
}
/* We should eliminate m - n, n + k, set data[5] = 0, eliminate the
address arithmetic for data[5], and set p = 0.
/* { dg-final { scan-tree-dump-times "Eliminated: 6" 1 "fre"} } */
/* { dg-final { scan-tree-dump-times "Eliminated: 7" 1 "fre"} } */
/* { dg-final { cleanup-tree-dump "fre" } } */
......@@ -4330,7 +4330,14 @@ eliminate (void)
else
gcc_unreachable ();
}
if (!sprimeexpr
if (!sprime && is_gimple_min_invariant (VN_INFO (res)->valnum))
{
sprime = VN_INFO (res)->valnum;
if (!useless_type_conversion_p (TREE_TYPE (res),
TREE_TYPE (sprime)))
sprime = fold_convert (TREE_TYPE (res), sprime);
}
if (!sprime
|| sprime == res)
{
gsi_next (&gsi);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment