public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug tree-optimization/112402] New: [11/12/13/14 Regression] Path splitting causes if-conversion miss @ 2023-11-06 6:53 pinskia at gcc dot gnu.org 2023-11-06 6:53 ` [Bug tree-optimization/112402] " pinskia at gcc dot gnu.org ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: pinskia at gcc dot gnu.org @ 2023-11-06 6:53 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112402 Bug ID: 112402 Summary: [11/12/13/14 Regression] Path splitting causes if-conversion miss Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Blocks: 94274 Target Milestone: --- Similar to PR 68541 except instead of having a diamond, we just have a triangle. Testcase: ``` int foo(signed char *p, int n) { int s = 0; int i; for (i = 0; i < n; i++) { int t; if (p[i] >= 0) t=1; else t=-1; s+=t; } return s; } ``` I noticed this while working on fixing PR 94274. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94274 [Bug 94274] fold phi whose incoming args are defined from binary operations ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/112402] [11/12/13/14 Regression] Path splitting causes if-conversion miss 2023-11-06 6:53 [Bug tree-optimization/112402] New: [11/12/13/14 Regression] Path splitting causes if-conversion miss pinskia at gcc dot gnu.org @ 2023-11-06 6:53 ` pinskia at gcc dot gnu.org 2023-11-06 8:37 ` rguenth at gcc dot gnu.org ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu.org @ 2023-11-06 6:53 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112402 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |11.5 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/112402] [11/12/13/14 Regression] Path splitting causes if-conversion miss 2023-11-06 6:53 [Bug tree-optimization/112402] New: [11/12/13/14 Regression] Path splitting causes if-conversion miss pinskia at gcc dot gnu.org 2023-11-06 6:53 ` [Bug tree-optimization/112402] " pinskia at gcc dot gnu.org @ 2023-11-06 8:37 ` rguenth at gcc dot gnu.org 2023-11-07 3:27 ` pinskia at gcc dot gnu.org ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: rguenth at gcc dot gnu.org @ 2023-11-06 8:37 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112402 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- So the question is whether we should do more if-conversion on GIMPLE then (or axe path splitting or move it to RTL) ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/112402] [11/12/13/14 Regression] Path splitting causes if-conversion miss 2023-11-06 6:53 [Bug tree-optimization/112402] New: [11/12/13/14 Regression] Path splitting causes if-conversion miss pinskia at gcc dot gnu.org 2023-11-06 6:53 ` [Bug tree-optimization/112402] " pinskia at gcc dot gnu.org 2023-11-06 8:37 ` rguenth at gcc dot gnu.org @ 2023-11-07 3:27 ` pinskia at gcc dot gnu.org 2023-11-09 20:25 ` pinskia at gcc dot gnu.org 2024-03-07 21:03 ` law at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu.org @ 2023-11-07 3:27 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112402 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The orginal threads about patch splitting: https://gcc.gnu.org/legacy-ml/gcc/2015-03/msg00057.html https://gcc.gnu.org/pipermail/gcc/2015-May/217495.html > or axe path splitting or move it to RTL Jeff had a similar idea back in 2016 (I would assume while he was looking into PR 68541): https://gcc.gnu.org/pipermail/gcc-patches/2016-February/441651.html : ``` And if that's the case, then we may really be looking at something that belongs at the RTL level rather than at the tree/gimple level. Sadly, it's harder to do things like duplicate blocks at the RTL level. ``` and also mentioned in (which was the heustrics added to fix PR 68541): https://gcc.gnu.org/pipermail/gcc-patches/2016-February/441841.html Maybe this is something for GCC 15 ... to move to this to RTL right during the loop optimization phase after pass_rtl_doloop. There is still a CSE and DSE/DCE passes afterwards too. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/112402] [11/12/13/14 Regression] Path splitting causes if-conversion miss 2023-11-06 6:53 [Bug tree-optimization/112402] New: [11/12/13/14 Regression] Path splitting causes if-conversion miss pinskia at gcc dot gnu.org ` (2 preceding siblings ...) 2023-11-07 3:27 ` pinskia at gcc dot gnu.org @ 2023-11-09 20:25 ` pinskia at gcc dot gnu.org 2024-03-07 21:03 ` law at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu.org @ 2023-11-09 20:25 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112402 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org Last reconfirmed| |2023-11-09 Ever confirmed|0 |1 --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I have a patch which moves split paths to RTL like it should be. Waiting on legal though. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/112402] [11/12/13/14 Regression] Path splitting causes if-conversion miss 2023-11-06 6:53 [Bug tree-optimization/112402] New: [11/12/13/14 Regression] Path splitting causes if-conversion miss pinskia at gcc dot gnu.org ` (3 preceding siblings ...) 2023-11-09 20:25 ` pinskia at gcc dot gnu.org @ 2024-03-07 21:03 ` law at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: law at gcc dot gnu.org @ 2024-03-07 21:03 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112402 Jeffrey A. Law <law at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P2 CC| |law at gcc dot gnu.org ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-03-07 21:03 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-11-06 6:53 [Bug tree-optimization/112402] New: [11/12/13/14 Regression] Path splitting causes if-conversion miss pinskia at gcc dot gnu.org 2023-11-06 6:53 ` [Bug tree-optimization/112402] " pinskia at gcc dot gnu.org 2023-11-06 8:37 ` rguenth at gcc dot gnu.org 2023-11-07 3:27 ` pinskia at gcc dot gnu.org 2023-11-09 20:25 ` pinskia at gcc dot gnu.org 2024-03-07 21:03 ` 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).