This is an archive of the discontinued LLVM Phabricator instance.

[LegalizeTypes][VP] Add widen and split support for vp.fptrunc and vp.fpext
ClosedPublic

Authored by Jimerlife on May 25 2022, 7:54 PM.

Details

Diff Detail

Event Timeline

Jimerlife created this revision.May 25 2022, 7:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2022, 7:54 PM
Jimerlife requested review of this revision.May 25 2022, 7:54 PM
frasercrmck accepted this revision.Jun 1 2022, 12:10 AM

LGTM. As pointed out I think WidenVecRes_Convert needs some extra attention to cover the missing cases for VP nodes, but we're already using it for VP_TRUNCATE so that could be done as a follow-up.

llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
3781

This is really nitpicky but why is VP_FP_EXTEND before FP_EXTEND but VP_FP_FOUND is after FP_FOUND?

3793

Looking at WidenVecRes_Convert it seems like it's possible VP operations to silently fall through some cracks we haven't covered. Should we add a few asserts to the cases we haven't handled? I'm thinking the scalar unroll code, which would silently drop the mask/evl (I think) and the case above it.

This revision is now accepted and ready to land.Jun 1 2022, 12:10 AM
Jimerlife updated this revision to Diff 434367.Jun 5 2022, 7:20 PM

address comment

Jimerlife added inline comments.Jun 5 2022, 7:22 PM
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
3781

Adjust VP_FP_EXTEND position

This revision was landed with ongoing or failed builds.Jun 5 2022, 7:28 PM
This revision was automatically updated to reflect the committed changes.