This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/15739] Fold strstr at tree level.


------- Additional Comments From kazu at cs dot umass dot edu  2004-05-30 22:29 -------
char *
bar (void)
{
  const char *haystack = "abcd";
  const char *needle = "a";
  return strstr (haystack, needle);
}

I get:

bar ()
{
  const char * needle;
  const char * haystack;
  char * T.0;

<bb 0>:
  T.0_3 = strstr ("abcd", "a") [tail call];
  return T.0_3;

}

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|missed-optimization         |
            Summary|Convert strstr into strchr  |Fold strstr at tree level.
                   |if we are looking for a     |
                   |single character.           |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15739


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]