Clients of SelectionDAG::ReplaceAllUsesWith drop debug info, & are inconsistent #34686
Labels
bugzilla
Issues migrated from bugzilla
debuginfo
llvm:codegen
llvm:SelectionDAG
SelectionDAGISel as well
Extended Description
There are a few issues here:
CombineTo() calls ReplaceAllUsesWith(), which calls transferDbgValues(). If we assert that debug line/value information is preserved after the RAUW in CombineTo(), a bunch of tests fail.
Clients of transferDbgValues() pass it SDValues which are attached to SDNodes with invalidated debug info. It seems unfortunate that we'd even try to propagate invalid debug info.
One overload of ReplaceAllUsesWith(From, To) requires From != To, but another doesn't. This is partly annoying, but may also be masking correctness issues.
The text was updated successfully, but these errors were encountered: