]> git.ipfire.org Git - thirdparty/gcc.git/commit
vect: Remove type from misalignment hook.
authorRobin Dapp <rdapp@ventanamicro.com>
Thu, 11 Sep 2025 13:20:36 +0000 (15:20 +0200)
committerRobin Dapp <rdapp@ventanamicro.com>
Thu, 9 Oct 2025 07:19:03 +0000 (09:19 +0200)
commit5e9eecc66867ba0ae7df20f1cd526ad38fd1888f
tree53f27d8cb783ba3afa2561198371fe96e7579e24
parentb52a90e7a03fef3c237a78c91dcad37237338d1b
vect: Remove type from misalignment hook.

This patch removes the type argument from the vector_misalignment hook.
Ever since we switched from element to byte misalignment its
semantics haven't been particularly clear and nowadays it should be
redundant.

Also, in case of gather/scatter, the patch sets misalignment to the
misalignment of one unit of the vector mode so targets can
distinguish between element size alignment and element mode alignment.

is_packed is now always set, regardless of misalignment.

gcc/ChangeLog:

* config/aarch64/aarch64.cc (aarch64_builtin_support_vector_misalignment):
Remove type.
* config/arm/arm.cc (arm_builtin_support_vector_misalignment):
Ditto.
* config/epiphany/epiphany.cc (epiphany_support_vector_misalignment):
Ditto.
* config/gcn/gcn.cc (gcn_vectorize_support_vector_misalignment):
Ditto.
* config/loongarch/loongarch.cc (loongarch_builtin_support_vector_misalignment):
Ditto.
* config/riscv/riscv.cc (riscv_support_vector_misalignment):
Ditto.
* config/rs6000/rs6000.cc (rs6000_builtin_support_vector_misalignment):
Ditto.
* config/s390/s390.cc (s390_support_vector_misalignment):
Ditto.
* doc/tm.texi: Adjust vector misalignment docs.
* target.def: Ditto.
* targhooks.cc (default_builtin_support_vector_misalignment):
Remove type.
* targhooks.h (default_builtin_support_vector_misalignment):
Ditto.
* tree-vect-data-refs.cc (vect_can_force_dr_alignment_p):
Set misalignment for gather/scatter and remove type.
(vect_supportable_dr_alignment): Ditto.
13 files changed:
gcc/config/aarch64/aarch64.cc
gcc/config/arm/arm.cc
gcc/config/epiphany/epiphany.cc
gcc/config/gcn/gcn.cc
gcc/config/loongarch/loongarch.cc
gcc/config/riscv/riscv.cc
gcc/config/rs6000/rs6000.cc
gcc/config/s390/s390.cc
gcc/doc/tm.texi
gcc/target.def
gcc/targhooks.cc
gcc/targhooks.h
gcc/tree-vect-data-refs.cc