https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91126
Andrew Pinski changed:
What|Removed |Added
Keywords||wrong-code
CC|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91126
Richard Biener changed:
What|Removed |Added
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91126
--- Comment #3 from Richard Biener ---
So the issue is the usual GET_MODE_SIZE != ref->size. native_encode_int
encodes two 32bit numbers (but only 3 bytes from them, in big-endian) while VN
expects it to encode a 3-byte 24bit number. There's th
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91126
--- Comment #4 from Richard Biener ---
Created attachment 46581
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46581&action=edit
patch
Untested patch that fixes the issue.
Value numbering stmt = _1 = BIT_FIELD_REF ;
Successfully combined
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91126
--- Comment #5 from Richard Biener ---
Oh, and I think it's a pity we're trying to stay away from optimizing the
bitfield cases. I suppose we could also use encode_tree_to_bitpos from
the store-merging pass for this purpose, but while operating
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91126
--- Comment #6 from Richard Biener ---
Testcase that fails for a longer time already:
struct S
{
int a : 24;
int b : 8;
} s;
int
main()
{
s.a = 0xfefefe;
s.b = 0xfe;
unsigned char c;
c = ((unsigned char *)&s)[0];
if (c != 0xfe)
__bu