[Bug rtl-optimization/89195] [7/8/9 regression] Corrupted stack offset after combine

segher at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Feb 5 07:12:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89195

Segher Boessenkool <segher at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |segher at gcc dot gnu.org

--- Comment #2 from Segher Boessenkool <segher at gcc dot gnu.org> ---
r256198 did

          /* POS counts from lsb, but make OFFSET count in memory order.  */
          if (BYTES_BIG_ENDIAN)
-           offset = (GET_MODE_PRECISION (is_mode) - len - pos) /
BITS_PER_UNIT;
+           offset = bits_to_bytes_round_down (GET_MODE_PRECISION (is_mode)
+                                              - len - pos);
          else
            offset = pos / BITS_PER_UNIT;

Was it correct before that?  At least it was symmetric so it *seemed* correct..


More information about the Gcc-bugs mailing list