Commit 3a531a8b by Richard Kenner

expr.c (highest_pow2_factor, [...]): Return BIGGEST_ALIGNMENT for 0.

	* expr.c (highest_pow2_factor, case INTEGER_CST): Return
	BIGGEST_ALIGNMENT for 0.

From-SVN: r48042
parent dcfcd436
Sat Dec 15 08:29:45 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* expr.c (highest_pow2_factor, case INTEGER_CST): Return
BIGGEST_ALIGNMENT for 0.
Sat Dec 15 14:13:03 CET 2001 Jan Hubicka <jh@suse.cz> Sat Dec 15 14:13:03 CET 2001 Jan Hubicka <jh@suse.cz>
* predict.def (PRED_NORETURN, PRED_OPCODE_POSITIVE, PRED_OPCODE_NONEQUAL, * predict.def (PRED_NORETURN): Make probabilities match reality.
PRED_ERROR_RETURN): Make probabilities match reality. (PRED_OPCODE_POSITIVE, PRED_OPCODE_NONEQUAL, PRED_ERROR_RETURN):
Likewise.
2001-12-15 Jakub Jelinek <jakub@redhat.com> 2001-12-15 Jakub Jelinek <jakub@redhat.com>
......
...@@ -5793,18 +5793,18 @@ highest_pow2_factor (exp) ...@@ -5793,18 +5793,18 @@ highest_pow2_factor (exp)
{ {
case INTEGER_CST: case INTEGER_CST:
/* If the integer is expressable in a HOST_WIDE_INT, we can find the /* If the integer is expressable in a HOST_WIDE_INT, we can find the
lowest bit that's a one. If the result is zero, pessimize by lowest bit that's a one. If the result is zero, return
returning 1. This is overly-conservative, but such things should not BIGGEST_ALIGNMENT. We need to handle this case since we can find it
happen in the offset expressions that we are called with. If in a COND_EXPR, a MIN_EXPR, or a MAX_EXPR. If the constant overlows,
the constant overlows, we some erroneous program, so return we have an erroneous program, so return BIGGEST_ALIGNMENT to avoid any
BIGGEST_ALIGNMENT to avoid any later ICE. */ later ICE. */
if (TREE_CONSTANT_OVERFLOW (exp)) if (TREE_CONSTANT_OVERFLOW (exp)
|| integer_zerop (exp))
return BIGGEST_ALIGNMENT; return BIGGEST_ALIGNMENT;
else if (host_integerp (exp, 0)) else if (host_integerp (exp, 0))
{ {
c0 = tree_low_cst (exp, 0); c0 = tree_low_cst (exp, 0);
c0 = c0 < 0 ? - c0 : c0; return c0 < 0 ? - c0 : c0;
return c0 != 0 ? c0 & -c0 : 1;
} }
break; break;
......
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