This is an archive of the discontinued LLVM Phabricator instance.

[SDAG] Recursively legalize both vector mulo results
ClosedPublic

Authored by nikic on May 9 2019, 10:12 AM.

Details

Summary

Split out from D61692 per @RKSimon's suggestion. Vector op legalization will automatically recursively legalize the returned SDValue, but we need to take care of the other results ourselves. Otherwise it will end up getting legalized only during op legalization, by which point it might be too late (though I'm not aware of any specific cases right now).

There are codegen differences because expansion occurs earlier now and we don't get a DAGCombiner run in between.

Diff Detail

Repository
rL LLVM

Event Timeline

nikic created this revision.May 9 2019, 10:12 AM
nikic added a comment.May 9 2019, 11:01 AM

Vector op legalization will automatically recursively legalize the returned SDValue, but we need to take care of the other results ourselves.

After looking a bit more closely, the explicit calls to AddLegalizedOperand actually prevented recursive legalization of both results, not just one of them.

This revision is now accepted and ready to land.May 10 2019, 1:28 PM
This revision was automatically updated to reflect the committed changes.