[PATCH] AArch64: Remove redundant check in aarch64_simd_mov

Victor Do Nascimento victor.donascimento@arm.com
Thu Oct 17 20:32:57 GMT 2024


FWIW, I definitely agree about the spuriousness of the V2DI mode check.
While I can't approve, I can confirm it looks good.

Thanks,
Victor.

On 10/17/24 16:10, Wilco Dijkstra wrote:
> 
> The split condition in aarch64_simd_mov uses aarch64_simd_special_constant_p.  While
> doing the split, it checks the mode before calling aarch64_maybe_generate_simd_constant.
> This risky since it may result in unexpectedly calling aarch64_split_simd_move instead
> of aarch64_maybe_generate_simd_constant.  Since the mode is already checked, remove the
> spurious explicit mode check.
> 
> Passes bootstrap & regress, OK for commit?
> 
> ---
> 
> diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md
> index 18795a08b61da874a9e811822ed82e7eb9350bb4..5ac80103502112664528d37e3b8e24edc16eb932 100644
> --- a/gcc/config/aarch64/aarch64-simd.md
> +++ b/gcc/config/aarch64/aarch64-simd.md
> @@ -208,7 +208,6 @@ (define_insn_and_split "*aarch64_simd_mov<VQMOV:mode>"
>       else
>         {
>   	if (FP_REGNUM_P (REGNO (operands[0]))
> -	    && <MODE>mode == V2DImode
>   	    && aarch64_maybe_generate_simd_constant (operands[0], operands[1],
>   						     <MODE>mode))
>   	  ;
> 


More information about the Gcc-patches mailing list