> > ... define buffer_find_nonzero_offset_inner ...
> > ... define can_use_buffer_find_nonzero_offset_inner ...
> 
> > #if defined CONFIG_HAVE_GNU_IFUNC && defined CONFIG_HAVE_AVX2 ...
> > define buffer_find_nonzero_offset_avx2 ...
> > ... define can_use_buffer_find_nonzero_offset_avx2 ...
> > ... define the indirect functions ...
> > #else
> > ... define buffer_find_nonzero_offset that just calls
> > buffer_find_nonzero_offset_inner ...
> > ... define can_use_buffer_find_nonzero_offset that just calls
> > can_use_buffer_find_nonzero_offset_inner ...
> > #endif
> > 
> > Thanks,
> > 
> > Paolo
> 
> The buffer_find_nonzero_offset_inner  & buffer_find_nonzero_offset_avx2
> can't defined in the same .c file.
> Or, if the '-maxv2' is enabled, the " buffer_find_nonzero_offset_inner  ()"
> will be compiled to AVX2 instructions.

You can use __attribute__((__target__("avx2"))) on the avx2 version,
instead of compiling the whole file with -mavx2.

Paolo

Reply via email to