public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/58968] New: Powerpc -mlra cannot compile ormas1.f in gamess Spec 2006 with -m32 -mcpu=power7 -O3 -mlra -w -ffast-math  -funroll-loops
@ 2013-11-01 20:06 meissner at gcc dot gnu.org
  2013-11-02 23:48 ` [Bug rtl-optimization/58968] " steven at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: meissner at gcc dot gnu.org @ 2013-11-01 20:06 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58968

            Bug ID: 58968
           Summary: Powerpc -mlra cannot compile ormas1.f in gamess Spec
                    2006 with -m32 -mcpu=power7 -O3 -mlra -w -ffast-math
                    -funroll-loops
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: meissner at gcc dot gnu.org

Created attachment 31139
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31139&action=edit
Fortran source to show the problem

The spec 2006 benchmark gamess cannot be compiled with GCC subversion id
204267, using the -m32 -mcpu=power7 -O3 -mlra -w -ffast-math  -funroll-loops
options (the -w is to silence some of the warnings due to the types not being
the same, but it works perfectly without the -mlra option).  Dropping either
-mlra or -funroll-loops will allow the benchmark to be compiled.  This may be
the same underlying bug as PR 58967 since that also will not build if both loop
unrolling and lra register allocation are specified.  I'm submitting this as
separate bug because the insn that it is dying on is different.

Here is the traceback:
-bns-> /opt/at7.0/bin/gdb f951 
GNU gdb (GDB) 7.6.50.20130722-cvs
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "powerpc64-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
..
Reading symbols from
/home/meissner/fsf-build-ppc64/trunk-204267/gcc/f951...done.
Breakpoint 1 at 0x10d24480: file
/home/meissner/fsf-src/trunk-204267/gcc/diagnostic.c, line 1182.
Breakpoint 2 at 0x10d25dd0: file
/home/meissner/fsf-src/trunk-204267/gcc/diagnostic.c, line 1123.
Breakpoint 3 at 0x10d9c3a0
Breakpoint 4 at 0x10d9c448
File tree.h will be skipped when stepping.
Successfully loaded GDB hooks for GCC
(gdb) r -mcpu=power7 -quiet -O3 -mlra -w -ffast-math  -funroll-loops  -m32
ormas1.fppized.f
Starting program: /home/meissner/fsf-build-ppc64/trunk-204267/gcc/f951
-mcpu=power7 -quiet -O3 -mlra -w -ffast-math  -funroll-loops  -m32
ormas1.fppized.f

Breakpoint 1, fancy_abort (file=0x10dfb400
"/home/meissner/fsf-src/trunk-204267/gcc/lra.c", line=2034, function=0x10dfb1b8
<check_rtl(bool)::__FUNCTION__> "check_rtl")
    at /home/meissner/fsf-src/trunk-204267/gcc/diagnostic.c:1182
1182    {
(gdb) up
#1  0x000000001059fb80 in check_rtl (final_p=final_p@entry=true) at
/home/meissner/fsf-src/trunk-204267/gcc/lra.c:2034
2034                lra_assert (constrain_operands (1));
(gdb) print insn
$1 = (rtx) 0xfffabc0d338
(gdb) pr
warning: Expression is not an assignment (and might have no effect)
(insn 19319 19318 19320 1557 (set (reg:CC 66 ctr [4379])
        (reg:CC 66 ctr [4379])) 439 {*movcc_internal1}
     (nil))
(gdb) 

In the past when I was looking at the code, we could paper over the problem by
adding a constraint in movcc_internal1 that allowed moving the CTR register to
itself.  However, LRA should not be generating a move to the same register
(which will eventually be deleted).  An alternative method is constrain CC to
not go in the CTR register.  I did this at one point, but it did have some
performance impacts, so I never submitted the code.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/58968] Powerpc -mlra cannot compile ormas1.f in gamess Spec 2006 with -m32 -mcpu=power7 -O3 -mlra -w -ffast-math  -funroll-loops
  2013-11-01 20:06 [Bug rtl-optimization/58968] New: Powerpc -mlra cannot compile ormas1.f in gamess Spec 2006 with -m32 -mcpu=power7 -O3 -mlra -w -ffast-math -funroll-loops meissner at gcc dot gnu.org
@ 2013-11-02 23:48 ` steven at gcc dot gnu.org
  2013-11-02 23:49 ` steven at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: steven at gcc dot gnu.org @ 2013-11-02 23:48 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58968

Steven Bosscher <steven at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-11-02
                 CC|                            |steven at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Steven Bosscher <steven at gcc dot gnu.org> ---
Confirmed.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/58968] Powerpc -mlra cannot compile ormas1.f in gamess Spec 2006 with -m32 -mcpu=power7 -O3 -mlra -w -ffast-math  -funroll-loops
  2013-11-01 20:06 [Bug rtl-optimization/58968] New: Powerpc -mlra cannot compile ormas1.f in gamess Spec 2006 with -m32 -mcpu=power7 -O3 -mlra -w -ffast-math -funroll-loops meissner at gcc dot gnu.org
  2013-11-02 23:48 ` [Bug rtl-optimization/58968] " steven at gcc dot gnu.org
@ 2013-11-02 23:49 ` steven at gcc dot gnu.org
  2013-11-04 16:14 ` vmakarov at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: steven at gcc dot gnu.org @ 2013-11-02 23:49 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58968

--- Comment #2 from Steven Bosscher <steven at gcc dot gnu.org> ---
Created attachment 31143
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31143&action=edit
Somewhat reduced test case


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/58968] Powerpc -mlra cannot compile ormas1.f in gamess Spec 2006 with -m32 -mcpu=power7 -O3 -mlra -w -ffast-math  -funroll-loops
  2013-11-01 20:06 [Bug rtl-optimization/58968] New: Powerpc -mlra cannot compile ormas1.f in gamess Spec 2006 with -m32 -mcpu=power7 -O3 -mlra -w -ffast-math -funroll-loops meissner at gcc dot gnu.org
  2013-11-02 23:48 ` [Bug rtl-optimization/58968] " steven at gcc dot gnu.org
  2013-11-02 23:49 ` steven at gcc dot gnu.org
@ 2013-11-04 16:14 ` vmakarov at gcc dot gnu.org
  2013-11-04 16:21 ` vmakarov at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2013-11-04 16:14 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58968

--- Comment #3 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
Author: vmakarov
Date: Mon Nov  4 16:12:29 2013
New Revision: 204353

URL: http://gcc.gnu.org/viewcvs?rev=204353&root=gcc&view=rev
Log:
2013-11-04  Vladimir Makarov  <vmakarov@redhat.com>

    PR rtl-optimization/58968
    * lra-spills.c (return_regno_p): New function.
    (lra_final_code_change): Use it.

2013-11-04  Vladimir Makarov  <vmakarov@redhat.com>

    PR rtl-optimization/58968
    * gfortran.dg/pr58968.f: New


Added:
    trunk/gcc/testsuite/gfortran.dg/pr58968.f
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/lra-spills.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/58968] Powerpc -mlra cannot compile ormas1.f in gamess Spec 2006 with -m32 -mcpu=power7 -O3 -mlra -w -ffast-math  -funroll-loops
  2013-11-01 20:06 [Bug rtl-optimization/58968] New: Powerpc -mlra cannot compile ormas1.f in gamess Spec 2006 with -m32 -mcpu=power7 -O3 -mlra -w -ffast-math -funroll-loops meissner at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2013-11-04 16:14 ` vmakarov at gcc dot gnu.org
@ 2013-11-04 16:21 ` vmakarov at gcc dot gnu.org
  2014-09-19 13:30 ` dominiq at lps dot ens.fr
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2013-11-04 16:21 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58968

Vladimir Makarov <vmakarov at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vmakarov at gcc dot gnu.org

--- Comment #4 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Steven Bosscher from comment #2)
> Created attachment 31143 [details]
> Somewhat reduced test case

Thanks for the test reducing.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/58968] Powerpc -mlra cannot compile ormas1.f in gamess Spec 2006 with -m32 -mcpu=power7 -O3 -mlra -w -ffast-math  -funroll-loops
  2013-11-01 20:06 [Bug rtl-optimization/58968] New: Powerpc -mlra cannot compile ormas1.f in gamess Spec 2006 with -m32 -mcpu=power7 -O3 -mlra -w -ffast-math -funroll-loops meissner at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2013-11-04 16:21 ` vmakarov at gcc dot gnu.org
@ 2014-09-19 13:30 ` dominiq at lps dot ens.fr
  2014-09-22 19:43 ` meissner at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-09-19 13:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58968

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING

--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Is this PR fixed or not?


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/58968] Powerpc -mlra cannot compile ormas1.f in gamess Spec 2006 with -m32 -mcpu=power7 -O3 -mlra -w -ffast-math  -funroll-loops
  2013-11-01 20:06 [Bug rtl-optimization/58968] New: Powerpc -mlra cannot compile ormas1.f in gamess Spec 2006 with -m32 -mcpu=power7 -O3 -mlra -w -ffast-math -funroll-loops meissner at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2014-09-19 13:30 ` dominiq at lps dot ens.fr
@ 2014-09-22 19:43 ` meissner at gcc dot gnu.org
  2014-09-22 19:45 ` meissner at gcc dot gnu.org
  2014-09-22 21:14 ` meissner at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: meissner at gcc dot gnu.org @ 2014-09-22 19:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58968

Michael Meissner <meissner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Michael Meissner <meissner at gcc dot gnu.org> ---
It is fixed as of subversion revision 215333 (it was probably fixed a lot
longer, but I had 215333 lying around).


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/58968] Powerpc -mlra cannot compile ormas1.f in gamess Spec 2006 with -m32 -mcpu=power7 -O3 -mlra -w -ffast-math  -funroll-loops
  2013-11-01 20:06 [Bug rtl-optimization/58968] New: Powerpc -mlra cannot compile ormas1.f in gamess Spec 2006 with -m32 -mcpu=power7 -O3 -mlra -w -ffast-math -funroll-loops meissner at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2014-09-22 19:43 ` meissner at gcc dot gnu.org
@ 2014-09-22 19:45 ` meissner at gcc dot gnu.org
  2014-09-22 21:14 ` meissner at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: meissner at gcc dot gnu.org @ 2014-09-22 19:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58968

--- Comment #7 from Michael Meissner <meissner at gcc dot gnu.org> ---
Just to be clear, it is fixed in GCC 5 trunk sources.  I'll build it with the
GCC 4.9 branch as well.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rtl-optimization/58968] Powerpc -mlra cannot compile ormas1.f in gamess Spec 2006 with -m32 -mcpu=power7 -O3 -mlra -w -ffast-math  -funroll-loops
  2013-11-01 20:06 [Bug rtl-optimization/58968] New: Powerpc -mlra cannot compile ormas1.f in gamess Spec 2006 with -m32 -mcpu=power7 -O3 -mlra -w -ffast-math -funroll-loops meissner at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2014-09-22 19:45 ` meissner at gcc dot gnu.org
@ 2014-09-22 21:14 ` meissner at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: meissner at gcc dot gnu.org @ 2014-09-22 21:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58968

--- Comment #8 from Michael Meissner <meissner at gcc dot gnu.org> ---
The gamess benchmark also runs fine with the options when built with subversion
215404 on the gcc-4_9-branch


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-09-22 21:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-01 20:06 [Bug rtl-optimization/58968] New: Powerpc -mlra cannot compile ormas1.f in gamess Spec 2006 with -m32 -mcpu=power7 -O3 -mlra -w -ffast-math -funroll-loops meissner at gcc dot gnu.org
2013-11-02 23:48 ` [Bug rtl-optimization/58968] " steven at gcc dot gnu.org
2013-11-02 23:49 ` steven at gcc dot gnu.org
2013-11-04 16:14 ` vmakarov at gcc dot gnu.org
2013-11-04 16:21 ` vmakarov at gcc dot gnu.org
2014-09-19 13:30 ` dominiq at lps dot ens.fr
2014-09-22 19:43 ` meissner at gcc dot gnu.org
2014-09-22 19:45 ` meissner at gcc dot gnu.org
2014-09-22 21:14 ` meissner at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).