Page MenuHomePhabricator

[SelectionDAG] When splitting scatter nodes during DAGCombine, create a serial chain dependency.

Authored by craig.topper on Aug 7 2018, 12:16 AM.



Scatter could have multiple identical indices. We need to maintain sequential order. We get this right in LegalizeVectorTypes, but not in this code.

Diff Detail


Event Timeline

craig.topper created this revision.Aug 7 2018, 12:16 AM
craig.topper added inline comments.Aug 7 2018, 12:19 AM
7426 ↗(On Diff #159457)

I removed the AddToWorklist calls because the worklist code in the DAGCombiner ensure all operands of visited nodes have been added to worklist. So we return Hi, which should get added to the worklist and then visited. Lo is an operand of Hi due to the chain so it should get added to the worklist then.

delena accepted this revision.Aug 7 2018, 12:50 AM

Yes. The scatter operation should be in-order after split.

This revision is now accepted and ready to land.Aug 7 2018, 12:50 AM
This revision was automatically updated to reflect the committed changes.