> diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c > index a128b19..446ee59 100644 > --- a/gcc/config/ia64/ia64.c > +++ b/gcc/config/ia64/ia64.c > @@ -1527,12 +1527,19 @@ ia64_split_tmode_move (rtx operands[]) > && reg_overlap_mentioned_p (operands[0], operands[1])) > { > rtx base = XEXP (operands[1], 0); > + rtx first_write = gen_rtx_REG (DImode, REGNO (operands[0])); > while (GET_CODE (base) != REG) > base = XEXP (base, 0); > > if (REGNO (base) == REGNO (operands[0])) > - reversed = true; > - dead = true; > + { > + reversed = true; > + first_write = gen_rtx_REG (DImode, REGNO (operands[0]) + 1); > + } > + > + if (GET_CODE (operands[0]) == REG > + && reg_overlap_mentioned_p (first_write, operands[1])) > + dead = true; > } > /* Another reason to do the moves in reversed order is if the first > element of the target register pair is also the second element of
Note that the new "GET_CODE (operands[0]) == REG" check is redundant, since REGNO (operands[0]) is already accessed before. And instead of generating very short-lived RTL, you could use refers_to_regno_p instead. I suspect that the problem reported by Jeff is related to the usage of "dead" in the REG subcase of the MEM case of ia64_split_tmode. There is a dangling comment to that effect in ia64_split_tmode_move just above the block. -- Eric Botcazou