On 06/26/2012 03:40 AM, Olivier Hainque wrote: > Hello Richard, > > On Jun 25, 2012, at 20:36 , Richard Henderson wrote: > >> Can you explain the sequence that results in multiple memory >> references? Because I can't see how it can... > > Compared to the point at which we were observing the problem, > the code has changed a bit in this area though not so much. > > In the current mainline, this would be from the two uses of > "lowfrom" in: > > /* Get a copy of FROM widened to a word, if necessary. */ > ... > lowfrom = convert_to_mode (lowpart_mode, from, unsignedp); > > lowpart = gen_lowpart (lowpart_mode, to); > ==> emit_move_insn (lowpart, lowfrom); > > /* Compute the value to put in each remaining word. */ > if (unsignedp) > fill_value = const0_rtx; > else > fill_value = emit_store_flag (gen_reg_rtx (word_mode), > ==> LT, lowfrom, const0_rtx, > VOIDmode, 0, -1);
Ah, right, since convert_to_mode can just reshuffle the MEM. The patch is ok. r~