re PR target/79170 (memcmp builtin expansion sequence can overflow)
authorAaron Sawdey <acsawdey@linux.vnet.ibm.com>
Mon, 30 Jan 2017 23:24:24 +0000 (23:24 +0000)
committerAaron Sawdey <acsawdey@gcc.gnu.org>
Mon, 30 Jan 2017 23:24:24 +0000 (17:24 -0600)
commit3095f651230f042648ac9c5d6008e8ea9d37567d
tree768dde0a441d3baf7051f92989e9d3b323e4cd0f
parent8657c838e2a10d7c32a991fdc8649a3dfeaa6a94
re PR target/79170 (memcmp builtin expansion sequence can overflow)

2017-01-27  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>

PR target/79170
* gcc.dg/memcmp-1.c: Improved to catch failures seen in PR 79170.

2017-01-27  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>

PR target/79170
* config/rs6000/altivec.md (*setb_internal): Rename to setb_signed.
(setb_unsigned) New pattern for setb with CCUNS.
* config/rs6000/rs6000.c (expand_block_compare): Use a different
subfc./subfe sequence to avoid overflow problems.  Generate a
shorter sequence with cmpld/setb for power9.
* config/rs6000/rs6000.md (subf<mode>3_carry_dot2): Add a new pattern
for generating subfc. instruction.
(cmpstrsi): Add TARGET_POPCNTD predicate as the generate sequence
now uses this instruction.

From-SVN: r245041
gcc/ChangeLog
gcc/config/rs6000/altivec.md
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/memcmp-1.c