summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-ccp.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2013-08-20 06:25:10 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2013-08-20 06:25:10 +0000
commitb45b214a5b6e3452a6984f4589eec7fbb196daea (patch)
tree0b39e1aa3dc0b1f1cd32d8d2529a42ca517dc25b /gcc/tree-ssa-ccp.c
parent6d69d407a875cb3bbbfbc49d06df935c668f6f5c (diff)
downloadgcc-b45b214a5b6e3452a6984f4589eec7fbb196daea.tar.gz
* tree-ssa-ccp.c (get_default_value): Remove redundant condition
checks. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201870 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r--gcc/tree-ssa-ccp.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index 6472f484e33..78687f7fac8 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -258,12 +258,7 @@ get_default_value (tree var)
val.mask = double_int_minus_one;
}
}
- else if (is_gimple_assign (stmt)
- /* Value-returning GIMPLE_CALL statements assign to
- a variable, and are treated similarly to GIMPLE_ASSIGN. */
- || (is_gimple_call (stmt)
- && gimple_call_lhs (stmt) != NULL_TREE)
- || gimple_code (stmt) == GIMPLE_PHI)
+ else if (is_gimple_assign (stmt))
{
tree cst;
if (gimple_assign_single_p (stmt)
@@ -274,9 +269,19 @@ get_default_value (tree var)
val.value = cst;
}
else
- /* Any other variable defined by an assignment or a PHI node
- is considered UNDEFINED. */
- val.lattice_val = UNDEFINED;
+ {
+ /* Any other variable defined by an assignment is considered
+ UNDEFINED. */
+ val.lattice_val = UNDEFINED;
+ }
+ }
+ else if ((is_gimple_call (stmt)
+ && gimple_call_lhs (stmt) != NULL_TREE)
+ || gimple_code (stmt) == GIMPLE_PHI)
+ {
+ /* A variable defined by a call or a PHI node is considered
+ UNDEFINED. */
+ val.lattice_val = UNDEFINED;
}
else
{