[Bug rtl-optimization/78437] [7 Regression]: Invalid sign-extend conversion in REE pass
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78437 Eric Botcazou changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2016-11-21 CC||ebotcazou at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Eric Botcazou --- Alpha is the only architecture both affected by PR rtl-optimization/59461 and enabling REE at -O2, but I presume that this could happen on others too.
[Bug rtl-optimization/78437] [7 Regression]: Invalid sign-extend conversion in REE pass
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78437 Eric Botcazou changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |ebotcazou at gcc dot gnu.org Target Milestone|--- |7.0 --- Comment #2 from Eric Botcazou --- Investigating.
[Bug rtl-optimization/78437] [7 Regression]: Invalid sign-extend conversion in REE pass
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78437 --- Comment #3 from Eric Botcazou --- Created attachment 40098 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40098&action=edit Tentative fix It only affects Alpha (by default) but I no longer have access to Alpha hardware so I'm going to play with it on SPARC. Its effect on the assembly code on Alpha is: --- pr78437_1.s 2016-11-21 11:54:33.678363106 +0100 +++ pr78437_2.s 2016-11-21 11:54:40.230542615 +0100 @@ -62,7 +62,7 @@ ldbu $7,max($5) !gprellow sextb $8,$3 stb $8,expected($2) !gprellow - mov $3,$22 + bis $31,$8,$22 sextb $7,$7 cmpeq $3,$7,$3 beq $3,$L4 FWIW the change for PR rtl-opt/59461 eliminated 2 redundant extensions.
[Bug rtl-optimization/78437] [7 Regression]: Invalid sign-extend conversion in REE pass
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78437 --- Comment #4 from Uroš Bizjak --- (In reply to Eric Botcazou from comment #3) > Created attachment 40098 [details] > Tentative fix > > It only affects Alpha (by default) but I no longer have access to Alpha > hardware so I'm going to play with it on SPARC. Its effect on the assembly > code on Alpha is: > > --- pr78437_1.s 2016-11-21 11:54:33.678363106 +0100 > +++ pr78437_2.s 2016-11-21 11:54:40.230542615 +0100 > @@ -62,7 +62,7 @@ > ldbu $7,max($5) !gprellow > sextb $8,$3 > stb $8,expected($2) !gprellow > - mov $3,$22 > + bis $31,$8,$22 > sextb $7,$7 > cmpeq $3,$7,$3 > beq $3,$L4 > > FWIW the change for PR rtl-opt/59461 eliminated 2 redundant extensions. Yes this change fixes reduced testcase execution. I have started bootstrap+regtest with your patch on alpha native. Please expect results sometime tomorrow.
[Bug rtl-optimization/78437] [7 Regression]: Invalid sign-extend conversion in REE pass
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78437 Jeffrey A. Law changed: What|Removed |Added Priority|P3 |P4 CC||law at redhat dot com
[Bug rtl-optimization/78437] [7 Regression] invalid sign-extend conversion in REE pass
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78437 --- Comment #5 from Uroš Bizjak --- (In reply to Uroš Bizjak from comment #4) > I have started bootstrap+regtest with your patch on alpha native. Please > expect results sometime tomorrow. Bootstrap and regression tests pass OK, the patch fixes reported gcc.dg/atomic/stdatomic-compare-exchange-[1,2].c failure.
[Bug rtl-optimization/78437] [7 Regression] invalid sign-extend conversion in REE pass
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78437 --- Comment #6 from Eric Botcazou --- > Bootstrap and regression tests pass OK, the patch fixes reported > gcc.dg/atomic/stdatomic-compare-exchange-[1,2].c failure. Thanks, no regressions with -free on SPARC either.
[Bug rtl-optimization/78437] [7 Regression] invalid sign-extend conversion in REE pass
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78437 --- Comment #7 from Eric Botcazou --- Author: ebotcazou Date: Thu Nov 24 15:01:32 2016 New Revision: 242839 URL: https://gcc.gnu.org/viewcvs?rev=242839&root=gcc&view=rev Log: PR rtl-optimization/78437 * ree.c (get_uses): New function. (combine_reaching_defs): When a copy is needed, return false if any reaching use of the source register reads it in a mode larger than the mode it is set in and WORD_REGISTER_OPERATIONS is true. Modified: trunk/gcc/ChangeLog trunk/gcc/ree.c
[Bug rtl-optimization/78437] [7 Regression] invalid sign-extend conversion in REE pass
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78437 Eric Botcazou changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #8 from Eric Botcazou --- Thanks for distilling the reduced testcase.