From: Kazu Hirata Date: Mon, 31 May 2004 17:39:14 +0000 (+0000) Subject: re PR tree-optimization/15743 (Fold index() at tree level.) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=09d98c720ee469390f8114878cfd4f46650cec6e;p=gcc.git re PR tree-optimization/15743 (Fold index() at tree level.) PR tree-optimization/15743. * builtins.c (fold_builtin_1): Fold index() and rindex(). From-SVN: r82491 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cea33d1852c..ef2336f439e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-05-31 Kazu Hirata + + PR tree-optimization/15743. + * builtins.c (fold_builtin_1): Fold index() and rindex(). + 2004-05-31 Roger Sayle PR middle-end/15069 diff --git a/gcc/builtins.c b/gcc/builtins.c index 3fb8a0f6dba..e44ad61b7b2 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -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);