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

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jeff Law <l...@gcc.gnu.org>:

https://gcc.gnu.org/g:42d84ba5db65f6cf8e2bd5e8bfd8ca8c8240734b

commit r15-5996-g42d84ba5db65f6cf8e2bd5e8bfd8ca8c8240734b
Author: Jeff Law <j...@ventanamicro.com>
Date:   Fri Dec 6 13:40:25 2024 -0700

    [PR tree-optimization/117895] Fix sparc libgo build failure with CRC opts
enabled

    So as noted in the BZ, sparc builds of the golang libraries were failing
due to
    the CRC code.

    Ultimately this was another mode problem in the table expansion. 
Essentially
    when the mode of the resultant crc was different than the mode of the input
    data we could create mixed mode operations which is a no-no.  Not entirely
sure
    how we were getting away with it before, but it was clearly wrong.

    The mode of the crc will always be at least as large at the mode of the
data
    for the cases we support.  So the code has been adjusted to convert the
data's
    mode to the crc's mode and do all the ops in the crc mode.

    That fixes the libgo build problem on sparc and I've verfied that there
aren't
    any regressions on x86_64 as well as all the embedded targets in my tester.

            PR tree-optimization/117895
    gcc/
            * expr.cc (calculate_table_based_CRC): Drop CRC_MODE argument.
            Convert DATA to CRC's mode, then do calculations in CRC's mode.
            (expand_crc_table_based): Corresponding changes.
            (expand_reversed_crc_table_based): Corresponding changes.

Reply via email to