This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/78821] GCC7: Copying whole 32 bits structure field by field not optimised into copying whole 32 bits at once
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 20 Nov 2017 13:17:10 +0000
- Subject: [Bug tree-optimization/78821] GCC7: Copying whole 32 bits structure field by field not optimised into copying whole 32 bits at once
- Auto-submitted: auto-generated
- References: <bug-78821-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78821
--- Comment #22 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Jakub Jelinek from comment #21)
> Created attachment 42660 [details]
> gcc8-pr78821-i386.patch
>
> Untested patch for the -mmovbe movbew loads/stores. Note, is there any
> particular reason why we don't use for AT&T syntax w/l/q suffixes for movbe?
> At least looking at binutils testsuite, it covers both movbe without suffix
> and movbe[wlq]. On the other side, for bswap insn there are no suffixes.
No particular reason - we should add suffixes.
OTOH, proposed patch should use enabled attribute to enable xchg, and split the
pattern after reload to lose FLAGS_REG clobber for xchg and movbe
aliternatives.