Commit b231822d by Kyrylo Tkachov Committed by Kyrylo Tkachov

Fix for big-endian gcc.c-torture/execute/pr55750.c

	* gimple-ssa-store-merging.c (encode_tree_to_bitpos): Don't forget to
	clear padding bits even when they're less than a byte.

From-SVN: r241798
parent 2b01aad6
2016-11-02 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* gimple-ssa-store-merging.c (encode_tree_to_bitpos): Don't forget to
clear padding bits even when they're less than a byte.
2016-11-02 Richard Biener <rguenther@suse.de> 2016-11-02 Richard Biener <rguenther@suse.de>
* gimple-ssa-store-merging.c: Include gimplify-me.h. * gimple-ssa-store-merging.c: Include gimplify-me.h.
...@@ -431,7 +431,8 @@ encode_tree_to_bitpos (tree expr, unsigned char *ptr, int bitlen, int bitpos, ...@@ -431,7 +431,8 @@ encode_tree_to_bitpos (tree expr, unsigned char *ptr, int bitlen, int bitpos,
contain a sign bit due to sign-extension). */ contain a sign bit due to sign-extension). */
unsigned int padding unsigned int padding
= byte_size - ROUND_UP (bitlen, BITS_PER_UNIT) / BITS_PER_UNIT - 1; = byte_size - ROUND_UP (bitlen, BITS_PER_UNIT) / BITS_PER_UNIT - 1;
if (padding != 0) if (padding != 0
|| bitlen % BITS_PER_UNIT != 0)
{ {
/* On big-endian the padding is at the 'front' so just skip the initial /* On big-endian the padding is at the 'front' so just skip the initial
bytes. */ bytes. */
......
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