public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/99199] New: [9/10/11 Regression] Very large boolean expression leads to quite a few return statements
@ 2021-02-22 14:16 tkoenig at gcc dot gnu.org
  2021-02-22 14:17 ` [Bug tree-optimization/99199] " tkoenig at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2021-02-22 14:16 UTC (permalink / raw)
  To: gcc-bugs

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.

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

end of thread, other threads:[~2024-03-11  2:48 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-22 14:16 [Bug tree-optimization/99199] New: [9/10/11 Regression] Very large boolean expression leads to quite a few return statements tkoenig at gcc dot gnu.org
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

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).