diff mbox

Fix profile updating in ifcombine

Message ID CAKdteOYR97k33NFhbysKzZFTMD4vvogd34-7xhxv4OqH-qxpvw@mail.gmail.com
State New
Headers show

Commit Message

Christophe Lyon Feb. 7, 2017, 8:37 a.m. UTC
Hi,


On 6 February 2017 at 17:56, Richard Earnshaw (lists)
<Richard.Earnshaw@arm.com> wrote:
> On 06/02/17 15:54, Jiong Wang wrote:
>> On 06/02/17 15:26, Jan Hubicka wrote:
>>> I think it is not a regression, just the testcase if fragile and
>>> depends on outcome
>>> of ifcombine.  It seems it was updated several time in the past. I am
>>> not quite
>>> sure what the test is testing.
>>
>> They are tring to make sure optimal stack adjustment decisions are made.
>>
>> Fix the testcases by disabling relevant transformation passes looks one
>> way to
>> me.  The other way, might be more reliable, is we dump the decisions
>> made during
>> aarch64 frame layout if dump_file be true, and prefix the dump entry by
>> function
>> name to make it easier caught by dejagnu.  We then scan rtl dump instead of
>> instructions.
>>
>>
>
> We only care that the epilogue instructions appear at least once.  So
> for the epilogue we should probably just adjust the tests to use
> scan-assembler, rather than scan-assembler-times.
>

Here is a patch do to that, it also updates tests 8, 10 and 12 which
have similar
matching patterns.

OK?

> R.
gcc/testsuite/ChangeLog:

2017-02-07  Christophe Lyon  <christophe.lyon@linaro.org>

	* gcc.target/aarch64/test_frame_1.c: Scan epilogue with
	scan-assembler instead of scan-assembler-times.
	* gcc.target/aarch64/test_frame_10.c: Likewise.
	* gcc.target/aarch64/test_frame_12.c: Likewise.
	* gcc.target/aarch64/test_frame_2.c: Likewise.
	* gcc.target/aarch64/test_frame_4.c: Likewise.
	* gcc.target/aarch64/test_frame_6.c: Likewise.
	* gcc.target/aarch64/test_frame_7.c: Likewise.
	* gcc.target/aarch64/test_frame_8.c: Likewise.

Comments

Richard Earnshaw (lists) Feb. 7, 2017, 9:07 a.m. UTC | #1
On 07/02/17 08:37, Christophe Lyon wrote:
> Hi,
> 
> 
> On 6 February 2017 at 17:56, Richard Earnshaw (lists)
> <Richard.Earnshaw@arm.com> wrote:
>> On 06/02/17 15:54, Jiong Wang wrote:
>>> On 06/02/17 15:26, Jan Hubicka wrote:
>>>> I think it is not a regression, just the testcase if fragile and
>>>> depends on outcome
>>>> of ifcombine.  It seems it was updated several time in the past. I am
>>>> not quite
>>>> sure what the test is testing.
>>>
>>> They are tring to make sure optimal stack adjustment decisions are made.
>>>
>>> Fix the testcases by disabling relevant transformation passes looks one
>>> way to
>>> me.  The other way, might be more reliable, is we dump the decisions
>>> made during
>>> aarch64 frame layout if dump_file be true, and prefix the dump entry by
>>> function
>>> name to make it easier caught by dejagnu.  We then scan rtl dump instead of
>>> instructions.
>>>
>>>
>>
>> We only care that the epilogue instructions appear at least once.  So
>> for the epilogue we should probably just adjust the tests to use
>> scan-assembler, rather than scan-assembler-times.
>>
> 
> Here is a patch do to that, it also updates tests 8, 10 and 12 which
> have similar
> matching patterns.
> 
> OK?
> 
>> R.

OK.

R.
diff mbox

Patch

diff --git a/gcc/testsuite/gcc.target/aarch64/test_frame_1.c b/gcc/testsuite/gcc.target/aarch64/test_frame_1.c
index e7c7255..f906b07 100644
--- a/gcc/testsuite/gcc.target/aarch64/test_frame_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/test_frame_1.c
@@ -14,5 +14,5 @@  t_frame_pattern (test1, 200, )
 t_frame_run (test1)
 
 /* { dg-final { scan-assembler-times "str\tx30, \\\[sp, -\[0-9\]+\\\]!" 2 } } */
-/* { dg-final { scan-assembler-times "ldr\tx30, \\\[sp\\\], \[0-9\]+" 2 } } */
+/* { dg-final { scan-assembler "ldr\tx30, \\\[sp\\\], \[0-9\]+" } } */
 
diff --git a/gcc/testsuite/gcc.target/aarch64/test_frame_10.c b/gcc/testsuite/gcc.target/aarch64/test_frame_10.c
index e23a4a8..c195050 100644
--- a/gcc/testsuite/gcc.target/aarch64/test_frame_10.c
+++ b/gcc/testsuite/gcc.target/aarch64/test_frame_10.c
@@ -15,5 +15,5 @@  t_frame_pattern_outgoing (test10, 480, "x19", 24, a[8], a[9], a[10])
 t_frame_run (test10)
 
 /* { dg-final { scan-assembler-times "stp\tx19, x30, \\\[sp, \[0-9\]+\\\]" 1 } } */
-/* { dg-final { scan-assembler-times "ldp\tx19, x30, \\\[sp, \[0-9\]+\\\]" 1 } } */
+/* { dg-final { scan-assembler "ldp\tx19, x30, \\\[sp, \[0-9\]+\\\]" } } */
 
diff --git a/gcc/testsuite/gcc.target/aarch64/test_frame_12.c b/gcc/testsuite/gcc.target/aarch64/test_frame_12.c
index 3d7d359..62761e7 100644
--- a/gcc/testsuite/gcc.target/aarch64/test_frame_12.c
+++ b/gcc/testsuite/gcc.target/aarch64/test_frame_12.c
@@ -14,5 +14,5 @@  t_frame_run (test12)
 /* { dg-final { scan-assembler-times "sub\tsp, sp, #\[0-9\]+" 1 } } */
 
 /* Check epilogue using no write-back.  */
-/* { dg-final { scan-assembler-times "ldp\tx29, x30, \\\[sp, \[0-9\]+\\\]" 1 } } */
+/* { dg-final { scan-assembler "ldp\tx29, x30, \\\[sp, \[0-9\]+\\\]" } } */
 
diff --git a/gcc/testsuite/gcc.target/aarch64/test_frame_2.c b/gcc/testsuite/gcc.target/aarch64/test_frame_2.c
index bbe201d..7e5df84 100644
--- a/gcc/testsuite/gcc.target/aarch64/test_frame_2.c
+++ b/gcc/testsuite/gcc.target/aarch64/test_frame_2.c
@@ -15,5 +15,5 @@  t_frame_run (test2)
 
 
 /* { dg-final { scan-assembler-times "stp\tx19, x30, \\\[sp, -\[0-9\]+\\\]!" 1 } } */
-/* { dg-final { scan-assembler-times "ldp\tx19, x30, \\\[sp\\\], \[0-9\]+" 1 } } */
+/* { dg-final { scan-assembler "ldp\tx19, x30, \\\[sp\\\], \[0-9\]+" } } */
 
diff --git a/gcc/testsuite/gcc.target/aarch64/test_frame_4.c b/gcc/testsuite/gcc.target/aarch64/test_frame_4.c
index e32049e..ed13487 100644
--- a/gcc/testsuite/gcc.target/aarch64/test_frame_4.c
+++ b/gcc/testsuite/gcc.target/aarch64/test_frame_4.c
@@ -14,5 +14,5 @@  t_frame_pattern (test4, 400, "x19")
 t_frame_run (test4)
 
 /* { dg-final { scan-assembler-times "stp\tx19, x30, \\\[sp, -\[0-9\]+\\\]!" 1 } } */
-/* { dg-final { scan-assembler-times "ldp\tx19, x30, \\\[sp\\\], \[0-9\]+" 1 } } */
+/* { dg-final { scan-assembler "ldp\tx19, x30, \\\[sp\\\], \[0-9\]+" } } */
 
diff --git a/gcc/testsuite/gcc.target/aarch64/test_frame_6.c b/gcc/testsuite/gcc.target/aarch64/test_frame_6.c
index 6a753df..56259c9 100644
--- a/gcc/testsuite/gcc.target/aarch64/test_frame_6.c
+++ b/gcc/testsuite/gcc.target/aarch64/test_frame_6.c
@@ -14,6 +14,6 @@  t_frame_pattern (test6, 700, )
 t_frame_run (test6)
 
 /* { dg-final { scan-assembler-times "str\tx30, \\\[sp\\\]" 1 } } */
-/* { dg-final { scan-assembler-times "ldr\tx30, \\\[sp\\\]" 2 } } */
-/* { dg-final { scan-assembler-times "ldr\tx30, \\\[sp\\\]," 1 } } */
+/* { dg-final { scan-assembler "ldr\tx30, \\\[sp\\\]" } } */
+/* { dg-final { scan-assembler "ldr\tx30, \\\[sp\\\]," } } */
 
diff --git a/gcc/testsuite/gcc.target/aarch64/test_frame_7.c b/gcc/testsuite/gcc.target/aarch64/test_frame_7.c
index f2a8713..9645279 100644
--- a/gcc/testsuite/gcc.target/aarch64/test_frame_7.c
+++ b/gcc/testsuite/gcc.target/aarch64/test_frame_7.c
@@ -14,5 +14,5 @@  t_frame_pattern (test7, 700, "x19")
 t_frame_run (test7)
 
 /* { dg-final { scan-assembler-times "stp\tx19, x30, \\\[sp]" 1 } } */
-/* { dg-final { scan-assembler-times "ldp\tx19, x30, \\\[sp\\\]" 1 } } */
+/* { dg-final { scan-assembler "ldp\tx19, x30, \\\[sp\\\]" } } */
 
diff --git a/gcc/testsuite/gcc.target/aarch64/test_frame_8.c b/gcc/testsuite/gcc.target/aarch64/test_frame_8.c
index 9b6c693..75a68b4 100644
--- a/gcc/testsuite/gcc.target/aarch64/test_frame_8.c
+++ b/gcc/testsuite/gcc.target/aarch64/test_frame_8.c
@@ -13,5 +13,5 @@  t_frame_pattern_outgoing (test8, 700, , 8, a[8])
 t_frame_run (test8)
 
 /* { dg-final { scan-assembler-times "str\tx30, \\\[sp, \[0-9\]+\\\]" 1 } } */
-/* { dg-final { scan-assembler-times "ldr\tx30, \\\[sp, \[0-9\]+\\\]" 1 } } */
+/* { dg-final { scan-assembler "ldr\tx30, \\\[sp, \[0-9\]+\\\]" } } */