diff options
author | Richard Sandiford <rsandifo@nildram.co.uk> | 2008-05-08 21:29:00 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2008-05-08 21:29:00 +0000 |
commit | 96c92f4763242fbf74d70ca52dc5ebecc3c0ce95 (patch) | |
tree | 5a6ac7d4d62ca20606babf28b9a64cffc974b4d6 /gcc | |
parent | e663da80d4c288b804a1ae2e04544b7e668080ce (diff) | |
download | gcc-96c92f4763242fbf74d70ca52dc5ebecc3c0ce95.zip gcc-96c92f4763242fbf74d70ca52dc5ebecc3c0ce95.tar.gz gcc-96c92f4763242fbf74d70ca52dc5ebecc3c0ce95.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/read-rtl.c | 3 |
2 files changed, 8 insertions, 0 deletions
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 <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. (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); |