Re: [PATCH] simplify-rtx: Fix compare of comparisons (PR60818)

2017-05-01 Thread Segher Boessenkool
Hi! Is this okay for backport to 5 and 6? Segher On Fri, Mar 31, 2017 at 09:40:34PM +, Segher Boessenkool wrote: > The function simplify_binary_operation_1 has code that does > /* Convert (compare (gt (flags) 0) (lt (flags) 0)) to (flags). */ > but this transformation is only valid if "fl

Re: [PATCH] simplify-rtx: Fix compare of comparisons (PR60818)

2017-04-03 Thread Segher Boessenkool
On Mon, Apr 03, 2017 at 11:01:23AM -0600, Jeff Law wrote: > > PR rtl-optimization/60818 > > * simplify-rtx.c (simplify_binary_operation_1): Do not replace > > a compare of comparisons with the thing compared if this results > > in a different machine mode. > > > >gcc/testsuite/ > >

Re: [PATCH] simplify-rtx: Fix compare of comparisons (PR60818)

2017-04-03 Thread Jeff Law
On 03/31/2017 03:40 PM, Segher Boessenkool wrote: The function simplify_binary_operation_1 has code that does /* Convert (compare (gt (flags) 0) (lt (flags) 0)) to (flags). */ but this transformation is only valid if "flags" has the same machine mode as the outer compare. This fixes it. Bootst

[PATCH] simplify-rtx: Fix compare of comparisons (PR60818)

2017-03-31 Thread Segher Boessenkool
The function simplify_binary_operation_1 has code that does /* Convert (compare (gt (flags) 0) (lt (flags) 0)) to (flags). */ but this transformation is only valid if "flags" has the same machine mode as the outer compare. This fixes it. Bootstrapped and tested on powerpc64-linux {-m32,-m64} (an