[llvm] [DebugInfo][LoopIdiomRecognize] Fix #82582: Wrong debug location update in processLoopStoreOfLoopLoad (PR #82608)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 26 12:01:46 PST 2024


dwblaikie wrote:

Do we not have any instructions in the loop preheader we could use as the location for this instruction?

So we looked at a loop, and realized we could map it to a memcpy - I guess not all cases have any instructions in the preheader? (eg: `void f(char* a, char* b) { for (;*a; ++a, ++b) { *b = *a; }` or something, where there's no initial `a = &some_stuff` or equivalent) In the case where there is a preheader/initialization, perhaps we should use that location?

Otherwise removing the location is fine/necessary, and we'd still probably get a "flow on" location which might be usable enough.

https://github.com/llvm/llvm-project/pull/82608


More information about the llvm-commits mailing list