summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-ccp.c
diff options
context:
space:
mode:
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-30 00:16:17 +0000
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-30 00:16:17 +0000
commit7f96c6833d6e852762e6bbc89a4b923fed4673bd (patch)
tree08a719996377675a32d8694feb5cf80ef3a927e9 /gcc/tree-ssa-ccp.c
parent94ccf9fb7520aa884e05e5110ae3ae10a551db90 (diff)
downloadgcc-7f96c6833d6e852762e6bbc89a4b923fed4673bd.tar.gz
* tree-ssa-ccp.c (visit_assignment): Move code to prevent
setting a non-register to UNDEFINED right before the call to set_lattice_value. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85318 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r--gcc/tree-ssa-ccp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index 82479f052e6..c8ab92a896b 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -755,12 +755,6 @@ visit_assignment (tree stmt)
/* For a simple copy operation, we copy the lattice values. */
value *nval = get_value (rhs);
val = *nval;
-
- /* If lhs is not a gimple register, then it cannot take on
- an undefined value. */
- if (!is_gimple_reg (SSA_NAME_VAR (lhs))
- && val.lattice_val == UNDEFINED)
- val.lattice_val = UNKNOWN_VAL;
}
else if (DECL_P (rhs)
&& NUM_VUSES (vuses) == 1
@@ -798,6 +792,12 @@ visit_assignment (tree stmt)
}
}
+ /* If LHS is not a gimple register, then it cannot take on an
+ UNDEFINED value. */
+ if (!is_gimple_reg (SSA_NAME_VAR (lhs))
+ && val.lattice_val == UNDEFINED)
+ val.lattice_val = UNKNOWN_VAL;
+
/* Set the lattice value of the statement's output. */
set_lattice_value (lhs, val);
if (val.lattice_val == VARYING)