Re: [PATCH] match.pd: Avoid (view_convert (convert@0 @1)) optimization for extended _BitInts with padding bits [PR114469]

2024-03-27 Thread Jakub Jelinek
On Wed, Mar 27, 2024 at 01:42:03PM +0100, Richard Biener wrote: > The comment says it was added for (char)_Bool, probably > gcc.dg/tree-ssa/vce-1.c will fail. But I'm not sure this optimization > is important, it seems early SRA introduces a V_C_E here and then > phiopt the conversion to unsigned

Re: [PATCH] match.pd: Avoid (view_convert (convert@0 @1)) optimization for extended _BitInts with padding bits [PR114469]

2024-03-27 Thread Richard Biener
On Wed, 27 Mar 2024, Jakub Jelinek wrote: > On Wed, Mar 27, 2024 at 12:48:29PM +0100, Richard Biener wrote: > > > The following patch attempts to fix the (view_convert (convert@0 @1)) > > > optimization. If TREE_TYPE (@0) is a _BitInt type with padding bits > > > and @0 has the same precision as

Re: [PATCH] match.pd: Avoid (view_convert (convert@0 @1)) optimization for extended _BitInts with padding bits [PR114469]

2024-03-27 Thread Jakub Jelinek
On Wed, Mar 27, 2024 at 12:48:29PM +0100, Richard Biener wrote: > > The following patch attempts to fix the (view_convert (convert@0 @1)) > > optimization. If TREE_TYPE (@0) is a _BitInt type with padding bits > > and @0 has the same precision as @1 and it has a different sign > > and _BitInt with

Re: [PATCH] match.pd: Avoid (view_convert (convert@0 @1)) optimization for extended _BitInts with padding bits [PR114469]

2024-03-27 Thread Richard Biener
On Wed, 27 Mar 2024, Jakub Jelinek wrote: > Hi! > > The following patch attempts to fix the (view_convert (convert@0 @1)) > optimization. If TREE_TYPE (@0) is a _BitInt type with padding bits > and @0 has the same precision as @1 and it has a different sign > and _BitInt with padding bits are ex

[PATCH] match.pd: Avoid (view_convert (convert@0 @1)) optimization for extended _BitInts with padding bits [PR114469]

2024-03-27 Thread Jakub Jelinek
Hi! The following patch attempts to fix the (view_convert (convert@0 @1)) optimization. If TREE_TYPE (@0) is a _BitInt type with padding bits and @0 has the same precision as @1 and it has a different sign and _BitInt with padding bits are extended on the target (x86 doesn't, aarch64 doesn't, but