On 06/04/2015 12:47 PM, Aurelien Jarno wrote:
> For TCG ops with two outputs registers (add2, sub2, div2, div2u), when
> the same input temp is used for the two inputs aliased to the two
> outputs, and when these inputs are both dead, the register allocation
> code wrongly assigned the same register to the same output.
> 
> This happens for example with sub2 t1, t2, t3, t3, t4, t5, when t3 is
> not used anymore after the TCG op.  In that case the same register is
> used for t1, t2 and t3.
> 
> The fix is to look for already allocated aliased input when allocating
> a dead aliased input and check that the register is not already
> used.
> 
> Cc: Richard Henderson <r...@twiddle.net>
> Signed-off-by: Aurelien Jarno <aurel...@aurel32.net>
> ---
>  tcg/tcg.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)

Reviewed-by: Richard Henderson <r...@twiddle.net>


r~

Reply via email to