public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "kazu at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/25113] New: [m68k] lshiftrt and some other insns are conservative on cc0 Date: Sun, 27 Nov 2005 02:30:00 -0000 [thread overview] Message-ID: <bug-25113-5009@http.gcc.gnu.org/bugzilla/> (raw) Consider: unsigned int bar (void); void foo (void) { unsigned int a = bar (); a >>= 2; if (a == 0) bar (); } ./cc1 -quiet -O2 -m5200 -fomit-frame-pointer generates foo: move.l %a2,-(%sp) lea bar,%a2 jbsr (%a2) lsr.l #2,%d0 tst.l %d0 jbne .L4 jbsr (%a2) .L4: move.l (%sp)+,%a2 rts Note that tst.l is not necessary because lsr.l sets the zero flag correctly. See notice_update_cc and its frequent use of CC_STATUS_INIT. -- Summary: [m68k] lshiftrt and some other insns are conservative on cc0 Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: kazu at gcc dot gnu dot org GCC target triplet: m68k-elf http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25113
next reply other threads:[~2005-11-27 2:30 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-11-27 2:30 kazu at gcc dot gnu dot org [this message] 2005-11-27 23:31 ` [Bug target/25113] " kazu at gcc dot gnu dot org 2005-11-28 5:06 ` pinskia at gcc dot gnu dot org 2010-02-24 22:03 ` law at redhat dot com
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-25113-5009@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: linkBe 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).