This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 0/2][IRA,LRA] Fix PR86939, IRA incorrectly creates an interference between a pseudo register and a hard register
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: bergner at linux dot ibm dot com
- Cc: Vladimir Makarov <vmakarov at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Jeffrey Law <law at redhat dot com>
- Date: Mon, 1 Oct 2018 05:44:46 -0700
- Subject: Re: [PATCH 0/2][IRA,LRA] Fix PR86939, IRA incorrectly creates an interference between a pseudo register and a hard register
- References: <db00fba8-f392-510f-7f75-31dd1eed6f87@linux.ibm.com> <616affd5-5140-8e15-9081-1635f7d4e700@redhat.com> <ecabd78d-892c-a82d-7c06-a49e2620ecf7@linux.ibm.com> <CAMe9rOpquvvTAQWYNYHU-aFSK4WpSK8ksBzkHyp82Txgo+9f3A@mail.gmail.com> <6ff45a7e-2415-2d18-1d53-5a50964a2174@linux.ibm.com>
On Sun, Sep 30, 2018 at 6:18 PM Peter Bergner <bergner@linux.ibm.com> wrote:
>
> On 9/30/18 7:57 PM, H.J. Lu wrote:
> > This caused:
> >
> > FAIL: gcc.target/i386/pr63527.c scan-assembler-not movl[ \t]%[^,]+, %ebx
> > FAIL: gcc.target/i386/pr63534.c scan-assembler-not movl[ \t]%[^,]+, %ebx
> > FAIL: gcc.target/i386/pr64317.c scan-assembler addl[
> > \\t]+[$]_GLOBAL_OFFSET_TABLE_, %ebx
> > FAIL: gcc.target/i386/pr64317.c scan-assembler movl[ \\t]+c@GOTOFF[(]%ebx[)]
>
> Can you check whether the new generated code is at least as good
> as the old generated code? I'm assuming the code we generate now isn't
> wrong, just different and maybe we just need to change what we expect
> to see.
I checked gcc.target/i386/pr63527.c and it has a regression.
Before:
00000000 <foo>:
0: 53 push %ebx
1: e8 fc ff ff ff call 2 <foo+0x2>
6: 81 c3 02 00 00 00 add $0x2,%ebx
c: 83 ec 08 sub $0x8,%esp
f: e8 fc ff ff ff call 10 <foo+0x10>
14: e8 fc ff ff ff call 15 <foo+0x15>
19: 83 c4 08 add $0x8,%esp
1c: 5b pop %ebx
1d: c3 ret
Disassembly of section .text.__x86.get_pc_thunk.bx:
00000000 <__x86.get_pc_thunk.bx>:
0: 8b 1c 24 mov (%esp),%ebx
3: c3 ret
After:
00000000 <foo>:
0: 56 push %esi
1: e8 fc ff ff ff call 2 <foo+0x2>
6: 81 c6 02 00 00 00 add $0x2,%esi
c: 53 push %ebx
d: 83 ec 04 sub $0x4,%esp
10: 89 f3 mov %esi,%ebx
12: e8 fc ff ff ff call 13 <foo+0x13>
17: e8 fc ff ff ff call 18 <foo+0x18>
1c: 83 c4 04 add $0x4,%esp
1f: 5b pop %ebx
20: 5e pop %esi
21: c3 ret
Disassembly of section .text.__x86.get_pc_thunk.si:
00000000 <__x86.get_pc_thunk.si>:
0: 8b 34 24 mov (%esp),%esi
3: c3 ret
--
H.J.