Re: [Qemu-devel] [PATCH v2 07/10] tcg/optimize: further optimize brcond/movcond/setcond

2012-09-22 Thread Aurelien Jarno
On Fri, Sep 21, 2012 at 04:17:08PM -0700, Richard Henderson wrote: On 09/21/2012 12:43 PM, Aurelien Jarno wrote: +/* Return 2 if the condition can't be simplified, and the result + of the condition (0 or 1) if it can */ Ok as-is. But I'd bike-shed the fail return to -1. I have done

Re: [Qemu-devel] [PATCH v2 07/10] tcg/optimize: further optimize brcond/movcond/setcond

2012-09-22 Thread Richard Henderson
On 2012-09-22 02:35, Aurelien Jarno wrote: On Fri, Sep 21, 2012 at 04:17:08PM -0700, Richard Henderson wrote: On 09/21/2012 12:43 PM, Aurelien Jarno wrote: +/* Return 2 if the condition can't be simplified, and the result + of the condition (0 or 1) if it can */ Ok as-is. But I'd

[Qemu-devel] [PATCH v2 07/10] tcg/optimize: further optimize brcond/movcond/setcond

2012-09-21 Thread Aurelien Jarno
When both argument of brcond/movcond/setcond are the same or when one of the two values is a constant equal to zero, it's possible to do further optimizations. Signed-off-by: Aurelien Jarno aurel...@aurel32.net --- tcg/optimize.c | 127 +--- 1

Re: [Qemu-devel] [PATCH v2 07/10] tcg/optimize: further optimize brcond/movcond/setcond

2012-09-21 Thread Richard Henderson
On 09/21/2012 12:43 PM, Aurelien Jarno wrote: +/* Return 2 if the condition can't be simplified, and the result + of the condition (0 or 1) if it can */ Ok as-is. But I'd bike-shed the fail return to -1. r~