This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 4.8 v2, i386]: Make CCZ mode compatible with CCGOC and CCGO modes
On Tue, Feb 14, 2012 at 12:00 AM, Richard Henderson <firstname.lastname@example.org> wrote:
> On 02/11/2012 12:56 AM, Uros Bizjak wrote:
>> FWIW, the mode of flags in users doesn't matter at all on x86, but
>> which way is correct?
> As far as I know, it doesn't matter anywhere. ?We don't even bother to have perfect harmony between ?integer modes in hard registers -- think about what happens when we drop all the subregs on the floor post-reload. ?Yes, it's probably an error if we don't have compatible modes between def and use, but nothing is going to check for that.
cse.c says some relaxing words related to this issue:
/* If the following assertion was triggered, there is most probably
something wrong with the cc_modes_compatible back end function.
CC modes only can be considered compatible if the insn - with the mode
replaced by any of the compatible modes - can still be recognized. */
It looks to me that correct definition of cc_modes_compatible
guarantees that insn is still valid, no matter if the mode of flags
remains in the "wrong mode".
In any case, I will add the comment to avoid confusion.