https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78821
--- Comment #9 from rguenther at suse dot de <rguenther at suse dot de> --- On Thu, 9 Nov 2017, ubizjak at gmail dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78821 > > --- Comment #8 from Uroš Bizjak <ubizjak at gmail dot com> --- > (In reply to rguent...@suse.de from comment #6) > > > > In addition to a merge opportunity, there is a redundant move [*], that > > > results > > > in redundant operation [**]. The whole function could be just: > > > > > > movw %dx, -4(%rdi,%rsi) > > > notl %edx > > > movw %dx, -2(%rdi,%rsi) > > > > or > > > > xorl $0xffff0000, %edx > > movl %edx, -4(%rdi,%rsi) > > > > ? > > Yes, even this. It looks that store merging opens many optimization > opportunities. I believe we should aggressively merge stores as this helps STLF (as opposed to merging loads which can introduce STLF issues)