[PATCH] D75173: [Transform][MemCpyOpt] Add missing DebugLoc to %tmpbitcast
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 27 16:38:23 PST 2020
vsk added a comment.
@Pierre-vh you can run `opt` with `-debug-pass=Structure` to see what it's doing. In this case, it's stripping out all the debug metadata right before printing module IR:
ModulePass Manager
FunctionPass Manager
[snip ...]
Attach debug info to a function
Phi Values Analysis
Memory Dependence Analysis
MemCpy Optimization
Check debug info from -debugify-function
Attach debug info to a function
Module Verifier
Check debug info from -debugify-function
Print Module IR
So that's why the 'CHECK' line doesn't match !dbg, it got stripped out. If you change your RUN line to do `opt -instcombine -debugify -memcpyopt -check-debugify`, opt will produce IR you can write a positive test against.
As for reducing the test, you can try to find a simpler way to trigger this code path in MemCpyOpt. llvm/test/Transforms/MemCpyOpt/memcpy.ll has lots of tidy examples, perhaps running one of those examples through -debugify-each would hit the same bug.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75173/new/
https://reviews.llvm.org/D75173
More information about the llvm-commits
mailing list