Scatter could have multiple identical indices. We need to maintain sequential order. We get this right in LegalizeVectorTypes, but not in this code.
|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.