Currently, when GVN creates a load and when InstCombine creates a new store for unreachable Load, the DebugLoc info gets lost.
Details
Details
Diff Detail
Diff Detail
Event Timeline
| lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp | ||
|---|---|---|
| 988–991 | Also, I'm a little confused why you need to preserve the debug location of a block you're going to wipe out shortly after? (i.e. after SimplifyCFG will run again). | |
Comment Actions
updated with testcase.
| lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp | ||
|---|---|---|
| 988–991 | we have an internal pass that will report potentially invalid memory accesses. | |
| test/Transforms/GVN/PRE/2017-06-28-pre-load-dbgloc.ll | ||
|---|---|---|
| 68–75 | Do you need all this? probably the testcase can be simplified a bit. | |
Also, I'm a little confused why you need to preserve the debug location of a block you're going to wipe out shortly after? (i.e. after SimplifyCFG will run again).