public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [COMMITTED] Turn of ipa-ra in builtins test (PR91059)
@ 2019-07-08 17:20 Wilco Dijkstra
  2019-07-08 18:36 ` Alexander Monakov
  2019-07-12 18:06 ` Wilco Dijkstra
  0 siblings, 2 replies; 4+ messages in thread
From: Wilco Dijkstra @ 2019-07-08 17:20 UTC (permalink / raw)
  To: GCC Patches; +Cc: nd

The gcc.c-torture/execute/builtins/lib directory contains a reimplementation
of many C library string functions, which causes non-trivial register allocation
bugs with LTO and static linked libraries.  To fix this long-standing test issue,
turn off ipa-ra which avoids the register corruption across calls.  All builtin
torture tests now pass on aarch64-none-elf.  Committed as obvious.

ChangeLog:
2019-07-08  Wilco Dijkstra  <wdijkstr@arm.com>

testsuite/
	PR testsuite/91059
	PR testsuite/78529
	* gcc.c-torture/execute/builtins/builtins.exp: Add -fno-ipa-ra.
--

diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
index fb9d3ece181fee3489e1ddd2f72f40dbbf807bb6..d62f78c7a6c52c3adea5e4c216f12765acadf60e 100644
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
@@ -37,7 +37,7 @@ load_lib c-torture.exp
 torture-init
 set-torture-options $C_TORTURE_OPTIONS {{}} $LTO_TORTURE_OPTIONS
 
-set additional_flags "-fno-tree-dse -fno-tree-loop-distribute-patterns -fno-tracer"
+set additional_flags "-fno-tree-dse -fno-tree-loop-distribute-patterns -fno-tracer -fno-ipa-ra"
 if [istarget "powerpc-*-darwin*"] {
    lappend additional_flags "-Wl,-multiply_defined,suppress"
 }

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

* Re: [COMMITTED] Turn of ipa-ra in builtins test (PR91059)
  2019-07-08 17:20 [COMMITTED] Turn of ipa-ra in builtins test (PR91059) Wilco Dijkstra
@ 2019-07-08 18:36 ` Alexander Monakov
  2019-07-08 19:04   ` Wilco Dijkstra
  2019-07-12 18:06 ` Wilco Dijkstra
  1 sibling, 1 reply; 4+ messages in thread
From: Alexander Monakov @ 2019-07-08 18:36 UTC (permalink / raw)
  To: Wilco Dijkstra; +Cc: GCC Patches, nd

On Mon, 8 Jul 2019, Wilco Dijkstra wrote:

> The gcc.c-torture/execute/builtins/lib directory contains a reimplementation
> of many C library string functions, which causes non-trivial register allocation
> bugs with LTO and static linked libraries.  To fix this long-standing test issue,
> turn off ipa-ra which avoids the register corruption across calls.  All builtin
> torture tests now pass on aarch64-none-elf.  Committed as obvious.

Would have been nice if the above text also mentioned that PR 78527 has some
background info for the "obvious".  The paragraph went into commit text, but on
its own it doesn't explain what's "obvious" here at all :(

(went looking for the explanation after collecting jaw from the floor; I don't
agree with triage shown there, but what does it matter...)

> ChangeLog:
> 2019-07-08  Wilco Dijkstra  <wdijkstr@arm.com>
> 
> testsuite/
> 	PR testsuite/91059
> 	PR testsuite/78529
> 	* gcc.c-torture/execute/builtins/builtins.exp: Add -fno-ipa-ra.

Alexander

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

* Re: [COMMITTED] Turn of ipa-ra in builtins test (PR91059)
  2019-07-08 18:36 ` Alexander Monakov
@ 2019-07-08 19:04   ` Wilco Dijkstra
  0 siblings, 0 replies; 4+ messages in thread
From: Wilco Dijkstra @ 2019-07-08 19:04 UTC (permalink / raw)
  To: Alexander Monakov; +Cc: GCC Patches, nd

Hi Alexander,
 
> Would have been nice if the above text also mentioned that PR 78527 has some
> background info for the "obvious".  The paragraph went into commit text, but on
> its own it doesn't explain what's "obvious" here at all :(
 
The "obvious" refers to the patch itself under the commit rules. The issue itself is 
non-obvious of course.

> (went looking for the explanation after collecting jaw from the floor; I don't
> agree with triage shown there, but what does it matter...)

Yes, it was a huge waste of time before the underlying cause was found (comment #26).
Worse, absolutely nothing happened after all that...

Wilco

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

* Re: [COMMITTED] Turn of ipa-ra in builtins test (PR91059)
  2019-07-08 17:20 [COMMITTED] Turn of ipa-ra in builtins test (PR91059) Wilco Dijkstra
  2019-07-08 18:36 ` Alexander Monakov
@ 2019-07-12 18:06 ` Wilco Dijkstra
  1 sibling, 0 replies; 4+ messages in thread
From: Wilco Dijkstra @ 2019-07-12 18:06 UTC (permalink / raw)
  To: GCC Patches; +Cc: nd

Hi,

I've now backported this to all active branches so the issue can no
longer occur:

Turn off ipa-ra in builtins test (PR91059)

The gcc.c-torture/execute/builtins/lib directory contains a reimplementation
of many C library string functions, which causes non-trivial register allocation
bugs with LTO and static linked libraries.  To fix this long-standing test issue,
turn off ipa-ra which avoids the register corruption across calls.  All builtin
torture tests now pass on aarch64-none-elf.  Committed as obvious.
See PR78529 for more details.

ChangeLog:
2019-07-12  Wilco Dijkstra  <wdijkstr@arm.com>

testsuite/
        PR testsuite/78529
        * gcc.c-torture/execute/builtins/builtins.exp: Add -fno-ipa-ra.
--

diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
index fb9d3ece181fee3489e1ddd2f72f40dbbf807bb6..d62f78c7a6c52c3adea5e4c216f12765acadf60e 100644
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
@@ -37,7 +37,7 @@ load_lib c-torture.exp
 torture-init
 set-torture-options $C_TORTURE_OPTIONS {{}} $LTO_TORTURE_OPTIONS
 
-set additional_flags "-fno-tree-dse -fno-tree-loop-distribute-patterns -fno-tracer"
+set additional_flags "-fno-tree-dse -fno-tree-loop-distribute-patterns -fno-tracer -fno-ipa-ra"
 if [istarget "powerpc-*-darwin*"] {
    lappend additional_flags "-Wl,-multiply_defined,suppress"
 }

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

end of thread, other threads:[~2019-07-12 17:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-08 17:20 [COMMITTED] Turn of ipa-ra in builtins test (PR91059) Wilco Dijkstra
2019-07-08 18:36 ` Alexander Monakov
2019-07-08 19:04   ` Wilco Dijkstra
2019-07-12 18:06 ` Wilco Dijkstra

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).