This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][BZ #17801] Fix memcpy regression (five times slower on bulldozer.)


"H.J. Lu" <hjl.tools@gmail.com> writes:

> #if index_AVX2_Usable != index_AVX_Fast_Unaligned_Load
> # error index_AVX2_Usable != index_AVX_Fast_Unaligned_Load
> #endif
>           /* Determine if AVX2 is usable.  Unaligned load with 256-bit
>              AVX registers are faster on processors with AVX2.  */
>           if (CPUID_AVX2)
>             __cpu_features.feature[index_AVX2_Usable]
>               |= bit_AVX2_Usable | bit_AVX_Fast_Unaligned_Load;
>
> to update 2 features.  It works only if they have the same index_XXX.
> We need this check when we update more than one feature bit
> in a single statement.

You can use two statements, and the compiler will be able to combine
them.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]