]> git.ipfire.org Git - thirdparty/gcc.git/commit
builtins.c (expand_builtin_strcmp): Defend against the possibility that gen_cmpstrsi...
authorRoger Sayle <roger@eyesopen.com>
Sat, 11 Oct 2003 21:11:29 +0000 (21:11 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Sat, 11 Oct 2003 21:11:29 +0000 (21:11 +0000)
commitc43fa1f51a746777e557c1ca99b6111474c5c961
tree3038c6d3362d74076b56b1b91ed777dad3dc5708
parentc877353c907f31f7af74452d4eb2c44b6900493d
builtins.c (expand_builtin_strcmp): Defend against the possibility that gen_cmpstrsi may fail...

* builtins.c (expand_builtin_strcmp): Defend against the possibility
that gen_cmpstrsi may fail: Stabilize the argument list against
re-evaluation and expand the library call directly using this saved
argument list if a cmpstrsi sequence can't be generated.
(expand_builtin_strncmp): Likewise.

* config/i386/i386.md (cmpstrsi, movstrsi): Disable with -Os.

* gcc.c-torture/execute/string-opt-8.c: Don't test optimizations
that inline strncmp as cmpstrsi on i386 when compiled with -Os.

From-SVN: r72380
gcc/ChangeLog
gcc/builtins.c
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/string-opt-8.c