PR middle-end/22141
* gimple-ssa-store-merging.c (merged_store_group::apply_stores): Fix
arguments to clear_bit_region_be.
From-SVN: r254228
+2017-10-30 Jakub Jelinek <jakub@redhat.com>
+
+ 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 <wilson@tuliptree.org>
* gimplify.c: Include memmodel.h.
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);
}