mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-16 11:30:51 +00:00
Make it work for DAG combine of multi-value nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30573 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
649069728f
commit
2adffa1f66
@ -407,8 +407,13 @@ void DAGCombiner::Run(bool RunningAfterLegalize) {
|
||||
std::cerr << "\nWith: "; RV.Val->dump(&DAG);
|
||||
std::cerr << '\n');
|
||||
std::vector<SDNode*> NowDead;
|
||||
SDOperand OpV = RV;
|
||||
DAG.ReplaceAllUsesWith(N, &OpV, &NowDead);
|
||||
if (N->getNumValues() == RV.Val->getNumValues())
|
||||
DAG.ReplaceAllUsesWith(N, RV.Val, &NowDead);
|
||||
else {
|
||||
assert(N->getValueType(0) == RV.getValueType() && "Type mismatch");
|
||||
SDOperand OpV = RV;
|
||||
DAG.ReplaceAllUsesWith(N, &OpV, &NowDead);
|
||||
}
|
||||
|
||||
// Push the new node and any users onto the worklist
|
||||
WorkList.push_back(RV.Val);
|
||||
|
Loading…
Reference in New Issue
Block a user