mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-26 06:04:47 +00:00
Make it work for DAG combine of multi-value nodes.
llvm-svn: 30573
This commit is contained in:
parent
28d7124afb
commit
ce6a660148
@ -407,8 +407,13 @@ void DAGCombiner::Run(bool RunningAfterLegalize) {
|
|||||||
std::cerr << "\nWith: "; RV.Val->dump(&DAG);
|
std::cerr << "\nWith: "; RV.Val->dump(&DAG);
|
||||||
std::cerr << '\n');
|
std::cerr << '\n');
|
||||||
std::vector<SDNode*> NowDead;
|
std::vector<SDNode*> NowDead;
|
||||||
SDOperand OpV = RV;
|
if (N->getNumValues() == RV.Val->getNumValues())
|
||||||
DAG.ReplaceAllUsesWith(N, &OpV, &NowDead);
|
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
|
// Push the new node and any users onto the worklist
|
||||||
WorkList.push_back(RV.Val);
|
WorkList.push_back(RV.Val);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user