public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug tree-optimization/115210] New: Missed optimization opportunity in redundant copies for large structure @ 2024-05-24 7:35 user202729 at protonmail dot com 2024-05-24 7:45 ` [Bug tree-optimization/115210] " rguenth at gcc dot gnu.org ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: user202729 at protonmail dot com @ 2024-05-24 7:35 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115210 Bug ID: 115210 Summary: Missed optimization opportunity in redundant copies for large structure Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: user202729 at protonmail dot com Target Milestone: --- Code: ``` struct A{ //long long a[128]; long long a_1, a_2, a_3, a_4, a_5, a_6, a_7, a_8, a_9, a_10, a_11, a_12, a_13, a_14, a_15, a_16, a_17, a_18, a_19, a_20, a_21, a_22, a_23, a_24, a_25, a_26, a_27, a_28, a_29, a_30, a_31, a_32, a_33, a_34, a_35, a_36, a_37, a_38, a_39, a_40, a_41, a_42, a_43, a_44, a_45, a_46, a_47, a_48, a_49, a_50, a_51, a_52, a_53, a_54, a_55, a_56, a_57, a_58, a_59, a_60, a_61, a_62, a_63, a_64, a_65, a_66, a_67, a_68, a_69, a_70, a_71, a_72, a_73, a_74, a_75, a_76, a_77, a_78, a_79, a_80, a_81, a_82, a_83, a_84, a_85, a_86, a_87, a_88, a_89, a_90, a_91, a_92, a_93, a_94, a_95, a_96, a_97, a_98, a_99, a_100, a_101, a_102, a_103, a_104, a_105, a_106, a_107, a_108, a_109, a_110, a_111, a_112, a_113, a_114, a_115, a_116, a_117, a_118, a_119, a_120, a_121, a_122, a_123, a_124, a_125, a_126, a_127, a_128; }; void f(A& u){ A v=u; A w=v; A x=w; u=x; } ``` Both variants (with a large array or with a lot of fields) exhibits the bug. 4 occurrences of `rep movsq` are seen in the code. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/115210] Missed optimization opportunity in redundant copies for large structure 2024-05-24 7:35 [Bug tree-optimization/115210] New: Missed optimization opportunity in redundant copies for large structure user202729 at protonmail dot com @ 2024-05-24 7:45 ` rguenth at gcc dot gnu.org 2024-05-24 13:49 ` pinskia at gcc dot gnu.org 2024-05-24 13:50 ` pinskia at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: rguenth at gcc dot gnu.org @ 2024-05-24 7:45 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115210 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |jamborm at gcc dot gnu.org, | |rguenth at gcc dot gnu.org Last reconfirmed| |2024-05-24 Ever confirmed|0 |1 Keywords| |missed-optimization --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- SRA has a limit on the size of structures decomposed and GCC does not have a aggregate copy propagation pass but relies on SRA. There's --param sra-max-scalarization-size-{Osize,Ospeed} Being able to perform copy coalescing(!) for A = B when B dies at the assignment and A becomes live without this limit and without decomposing but from SRA analysis would be nice. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/115210] Missed optimization opportunity in redundant copies for large structure 2024-05-24 7:35 [Bug tree-optimization/115210] New: Missed optimization opportunity in redundant copies for large structure user202729 at protonmail dot com 2024-05-24 7:45 ` [Bug tree-optimization/115210] " rguenth at gcc dot gnu.org @ 2024-05-24 13:49 ` pinskia at gcc dot gnu.org 2024-05-24 13:50 ` pinskia at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu.org @ 2024-05-24 13:49 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115210 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/115210] Missed optimization opportunity in redundant copies for large structure 2024-05-24 7:35 [Bug tree-optimization/115210] New: Missed optimization opportunity in redundant copies for large structure user202729 at protonmail dot com 2024-05-24 7:45 ` [Bug tree-optimization/115210] " rguenth at gcc dot gnu.org 2024-05-24 13:49 ` pinskia at gcc dot gnu.org @ 2024-05-24 13:50 ` pinskia at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu.org @ 2024-05-24 13:50 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115210 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Dup. *** This bug has been marked as a duplicate of bug 14295 *** ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-05-24 13:50 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-05-24 7:35 [Bug tree-optimization/115210] New: Missed optimization opportunity in redundant copies for large structure user202729 at protonmail dot com 2024-05-24 7:45 ` [Bug tree-optimization/115210] " rguenth at gcc dot gnu.org 2024-05-24 13:49 ` pinskia at gcc dot gnu.org 2024-05-24 13:50 ` pinskia 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).