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
- Repository
- rL LLVM
Event Timeline
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp | ||
---|---|---|
988–990 ↗ | (On Diff #104008) | 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–990 ↗ | (On Diff #104008) | 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 ↗ | (On Diff #104098) | Do you need all this? probably the testcase can be simplified a bit. |