[Bug ld/18414] TOC optimization bug (ignoring data deps on addis/ld -> nop/ld opt)

2015-05-18 Thread hfinkel at anl dot gov
https://sourceware.org/bugzilla/show_bug.cgi?id=18414 --- Comment #6 from Hal Finkel --- (In reply to Alan Modra from comment #1) > True, ld will do this. However, the optimization is relying on gcc to > generate code that can be optimized this way.. So I'm assuming the example > code was from

[Bug ld/18414] TOC optimization bug (ignoring data deps on addis/ld -> nop/ld opt)

2015-05-14 Thread hfinkel at anl dot gov
https://sourceware.org/bugzilla/show_bug.cgi?id=18414 --- Comment #5 from Hal Finkel --- (In reply to Alan Modra from comment #4) > Hmm, the dependency on r2 was added to gcc 2012-05-21. Which means that > people using an older gcc with a newer ld are in trouble. There needs to be > some way fo

[Bug ld/18414] TOC optimization bug (ignoring data deps on addis/ld -> nop/ld opt)

2015-05-13 Thread hfinkel at anl dot gov
https://sourceware.org/bugzilla/show_bug.cgi?id=18414 --- Comment #3 from Hal Finkel --- (In reply to Hal Finkel from comment #2) > (In reply to Alan Modra from comment #1) > > True, ld will do this. However, the optimization is relying on gcc to > > generate code that can be optimized this way.

[Bug ld/18414] TOC optimization bug (ignoring data deps on addis/ld -> nop/ld opt)

2015-05-13 Thread hfinkel at anl dot gov
https://sourceware.org/bugzilla/show_bug.cgi?id=18414 --- Comment #2 from Hal Finkel --- (In reply to Alan Modra from comment #1) > True, ld will do this. However, the optimization is relying on gcc to > generate code that can be optimized this way.. So I'm assuming the example > code was from

[Bug ld/18414] TOC optimization bug (ignoring data deps on addis/ld -> nop/ld opt)

2015-05-13 Thread hfinkel at anl dot gov
https://sourceware.org/bugzilla/show_bug.cgi?id=18414 Hal Finkel changed: What|Removed |Added CC||amodra at gmail dot com,

[Bug ld/18414] New: TOC optimization

2015-05-13 Thread hfinkel at anl dot gov
: unassigned at sourceware dot org Reporter: hfinkel at anl dot gov Target Milestone: --- When TOC optimization is enabled, on a (big-endian) POWER7 system, ld will happily optimize this: .Ltmp526: addis 3, 2, .LC12@toc@ha .Ltmp1628: std 2, 40(1) ld 5, 0(27) ld 2