https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102131
Hongtao.liu changed:
What|Removed |Added
CC||crazylht at gmail dot com
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102131
Richard Biener changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
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:
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. ***
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 <
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'),
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102131
--- Comment #7 from Jakub Jelinek ---
Any further progress on this?
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
+++
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
> >
>
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} <=
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
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102131
Jakub Jelinek changed:
What|Removed |Added
Ever confirmed|0 |1
CC|
13 matches
Mail list logo