[ISel] Fix DAG divergence after new FMA combine
D132837 introduced a new DAG combine that used MorphNodeTo to morph an FMUL into an FMA. It turns out that MorphNodeTo does not properly update the divergence bit for users of the morphed node, causing an assertion failure on the new test case: llc: SelectionDAG.cpp:10486: void llvm::SelectionDAG::VerifyDAGDivergence(): Assertion `calculateDivergence(N) == N->isDivergent() && "Divergence bit inconsistency detected"' failed. Fixing MorphNodeTo to propagate the divergence bit is tricky because of the way it is used to select machine instructions, so use getNode and ReplaceAllUsesOfValueWith instead. Differential Revision: https://reviews.llvm.org/D134810
parent
2ad41f97
Please register or sign in to comment