https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59124

--- Comment #33 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to baoshan from comment #32)
> And I think it is not wrong, it's just inaccurate, and it is not making any
> wrong result in running time.
> 
> Can you point me how to proceed?

To be honest, I don't know, since neither loop-unrolling nor VRP are my
speciality. If you can figure out how the estimate can be improved in cunrolli,
that would be great. There are some functions called after that point that seem
to attempt to provide a more accurate estimate. One would need to go through
them carefully in GDB and find out why they fail. 

If itl cannot be fixed here, the info about valid ranges is still inaccurate,
that is, the loop may be unrolled into 6 iterations, but only 4 are ever
executed. There must be a way to teach VRP that this is the case and mark the
blocks as unreachable.

I hope other more knowledgeable devs will chime in, I'm out of ideas.

Reply via email to