From 96c92f4763242fbf74d70ca52dc5ebecc3c0ce95 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Thu, 8 May 2008 21:29:00 +0000 Subject: 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 --- gcc/ChangeLog | 5 +++++ gcc/read-rtl.c | 3 +++ 2 files changed, 8 insertions(+) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7a53d5d..cb7ee2e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2008-05-08 Richard Sandiford + * read-rtl.c (join_c_conditions): Return the first string if the + two strings are equal. + +2008-05-08 Richard Sandiford + * gensupport.h (pred_data): Add a "num_codes" field. (add_predicate_code): Declare. * gensupport.c (add_predicate_code): New function. diff --git a/gcc/read-rtl.c b/gcc/read-rtl.c index cc8fd97..902e1f6 100644 --- a/gcc/read-rtl.c +++ b/gcc/read-rtl.c @@ -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); -- cgit v1.1