https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101579
--- Comment #8 from Hongtao.liu ---
>
> U u = ((union { V a; U b; }) w).b + ((union { V a; U b; }) w).b[1];
> return u;
>
> I means the result u only cared about the first half, we can drop the second
> half, it's redundant.
Sorry for the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101579
--- Comment #7 from Hongtao.liu ---
(In reply to Jakub Jelinek from comment #6)
> (In reply to Hongtao.liu from comment #4)
> > I looks to me that middle end should be able to transform 64-byte vector
> > shuffle to 32-byte vector shuffle when d
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101579
--- Comment #6 from Jakub Jelinek ---
(In reply to Hongtao.liu from comment #4)
> I looks to me that middle end should be able to transform 64-byte vector
> shuffle to 32-byte vector shuffle when data flow analysis shows the upper
> part of the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101579
--- Comment #5 from Hongtao.liu ---
After manually eliminating the upper part vector shuffle, codegen is much
better https://godbolt.org/z/d3YhzzYfo
typedef unsigned int __attribute__((__vector_size__ (32))) U;
typedef unsigned char __attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101579
--- Comment #4 from Hongtao.liu ---
(In reply to Jakub Jelinek from comment #2)
> As
> typedef unsigned char V __attribute__((vector_size (32)));
>
> V
> foo (V x)
> {
> return __builtin_shufflevector (x, x, 0, 1, 2, 0, 5, 1, 0, 1, 3, 2, 3, 0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101579
--- Comment #3 from Hongtao.liu ---
Codegen could be improved by -mavx512bw, but still not good as clang12
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101579
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101579
Richard Biener changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|