This patch fixes the debug info handling for SelectionDAG legalization of DAG nodes with two results. When an replaced SDNode has more than one result, transferDbgValues was always copying the SDDbgValue from the first result and attaching them to all members. In reality SelectionDAG::ReplaceAllUsesWith() is given an array of SDNodes (though the type signature doesn't make this obvious (cf. the call site code in ReplaceNode()).
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
LGTM, possibly with an added assert. The test looks great!
lib/CodeGen/SelectionDAG/SelectionDAG.cpp | ||
---|---|---|
7793 | Should we assert the first requirement here, i.e From->getNumValues() == To->getNumValues()? |
Should we assert the first requirement here, i.e From->getNumValues() == To->getNumValues()?