public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][ARM] Fix for testcase after r228661
@ 2015-10-20 15:53 Andre Vieira
  2015-10-20 16:26 ` Ramana Radhakrishnan
  0 siblings, 1 reply; 4+ messages in thread
From: Andre Vieira @ 2015-10-20 15:53 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 977 bytes --]

Hi,

This patch addresses PR-67948 by changing the xor-and.c test, initially 
written for a simplify-rtx pattern, to make it pass post r228661 (see 
https://gcc.gnu.org/ml/gcc-patches/2015-10/msg00676.html). This test no 
longer triggered the simplify-rtx pattern it was written for prior to 
r228661, though other optimizations did lead to the same assembly the 
test checked for. The optimization added with r228661 matches the 
pattern used in the test and optimizes it to a better and still valid 
sequence. Being unable to easily change the test to trigger the original 
simplify-rtx pattern, I chose to change it to pass with the new produced 
assembly sequence.

This is correct because the transformation is valid and it yields a more 
efficient pattern. However, as I pointed out before this test doesn't 
test the optimization it originally was intended for.

Tested by running regression tests for armv6.

Is this OK to commit?

Thanks,
Andre

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-for-xor-and.c-test.patch --]
[-- Type: text/x-patch; name=0001-Fix-for-xor-and.c-test.patch, Size: 876 bytes --]

From 89922547118e716b41ddf6edefb274322193f25c Mon Sep 17 00:00:00 2001
From: Andre Simoes Dias Vieira <andsim01@arm.com>
Date: Thu, 15 Oct 2015 12:48:26 +0100
Subject: [PATCH] Fix for xor-and.c test

---
 gcc/testsuite/gcc.target/arm/xor-and.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/arm/xor-and.c b/gcc/testsuite/gcc.target/arm/xor-and.c
index 53dff85f8f780fb99a93bbcc24180a3d0d5d3be9..3715530cd7bf9ad8abb24cb21cd51ae3802079e8 100644
--- a/gcc/testsuite/gcc.target/arm/xor-and.c
+++ b/gcc/testsuite/gcc.target/arm/xor-and.c
@@ -10,6 +10,6 @@ unsigned short foo (unsigned short x)
   return x;
 }
 
-/* { dg-final { scan-assembler "orr" } } */
+/* { dg-final { scan-assembler "eor" } } */
 /* { dg-final { scan-assembler-not "mvn" } } */
 /* { dg-final { scan-assembler-not "uxth" } } */
-- 
1.9.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH][ARM] Fix for testcase after r228661
  2015-10-20 15:53 [PATCH][ARM] Fix for testcase after r228661 Andre Vieira
@ 2015-10-20 16:26 ` Ramana Radhakrishnan
  2015-10-20 16:42   ` Andre Vieira
  0 siblings, 1 reply; 4+ messages in thread
From: Ramana Radhakrishnan @ 2015-10-20 16:26 UTC (permalink / raw)
  To: Andre Vieira; +Cc: GCC Patches

On Tue, Oct 20, 2015 at 4:52 PM, Andre Vieira
<Andre.SimoesDiasVieira@arm.com> wrote:
> Hi,
>
> This patch addresses PR-67948 by changing the xor-and.c test, initially
> written for a simplify-rtx pattern, to make it pass post r228661 (see
> https://gcc.gnu.org/ml/gcc-patches/2015-10/msg00676.html). This test no
> longer triggered the simplify-rtx pattern it was written for prior to
> r228661, though other optimizations did lead to the same assembly the test
> checked for. The optimization added with r228661 matches the pattern used in
> the test and optimizes it to a better and still valid sequence. Being unable
> to easily change the test to trigger the original simplify-rtx pattern, I
> chose to change it to pass with the new produced assembly sequence.
>
> This is correct because the transformation is valid and it yields a more
> efficient pattern. However, as I pointed out before this test doesn't test
> the optimization it originally was intended for.
>
> Tested by running regression tests for armv6.
>
> Is this OK to commit?
>

Missing Changelog - please remember to put the PR number in the
Changelog in the correct format i.e PR testsuite/67948. Ok with that.

I suspect that the simplify-rtx.c is much less likely to trigger given
your match.pd change, but it will be fun proving that.

regards
ramana


> Thanks,
> Andre

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH][ARM] Fix for testcase after r228661
  2015-10-20 16:26 ` Ramana Radhakrishnan
@ 2015-10-20 16:42   ` Andre Vieira
  2015-10-22  7:32     ` Ramana Radhakrishnan
  0 siblings, 1 reply; 4+ messages in thread
From: Andre Vieira @ 2015-10-20 16:42 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 1965 bytes --]



On 20/10/15 17:25, Ramana Radhakrishnan wrote:
> On Tue, Oct 20, 2015 at 4:52 PM, Andre Vieira
> <Andre.SimoesDiasVieira@arm.com> wrote:
>> Hi,
>>
>> This patch addresses PR-67948 by changing the xor-and.c test, initially
>> written for a simplify-rtx pattern, to make it pass post r228661 (see
>> https://gcc.gnu.org/ml/gcc-patches/2015-10/msg00676.html). This test no
>> longer triggered the simplify-rtx pattern it was written for prior to
>> r228661, though other optimizations did lead to the same assembly the test
>> checked for. The optimization added with r228661 matches the pattern used in
>> the test and optimizes it to a better and still valid sequence. Being unable
>> to easily change the test to trigger the original simplify-rtx pattern, I
>> chose to change it to pass with the new produced assembly sequence.
>>
>> This is correct because the transformation is valid and it yields a more
>> efficient pattern. However, as I pointed out before this test doesn't test
>> the optimization it originally was intended for.
>>
>> Tested by running regression tests for armv6.
>>
>> Is this OK to commit?
>>
>
> Missing Changelog - please remember to put the PR number in the
> Changelog in the correct format i.e PR testsuite/67948. Ok with that.
>
> I suspect that the simplify-rtx.c is much less likely to trigger given
> your match.pd change, but it will be fun proving that.
Ideally, I'd like to prove the simplify-rtx.c couldn't be triggered 
anymore. Though I wouldn't know where to begin with that. I did spend a 
tiny effort trying to trigger it with a version before the match.pd 
change, but with no success.
>
> regards
> ramana
>
>
>> Thanks,
>> Andre
>
Here is the ChangeLog (with the PR), sorry for that!

gcc/testsuite/ChangeLog
2015-10-15  Andre Vieira  <andre.simoesdiasvieira@arm.com>

         PR testsuite/67948
         * gcc.target/arm/xor-and.c: check for eor instead of orr.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-for-xor-and.c-test.patch --]
[-- Type: text/x-patch; name=0001-Fix-for-xor-and.c-test.patch, Size: 876 bytes --]

From 89922547118e716b41ddf6edefb274322193f25c Mon Sep 17 00:00:00 2001
From: Andre Simoes Dias Vieira <andsim01@arm.com>
Date: Thu, 15 Oct 2015 12:48:26 +0100
Subject: [PATCH] Fix for xor-and.c test

---
 gcc/testsuite/gcc.target/arm/xor-and.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/arm/xor-and.c b/gcc/testsuite/gcc.target/arm/xor-and.c
index 53dff85f8f780fb99a93bbcc24180a3d0d5d3be9..3715530cd7bf9ad8abb24cb21cd51ae3802079e8 100644
--- a/gcc/testsuite/gcc.target/arm/xor-and.c
+++ b/gcc/testsuite/gcc.target/arm/xor-and.c
@@ -10,6 +10,6 @@ unsigned short foo (unsigned short x)
   return x;
 }
 
-/* { dg-final { scan-assembler "orr" } } */
+/* { dg-final { scan-assembler "eor" } } */
 /* { dg-final { scan-assembler-not "mvn" } } */
 /* { dg-final { scan-assembler-not "uxth" } } */
-- 
1.9.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH][ARM] Fix for testcase after r228661
  2015-10-20 16:42   ` Andre Vieira
@ 2015-10-22  7:32     ` Ramana Radhakrishnan
  0 siblings, 0 replies; 4+ messages in thread
From: Ramana Radhakrishnan @ 2015-10-22  7:32 UTC (permalink / raw)
  To: Andre Vieira; +Cc: GCC Patches

On Tue, Oct 20, 2015 at 5:38 PM, Andre Vieira
<Andre.SimoesDiasVieira@arm.com> wrote:
>
>
> On 20/10/15 17:25, Ramana Radhakrishnan wrote:
>>
>> On Tue, Oct 20, 2015 at 4:52 PM, Andre Vieira
>> <Andre.SimoesDiasVieira@arm.com> wrote:
>>>
>>> Hi,
>>>
>>> This patch addresses PR-67948 by changing the xor-and.c test, initially
>>> written for a simplify-rtx pattern, to make it pass post r228661 (see
>>> https://gcc.gnu.org/ml/gcc-patches/2015-10/msg00676.html). This test no
>>> longer triggered the simplify-rtx pattern it was written for prior to
>>> r228661, though other optimizations did lead to the same assembly the
>>> test
>>> checked for. The optimization added with r228661 matches the pattern used
>>> in
>>> the test and optimizes it to a better and still valid sequence. Being
>>> unable
>>> to easily change the test to trigger the original simplify-rtx pattern, I
>>> chose to change it to pass with the new produced assembly sequence.
>>>
>>> This is correct because the transformation is valid and it yields a more
>>> efficient pattern. However, as I pointed out before this test doesn't
>>> test
>>> the optimization it originally was intended for.
>>>
>>> Tested by running regression tests for armv6.
>>>
>>> Is this OK to commit?
>>>
>>
>> Missing Changelog - please remember to put the PR number in the
>> Changelog in the correct format i.e PR testsuite/67948. Ok with that.
>>
>> I suspect that the simplify-rtx.c is much less likely to trigger given
>> your match.pd change, but it will be fun proving that.
>
> Ideally, I'd like to prove the simplify-rtx.c couldn't be triggered anymore.
> Though I wouldn't know where to begin with that. I did spend a tiny effort
> trying to trigger it with a version before the match.pd change, but with no
> success.

>>
>>
>> regards
>> ramana
>>
>>
>>> Thanks,
>>> Andre
>>
>>
> Here is the ChangeLog (with the PR), sorry for that!
>
> gcc/testsuite/ChangeLog
> 2015-10-15  Andre Vieira  <andre.simoesdiasvieira@arm.com>
>
>         PR testsuite/67948
>         * gcc.target/arm/xor-and.c: check for eor instead of orr.

Applied with a minor tweak to the changelog message.

regards
Ramana

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-10-22  5:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-20 15:53 [PATCH][ARM] Fix for testcase after r228661 Andre Vieira
2015-10-20 16:26 ` Ramana Radhakrishnan
2015-10-20 16:42   ` Andre Vieira
2015-10-22  7:32     ` Ramana Radhakrishnan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).