Re: [x86_64 PATCH] Improved Scalar-To-Vector (STV) support for TImode to V1TImode.

2022-07-14 Thread Richard Biener via Gcc-patches
On Thu, Jul 14, 2022 at 7:32 AM Roger Sayle wrote: > > > On Mon, Jul 11, 2022, H.J. Lu wrote: > > On Sun, Jul 10, 2022 at 2:38 PM Roger Sayle > > wrote: > > > Hi HJ, > > > > > > I believe this should now be handled by the post-reload (CSE) pass. > > > Consider the simple test case: > > > > > >

RE: [x86_64 PATCH] Improved Scalar-To-Vector (STV) support for TImode to V1TImode.

2022-07-13 Thread Roger Sayle
On Mon, Jul 11, 2022, H.J. Lu wrote: > On Sun, Jul 10, 2022 at 2:38 PM Roger Sayle > wrote: > > Hi HJ, > > > > I believe this should now be handled by the post-reload (CSE) pass. > > Consider the simple test case: > > > > __int128 a, b, c; > > void foo() > > { > > a = 0; > > b = 0; > > c

Re: [x86_64 PATCH] Improved Scalar-To-Vector (STV) support for TImode to V1TImode.

2022-07-11 Thread Uros Bizjak via Gcc-patches
On Sun, Jul 10, 2022 at 8:36 PM Roger Sayle wrote: > > > Hi Uros, > Yes, I agree. I think it makes sense to have a single STV pass (after > combine and before reload). Let's hear what HJ thinks, but I'm > happy to investigate a follow-up patch that unifies the STV passes. > But it'll be easier

Re: [x86_64 PATCH] Improved Scalar-To-Vector (STV) support for TImode to V1TImode.

2022-07-10 Thread H.J. Lu via Gcc-patches
On Sun, Jul 10, 2022 at 2:38 PM Roger Sayle wrote: > > > Hi HJ, > > I believe this should now be handled by the post-reload (CSE) pass. > Consider the simple test case: > > __int128 a, b, c; > void foo() > { > a = 0; > b = 0; > c = 0; > } > > Without any STV, i.e. -O2 -msse4 -mno-stv, GCC

RE: [x86_64 PATCH] Improved Scalar-To-Vector (STV) support for TImode to V1TImode.

2022-07-10 Thread Roger Sayle
Hi HJ, I believe this should now be handled by the post-reload (CSE) pass. Consider the simple test case: __int128 a, b, c; void foo() { a = 0; b = 0; c = 0; } Without any STV, i.e. -O2 -msse4 -mno-stv, GCC get TI mode writes: movq$0, a(%rip) movq$0, a+8(%rip)

Re: [x86_64 PATCH] Improved Scalar-To-Vector (STV) support for TImode to V1TImode.

2022-07-10 Thread H.J. Lu via Gcc-patches
On Sun, Jul 10, 2022 at 11:36 AM Roger Sayle wrote: > > > Hi Uros, > Yes, I agree. I think it makes sense to have a single STV pass (after > combine and before reload). Let's hear what HJ thinks, but I'm > happy to investigate a follow-up patch that unifies the STV passes. > But it'll be easier

RE: [x86_64 PATCH] Improved Scalar-To-Vector (STV) support for TImode to V1TImode.

2022-07-10 Thread Roger Sayle
Hi Uros, Yes, I agree. I think it makes sense to have a single STV pass (after combine and before reload). Let's hear what HJ thinks, but I'm happy to investigate a follow-up patch that unifies the STV passes. But it'll be easier to confirm there are no "code generation" changes if those

Re: [x86_64 PATCH] Improved Scalar-To-Vector (STV) support for TImode to V1TImode.

2022-07-10 Thread Uros Bizjak via Gcc-patches
On Sat, Jul 9, 2022 at 2:17 PM Roger Sayle wrote: > > > This patch upgrades x86_64's scalar-to-vector (STV) pass to more > aggressively transform 128-bit scalar TImode operations into vector > V1TImode operations performed on SSE registers. TImode functionality > already exists in STV, but only