From 96c92f4763242fbf74d70ca52dc5ebecc3c0ce95 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Thu, 8 May 2008 21:29:00 +0000 Subject: [PATCH] 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(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7a53d5d62b5..cb7ee2ec286 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +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. diff --git a/gcc/read-rtl.c b/gcc/read-rtl.c index cc8fd974a2f..902e1f6b7da 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); -- 2.30.2