public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/41082] [4.5/4.6 Regression] FAIL: gfortran.fortran-torture/execute/where_2.f90 execution,  -O3
Date: Wed, 08 Dec 2010 08:29:00 -0000	[thread overview]
Message-ID: <bug-41082-4-BsQMdc9A2Z@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-41082-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #67 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-08 08:28:42 UTC ---
Perhaps it would be also good to add new peephole2 to catch:
(insn 931 415 932 33 (set (reg:CC 19 r19)
        (mem/c:CC (plus:DI (reg/f:DI 1 r1)
                (const_int 272 [0x110])) [5 %sfp+272 S4 A32])) where_2.f90:11
358 {*movcc_internal1}
     (nil))

(insn 932 931 461 33 (set (reg:CC 74 cr6)
        (reg:CC 19 r19)) where_2.f90:11 358 {*movcc_internal1}
     (expr_list:REG_DEAD (reg:CC 19 r19)
        (nil)))

(insn 461 932 422 33 (set (reg:SI 27 r27 [712])
        (gt:SI (reg:CC 74 cr6)
            (const_int 0 [0]))) where_2.f90:11 462 {*rs6000.md:13486}
     (expr_list:REG_DEAD (reg:CC 74 cr6)
        (nil)))

which is expanded to (if -fno-schedule-insns2, but peephole2 is run before
second scheduling):
        lwz r19,272(r1)
        rlwinm r19,r19,8,0xffffffff
        mtcrf 2,r19
        rlwinm r19,r19,24,0xffffffff
        mfcr r27
        rlwinm r27,r27,26,1
while only one lwz and one rlwinm are actually needed (BTW, also it would be
nice to avoid the second rlwinm in movcc_internal1 pattern if the source
integer register is dead at the insn).

I guess this can happen quite often, any time the register pressure is too high
and reload spills CC mode registers and then they are used just once for cr*
cond 0 ? 1 : 0 assignments.


  parent reply	other threads:[~2010-12-08  8:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-41082-4@http.gcc.gnu.org/bugzilla/>
2010-11-22 10:06 ` [Bug middle-end/41082] " dominiq at lps dot ens.fr
2010-11-26 15:39 ` jakub at gcc dot gnu.org
2010-11-26 16:01 ` dominiq at lps dot ens.fr
2010-11-26 16:54 ` jakub at gcc dot gnu.org
2010-11-26 17:18 ` dominiq at lps dot ens.fr
2010-11-26 17:42 ` jakub at gcc dot gnu.org
2010-11-27 18:15 ` jakub at gcc dot gnu.org
2010-11-27 22:12 ` dominiq at lps dot ens.fr
2010-12-07 22:08 ` jakub at gcc dot gnu.org
2010-12-07 23:18 ` [Bug target/41082] " jakub at gcc dot gnu.org
2010-12-08  0:13 ` jakub at gcc dot gnu.org
2010-12-08  0:16 ` pinskia at gcc dot gnu.org
2010-12-08  0:33 ` jakub at gcc dot gnu.org
2010-12-08  7:36 ` jakub at gcc dot gnu.org
2010-12-08  8:29 ` jakub at gcc dot gnu.org [this message]
2010-12-08 20:30 ` meissner at gcc dot gnu.org
2010-12-09  6:15 ` dominiq at lps dot ens.fr
2010-12-09  8:34 ` jakub at gcc dot gnu.org
2010-12-09  8:36 ` [Bug target/41082] [4.5 " jakub at gcc dot gnu.org
2010-12-16 13:13 ` rguenth at gcc dot gnu.org
2011-01-16 20:13 ` jakub at gcc dot gnu.org
2011-01-17  9:14 ` jakub at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-41082-4-BsQMdc9A2Z@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).