public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/99199] New: [9/10/11 Regression] Very large boolean expression leads to quite a few return statements
Date: Mon, 22 Feb 2021 14:16:48 +0000	[thread overview]
Message-ID: <bug-99199-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 99199
           Summary: [9/10/11 Regression] Very large boolean expression
                    leads to quite a few return statements
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tkoenig at gcc dot gnu.org
  Target Milestone: ---

Created attachment 50233
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50233&action=edit
C test case

The attached test case translated rather strangely with -O3.

The instruction sequence is very long, and it generates 42 return
instructions, quite a few of them at the end:

$ gcc -O3 -S tr.c
$ wc -l tr.s
504 tr.s
$ grep ret tr.s | wc -l
42

...

L24:
        movl    %r9d, %eax
        orl     %r8d, %eax
        xorl    $1, %eax
        jmp     .L112
.L131:
        ret
.L132:
        ret
.L140:
        ret
.L141:
        ret
.L145:
        ret
.L146:
        ret
.L148:
        ret
.L142:
        ret
.L143:
        ret
.L150:
        ret
.L152:
        ret
.L151:
        ret
.L138:
        ret
.L129:
        ret
.L147:
        ret
        .cfi_endproc

Seems to have been introduced with gcc 9, gcc 8 is fine.

             reply	other threads:[~2021-02-22 14:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22 14:16 tkoenig at gcc dot gnu.org [this message]
2021-02-22 14:17 ` [Bug tree-optimization/99199] " tkoenig at gcc dot gnu.org
2021-02-22 14:52 ` jakub at gcc dot gnu.org
2021-02-22 16:47 ` jakub at gcc dot gnu.org
2021-02-23  8:15 ` [Bug rtl-optimization/99199] " rguenth at gcc dot gnu.org
2021-02-26 11:55 ` rguenth at gcc dot gnu.org
2021-04-27 11:40 ` [Bug rtl-optimization/99199] [9/10/11/12 " jakub at gcc dot gnu.org
2021-07-28  7:05 ` rguenth at gcc dot gnu.org
2021-12-16  7:32 ` pinskia at gcc dot gnu.org
2021-12-16  7:37 ` pinskia at gcc dot gnu.org
2021-12-16  8:39 ` jakub at gcc dot gnu.org
2022-04-21  7:48 ` rguenth at gcc dot gnu.org
2023-05-29 10:04 ` [Bug rtl-optimization/99199] [10/11/12/13/14 " jakub at gcc dot gnu.org
2023-09-02 21:15 ` [Bug rtl-optimization/99199] [11/12/13/14 " pinskia at gcc dot gnu.org
2024-03-11  2:48 ` [Bug rtl-optimization/99199] [11 " law 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-99199-4@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).