* [Bug target/55565] [4.8 regression] FAIL: gcc.target/powerpc/ppc-mov-1.c scan-assembler-not fmr [0-9]+,[0-9]+
2012-12-02 20:19 [Bug target/55565] New: [4.8 regression] FAIL: gcc.target/powerpc/ppc-mov-1.c scan-assembler-not fmr [0-9]+,[0-9]+ schwab@linux-m68k.org
@ 2012-12-02 20:28 ` schwab@linux-m68k.org
2012-12-07 14:08 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: schwab@linux-m68k.org @ 2012-12-02 20:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55565
Andreas Schwab <schwab@linux-m68k.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.8.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/55565] [4.8 regression] FAIL: gcc.target/powerpc/ppc-mov-1.c scan-assembler-not fmr [0-9]+,[0-9]+
2012-12-02 20:19 [Bug target/55565] New: [4.8 regression] FAIL: gcc.target/powerpc/ppc-mov-1.c scan-assembler-not fmr [0-9]+,[0-9]+ schwab@linux-m68k.org
2012-12-02 20:28 ` [Bug target/55565] " schwab@linux-m68k.org
@ 2012-12-07 14:08 ` rguenth at gcc dot gnu.org
2012-12-18 14:54 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-12-07 14:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55565
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/55565] [4.8 regression] FAIL: gcc.target/powerpc/ppc-mov-1.c scan-assembler-not fmr [0-9]+,[0-9]+
2012-12-02 20:19 [Bug target/55565] New: [4.8 regression] FAIL: gcc.target/powerpc/ppc-mov-1.c scan-assembler-not fmr [0-9]+,[0-9]+ schwab@linux-m68k.org
2012-12-02 20:28 ` [Bug target/55565] " schwab@linux-m68k.org
2012-12-07 14:08 ` rguenth at gcc dot gnu.org
@ 2012-12-18 14:54 ` jakub at gcc dot gnu.org
2012-12-20 22:58 ` dominiq at lps dot ens.fr
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-12-18 14:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55565
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-12-18 14:53:52 UTC ---
Started with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190339
which changed *.optimized dump tiny bit.
I'd say the testcase is questionable, on such large routine assuming there
can't be any floating point register moves is dubious.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/55565] [4.8 regression] FAIL: gcc.target/powerpc/ppc-mov-1.c scan-assembler-not fmr [0-9]+,[0-9]+
2012-12-02 20:19 [Bug target/55565] New: [4.8 regression] FAIL: gcc.target/powerpc/ppc-mov-1.c scan-assembler-not fmr [0-9]+,[0-9]+ schwab@linux-m68k.org
` (2 preceding siblings ...)
2012-12-18 14:54 ` jakub at gcc dot gnu.org
@ 2012-12-20 22:58 ` dominiq at lps dot ens.fr
2013-01-09 19:53 ` aldyh at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-12-20 22:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55565
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-12-20
Ever Confirmed|0 |1
--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-12-20 22:57:37 UTC ---
BTW the test passes on powerpc-apple-darwin9 because the regexpr does not catch
fmr f1,f0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/55565] [4.8 regression] FAIL: gcc.target/powerpc/ppc-mov-1.c scan-assembler-not fmr [0-9]+,[0-9]+
2012-12-02 20:19 [Bug target/55565] New: [4.8 regression] FAIL: gcc.target/powerpc/ppc-mov-1.c scan-assembler-not fmr [0-9]+,[0-9]+ schwab@linux-m68k.org
` (3 preceding siblings ...)
2012-12-20 22:58 ` dominiq at lps dot ens.fr
@ 2013-01-09 19:53 ` aldyh at gcc dot gnu.org
2013-01-10 17:47 ` aldyh at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: aldyh at gcc dot gnu.org @ 2013-01-09 19:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55565
Aldy Hernandez <aldyh at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aldyh at gcc dot gnu.org
AssignedTo|unassigned at gcc dot |aldyh at gcc dot gnu.org
|gnu.org |
--- Comment #3 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2013-01-09 19:53:13 UTC ---
I'll take a look.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/55565] [4.8 regression] FAIL: gcc.target/powerpc/ppc-mov-1.c scan-assembler-not fmr [0-9]+,[0-9]+
2012-12-02 20:19 [Bug target/55565] New: [4.8 regression] FAIL: gcc.target/powerpc/ppc-mov-1.c scan-assembler-not fmr [0-9]+,[0-9]+ schwab@linux-m68k.org
` (4 preceding siblings ...)
2013-01-09 19:53 ` aldyh at gcc dot gnu.org
@ 2013-01-10 17:47 ` aldyh at gcc dot gnu.org
2013-01-10 17:53 ` pinskia at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: aldyh at gcc dot gnu.org @ 2013-01-10 17:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55565
--- Comment #4 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2013-01-10 17:46:39 UTC ---
I compared the code generated by trunk with the generated code in rev 190339
which broke the test. The trunk code is more optimal than when the test
"passed", so I suggest either removing the dg-final in the test, or modifying
the regex in the dg-final.
In the testcase we have something functionally equivalent to (where x is the
original function argument passed in f1):
if (huge + x > 0.0) {
if ((int)x > 0)
return 0.0;
...
} else
return x;
When the test passed, we used to generate:
.L17:
ld %r8,.LC0@toc(%r2)
ld %r10,.LC2@toc(%r2)
lfd %f13,0(%r8)
lfd %f0,0(%r10)
fadd %f1,%f1,%f13
fcmpu %cr7,%f1,%f0
bng %cr7,.L4 /* if (!(huge + x > 0.0)) return x; */
...
...
.L4: /* return x; */
std %r9,-8(%r1)
ori 2,2,0
lfd %f1,-8(%r1)
blr
Notice that since we perform the fadd onto %f1, we need to reload %f1 from
memory.
On trunk though, we keep x/%f1 and 0.0/%f0 around so we can return them
directly. We can return x/%f1 directly in one case, or copy 0.0/%f0 to the
return register (%f1) in the another case.
.L18:
ld %r8,.LC6@toc(%r2)
ld %r9,.LC1@toc(%r2)
lfd %f13,0(%r8)
lfd %f0,0(%r9)
fadd %f13,%f1,%f13
fcmpu %cr7,%f13,%f0
bnglr %cr7 /* if (!(huge + x > 0.0)) return x; */
cmpdi %cr7,%r10,0
fmr %f1,%f0
bgelr %cr7 /* if (huge+x>0.0 && (int)x >0) return 0.0 */
Bottom line, on trunk we avoid a branch and memory load/stores.
Testing a patch.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/55565] [4.8 regression] FAIL: gcc.target/powerpc/ppc-mov-1.c scan-assembler-not fmr [0-9]+,[0-9]+
2012-12-02 20:19 [Bug target/55565] New: [4.8 regression] FAIL: gcc.target/powerpc/ppc-mov-1.c scan-assembler-not fmr [0-9]+,[0-9]+ schwab@linux-m68k.org
` (5 preceding siblings ...)
2013-01-10 17:47 ` aldyh at gcc dot gnu.org
@ 2013-01-10 17:53 ` pinskia at gcc dot gnu.org
2013-01-10 20:28 ` aldyh at gcc dot gnu.org
2013-01-10 20:30 ` aldyh at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2013-01-10 17:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55565
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> 2013-01-10 17:53:24 UTC ---
(In reply to comment #4)
> Bottom line, on trunk we avoid a branch and memory load/stores.
I agree the code is much better now. Only moving between the fpr and gpr where
needed instead of keeping x into the GPRs.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/55565] [4.8 regression] FAIL: gcc.target/powerpc/ppc-mov-1.c scan-assembler-not fmr [0-9]+,[0-9]+
2012-12-02 20:19 [Bug target/55565] New: [4.8 regression] FAIL: gcc.target/powerpc/ppc-mov-1.c scan-assembler-not fmr [0-9]+,[0-9]+ schwab@linux-m68k.org
` (6 preceding siblings ...)
2013-01-10 17:53 ` pinskia at gcc dot gnu.org
@ 2013-01-10 20:28 ` aldyh at gcc dot gnu.org
2013-01-10 20:30 ` aldyh at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: aldyh at gcc dot gnu.org @ 2013-01-10 20:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55565
--- Comment #6 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2013-01-10 20:28:33 UTC ---
Author: aldyh
Date: Thu Jan 10 20:28:26 2013
New Revision: 195097
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195097
Log:
PR target/55565
* gcc.target/powerpc/ppc-mov-1.c: Update scan-assembler-not
regex.
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/powerpc/ppc-mov-1.c
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/55565] [4.8 regression] FAIL: gcc.target/powerpc/ppc-mov-1.c scan-assembler-not fmr [0-9]+,[0-9]+
2012-12-02 20:19 [Bug target/55565] New: [4.8 regression] FAIL: gcc.target/powerpc/ppc-mov-1.c scan-assembler-not fmr [0-9]+,[0-9]+ schwab@linux-m68k.org
` (7 preceding siblings ...)
2013-01-10 20:28 ` aldyh at gcc dot gnu.org
@ 2013-01-10 20:30 ` aldyh at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: aldyh at gcc dot gnu.org @ 2013-01-10 20:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55565
Aldy Hernandez <aldyh at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #7 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2013-01-10 20:29:41 UTC ---
Fixed in trunk.
^ permalink raw reply [flat|nested] 10+ messages in thread