aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDan Nicolaescu <dann@ics.uci.edu>2001-10-24 18:58:15 +0000
committerJeff Law <law@gcc.gnu.org>2001-10-24 12:58:15 -0600
commit83c66c1e7a8cb96d3d429fceb49b1025295b5667 (patch)
tree4e5e4d6b88785120d6f5705ef1ec0f1df947d36e /gcc
parentb8a5867e51cdef2b62d67884df4ecbfc16ee6aca (diff)
downloadgcc-83c66c1e7a8cb96d3d429fceb49b1025295b5667.zip
gcc-83c66c1e7a8cb96d3d429fceb49b1025295b5667.tar.gz
gcc-83c66c1e7a8cb96d3d429fceb49b1025295b5667.tar.bz2
ssa-ccp.c (ssa_ccp_substitute_constants): Don't do anything if the node was already a set to a constant.
* ssa-ccp.c (ssa_ccp_substitute_constants): Don't do anything if the node was already a set to a constant. From-SVN: r46468
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/ssa-ccp.c9
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f595b36..69d605d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2001-10-24 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * ssa-ccp.c (ssa_ccp_substitute_constants): Don't do anything if
+ the node was already a set to a constant.
+
Wed Oct 24 12:41:19 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* emit-rtl.c (set_mem_attributes): Fix typo in last change.
diff --git a/gcc/ssa-ccp.c b/gcc/ssa-ccp.c
index 047b29d..c2f1b78 100644
--- a/gcc/ssa-ccp.c
+++ b/gcc/ssa-ccp.c
@@ -866,8 +866,13 @@ ssa_ccp_substitute_constants ()
/* Do not try to simplify PHI nodes down to a constant load.
That will be done later as we translate out of SSA. Also,
doing that here could violate the rule that all PHI nodes
- are consecutive at the start of the basic block. */
- if (! PHI_NODE_P (def))
+ are consecutive at the start of the basic block.
+
+ Don't do anything to nodes that were already sets to
+ constants. */
+ if (! PHI_NODE_P (def)
+ && ! ((GET_CODE (def) == INSN
+ && GET_CODE (SET_SRC (set)) == CONST_INT)))
{
if (rtl_dump_file)
fprintf (rtl_dump_file,