From: ramana Date: Thu, 22 Oct 2015 05:12:32 +0000 (+0000) Subject: [PATCH][ARM] Fix for testcase after r228661 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b56a60c7c6bf79f0bd0fad93ace8866d9554b4e6;p=thirdparty%2Fgcc.git [PATCH][ARM] Fix for testcase after r228661 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 2015-10-22 Andre Vieira PR testsuite/67948 * gcc.target/arm/xor-and.c: Adjust test to check for eor instead of orr. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229161 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b952ac76bcda..3bcbe96c5f1d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2015-10-22 Andre Vieira + + PR testsuite/67948 + * gcc.target/arm/xor-and.c: Adjust test to check for eor + instead of orr. + 2015-10-22 Jiong Wang Ramana Radhakrishnan diff --git a/gcc/testsuite/gcc.target/arm/xor-and.c b/gcc/testsuite/gcc.target/arm/xor-and.c index 53dff85f8f78..3715530cd7bf 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" } } */