From 36204c3090df5dab5cd942cd8f9258f9d360445a Mon Sep 17 00:00:00 2001 From: rakdver Date: Mon, 14 Mar 2005 15:23:43 +0000 Subject: * tree-cfg.c (find_taken_edge_cond_expr): Use zero_p instead of integer_zerop. * tree-gimple.c (is_gimple_min_invariant): Consider overflowed constants invariant. * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert the argument of the shift to the unsigned type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96435 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree-cfg.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'gcc/tree-cfg.c') diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 18fcab7ba8e..32dc2bc579c 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -2376,20 +2376,11 @@ find_taken_edge_cond_expr (basic_block bb, tree val) edge true_edge, false_edge; extract_true_false_edges_from_block (bb, &true_edge, &false_edge); - - /* Otherwise, try to determine which branch of the if() will be taken. - If VAL is a constant but it can't be reduced to a 0 or a 1, then - we don't really know which edge will be taken at runtime. This - may happen when comparing addresses (e.g., if (&var1 == 4)). */ - if (integer_nonzerop (val)) - return true_edge; - else if (integer_zerop (val)) - return false_edge; - - gcc_unreachable (); + + gcc_assert (TREE_CODE (val) == INTEGER_CST); + return (zero_p (val) ? false_edge : true_edge); } - /* Given an INTEGER_CST VAL and the entry block BB to a SWITCH_EXPR statement, determine which edge will be taken out of the block. Return NULL if any edge may be taken. */ -- cgit v1.2.1