This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/81396] [7/8 Regression] Optimization of reading Little-Endian 64-bit number with portable code has a regression
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 11 Jul 2017 16:42:30 +0000
- Subject: [Bug tree-optimization/81396] [7/8 Regression] Optimization of reading Little-Endian 64-bit number with portable code has a regression
- Auto-submitted: auto-generated
- References: <bug-81396-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81396
--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> ---
bswap was happy dealing with
_2 = MEM[(const unsigned char *)&word];
_3 = (uint64_t) _2;
_4 = MEM[(const unsigned char *)&word + 1B];
_5 = (uint64_t) _4;
_6 = _5 << 8;
_8 = MEM[(const unsigned char *)&word + 2B];
_9 = (uint64_t) _8;
_10 = _9 << 16;
_32 = _6 | _10;
_11 = _3 | _32;
etc, but has trouble with
_21 = word_31(D) & 255;
_1 = BIT_FIELD_REF <word_31(D), 8, 8>;
_23 = (uint64_t) _1;
_2 = _23 << 8;
_4 = BIT_FIELD_REF <word_31(D), 8, 16>;
_24 = (uint64_t) _4;
_5 = _24 << 16;
_32 = _2 | _5;
_6 = _21 | _32;