Re: [x86 PATCH] Improve V[48]QI shifts on AVX512

2024-05-10 Thread Hongtao Liu
On Fri, May 10, 2024 at 3:41 PM Roger Sayle wrote: > > > Many thanks for the speedy review and correction/improvement. > It's interesting that you spotted the ternlog "spill"... > I have a patch that rewrites ternlog handling that's been > waiting for stage 1, that would also fix this mem operand

Re: [x86 PATCH] Improve V[48]QI shifts on AVX512

2024-05-10 Thread Roger Sayle
Many thanks for the speedy review and correction/improvement. It's interesting that you spotted the ternlog "spill"... I have a patch that rewrites ternlog handling that's been waiting for stage 1, that would also fix this mem operand issue. I hope to submit it for review this weekend. Thanks a

Re: [x86 PATCH] Improve V[48]QI shifts on AVX512

2024-05-09 Thread Hongtao Liu
On Fri, May 10, 2024 at 6:26 AM Roger Sayle wrote: > > > The following one line patch improves the code generated for V8QI and V4QI > shifts when AV512BW and AVX512VL functionality is available. + /* With AVX512 its cheaper to do vpmovsxbw/op/vpmovwb. */ + && !(TARGET_AVX512BW && TARGET

[x86 PATCH] Improve V[48]QI shifts on AVX512

2024-05-09 Thread Roger Sayle
The following one line patch improves the code generated for V8QI and V4QI shifts when AV512BW and AVX512VL functionality is available. For the testcase (from gcc.target/i386/vect-shiftv8qi.c): typedef signed char v8qi __attribute__ ((__vector_size__ (8))); v8qi foo (v8qi x) { return x >> 5; }