From: Jakub Jelinek Date: Mon, 30 Oct 2017 16:20:24 +0000 (+0100) Subject: re PR middle-end/22141 (Missing optimization when storing structures) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4403d99aef3dddbd11cb3d444b0febf2ea89eca9;p=gcc.git re PR middle-end/22141 (Missing optimization when storing structures) PR middle-end/22141 * gimple-ssa-store-merging.c (merged_store_group::apply_stores): Fix arguments to clear_bit_region_be. From-SVN: r254228 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dcef7ec7ec1..711458f428c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-10-30 Jakub Jelinek + + PR middle-end/22141 + * gimple-ssa-store-merging.c (merged_store_group::apply_stores): Fix + arguments to clear_bit_region_be. + 2017-10-30 Jim Wilson * gimplify.c: Include memmodel.h. diff --git a/gcc/gimple-ssa-store-merging.c b/gcc/gimple-ssa-store-merging.c index fb68a815c87..5a5b776290a 100644 --- a/gcc/gimple-ssa-store-merging.c +++ b/gcc/gimple-ssa-store-merging.c @@ -701,7 +701,9 @@ merged_store_group::apply_stores () return false; unsigned char *m = mask + (pos_in_buffer / BITS_PER_UNIT); if (BYTES_BIG_ENDIAN) - clear_bit_region_be (m, pos_in_buffer % BITS_PER_UNIT, info->bitsize); + clear_bit_region_be (m, (BITS_PER_UNIT - 1 + - (pos_in_buffer % BITS_PER_UNIT)), + info->bitsize); else clear_bit_region (m, pos_in_buffer % BITS_PER_UNIT, info->bitsize); }