read-rtl.c (join_c_conditions): Return the first string if the two strings are equal.

gcc/
	* read-rtl.c (join_c_conditions): Return the first string if the
	two strings are equal.

From-SVN: r135091
This commit is contained in:
Richard Sandiford 2008-05-08 21:29:00 +00:00 committed by Richard Sandiford
parent e663da80d4
commit 96c92f4763
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2008-05-08 Richard Sandiford <rsandifo@nildram.co.uk>
* read-rtl.c (join_c_conditions): Return the first string if the
two strings are equal.
2008-05-08 Richard Sandiford <rsandifo@nildram.co.uk>
* gensupport.h (pred_data): Add a "num_codes" field.

View File

@ -787,6 +787,9 @@ join_c_conditions (const char *cond1, const char *cond2)
if (cond2 == 0 || cond2[0] == 0)
return cond1;
if (strcmp (cond1, cond2) == 0)
return cond1;
result = concat ("(", cond1, ") && (", cond2, ")", NULL);
obstack_ptr_grow (&joined_conditions_obstack, result);
obstack_ptr_grow (&joined_conditions_obstack, cond1);