Re: [x86 SSE] Improve handling of ternlog instructions in i386/sse.md (v3)

2024-06-06 Thread Hongtao Liu
On Thu, Jun 6, 2024 at 6:07 PM Roger Sayle wrote: > > > Hi Hongtao, > Here's the third revision of my improved ternlog handling patch for x86. > This addresses the previously discovered problems, adding a check for > memory_operand, and adds four new test cases, to confirm that the > appropriate f

Re: [x86 SSE] Improve handling of ternlog instructions in i386/sse.md (v2)

2024-05-27 Thread Hongtao Liu
On Mon, May 27, 2024 at 2:48 PM Hongtao Liu wrote: > > On Sat, May 18, 2024 at 4:10 AM Roger Sayle > wrote: > > > > > > Hi Hongtao, > > Many thanks for the review, bug fixes and suggestions for improvements. > > This revised version of the patch, implements all of your corrections. In > > theo

Re: [x86 SSE] Improve handling of ternlog instructions in i386/sse.md (v2)

2024-05-26 Thread Hongtao Liu
On Sat, May 18, 2024 at 4:10 AM Roger Sayle wrote: > > > Hi Hongtao, > Many thanks for the review, bug fixes and suggestions for improvements. > This revised version of the patch, implements all of your corrections. In > theory > the "ternlog idx" should guarantee that some operands are non-null

Re: [x86 SSE] Improve handling of ternlog instructions in i386/sse.md (v2)

2024-05-26 Thread Hongtao Liu
On Tue, May 21, 2024 at 5:46 AM Alexander Monakov wrote: > > > Hello! > > I looked at ternlog a bit last year, so I'd like to offer some drive-by > comments. If you want to tackle them in a follow-up patch, or leave for > someone else to handle, please let me know. > > On Fri, 17 May 2024, Roger S

Re: [x86 SSE] Improve handling of ternlog instructions in i386/sse.md (v2)

2024-05-20 Thread Alexander Monakov
Hello! I looked at ternlog a bit last year, so I'd like to offer some drive-by comments. If you want to tackle them in a follow-up patch, or leave for someone else to handle, please let me know. On Fri, 17 May 2024, Roger Sayle wrote: > This revised patch has been tested on x86_64-pc-linux-gnu

[x86 SSE] Improve handling of ternlog instructions in i386/sse.md (v2)

2024-05-17 Thread Roger Sayle
Hi Hongtao, Many thanks for the review, bug fixes and suggestions for improvements. This revised version of the patch, implements all of your corrections. In theory the "ternlog idx" should guarantee that some operands are non-null, but I agree that it's better defensive programming to check inv

Re: [x86 SSE] Improve handling of ternlog instructions in i386/sse.md

2024-05-14 Thread Hongtao Liu
On Mon, May 13, 2024 at 5:57 AM Roger Sayle wrote: > > > This patch improves the way that the x86 backend recognizes and > expands AVX512's bitwise ternary logic (vpternlog) instructions. I like the patch. 1 file changed, 25 insertions(+), 1 deletion(-) gcc/config/i386/i386-expand.cc | 26 +++

[x86 SSE] Improve handling of ternlog instructions in i386/sse.md

2024-05-12 Thread Roger Sayle
This patch improves the way that the x86 backend recognizes and expands AVX512's bitwise ternary logic (vpternlog) instructions. As a motivating example consider the following code which calculates the carry out from a (binary) full adder: typedef unsigned long long v4di __attribute((vector_size