]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Aarch64: Use BUILTIN_VHSDF_HSDF for vector and scalar sqrt builtins
authorAyan Shafqat <ayan.x.shafqat@gmail.com>
Thu, 1 May 2025 13:14:44 +0000 (06:14 -0700)
committerKyrylo Tkachov <ktkachov@nvidia.com>
Thu, 1 May 2025 13:44:20 +0000 (15:44 +0200)
This patch changes the `sqrt` builtin definition from `BUILTIN_VHSDF_DF`
to `BUILTIN_VHSDF_HSDF` in `aarch64-simd-builtins.def`, ensuring the
builtin covers half, single, and double precision variants. The redundant
`VAR1 (UNOP, sqrt, 2, FP, hf)` lines are removed, as they are no longer
needed now that `BUILTIN_VHSDF_HSDF` handles those cases.

gcc/ChangeLog:

* config/aarch64/aarch64-simd-builtins.def: Change
BUILTIN_VHSDF_DF to BUILTIN_VHSDF_HSDF.

Signed-off-by: Ayan Shafqat <ayan.x.shafqat@gmail.com>
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/config/aarch64/aarch64-simd-builtins.def

index 6cc45b18a723fc9621e2da6220231e61b621185a..685bf0dc40867f49159dcf879b55f4dc9dd17db2 100644 (file)
@@ -57,7 +57,7 @@
   VAR1 (BINOPP, pmull, 0, DEFAULT, v8qi)
   VAR1 (BINOPP, pmull_hi, 0, DEFAULT, v16qi)
   BUILTIN_VHSDF_HSDF (BINOP, fmulx, 0, FP)
-  BUILTIN_VHSDF_DF (UNOP, sqrt, 2, FP)
+  BUILTIN_VHSDF_HSDF (UNOP, sqrt, 2, FP)
   BUILTIN_VDQ_I (BINOP, addp, 0, DEFAULT)
   BUILTIN_VDQ_I (BINOPU, addp, 0, DEFAULT)
   BUILTIN_VDQ_BHSI (UNOP, clrsb, 2, DEFAULT)
   BUILTIN_VHSDF_HSDF (BINOP_USS, facgt, 0, FP)
   BUILTIN_VHSDF_HSDF (BINOP_USS, facge, 0, FP)
 
-  /* Implemented by sqrt<mode>2.  */
-  VAR1 (UNOP, sqrt, 2, FP, hf)
-
   /* Implemented by <optab><mode>hf2.  */
   VAR1 (UNOP, floatdi, 2, FP, hf)
   VAR1 (UNOP, floatsi, 2, FP, hf)