This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][BZ #17801] Fix memcpy regression (five times slower on bulldozer.)
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: "Carlos O'Donell" <carlos at redhat dot com>, OndÅej BÃlka <neleai at seznam dot cz>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Sat, 31 Jan 2015 15:21:00 +0100
- Subject: Re: [PATCH][BZ #17801] Fix memcpy regression (five times slower on bulldozer.)
- Authentication-results: sourceware.org; auth=none
- References: <20150106142939 dot GB5835 at domone> <CAMe9rOo4tmQc0bJ1Z=pjURvPBBMndwQ-ynbHc=Mpz3eD=eqjbg at mail dot gmail dot com> <20150130145656 dot GA26219 at gmail dot com> <CAMe9rOr9Vn93958O=1fFBTU8zTRJ_j-15EvrOq7J05SwTRejgw at mail dot gmail dot com> <54CC7B38 dot 9060608 at redhat dot com> <CAMe9rOr-GkDU=w_3-+ZVwXNN9vWa_Y+SiZwuN+qBd2Zoigr3iA at mail dot gmail dot com>
"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."