[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-04-29 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 Jonathan Wakely changed: What|Removed |Added CC||aaron at aarongraham dot com --- Comme

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-04-29 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 Jonathan Wakely changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-04-29 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 --- Comment #5 from Jonathan Wakely --- (In reply to Marc Glisse from comment #0) > For most comparisons @ we do optimize (i<=>0)@0 to just i@0, but not for > > and <=. Spaceship operator<=> is very painful to use, but I expect we will > end up s

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-04-29 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 Richard Biener changed: What|Removed |Added Known to work||11.1.0 --- Comment #6 from Richard Bien

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-04-29 Thread glisse at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 --- Comment #7 from Marc Glisse --- Some key steps in the optimization: PRE turns PHI<-1,0,1> > 0 into PHI<0,0,1> reassoc then combines the operations (it didn't in gcc-10) forwprop+phiopt cleans up (i>0)!=0?1:0 into just i>0. Having to wait unt

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-04-29 Thread glisse at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 --- Comment #8 from Marc Glisse --- PR96480 would be my guess.

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-04-29 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 --- Comment #9 from Jonathan Wakely --- (In reply to Richard Biener from comment #6) > Not sure what fixed it there. Seems to be r11-2593

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-04-29 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 --- Comment #10 from Jonathan Wakely --- (In reply to Marc Glisse from comment #8) > PR96480 would be my guess. Yes

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-04-29 Thread rguenther at suse dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 --- Comment #11 from rguenther at suse dot de --- On Thu, 29 Apr 2021, glisse at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 > > --- Comment #7 from Marc Glisse --- > Some key steps in the optimization: > PRE tu

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-04-29 Thread glisse at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 --- Comment #12 from Marc Glisse --- (In reply to rguent...@suse.de from comment #11) > For PR7 > I have prototyped a forwprop patch to try constant folding > stmts with all-constant PHIs, thus in this case c$_M_value_2 > 0, > when there's o

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-04-29 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 --- Comment #13 from Richard Biener --- Created attachment 50707 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50707&action=edit prototype For reference this is the prototype patch I mentioned. I wasn't entirely happy and wanted to explo

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-04-29 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 --- Comment #14 from Richard Biener --- #include bool k(int a, int b){ auto c = (a <=> b); return c>0; } Produces [local count: 1073741824]: if (a_1(D) == b_3(D)) goto ; [34.00%] else goto ; [66.00%] [local count: 708669

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-04-29 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #15

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-04-29 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 --- Comment #16 from Jakub Jelinek --- Writing a phiopt patch now.

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-04-29 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 --- Comment #17 from Jakub Jelinek --- Created attachment 50710 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50710&action=edit gcc12-pr94589-wip.patch WIP patch that just matches those spaceship comparisons followed by single use compari

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-04-30 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 Jakub Jelinek changed: What|Removed |Added Attachment #50710|0 |1 is obsolete|

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-05-03 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 Jakub Jelinek changed: What|Removed |Added Attachment #50719|0 |1 is obsolete|

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-05-06 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 --- Comment #20 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:ad96c867e173c1ebcfc201b201adac5095683a08 commit r12-559-gad96c867e173c1ebcfc201b201adac5095683a08 Author: Jakub Jelinek Date: Th

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-05-12 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 --- Comment #21 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:f5f1838435400b837c8677c53a611e2dc6d56442 commit r12-733-gf5f1838435400b837c8677c53a611e2dc6d56442 Author: Jakub Jelinek Date: We

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-05-18 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 --- Comment #22 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:65061ea287a80cfb214e402cfd2373a14bfec95a commit r12-864-g65061ea287a80cfb214e402cfd2373a14bfec95a Author: Jakub Jelinek Date: Tu

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-05-18 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 Jakub Jelinek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-05-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 --- Comment #24 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:2b536797f7e43c55072a3215735f5833f1d6d218 commit r12-935-g2b536797f7e43c55072a3215735f5833f1d6d218 Author: Jakub Jelinek Date: Th

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-05-21 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 --- Comment #25 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:f1c777f40aa0b6941efc7440495a8d7e0cc2a1bb commit r12-964-gf1c777f40aa0b6941efc7440495a8d7e0cc2a1bb Author: Jakub Jelinek Date: Fr

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-08-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |12.0

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2020-06-05 Thread khim at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 Victor Khimenko changed: What|Removed |Added CC||khim at google dot com --- Comment #2

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2020-04-14 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2023-09-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589 --- Comment #26 from Andrew Pinski --- Created attachment 55893 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55893&action=edit Here is my idea around the patch for prototype for doing the constant prop idea This is like the one in commen