Re: [PATCH] gimple-isel: Recognize vec_extract pattern.

2023-07-05 Thread Robin Dapp via Gcc-patches
>> + _4 = vD.2208; >> + _5 = .VEC_EXTRACT (_4, idx_2(D)); >> + _3 = _5; */ > > I think you are doing > > _3 = .VEC_EXTRACT (_4, idx_2(D)); > > and avoiding the SSA name copy correctly. Can you double-check? > > OK with the comment adjusted. Argh, yes, thanks. Regards

Re: [PATCH] gimple-isel: Recognize vec_extract pattern.

2023-07-05 Thread Richard Biener via Gcc-patches
On Tue, 4 Jul 2023, Robin Dapp wrote: > Hi Richard, > > changed the patch according to your comments and I agree that > it is more readable that way. I hope using lhs as target for > the extract directly is possible the way I did it. Richard's > patch for aarch64 is already, therefore testsuite

Re: [PATCH] gimple-isel: Recognize vec_extract pattern.

2023-07-04 Thread Robin Dapp via Gcc-patches
Hi Richard, changed the patch according to your comments and I agree that it is more readable that way. I hope using lhs as target for the extract directly is possible the way I did it. Richard's patch for aarch64 is already, therefore testsuites on aarch64 and i386 are unchanged. Regards Robi

Re: [PATCH] gimple-isel: Recognize vec_extract pattern.

2023-07-03 Thread Richard Biener via Gcc-patches
On Mon, 3 Jul 2023, Robin Dapp wrote: > Hi, > > In gimple-isel we already deduce a vec_set pattern from an > ARRAY_REF(VIEW_CONVERT_EXPR). This patch does the same for a > vec_extract. > > The code is largely similar to the vec_set one including > the addition of a can_vec_extract_var_idx_p fun

[PATCH] gimple-isel: Recognize vec_extract pattern.

2023-07-03 Thread Robin Dapp via Gcc-patches
Hi, In gimple-isel we already deduce a vec_set pattern from an ARRAY_REF(VIEW_CONVERT_EXPR). This patch does the same for a vec_extract. The code is largely similar to the vec_set one including the addition of a can_vec_extract_var_idx_p function in optabs.cc to check if the backend can handle a