Commit 56812845 by Oleg Endo

re PR tree-optimization/52171 (memcmp/strcmp/strncmp can be optimized when the…

re PR tree-optimization/52171 (memcmp/strcmp/strncmp can be optimized when the result is tested for [in]equality with 0)

gcc/ChangeLog
	PR tree-optimization/52171
	* config/sh/sh.c (sh_use_by_pieces_infrastructure_p): Use
	by_pieces_ninsns instead of move_by_pieces_ninsns.

From-SVN: r237090
parent 909a11ad
2016-06-04 Oleg Endo <olegendo@gcc.gnu.org> 2016-06-04 Oleg Endo <olegendo@gcc.gnu.org>
PR tree-optimization/52171
* config/sh/sh.c (sh_use_by_pieces_infrastructure_p): Use
by_pieces_ninsns instead of move_by_pieces_ninsns.
2016-06-04 Oleg Endo <olegendo@gcc.gnu.org>
* config/sh/sh.c (sh_print_operand_address): Don't use hardcoded 'r0' * config/sh/sh.c (sh_print_operand_address): Don't use hardcoded 'r0'
for reg+reg addressing mode. for reg+reg addressing mode.
......
...@@ -12506,11 +12506,11 @@ sh_use_by_pieces_infrastructure_p (unsigned HOST_WIDE_INT size, ...@@ -12506,11 +12506,11 @@ sh_use_by_pieces_infrastructure_p (unsigned HOST_WIDE_INT size,
switch (op) switch (op)
{ {
case MOVE_BY_PIECES: case MOVE_BY_PIECES:
return move_by_pieces_ninsns (size, align, MOVE_MAX_PIECES + 1) return by_pieces_ninsns (size, align, MOVE_MAX_PIECES + 1, op)
< (!speed_p ? 2 : (align >= 32) ? 16 : 2); < (!speed_p ? 2 : (align >= 32) ? 16 : 2);
case STORE_BY_PIECES: case STORE_BY_PIECES:
case SET_BY_PIECES: case SET_BY_PIECES:
return move_by_pieces_ninsns (size, align, STORE_MAX_PIECES + 1) return by_pieces_ninsns (size, align, STORE_MAX_PIECES + 1, op)
< (!speed_p ? 2 : (align >= 32) ? 16 : 2); < (!speed_p ? 2 : (align >= 32) ? 16 : 2);
default: default:
return default_use_by_pieces_infrastructure_p (size, align, return default_use_by_pieces_infrastructure_p (size, align,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment