fold-const.c (fold_range_test): Do not try to fold the range test if the rhs or lhs has side effects.

* fold-const.c (fold_range_test): Do not try to fold the range
	test if the rhs or lhs has side effects.

From-SVN: r29058
This commit is contained in:
Jeffrey A Law 1999-09-02 09:37:20 +00:00 committed by Jeff Law
parent 88bf1faf57
commit a8c6125952
2 changed files with 7 additions and 0 deletions

View File

@ -13,6 +13,9 @@ Thu Sep 2 00:43:59 1999 Finn Hakansson <finn@axis.com>
Thu Sep 2 00:06:43 1999 Jeffrey A Law (law@cygnus.com)
* fold-const.c (fold_range_test): Do not try to fold the range
test if the rhs or lhs has side effects.
* combine.c (simplify_rtx): Recognize another case of a synthesized
sign extension.

View File

@ -3560,6 +3560,10 @@ fold_range_test (exp)
tree rhs = make_range (TREE_OPERAND (exp, 1), &in1_p, &low1, &high1);
tree tem;
/* Fail if anything is volatile. */
if (TREE_SIDE_EFFECTS (lhs) || TREE_SIDE_EFFECTS (rhs))
return 0;
/* If this is an OR operation, invert both sides; we will invert
again at the end. */
if (or_op)