[Bug target/91769] [9/10 regression] wrong code with -O2 on MIPS

2019-11-22 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91769

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||jakub at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #11 from Jakub Jelinek  ---
Assuming this is fixed.  If not, please reopen.

[Bug target/91769] [9/10 regression] wrong code with -O2 on MIPS

2019-10-04 Thread aurelien at aurel32 dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91769

--- Comment #10 from Aurelien Jarno  ---
Thanks!

[Bug target/91769] [9/10 regression] wrong code with -O2 on MIPS

2019-10-04 Thread dragan.mladjeno...@rt-rk.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91769

--- Comment #9 from Dragan Mladjenovic  ---
Sorry for the delay. I somehow managed to get my git svn rebase to take hours.
Both patches have been backported.

[Bug target/91769] [9/10 regression] wrong code with -O2 on MIPS

2019-10-04 Thread draganm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91769

--- Comment #8 from draganm at gcc dot gnu.org ---
Author: draganm
Date: Fri Oct  4 11:10:01 2019
New Revision: 276570

URL: https://gcc.gnu.org/viewcvs?rev=276570=gcc=rev
Log:
Backport fix for PR target/91769

gcc/ChangeLog:

2019-10-04  Dragan Mladjenovic 

Backport from mainline
2019-10-03  Dragan Mladjenovic  

PR target/91769
* config/mips/mips.c (mips_split_move): Use
reg_overlap_mentioned_p
instead of REGNO equality check on addr.reg.

gcc/testsuite/ChangeLog:

2019-10-04  Dragan Mladjenovic 

Backport from mainline
2019-10-03  Dragan Mladjenovic  

PR target/91769
* gcc.target/mips/pr91769.c: New test.

Added:
branches/gcc-9-branch/gcc/testsuite/gcc.target/mips/pr91769.c
Modified:
branches/gcc-9-branch/gcc/ChangeLog
branches/gcc-9-branch/gcc/config/mips/mips.c
branches/gcc-9-branch/gcc/testsuite/ChangeLog

[Bug target/91769] [9/10 regression] wrong code with -O2 on MIPS

2019-10-03 Thread aurelien at aurel32 dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91769

--- Comment #7 from Aurelien Jarno  ---
Thanks a lot for the fix. Would it be possible to backport it to the GCC 9
branch? Note that it requires backporting r273174 first.

[Bug target/91769] [9/10 regression] wrong code with -O2 on MIPS

2019-10-03 Thread draganm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91769

--- Comment #6 from draganm at gcc dot gnu.org ---
Author: draganm
Date: Thu Oct  3 19:17:20 2019
New Revision: 276525

URL: https://gcc.gnu.org/viewcvs?rev=276525=gcc=rev
Log:
Fix PR target/91769

This fixes the issue by checking that addr's base reg is not part of dest
multiword reg instead just checking the first reg of dest.

gcc/ChangeLog:

2019-10-03  Dragan Mladjenovic  

PR target/91769
* config/mips/mips.c (mips_split_move): Use reg_overlap_mentioned_p
instead of REGNO equality check on addr.reg.

gcc/testsuite/ChangeLog:

2019-10-03  Dragan Mladjenovic  

PR target/91769
* gcc.target/mips/pr91769.c: New test.

Added:
trunk/gcc/testsuite/gcc.target/mips/pr91769.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/mips/mips.c
trunk/gcc/testsuite/ChangeLog

[Bug target/91769] [9/10 regression] wrong code with -O2 on MIPS

2019-09-17 Thread aurelien at aurel32 dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91769

--- Comment #5 from Aurelien Jarno  ---
(In reply to Dragan Mladjenovic from comment #4)
> Hi,
> 
> This fix is propbably nothing more than:

Thanks for the fix. I have just tried it and I confirm it fixes the issue. Note
that when backporting it to the 9 branch, it might be a good idea to also
backport r273174.

[Bug target/91769] [9/10 regression] wrong code with -O2 on MIPS

2019-09-17 Thread dragan.mladjeno...@rt-rk.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91769

--- Comment #4 from Dragan Mladjenovic  ---
Hi,

This fix is propbably nothing more than:

--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -4862,7 +4862,7 @@ mips_split_move (rtx dest, rtx src, enum mips_split_type
split_type, rtx insn_)
{
  rtx tmp = XEXP (src, 0);
  mips_classify_address (, tmp, GET_MODE (tmp), true);
- if (addr.reg && REGNO (addr.reg) != REGNO (dest))
+ if (addr.reg && !reg_overlap_mentioned_p (dest, addr.reg))
validate_change (next, _SRC (set), src, false);
}
  else

But I have to regtest it before posting it on the mailing list. There are more
bug reports that are potentialy relate to this particular piece of code, so I
have to check them too.

[Bug target/91769] [9/10 regression] wrong code with -O2 on MIPS

2019-09-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91769

Richard Biener  changed:

   What|Removed |Added

   Keywords||wrong-code
   Target Milestone|--- |9.3
Summary|[9 regression] wrong code   |[9/10 regression] wrong
   |with -O2 on MIPS|code with -O2 on MIPS