> -----Original Message-----
> From: Kyrylo Tkachov <ktkac...@nvidia.com>
> Sent: Monday, July 7, 2025 11:19 AM
> To: GCC Patches <gcc-patches@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: [PATCH 4/7] aarch64: Use EOR3 for DImode values
> 
> 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?

I think the patch is OK with the same changes Richard
asked for the BCAX case.

Thanks,
Tamar

> 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.

Reply via email to