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

--- Comment #8 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Author: segher
Date: Thu Jul 26 10:16:48 2018
New Revision: 262994

URL: https://gcc.gnu.org/viewcvs?rev=262994&root=gcc&view=rev
Log:
combine: Another hard register problem (PR85805)

The current code in reg_nonzero_bits_for_combine allows using the
reg_stat info when last_set_mode is a different integer mode.  This is
completely wrong for non-pseudos.  For example, as in the PR, a value
in a DImode hard register is set by eight writes to its constituent
QImode parts.  The value written to the DImode is not the same as that
written to the lowest-numbered QImode!


        PR rtl-optimization/85805
        * combine.c (reg_nonzero_bits_for_combine): Only use the last set
        value for hard registers if that was written in the same mode.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/combine.c

Reply via email to