[Bug tree-optimization/59660] We fail to optimize common boolean checks pre-inlining

2024-09-30 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59660 --- Comment #18 from Andrew Pinski --- (In reply to Andrew Pinski from comment #17) > I have a phiopt change which allows us now to optimize this in phiopt2 (and > get the tail call in tailr2). phiprop should do it instead of phiopt ...

[Bug tree-optimization/59660] We fail to optimize common boolean checks pre-inlining

2023-08-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59660 --- Comment #17 from Andrew Pinski --- (In reply to Andrew Pinski from comment #12) > (In reply to Jan Hubicka from comment #4) > > > Not all testcases can be handled at gimplification time IIRC. Which > > > means "testcases welcome" first, so w

[Bug tree-optimization/59660] We fail to optimize common boolean checks pre-inlining

2023-06-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59660 --- Comment #16 from Andrew Pinski --- (In reply to Andrew Pinski from comment #15) > (In reply to Andrew Pinski from comment #13) > > Using the C front-end we still have a casting issue. > > There are a few issues of even for the C++ front-end

[Bug tree-optimization/59660] We fail to optimize common boolean checks pre-inlining

2023-04-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59660 --- Comment #15 from Andrew Pinski --- (In reply to Andrew Pinski from comment #13) > Using the C front-end we still have a casting issue. There are a few issues of even for the C++ front-end IR: In phiopt1 we have: if (n_6(D) == m_7(D)) g

[Bug tree-optimization/59660] We fail to optimize common boolean checks pre-inlining

2023-04-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59660 Andrew Pinski changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org

[Bug tree-optimization/59660] We fail to optimize common boolean checks pre-inlining

2021-09-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59660 --- Comment #13 from Andrew Pinski --- This has been fixed at r12-2039-gcd48e550d1dc583, if we use the C++ front-end. Using the C front-end we still have a casting issue.

[Bug tree-optimization/59660] We fail to optimize common boolean checks pre-inlining

2021-06-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59660 Andrew Pinski changed: What|Removed |Added Keywords||missed-optimization Last reconfirmed|2

[Bug tree-optimization/59660] We fail to optimize common boolean checks pre-inlining

2014-01-09 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59660 --- Comment #11 from Jan Hubicka --- > > case INTEGER_TYPE: case ENUMERAL_TYPE: case BOOLEAN_TYPE: > > case OFFSET_TYPE: > > + if (TREE_CODE (arg) == TRUTH_ORIF_EXPR) > > + return fold_build2_loc (loc, TRUTH_ORIF_EXPR, type, TREE_

[Bug tree-optimization/59660] We fail to optimize common boolean checks pre-inlining

2014-01-09 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59660 --- Comment #10 from Richard Biener --- (In reply to Jan Hubicka from comment #9) > Hi, > this patch solves the testcase. > The first hunk gets rid of the redundant NOP_EXPR converting TRUTH_EXPR from > INT to BOOL. The second improves gimplifier

[Bug tree-optimization/59660] We fail to optimize common boolean checks pre-inlining

2014-01-08 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59660 --- Comment #9 from Jan Hubicka --- Hi, this patch solves the testcase. The first hunk gets rid of the redundant NOP_EXPR converting TRUTH_EXPR from INT to BOOL. The second improves gimplifier to not introduce unnecesary control flow. If this ap

[Bug tree-optimization/59660] We fail to optimize common boolean checks pre-inlining

2014-01-08 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59660 --- Comment #8 from Jan Hubicka --- Fe produces: unit size align 32 symtab 0 alias set -1 canonical type 0x76ede690 precision 32 min max pointer_to_this > side-effects arg 0 unit size

[Bug tree-optimization/59660] We fail to optimize common boolean checks pre-inlining

2014-01-08 Thread rguenther at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59660 --- Comment #7 from rguenther at suse dot de --- On Wed, 8 Jan 2014, hubicka at ucw dot cz wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59660 > > --- Comment #6 from Jan Hubicka --- > > That's only optimizable after the 'mergephi' pass.

[Bug tree-optimization/59660] We fail to optimize common boolean checks pre-inlining

2014-01-08 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59660 --- Comment #6 from Jan Hubicka --- > That's only optimizable after the 'mergephi' pass. Before the > temporary setting is shared by the n==m code. Thus maybe > 'mergephi' itself can handle this ... Yep, mergephi seems like resonable place (at

[Bug tree-optimization/59660] We fail to optimize common boolean checks pre-inlining

2014-01-07 Thread rguenther at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59660 --- Comment #5 from rguenther at suse dot de --- On Tue, 7 Jan 2014, hubicka at ucw dot cz wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59660 > > --- Comment #4 from Jan Hubicka --- > > Not all testcases can be handled at gimplification

[Bug tree-optimization/59660] We fail to optimize common boolean checks pre-inlining

2014-01-07 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59660 --- Comment #4 from Jan Hubicka --- > Not all testcases can be handled at gimplification time IIRC. Which > means "testcases welcome" first, so we can look at them individually. The GCC one I saw was equivalent of: #include bool m_is_less_than_

[Bug tree-optimization/59660] We fail to optimize common boolean checks pre-inlining

2014-01-07 Thread rguenther at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59660 --- Comment #3 from rguenther at suse dot de --- On Tue, 7 Jan 2014, hubicka at ucw dot cz wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59660 > > --- Comment #2 from Jan Hubicka --- > > I have noticed these, too (-Og is pessimzed by the

[Bug tree-optimization/59660] We fail to optimize common boolean checks pre-inlining

2014-01-07 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59660 --- Comment #2 from Jan Hubicka --- > I have noticed these, too (-Og is pessimzed by them). The pattern is > generated > by gimplifying. I wondered why we can't simply update gimplifier to not produce them? (this is what I wanted to look into t

[Bug tree-optimization/59660] We fail to optimize common boolean checks pre-inlining

2014-01-07 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59660 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug tree-optimization/59660] We fail to optimize common boolean checks pre-inlining

2014-01-02 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59660 Jan Hubicka changed: What|Removed |Added CC||hubicka at gcc dot gnu.org,