https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78821
--- Comment #13 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Uroš Bizjak from comment #12) > --cut here-- > struct s { char a; char b; char c; char d; }; > > void foo (struct s *__restrict a, struct s *__restrict b) > { > a->a = b->a; > a->b = b->b; > a->c = ~b->c; > a->d = b->d; > } > --cut here-- > > This testcase can be optimized by inserting xorl mask between load and > store, as suggested above. Also, a->a = 0; a->b = 0; a->c = b->c; a->d = 0; could use andl mask, and similar a->a = 0xff; a->b = 0xff; a->c = b->c; a->d = 0xff; could use orl mask.