* builtins.c (expand_builtin_strcmp): Defend against the possibility
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 11 Oct 2003 21:11:29 +0000 (21:11 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 11 Oct 2003 21:11:29 +0000 (21:11 +0000)
commit3f8aefe2eeb6df27cdd5a8aedd31fb563ec495a7
tree3038c6d3362d74076b56b1b91ed777dad3dc5708
parentfa5cf47b03f162ceb7669ed78fb783b153c1405d
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72380 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/builtins.c
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/string-opt-8.c