[PATCH] D83561: [ScheduleDAG] Move DBG_VALUEs after first term forward.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 13 12:37:45 PDT 2020
fhahn marked an inline comment as done.
fhahn added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp:1037-1039
+ // In some cases, DBG_VALUEs might be inserted after the first terminator,
+ // which results in an invalid MBB. If that happens, move the DBG_VALUEs
+ // before the first terminator.
----------------
paquette wrote:
> Does this ever happen with anything other than tail calls?
I am not sure. I think the reason this happens here is that the instruction with the debug value attached (the `sdiv`) gets folded with the return instruction into `TCRETURNdi` during SelectionDAG. And now the DBG_VALUE is attached to the TCRETURN.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83561/new/
https://reviews.llvm.org/D83561
More information about the llvm-commits
mailing list