public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/111558] New: RISCV: shrink-wrapper optimization question
@ 2023-09-23 21:00 alexey.lapshin at espressif dot com
  2023-09-23 21:17 ` [Bug rtl-optimization/111558] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: alexey.lapshin at espressif dot com @ 2023-09-23 21:00 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111558
           Summary: RISCV: shrink-wrapper optimization question
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: alexey.lapshin at espressif dot com
                CC: manolis.tsamis at vrull dot eu
  Target Milestone: ---

Created attachment 55977
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55977&action=edit
shrink-synthetic-example.c

When I was studying shrink-wrapping behavior, I discovered something strange
code generation.

See the code and assembly at https://godbolt.org/z/P3WfTszYn

Every branch has the same save/restore callee-saved registers.
Therefore, the shrink-wrapping optimization may reduce the speed of the
function when input parameters are not zero...

I understand that this is not a synthetic code snippet... 

But may this code generation be reproduced in real code (without asm inlining)?

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

end of thread, other threads:[~2023-09-26 13:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-23 21:00 [Bug c/111558] New: RISCV: shrink-wrapper optimization question alexey.lapshin at espressif dot com
2023-09-23 21:17 ` [Bug rtl-optimization/111558] " pinskia at gcc dot gnu.org
2023-09-26 13:19 ` mxlol233 at outlook dot com
2023-09-26 13:26 ` mxlol233 at outlook dot com

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