This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/33699] [5/6/7 regression] missing optimization on const addr area store
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 13 Jan 2017 17:40:19 +0000
- Subject: [Bug middle-end/33699] [5/6/7 regression] missing optimization on const addr area store
- Auto-submitted: auto-generated
- References: <bug-33699-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33699
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |msebor at gcc dot gnu.org
Known to fail| |6.3.0, 7.0
--- Comment #23 from Martin Sebor <msebor at gcc dot gnu.org> ---
No progress in GCC 7.0 which emits the following code for powerpc64le at -O2
(-Os is slightly different but the same size):
0000000000000000 <f>:
0: 00 00 20 39 li r9,0
4: 00 00 c0 38 li r6,0
8: 00 00 e0 38 li r7,0
c: 00 00 00 39 li r8,0
10: 00 00 40 39 li r10,0
14: ad de 29 61 ori r9,r9,57005
18: d0 fe c6 60 ori r6,r6,65232
1c: d8 fe e7 60 ori r7,r7,65240
20: e0 fe 08 61 ori r8,r8,65248
24: e8 fe 4a 61 ori r10,r10,65256
28: 00 00 26 91 stw r9,0(r6)
2c: 00 00 27 91 stw r9,0(r7)
30: 00 00 28 91 stw r9,0(r8)
34: 00 00 2a 91 stw r9,0(r10)
38: 20 00 80 4e blr
Clang in contrast emits the following more compact code:
0000000000000000 <f>:
0: 00 00 60 3c lis r3,0
4: 00 00 80 38 li r4,0
8: 01 00 a0 3c lis r5,1
c: ad de 63 60 ori r3,r3,57005
10: d0 fe 84 60 ori r4,r4,65232
14: d0 fe 65 90 stw r3,-304(r5)
18: 08 00 64 90 stw r3,8(r4)
1c: 10 00 64 90 stw r3,16(r4)
20: 18 00 64 90 stw r3,24(r4)
24: 20 00 80 4e blr