This is an archive of the discontinued LLVM Phabricator instance.

[LegalizeTypes] Support widen result for VECTOR_REVERSE
ClosedPublic

Authored by Jimerlife on Aug 22 2022, 2:23 AM.

Details

Summary

Support widen result for VECTOR_REVERSE.
After widen and reverse, extract real value and fill undef value in the tail to build a new vector.

I am not sure if I should add widen vector_reverse result for fixed-vectors, because when I use llvm.experimental.vector.reverse for fixed-vectors it will become to vector_shuffle ISD node.

Diff Detail

Event Timeline

Jimerlife created this revision.Aug 22 2022, 2:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 22 2022, 2:23 AM
Jimerlife requested review of this revision.Aug 22 2022, 2:23 AM
craig.topper added inline comments.Aug 26 2022, 5:38 PM
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
5578

Can we use SHUFFLE_VECTOR here?

rebase and address comment

Jimerlife marked an inline comment as done.Aug 29 2022, 12:42 AM
Jimerlife added inline comments.
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
5578

Yes, we can use VECTOR_SHUFFLE here. Thanks for your suggestion.

This revision is now accepted and ready to land.Aug 29 2022, 10:26 AM
This revision was automatically updated to reflect the committed changes.
Jimerlife marked an inline comment as done.