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

--- Comment #18 from rguenther at suse dot de <rguenther at suse dot de> ---
On Thu, 17 Oct 2019, jakub at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90231
> 
> --- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> Sure, the debug stmts should not have any effect on code generation.  I admit 
> I
> don't know much about ivopts implementation, but either when you are rewriting
> stmts containing uses of the IV being replaced by some other IV, don't you 
> know
> an IV from the same class already and similarly to how the replacement is done
> for those, you'd tweak debug stmts too?

Yes, I think the key is to not try generate debug stmts at the original
definitions of the IV we remove but to generate debug stmts for the
original IV _uses_ at the use stmt and express the original IV in
the IV we chose as replacement.  Simply because that one is known
to be available at this point and because that gives a natural
candidate to express the old IV with.

Reply via email to