rs6000-protos.h (expand_strn_compare): Add arg.
authorAaron Sawdey <acsawdey@linux.vnet.ibm.com>
Wed, 18 Jan 2017 20:56:16 +0000 (20:56 +0000)
committerAaron Sawdey <acsawdey@gcc.gnu.org>
Wed, 18 Jan 2017 20:56:16 +0000 (14:56 -0600)
commit0edd264dfc29db3c30641771d46634b4ef3ffe10
tree7b74e876028ea84d7f5106ead28c3723393320c6
parent551914b748a9bafe51ed7192c3e7b3d4366211bb
rs6000-protos.h (expand_strn_compare): Add arg.

2017-01-18  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
* config/rs6000/rs6000-protos.h (expand_strn_compare): Add arg.
* config/rs6000/rs6000.c (expand_strn_compare): Add ability to expand
strcmp. Fix bug where comparison didn't stop with zero byte. Fix
case where N arg is SIZE_MAX.
* config/rs6000/rs6000.md (cmpstrnsi): Args to expand_strn_compare.
(cmpstrsi): Add pattern.
2017-01-18  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
* gcc.dg/strcmp-1.c: New test.
* gcc.dg/strncmp-1.c: Add test for a bug that escaped.

From-SVN: r244598
gcc/ChangeLog
gcc/config/rs6000/rs6000-protos.h
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/strcmp-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/strncmp-1.c