[Bug target/113079] [x86] Fails to generate dot_prod instructions for 64-bit vector.
liuhongt at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Dec 19 05:21:07 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113079
--- Comment #1 from Hongtao Liu <liuhongt at gcc dot gnu.org> ---
(In reply to Hongtao Liu from comment #0)
> int
> foo (int n, unsigned char* p, char* pi)
> {
> int sum = 0;
> for (int i = 0; i != 8; i++)
> {
> sum += p[i] * pi[i];
> }
> return sum;
> }
>
> We can use 128-bit dot_prod instruction + clean upper 64 bits. Currently,
clean upper is not needed since it's integral operations, no side effect from
upper 64-bits operations.
More information about the Gcc-bugs
mailing list