[Bug tree-optimization/102131] [12 Regression] wrong code at -O1 and above on x86_64-linux-gnu since r12-3136

2022-01-24 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102131 Hongtao.liu changed: What|Removed |Added CC||crazylht at gmail dot com --- Comment

[Bug tree-optimization/102131] [12 Regression] wrong code at -O1 and above on x86_64-linux-gnu since r12-3136

2022-01-24 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102131 Richard Biener changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug tree-optimization/102131] [12 Regression] wrong code at -O1 and above on x86_64-linux-gnu since r12-3136

2022-01-24 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102131 --- Comment #11 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:f1af8528d34418bc874ae9d993ee0dc3559972d2 commit r12-6844-gf1af8528d34418bc874ae9d993ee0dc3559972d2 Author: Richard Biener Date:

[Bug tree-optimization/102131] [12 Regression] wrong code at -O1 and above on x86_64-linux-gnu since r12-3136

2022-01-24 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102131 --- Comment #10 from Richard Biener --- *** Bug 102636 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/102131] [12 Regression] wrong code at -O1 and above on x86_64-linux-gnu since r12-3136

2021-12-15 Thread zhendong.su at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102131 --- Comment #9 from Zhendong Su --- Perhaps the following is due to the same root cause? [558] % gcctk -O0 small.c; ./a.out [559] % gcctk -O1 small.c; ./a.out Aborted [560] % cat small.c int a; int main() { unsigned b = 0; for (a = 2; a <

[Bug tree-optimization/102131] [12 Regression] wrong code at -O1 and above on x86_64-linux-gnu since r12-3136

2021-11-15 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102131 --- Comment #8 from Jiu Fu Guo --- (In reply to Jakub Jelinek from comment #7) > Any further progress on this? Thanks, Jabkub! There is a patch that may cover more cases (PR102636/PR100740.. and other cases where 'vi0.step - iv1.step > 0'),

[Bug tree-optimization/102131] [12 Regression] wrong code at -O1 and above on x86_64-linux-gnu since r12-3136

2021-11-15 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102131 --- Comment #7 from Jakub Jelinek --- Any further progress on this?

[Bug tree-optimization/102131] [12 Regression] wrong code at -O1 and above on x86_64-linux-gnu

2021-09-02 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102131 --- Comment #6 from Jiu Fu Guo --- Drafted a patch as below. With this patch, those cases can pass. diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c index 7af92d1c893..a400c42919b 100644 --- a/gcc/tree-ssa-loop-niter.c +++

[Bug tree-optimization/102131] [12 Regression] wrong code at -O1 and above on x86_64-linux-gnu

2021-09-01 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102131 --- Comment #5 from Jiu Fu Guo --- (In reply to bin cheng from comment #4) > (In reply to Jiu Fu Guo from comment #3) > > The issue may come from 'iv0 cmp iv1' transform: > > > >if (c > -->if (c>=b) in-loop > > -->if (b<=c) in-loop > > >

[Bug tree-optimization/102131] [12 Regression] wrong code at -O1 and above on x86_64-linux-gnu

2021-08-31 Thread amker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102131 --- Comment #4 from bin cheng --- (In reply to Jiu Fu Guo from comment #3) > The issue may come from 'iv0 cmp iv1' transform: > >if (c -->if (c>=b) in-loop > -->if (b<=c) in-loop > > c: {4, +, 3} > b: {1, +, 1} > > if ({1, +, 1} <=

[Bug tree-optimization/102131] [12 Regression] wrong code at -O1 and above on x86_64-linux-gnu

2021-08-31 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102131 --- Comment #3 from Jiu Fu Guo --- The issue may come from 'iv0 cmp iv1' transform: if (cif (c>=b) in-loop -->if (b<=c) in-loop c: {4, +, 3} b: {1, +, 1} if ({1, +, 1} <= {4, +, 3}) ==> if ({1,+,-2} <= {4,+,0}) here, error

[Bug tree-optimization/102131] [12 Regression] wrong code at -O1 and above on x86_64-linux-gnu

2021-08-31 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102131 --- Comment #2 from Jiu Fu Guo --- Thank you! For this case, there are two exits, and through these two exits, different niters(number of iterations) are calculated. It fails to handle this kind of case well. In ivcanon pass, the edge on the

[Bug tree-optimization/102131] [12 Regression] wrong code at -O1 and above on x86_64-linux-gnu

2021-08-30 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102131 Jakub Jelinek changed: What|Removed |Added Ever confirmed|0 |1 CC|