re PR tree-optimization/15743 (Fold index() at tree level.)
authorKazu Hirata <kazu@cs.umass.edu>
Mon, 31 May 2004 17:39:14 +0000 (17:39 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Mon, 31 May 2004 17:39:14 +0000 (17:39 +0000)
PR tree-optimization/15743.
* builtins.c (fold_builtin_1): Fold index() and rindex().

From-SVN: r82491

gcc/ChangeLog
gcc/builtins.c

index cea33d1852c65bfd7d3c34eb3b8f70be3f63896d..ef2336f439efcfbbd2ad96f0c832611e95bc33dd 100644 (file)
@@ -1,3 +1,8 @@
+2004-05-31  Kazu Hirata  <kazu@cs.umass.edu>
+
+       PR tree-optimization/15743.
+       * builtins.c (fold_builtin_1): Fold index() and rindex().
+
 2004-05-31  Roger Sayle  <roger@eyesopen.com>
 
        PR middle-end/15069
index 3fb8a0f6dba315e891104d66c1d16157cca2041a..e44ad61b7b2204fa0d46f43e83bca9c7ca530c5f 100644 (file)
@@ -7838,9 +7838,11 @@ fold_builtin_1 (tree exp)
     case BUILT_IN_STRNCPY:
       return fold_builtin_strncpy (exp);
 
+    case BUILT_IN_INDEX:
     case BUILT_IN_STRCHR:
       return fold_builtin_strchr (exp, false);
 
+    case BUILT_IN_RINDEX:
     case BUILT_IN_STRRCHR:
       return fold_builtin_strchr (exp, true);