> I'm still a bit worried about the overlap between the expanded > noce_convert_multiple_sets and cond_move_process_if_block (5/9). > It seems like we're making noce_convert_multiple_set handle most of > the conditional move cases that cond_move_process_if_block can handle. > But like you say, noce_convert_multiple_set is still restricted to > half-diamonds, whereas cond_move_process_if_block can handle full > diamonds.
I see your concern and would also agree on that there should be a clearer demarcation of which method can handle what. I'm not really sure I fully understand the distinction between "noce" and "cond_move" anyway, when we emit conditional moves in the "noce" parts. As said before, in my opinion, both noce_convert_multiple and cond_move_process should be unified rather sooner than later. Yet, before and after my suggested patch, noce_convert_multiple_set can handle blocks that cond_move_process cannot, e.g. cmovs that write to one of the registers the condition checked (like min/max idioms) or even cmovs that touch registers that are modified earlier in the block (like in swap idioms). As far as I understand, this is why the additional temporaries have been introduced in the first place - my patch now tries to limit these temporaries to situations where we really need them. I would argue that there is still sufficient difference between them, even though both can now handle constants. Regards Robin