diff options
Diffstat (limited to 'gcc/doc/tm.texi')
-rw-r--r-- | gcc/doc/tm.texi | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 23d386e..f021d15 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -5184,6 +5184,45 @@ holding the constant. This restriction is often true of addresses of TLS symbols for various targets. @end deftypefn +@deftypefn {Target Hook} bool TARGET_VECTORIZE_MISALIGNED_MEM_OK (@var{mode}) +This hook should return true if a move* pattern to/from memory +can be generated for machine_mode @var{mode} even if the memory location +is unaligned. +If a move* of data to/from unaligned memory locations is not supported for +machine_mode @var{mode}, the hook should return false. +This hook is used by the autovectorizer, and when expanding a +@code{MISALIGNED_INDIRECT_REF} expression. +@end deftypefn + +@deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD (void) +This hook should return the DECL of a function @var{f} that given an +address @var{addr} as an argument returns a mask @var{m} that can be +used to extract from two vectors the relevant data that resides in +@var{addr} in case @var{addr} is not properly aligned. + +The autovectrizer, when vectorizing a load operation from an address +@var{addr} that may be unaligned, will generate two vector loads from +the two aligned addresses around @var{addr}. It then generates a +@code{REALIGN_LOAD} operation to extract the relevant data from the +two loaded vectors. The first two arguments to @code{REALIGN_LOAD}, +@var{v1} and @var{v2}, are the two vectors, each of size @var{VS}, and +the third argument, @var{OFF}, defines how the data will be extracted +from these two vectors: if @var{OFF} is 0, then the returned vector is +@var{v2}; otherwise, the returned vector is composed from the last +@var{VS}-@var{OFF} elements of @var{v1} concatenated to the first +@var{OFF} elements of @var{v2}. + +If this hook is defined, the autovectorizer will generate a call +to @var{f} (using the DECL tree that this hook returns) and will +use the return value of @var{f} as the argument @var{OFF} to +@code{REALIGN_LOAD}. Therefore, the mask @var{m} returned by @var{f} +should comply with the semantics expected by @code{REALIGN_LOAD} +described above. +If this hook is not defined, then @var{addr} will be used as +the argument @var{OFF} to @code{REALIGN_LOAD}, in which case the low +log2(@var{VS})-1 bits of @var{addr} will be considered. +@end deftypefn + @node Condition Code @section Condition Code Status @cindex condition code status |