Re: [PATCH] x86_64: Integer min/max improvements.

2020-08-07 Thread Uros Bizjak via Gcc-patches
On Thu, Aug 6, 2020 at 10:40 AM Roger Sayle wrote: > > > Hi Uros, > > Many thanks for the review and feedback. Here's the final version as > committed, > with both the test cases requested by Richard Biener and your > suggestion/request > to use ix86_expand_clear. Tested again on x86_64-pc-lin

RE: [PATCH] x86_64: Integer min/max improvements.

2020-08-06 Thread Roger Sayle
6/minmax-9.c: Restrict test to !ia32. My apologies again. Roger -- -Original Message- From: Jakub Jelinek Sent: 06 August 2020 13:28 To: Roger Sayle Cc: 'Uros Bizjak' ; 'GCC Patches' Subject: Re: [PATCH] x86_64: Integer min/max improvements. On Thu, Aug 06, 2020 at

Re: [PATCH] x86_64: Integer min/max improvements.

2020-08-06 Thread Jakub Jelinek via Gcc-patches
On Thu, Aug 06, 2020 at 09:40:49AM +0100, Roger Sayle wrote: This test fails on i686-linux (or x86_64-linux when testing with -m32). make check-gcc RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} i386.exp=minmax-9.c' Running /usr/src/gcc/gcc/testsuite/gcc.target/i386/i386.exp ... FAIL: gcc.target/

RE: [PATCH] x86_64: Integer min/max improvements.

2020-08-06 Thread Roger Sayle
iginal Message- From: Uros Bizjak Sent: 03 August 2020 11:29 To: Roger Sayle Cc: GCC Patches Subject: Re: [PATCH] x86_64: Integer min/max improvements. On Thu, Jul 30, 2020 at 1:23 PM Roger Sayle wrote: > > > This patch tweaks the way that min and max are expanded, so that the >

Re: [PATCH] x86_64: Integer min/max improvements.

2020-08-03 Thread Uros Bizjak via Gcc-patches
On Thu, Jul 30, 2020 at 1:23 PM Roger Sayle wrote: > > > This patch tweaks the way that min and max are expanded, so that the > semantics of these operations are visible to the early RTL optimization > passes, until split into explicit comparison and conditional move > instructions. The good news

RE: [PATCH] x86_64: Integer min/max improvements.

2020-08-03 Thread Roger Sayle
. * gcc.target/i386/minmax-11.c: New test. Cheers, Roger -- -Original Message- From: Richard Biener Sent: 30 July 2020 13:21 To: Roger Sayle Cc: GCC Patches ; Uros Bizjak Subject: Re: [PATCH] x86_64: Integer min/max improvements. On Thu, Jul 30, 2020 at 1:24 PM Roger Sayle wrote

Re: [PATCH] x86_64: Integer min/max improvements.

2020-07-30 Thread Jakub Jelinek via Gcc-patches
On Thu, Jul 30, 2020 at 01:55:03PM +0100, Roger Sayle wrote: > Now that you mention it, I'm not sure whether PR rtl-optimization 94543 > is a bug at all, but with you and Richard Henderson weighing in, I suspect > that I must be missing something subtle. > > The initial text of the bug report comp

RE: [PATCH] x86_64: Integer min/max improvements.

2020-07-30 Thread Roger Sayle
Hi Richard, >> This patch tweaks the way that min and max are expanded, so that the >> semantics of these operations are visible to the early RTL >> optimization passes, until split into explicit comparison and >> conditional move instructions. > > Btw, I'm sure some variants of those are in

Re: [PATCH] x86_64: Integer min/max improvements.

2020-07-30 Thread Richard Biener via Gcc-patches
On Thu, Jul 30, 2020 at 1:24 PM Roger Sayle wrote: > > > This patch tweaks the way that min and max are expanded, so that the > semantics of these operations are visible to the early RTL optimization > passes, until split into explicit comparison and conditional move > instructions. The good news

[PATCH] x86_64: Integer min/max improvements.

2020-07-30 Thread Roger Sayle
This patch tweaks the way that min and max are expanded, so that the semantics of these operations are visible to the early RTL optimization passes, until split into explicit comparison and conditional move instructions. The good news is that i386.md already contains all of the required logic (man