diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2004-05-31 17:39:14 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2004-05-31 17:39:14 +0000 |
commit | 09d98c720ee469390f8114878cfd4f46650cec6e (patch) | |
tree | ccd4d6f1f6a26904501f33a96147b4b39bdb871c /gcc | |
parent | 1f7a8dccd4056be197e8f79fe7bbf2b8bd89c53b (diff) | |
download | gcc-09d98c720ee469390f8114878cfd4f46650cec6e.zip gcc-09d98c720ee469390f8114878cfd4f46650cec6e.tar.gz gcc-09d98c720ee469390f8114878cfd4f46650cec6e.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/builtins.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cea33d1..ef2336f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/builtins.c b/gcc/builtins.c index 3fb8a0f..e44ad61 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); |