|
From: | Bastian Koppelmann |
Subject: | Re: [Qemu-ppc] [Qemu-devel] qemu-system-ppc TCG assert with git master |
Date: | Thu, 12 Mar 2015 14:55:37 +0000 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
Hi Mark,
sorry I forgot to cc qemu-devel :/
On 03/12/2015 08:41 AM, Mark Cave-Ayland wrote: Hi all, does this fix it? diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h index 96adf9a..4c8ff70 100644 --- a/tcg/tcg-op.h +++ b/tcg/tcg-op.h @@ -396,7 +396,11 @@ static inline void tcg_gen_and_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2) static inline void tcg_gen_or_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2) { - tcg_gen_op3_i32(INDEX_op_or_i32, ret, arg1, arg2); + if (TCGV_EQUAL_I32(arg1, arg2)) { + tcg_gen_mov_i32(ret, arg1); + } else { + tcg_gen_op3_i32(INDEX_op_or_i32, ret, arg1, arg2); + } } static inline void tcg_gen_xor_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2) The patch is also attached. It is just a revert of tcg_gen_or_i32. I'll investigate some more why the optimizer fails here. Cheers, Bastian |
0001-tcg-tcg_gen_or_i32-causing-in-some-cases-tcg_opt_gen.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |