> -----Original Message----- > From: Remi Machet <rmac...@nvidia.com> > Sent: Monday, July 7, 2025 5:53 PM > To: Kyrylo Tkachov <ktkac...@nvidia.com>; GCC Patches <gcc- > patc...@gcc.gnu.org> > Cc: Richard Sandiford <richard.sandif...@arm.com>; Richard Earnshaw > <richard.earns...@arm.com>; Alex Coplan <alex.cop...@arm.com>; Andrew > Pinski <pins...@gmail.com> > Subject: Re: [PATCH 4/7] aarch64: Use EOR3 for DImode values > > On 7/7/25 06:18, Kyrylo Tkachov wrote: > > External email: Use caution opening links or attachments > > > > > > Hi all, > > > > Similar to BCAX, we can use EOR3 for DImode, but we have to be careful > > not to force GP<->SIMD moves unnecessarily, so add a splitter for that case. > > > > So for input: > > uint64_t eor3_d_gp (uint64_t a, uint64_t b, uint64_t c) { return EOR3 (a, > > b, c); } > > uint64x1_t eor3_d (uint64x1_t a, uint64x1_t b, uint64x1_t c) { return EOR3 > > (a, b, > c); } > > > > We generate the desired: > > eor3_d_gp: > > eor x1, x1, x2 > > eor x0, x1, x0 > > ret > > > > eor3_d: > > eor3 v0.16b, v0.16b, v1.16b, v2.16b > > ret > > > > Bootstrapped and tested on aarch64-none-linux-gnu. > > Ok for trunk? > > Thanks, > > Kyrill > > > > Signed-off-by: Kyrylo Tkachov <ktkac...@nvidia.com> > > > > gcc/ > > > > * config/aarch64/aarch64-simd.md (*eor3qdi4): New > > define_insn_and_split. > > > > gcc/testsuite/ > > > > * gcc.target/aarch64/simd/eor3_d.c: Add tests for DImode operands. > > Hi Kyrill, >
Hi Remi, > I assume compact syntax is a no-go because of the different modifiers on > operand 0 ('=' and '&')? > > Also, shouldn't the second variant use '=&r' for operand 0 instead of '&r'? > = and + apply to all alternatives, not just the first one, but they must be placed on the first alternative. The compact syntax can still be used here as constraints modifiers are allowed on the alternatives as well. The compact syntax does enforce that = and + be on the header though to make it clear that they apply to all. As an example see the @aarch64_fold_extract_vector_<last_op>_<mode> pattern in aarch64-sve.md Thanks, Tamar > Remi >