Re: [PATCH] Fix combine's simplify_comparison (PR rtl-optimization/51023, take 3)

2011-11-10 Thread Bernd Schmidt
On 11/09/11 18:12, Jakub Jelinek wrote: So here is hopefully last iteration of that. Negative constants that trunc_int_for_mode to the same value are IMHO just fine too, similarly for ZERO_EXTEND 0x for HImode should be fine too. On the other side, if mode is DImode and outer mode of

[PATCH] Fix combine's simplify_comparison (PR rtl-optimization/51023)

2011-11-09 Thread Jakub Jelinek
Hi! This patch essentially reverts part of Bernd's 2011-07-06 changes, which was IMHO wrong. As const_op here is a constant in wider mode than MODE (which is the inner mode of the SIGN_EXTEND), the old code (and what this patch is restoring) didn't check just that the sign bit is clear, but also

Re: [PATCH] Fix combine's simplify_comparison (PR rtl-optimization/51023)

2011-11-09 Thread Bernd Schmidt
On 11/09/11 16:32, Jakub Jelinek wrote: --- gcc/combine.c.jj 2011-11-08 23:35:12.0 +0100 +++ gcc/combine.c 2011-11-09 10:06:27.20764 +0100 @@ -11397,9 +11397,12 @@ simplify_comparison (enum rtx_code code, later on, and then we wouldn't know whether to sign- or

Re: [PATCH] Fix combine's simplify_comparison (PR rtl-optimization/51023)

2011-11-09 Thread Jakub Jelinek
On Wed, Nov 09, 2011 at 04:44:55PM +0100, Bernd Schmidt wrote: On 11/09/11 16:32, Jakub Jelinek wrote: --- gcc/combine.c.jj2011-11-08 23:35:12.0 +0100 +++ gcc/combine.c 2011-11-09 10:06:27.20764 +0100 @@ -11397,9 +11397,12 @@ simplify_comparison (enum rtx_code code,

Re: [PATCH] Fix combine's simplify_comparison (PR rtl-optimization/51023)

2011-11-09 Thread Bernd Schmidt
On 11/09/11 17:24, Jakub Jelinek wrote: --- gcc/combine.c.jj 2011-11-08 23:35:12.0 +0100 +++ gcc/combine.c 2011-11-09 10:06:27.20764 +0100 @@ -11397,13 +11397,20 @@ simplify_comparison (enum rtx_code code, later on, and then we wouldn't know whether to sign- or

[PATCH] Fix combine's simplify_comparison (PR rtl-optimization/51023, take 3)

2011-11-09 Thread Jakub Jelinek
On Wed, Nov 09, 2011 at 05:47:02PM +0100, Bernd Schmidt wrote: Yes, I think I prefer this. So here is hopefully last iteration of that. Negative constants that trunc_int_for_mode to the same value are IMHO just fine too, similarly for ZERO_EXTEND 0x for HImode should be fine too. On the