On 08/19/2015 11:20 AM, Kyrill Tkachov wrote:
Hmmm...
The function bb_valid_for_noce_process_p that we call early on
in noce_process_if_block makes sure that the only live reg out
of each basic block is the final common destination ('x' in the
noce_if_info struct definition). Since both basic blocks satisfy
that check I suppose that means that even if A and B do write to
the same intermediate pseudo that should not affect correctness
since the written-to common register would have to be read within
A and B (and nowhere outside A and B), which would cause it to
fail the bbs_ok_for_cmove_arith check that checks that no regs
written in A are read in B (and vice versa).
Excellent. That answers things quite well. In retrospect, I could have
figured that out myself :-)
That's the only issue left in my mind. If we're handling that case
correctly, then this is Ok for the trunk as-is. Else we'll need another
iteration.
Does the above explanation look ok to you?
If so, I'll be away for a week from Monday so I'd rather commit
the patch when I get back so I can deal with any fallout...
That's fine with me. Commit at your leisure.
Thanks,
jeff