diff mbox series

[committed,ARM] Fix minor testsuite fallout on ARM due to recent IRA changes

Message ID 7311f48e60ede3f01bd7bad27dc6738117cad36f.camel@redhat.com
State New
Headers show
Series [committed,ARM] Fix minor testsuite fallout on ARM due to recent IRA changes | expand

Commit Message

Jeff Law March 2, 2020, 3:46 p.m. UTC
More minor fallout from Vlad's IRA changes.

Previously this test used r3 to hold a value across a call (it's an ipa-ra
test).  After Vlad's changes we're using r1 instead.

This patch makes the obvious change to pattern we can for which should bring
the test back to a passing status.

There's a note about r3 being special on thumb1 and the pattern check is
skipped for thumb1.  That special casing my not be necessary anymore -- I leave
that to the ARM maintainers to resolve one way or the other.

Committing on the trunk momentarily.

jeff
commit 0ce38183001095c804b45bab0370ff50b34f886f
Author: Jeff Law <law@redhat.com>
Date:   Mon Mar 2 08:44:28 2020 -0700

    Fix testsuite regression due to recent IRA changes.
    
            * gcc.target/arm/fuse-caller-save.c: Update expected output.

Comments

Richard Earnshaw (lists) March 2, 2020, 4:40 p.m. UTC | #1
On 02/03/2020 15:46, Jeff Law wrote:
> 
> More minor fallout from Vlad's IRA changes.
> 
> Previously this test used r3 to hold a value across a call (it's an ipa-ra
> test).  After Vlad's changes we're using r1 instead.
> 
> This patch makes the obvious change to pattern we can for which should bring
> the test back to a passing status.
> 
> There's a note about r3 being special on thumb1 and the pattern check is
> skipped for thumb1.  That special casing my not be necessary anymore -- I leave
> that to the ARM maintainers to resolve one way or the other.
> 
> Committing on the trunk momentarily.
> 
> jeff
> 

Any of r1, r2, r3 could be chosen for the 'save' register, so why not 
put that in the regexp?

Something like:

+/* { dg-final { scan-assembler-times "mov\tr[123], r0" 1 { target { ! 
arm_thumb1 } } } } */

And then we are future-proof.

R.
Jeff Law March 2, 2020, 4:44 p.m. UTC | #2
On Mon, 2020-03-02 at 16:40 +0000, Richard Earnshaw (lists) wrote:
> On 02/03/2020 15:46, Jeff Law wrote:
> > More minor fallout from Vlad's IRA changes.
> > 
> > Previously this test used r3 to hold a value across a call (it's an ipa-ra
> > test).  After Vlad's changes we're using r1 instead.
> > 
> > This patch makes the obvious change to pattern we can for which should
> > bring
> > the test back to a passing status.
> > 
> > There's a note about r3 being special on thumb1 and the pattern check is
> > skipped for thumb1.  That special casing my not be necessary anymore -- I
> > leave
> > that to the ARM maintainers to resolve one way or the other.
> > 
> > Committing on the trunk momentarily.
> > 
> > jeff
> > 
> 
> Any of r1, r2, r3 could be chosen for the 'save' register, so why not 
> put that in the regexp?
> 
> Something like:
> 
> +/* { dg-final { scan-assembler-times "mov\tr[123], r0" 1 { target { ! 
> arm_thumb1 } } } } */
> 
> And then we are future-proof.
Seems reasonable.  I'll do that later today once the tester is finished with
its current run of arm-linux-gnueabi.

Any thoughts on the thumb1 issue?  I guess leaving it as-is just means slightly
less coverage for thumb1...

jeff
Richard Earnshaw (lists) March 3, 2020, 3:18 p.m. UTC | #3
On 02/03/2020 16:44, Jeff Law wrote:
> On Mon, 2020-03-02 at 16:40 +0000, Richard Earnshaw (lists) wrote:
>> On 02/03/2020 15:46, Jeff Law wrote:
>>> More minor fallout from Vlad's IRA changes.
>>>
>>> Previously this test used r3 to hold a value across a call (it's an ipa-ra
>>> test).  After Vlad's changes we're using r1 instead.
>>>
>>> This patch makes the obvious change to pattern we can for which should
>>> bring
>>> the test back to a passing status.
>>>
>>> There's a note about r3 being special on thumb1 and the pattern check is
>>> skipped for thumb1.  That special casing my not be necessary anymore -- I
>>> leave
>>> that to the ARM maintainers to resolve one way or the other.
>>>
>>> Committing on the trunk momentarily.
>>>
>>> jeff
>>>
>>
>> Any of r1, r2, r3 could be chosen for the 'save' register, so why not
>> put that in the regexp?
>>
>> Something like:
>>
>> +/* { dg-final { scan-assembler-times "mov\tr[123], r0" 1 { target { !
>> arm_thumb1 } } } } */
>>
>> And then we are future-proof.
> Seems reasonable.  I'll do that later today once the tester is finished with
> its current run of arm-linux-gnueabi.
> 
> Any thoughts on the thumb1 issue?  I guess leaving it as-is just means slightly
> less coverage for thumb1...
> 
> jeff
> 

My reading of the comment (I haven't looked at the test output) is that 
this is something that the thumb1 backed doesn't support, probably 
because the regs are all in CLASS_LIKELY_SPILLED.  I'm not sure if 
that's a hang-over from the old reload days, or if it's still relevant 
even today.

R.
Jeff Law March 5, 2020, 3:48 p.m. UTC | #4
On Mon, 2020-03-02 at 16:40 +0000, Richard Earnshaw (lists) wrote:
> On 02/03/2020 15:46, Jeff Law wrote:
> > More minor fallout from Vlad's IRA changes.
> > 
> > Previously this test used r3 to hold a value across a call (it's an ipa-ra
> > test).  After Vlad's changes we're using r1 instead.
> > 
> > This patch makes the obvious change to pattern we can for which should bring
> > the test back to a passing status.
> > 
> > There's a note about r3 being special on thumb1 and the pattern check is
> > skipped for thumb1.  That special casing my not be necessary anymore -- I
> > leave
> > that to the ARM maintainers to resolve one way or the other.
> > 
> > Committing on the trunk momentarily.
> > 
> > jeff
> > 
> 
> Any of r1, r2, r3 could be chosen for the 'save' register, so why not 
> put that in the regexp?
> 
> Something like:
> 
> +/* { dg-final { scan-assembler-times "mov\tr[123], r0" 1 { target { ! 
> arm_thumb1 } } } } */
> 
> And then we are future-proof.
Pushed to the trunk.  Thanks for the suggestion.

jeff
Christophe Lyon March 9, 2020, 1:20 p.m. UTC | #5
On Thu, 5 Mar 2020 at 16:49, Jeff Law <law@redhat.com> wrote:
>
> On Mon, 2020-03-02 at 16:40 +0000, Richard Earnshaw (lists) wrote:
> > On 02/03/2020 15:46, Jeff Law wrote:
> > > More minor fallout from Vlad's IRA changes.
> > >
> > > Previously this test used r3 to hold a value across a call (it's an ipa-ra
> > > test).  After Vlad's changes we're using r1 instead.
> > >
> > > This patch makes the obvious change to pattern we can for which should bring
> > > the test back to a passing status.
> > >
> > > There's a note about r3 being special on thumb1 and the pattern check is
> > > skipped for thumb1.  That special casing my not be necessary anymore -- I
> > > leave
> > > that to the ARM maintainers to resolve one way or the other.
> > >
> > > Committing on the trunk momentarily.
> > >
> > > jeff
> > >
> >
> > Any of r1, r2, r3 could be chosen for the 'save' register, so why not
> > put that in the regexp?
> >
> > Something like:
> >
> > +/* { dg-final { scan-assembler-times "mov\tr[123], r0" 1 { target { !
> > arm_thumb1 } } } } */
> >
> > And then we are future-proof.
> Pushed to the trunk.  Thanks for the suggestion.
>

Hi,

I've just pushed a fix for the obvious typo: [] need to be escaped:
-/* { dg-final { scan-assembler-times "mov\tr[123], r0" 1 { target { !
arm_thumb1 } } } } */
+/* { dg-final { scan-assembler-times "mov\tr\[123\], r0" 1 { target {
! arm_thumb1 } } } } */


Christophe

> jeff
>
diff mbox series

Patch

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 988d49af3b8..3f2c2851799 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@ 
+2020-03-02  Jeff Law  <law@redhat.com>
+
+	* gcc.target/arm/fuse-caller-save.c: Update expected output.
+
 2020-03-02  Martin Liska  <mliska@suse.cz>
 
 	* gcc.dg/vect/bb-slp-19.c: The comment
diff --git a/gcc/testsuite/gcc.target/arm/fuse-caller-save.c b/gcc/testsuite/gcc.target/arm/fuse-caller-save.c
index ef9256dced9..20837125c0a 100644
--- a/gcc/testsuite/gcc.target/arm/fuse-caller-save.c
+++ b/gcc/testsuite/gcc.target/arm/fuse-caller-save.c
@@ -22,4 +22,4 @@  main (void)
 
 /* For thumb1, r3 is considered likely spilled, and treated differently in
    ira_build_conflicts, which inhibits the fipa-ra optimization.  */
-/* { dg-final { scan-assembler-times "mov\tr3, r0" 1 { target { ! arm_thumb1 } } } } */
+/* { dg-final { scan-assembler-times "mov\tr1, r0" 1 { target { ! arm_thumb1 } } } } */