This is an archive of the discontinued LLVM Phabricator instance.

[LegalizeTypes] Support promotion for vp bitmanip sdnodes.
ClosedPublic

Authored by fakepaper56 on Aug 10 2023, 5:33 AM.

Details

Summary

This support promotion for vp.bitreverse/bswap/ctlz/ctlz_zero_undef/cttz/cttz_zero_undef/ctpop/fshr/fshl.

Diff Detail

Event Timeline

fakepaper56 created this revision.Aug 10 2023, 5:33 AM
fakepaper56 requested review of this revision.Aug 10 2023, 5:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 10 2023, 5:33 AM
luke accepted this revision.Aug 10 2023, 7:22 AM

LGTM. As a side note, there's a lot of duplication between the VP and non-VP nodes here. I wonder if it's time to introduce some sort of helper/abstraction for it

llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
536

Nit: Should we use EVL instead of VL since it's more VP specific?

This revision is now accepted and ready to land.Aug 10 2023, 7:22 AM

Rename VL to EVL.

As a side note, there's a lot of duplication between the VP and non-VP nodes here. I wonder if it's time to introduce some sort of helper/abstraction for it.

I agree we may try to introduce MatchContext in DAGCombiner or similar patterns to here now.

This revision was landed with ongoing or failed builds.Aug 10 2023, 5:27 PM
This revision was automatically updated to reflect the committed changes.