public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/56451] New: [4.8 regression] Wrong code for gcc.c-torture/execute/941015-1.c on SH
@ 2013-02-26  0:15 kkojima at gcc dot gnu.org
  2013-02-26  0:32 ` [Bug rtl-optimization/56451] " kkojima at gcc dot gnu.org
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: kkojima at gcc dot gnu.org @ 2013-02-26  0:15 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56451
           Summary: [4.8 regression] Wrong code for
                    gcc.c-torture/execute/941015-1.c on SH
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: kkojima@gcc.gnu.org
            Target: sh*-*-*


On sh4-linux, the function foo1 of gcc.c-torture/execute/941015-1.c

int
foo1 (value)
     long long value;
{
  register const long long constant = 0xc000000080000000LL;

  if (value < constant)
    return 1;
  else
    return 2;
}

is assembled to a wrong code with -O1

foo1:
        mov.l   .L7,r1
        cmp/gt  r1,r5
        bt/s    .L10
        mov     #2,r0
        cmp/ge  r1,r5
        bf/s    .L10
        mov     #1,r0
.L10:
        rts     
        nop
.L9:
        .align 2
.L7:
        .long   -1073741824

It looks delayed branch optimization causes this.


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

end of thread, other threads:[~2023-07-07 10:29 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-26  0:15 [Bug rtl-optimization/56451] New: [4.8 regression] Wrong code for gcc.c-torture/execute/941015-1.c on SH kkojima at gcc dot gnu.org
2013-02-26  0:32 ` [Bug rtl-optimization/56451] " kkojima at gcc dot gnu.org
2013-02-26 10:12 ` rguenth at gcc dot gnu.org
2013-03-05  6:25 ` jakub at gcc dot gnu.org
2013-03-22 14:44 ` [Bug rtl-optimization/56451] [4.8/4.9 " jakub at gcc dot gnu.org
2013-05-12 10:02 ` olegendo at gcc dot gnu.org
2013-05-31 10:58 ` jakub at gcc dot gnu.org
2013-10-16  9:49 ` jakub at gcc dot gnu.org
2013-11-25 21:34 ` olegendo at gcc dot gnu.org
2014-05-22  9:04 ` [Bug rtl-optimization/56451] [4.8/4.9/4.10 " rguenth at gcc dot gnu.org
2014-12-19 13:35 ` [Bug rtl-optimization/56451] [4.8/4.9/5 " jakub at gcc dot gnu.org
2015-06-23  8:18 ` [Bug rtl-optimization/56451] [4.8/4.9/5/6 " rguenth at gcc dot gnu.org
2015-06-26 20:06 ` [Bug rtl-optimization/56451] [4.9/5/6 " jakub at gcc dot gnu.org
2015-06-26 20:34 ` jakub at gcc dot gnu.org
2021-05-14  9:46 ` [Bug rtl-optimization/56451] [9/10/11/12 " jakub at gcc dot gnu.org
2021-06-01  8:05 ` rguenth at gcc dot gnu.org
2022-05-27  9:34 ` [Bug rtl-optimization/56451] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:30 ` jakub at gcc dot gnu.org
2023-06-02  2:14 ` [Bug rtl-optimization/56451] [10/11/12/13/14 " pinskia at gcc dot gnu.org
2023-07-07 10:29 ` [Bug rtl-optimization/56451] [11/12/13/14 " rguenth 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).