This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/53417] optimize multiple movb into a single movl
- From: "daniel.marjamaki at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 19 May 2012 19:44:13 +0000
- Subject: [Bug rtl-optimization/53417] optimize multiple movb into a single movl
- Auto-submitted: auto-generated
- References: <bug-53417-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53417
--- Comment #2 from Daniel MarjamÃki <daniel.marjamaki at gmail dot com> 2012-05-19 19:44:13 UTC ---
To clarify a little. The objdump output from my code example is:
0000000000000000 <f>:
0: 48 83 ec 18 sub $0x18,%rsp
4: 48 89 e7 mov %rsp,%rdi
7: c6 04 24 00 movb $0x0,(%rsp)
b: c6 44 24 01 00 movb $0x0,0x1(%rsp)
10: c6 44 24 02 00 movb $0x0,0x2(%rsp)
15: c6 44 24 03 00 movb $0x0,0x3(%rsp)
1a: e8 00 00 00 00 callq 1f <f+0x1f>
1f: 48 83 c4 18 add $0x18,%rsp
23: c3 retq
I guess it would be better ifthose movb was replaced with a movl.