Message ID | CAFULd4ZGrVhUyb3tAJTznRS+6whuPnHxNdB-KoAe3A5YJrLOXg@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Thu, Mar 12, 2015 at 9:11 AM, Tom de Vries <Tom_deVries@mentor.com> wrote: >> Attached patch adds nonpic target requirement for some (obvious) >> cases, where data access or PIC register setup confuses scan-asms. >> >> 2015-01-30 Uros Bizjak <ubizjak@gmail.com> >> >> * gcc.target/i386/fuse-caller-save-rec.c: Require nonpic target. >> * gcc.target/i386/fuse-caller-save-xmm.c: Ditto. >> * gcc.target/i386/fuse-caller-save.c: Ditto. > > > Hi, > > I've reverted this part of the patch. The scans were failing because the > -fipa-ra optimization was broken for -m32 -fpic (PR64895). Not really. Allocator is free to allocate %ebx (or other call-saved register) as PIC register. In this case, unwanted push/pop sequence will be emitted. Uros.
On 12-03-15 10:57, Uros Bizjak wrote: > On Thu, Mar 12, 2015 at 9:11 AM, Tom de Vries <Tom_deVries@mentor.com> wrote: > >>> Attached patch adds nonpic target requirement for some (obvious) >>> cases, where data access or PIC register setup confuses scan-asms. >>> >>> 2015-01-30 Uros Bizjak <ubizjak@gmail.com> >>> >>> * gcc.target/i386/fuse-caller-save-rec.c: Require nonpic target. >>> * gcc.target/i386/fuse-caller-save-xmm.c: Ditto. >>> * gcc.target/i386/fuse-caller-save.c: Ditto. >> >> >> Hi, >> >> I've reverted this part of the patch. The scans were failing because the >> -fipa-ra optimization was broken for -m32 -fpic (PR64895). > > Not really. > > Allocator is free to allocate %ebx (or other call-saved > register) as PIC register. > > In this case, unwanted push/pop sequence > will be emitted. > Sure, but I don't see what that has to do with the test-cases. I don't see a pic register used in fuse-caller-save.c and fuse-caller-save-rec.c. I do see a pic register used in gcc.target/i386/fuse-caller-save-xmm.c, but there's no scan for push/pop sequence in there. Thanks, - Tom
On Thu, Mar 12, 2015 at 11:41 AM, Tom de Vries <Tom_deVries@mentor.com> wrote: >>>> Attached patch adds nonpic target requirement for some (obvious) >>>> cases, where data access or PIC register setup confuses scan-asms. >>>> >>>> 2015-01-30 Uros Bizjak <ubizjak@gmail.com> >>>> >>>> * gcc.target/i386/fuse-caller-save-rec.c: Require nonpic target. >>>> * gcc.target/i386/fuse-caller-save-xmm.c: Ditto. >>>> * gcc.target/i386/fuse-caller-save.c: Ditto. >>> >>> >>> >>> Hi, >>> >>> I've reverted this part of the patch. The scans were failing because the >>> -fipa-ra optimization was broken for -m32 -fpic (PR64895). >> >> >> Not really. >> >> Allocator is free to allocate %ebx (or other call-saved >> register) as PIC register. >> >> In this case, unwanted push/pop sequence >> will be emitted. >> > > Sure, but I don't see what that has to do with the test-cases. I don't see a > pic register used in fuse-caller-save.c and fuse-caller-save-rec.c. I do see > a pic register used in gcc.target/i386/fuse-caller-save-xmm.c, but there's > no scan for push/pop sequence in there. You are right, the call is (obviously) to a local function. There is no need for PIC reg, so this clears my concerns. Thanks, Uros.
Index: gcc.target/i386/fuse-caller-save-rec.c =================================================================== --- gcc.target/i386/fuse-caller-save-rec.c (revision 220294) +++ gcc.target/i386/fuse-caller-save-rec.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target nonpic } */ /* { dg-options "-O2 -fipa-ra -fomit-frame-pointer -fno-optimize-sibling-calls" } */ /* { dg-additional-options "-mregparm=1" { target ia32 } } */ Index: gcc.target/i386/fuse-caller-save-xmm.c =================================================================== --- gcc.target/i386/fuse-caller-save-xmm.c (revision 220294) +++ gcc.target/i386/fuse-caller-save-xmm.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target nonpic } */ /* { dg-options "-O2 -msse2 -mno-avx -fipa-ra -fomit-frame-pointer" } */ typedef double v2df __attribute__((vector_size (16))); Index: gcc.target/i386/fuse-caller-save.c =================================================================== --- gcc.target/i386/fuse-caller-save.c (revision 220294) +++ gcc.target/i386/fuse-caller-save.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target nonpic } */ /* { dg-options "-O2 -fipa-ra -fomit-frame-pointer" } */ /* { dg-additional-options "-mregparm=1" { target ia32 } } */ Index: gcc.target/i386/headmerge-1.c =================================================================== --- gcc.target/i386/headmerge-1.c (revision 220294) +++ gcc.target/i386/headmerge-1.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target nonpic } */ /* { dg-options "-O2" } */ /* { dg-final { scan-assembler-times "\\\$120|, 120" 1 } } */ Index: gcc.target/i386/headmerge-2.c =================================================================== --- gcc.target/i386/headmerge-2.c (revision 220294) +++ gcc.target/i386/headmerge-2.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target nonpic } */ /* { dg-options "-O2" } */ /* { dg-final { scan-assembler-times "\\\$120|, 120" 1 } } */ Index: gcc.target/i386/sibcall-6.c =================================================================== --- gcc.target/i386/sibcall-6.c (revision 220294) +++ gcc.target/i386/sibcall-6.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile { target ia32 } } */ +/* { dg-require-effective-target nonpic } */ /* { dg-options "-O2" } */ typedef void *ira_loop_tree_node_t;