From: Oleg Endo Date: Sat, 4 Jun 2016 11:00:58 +0000 (+0000) Subject: re PR tree-optimization/52171 (memcmp/strcmp/strncmp can be optimized when the result... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=56812845490199b04123d9faf55cc2b338e6dfb9;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bce140bef53..3e11cb9e06c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-06-04 Oleg Endo + + 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 * config/sh/sh.c (sh_print_operand_address): Don't use hardcoded 'r0' diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 74327aa7c7e..0960a99fd2c 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -12506,11 +12506,11 @@ sh_use_by_pieces_infrastructure_p (unsigned HOST_WIDE_INT size, switch (op) { 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); case STORE_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); default: return default_use_by_pieces_infrastructure_p (size, align,