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
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
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.
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
https://sourceware.org/bugzilla/show_bug.cgi?id=18414
Hal Finkel changed:
What|Removed |Added
CC||amodra at gmail dot com,
: 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