aboutsummaryrefslogtreecommitdiff
path: root/gcc/internal-fn.def
diff options
context:
space:
mode:
authorOluwatamilore Adebayo <oluwatamilore.adebayo@arm.com>2023-06-15 07:36:48 +0100
committerRichard Sandiford <richard.sandiford@arm.com>2023-06-15 07:36:48 +0100
commit710b8dec61a73cbbf5dadbdd2070a85e690e8184 (patch)
tree2add3b812d5bff97cd4ad1a36dced05070d1d6d1 /gcc/internal-fn.def
parent6cf8989c6e63ef07b0516d19ce86bbe921f1a485 (diff)
downloadgcc-710b8dec61a73cbbf5dadbdd2070a85e690e8184.zip
gcc-710b8dec61a73cbbf5dadbdd2070a85e690e8184.tar.gz
gcc-710b8dec61a73cbbf5dadbdd2070a85e690e8184.tar.bz2
Missed opportunity to use [SU]ABD
This adds a recognition pattern for the non-widening absolute difference (ABD). gcc/ChangeLog: * doc/md.texi (sabd, uabd): Document them. * internal-fn.def (ABD): Use new optab. * optabs.def (sabd_optab, uabd_optab): New optabs, * tree-vect-patterns.cc (vect_recog_absolute_difference): Recognize the following idiom abs (a - b). (vect_recog_sad_pattern): Refactor to use vect_recog_absolute_difference. (vect_recog_abd_pattern): Use patterns found by vect_recog_absolute_difference to build a new ABD internal call.
Diffstat (limited to 'gcc/internal-fn.def')
-rw-r--r--gcc/internal-fn.def3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/internal-fn.def b/gcc/internal-fn.def
index 5d638de..45a3c98 100644
--- a/gcc/internal-fn.def
+++ b/gcc/internal-fn.def
@@ -192,6 +192,9 @@ DEF_INTERNAL_OPTAB_FN (FMS, ECF_CONST, fms, ternary)
DEF_INTERNAL_OPTAB_FN (FNMA, ECF_CONST, fnma, ternary)
DEF_INTERNAL_OPTAB_FN (FNMS, ECF_CONST, fnms, ternary)
+DEF_INTERNAL_SIGNED_OPTAB_FN (ABD, ECF_CONST | ECF_NOTHROW, first,
+ sabd, uabd, binary)
+
DEF_INTERNAL_SIGNED_OPTAB_FN (AVG_FLOOR, ECF_CONST | ECF_NOTHROW, first,
savg_floor, uavg_floor, binary)
DEF_INTERNAL_SIGNED_OPTAB_FN (AVG_CEIL, ECF_CONST | ECF_NOTHROW, first,