[Bug rtl-optimization/71709] powerpc64le: argument to strcpy() optimised out

2016-09-26 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71709

Matthias Klose  changed:

   What|Removed |Added

 CC||doko at gcc dot gnu.org

--- Comment #10 from Matthias Klose  ---
https://bugs.debian.org/838892 reports this for the gcc-6 branch too; could
that be backported?

[Bug rtl-optimization/71709] powerpc64le: argument to strcpy() optimised out

2016-07-01 Thread amodra at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71709

Alan Modra  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #9 from Alan Modra  ---
Fixed.

[Bug rtl-optimization/71709] powerpc64le: argument to strcpy() optimised out

2016-07-01 Thread amodra at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71709

--- Comment #8 from Alan Modra  ---
Author: amodra
Date: Fri Jul  1 11:15:17 2016
New Revision: 237909

URL: https://gcc.gnu.org/viewcvs?rev=237909=gcc=rev
Log:
strcpy arg optimised out

For functions that return an argument unchanged, like strcat,
find_call_crossed_cheap_reg attempts to find an assignment between
a pseudo reg and the arg reg before the call, so that uses of the
pseudo after the call can instead use the return value.  The exit
condition on the loop looking at previous insns was wrong.  Uses of
the arg reg don't matter.  What matters is the insn setting the arg
reg as any assignment involving the arg reg prior to that insn is
likely a completely unrelated use of the hard reg.

PR rtl-optimization/71709
* ira-lives.c (find_call_crossed_cheap_reg): Exit loop on arg reg
being set, not referenced.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/ira-lives.c