Page MenuHomePhabricator

[RISCV] Add intrinsics for vlmul_ext and vlmul_trunc.
AbandonedPublic

Authored by craig.topper on Feb 24 2021, 5:23 PM.

Details

Summary

I believe the isel for these is identical to what we do for
INSERT_SUBVECTOR/EXTRACT_SUBVECTOR of scalable vectors. So
I've just lowered these directly to that.a

Though now that I've written that. Maybe we should just emit
‘llvm.experimental.vector.extract’ or ‘llvm.experimental.vector.insert’
when we process the builtin in the frontend?

Diff Detail

Event Timeline

craig.topper created this revision.Feb 24 2021, 5:23 PM
craig.topper requested review of this revision.Feb 24 2021, 5:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 24 2021, 5:23 PM
Herald added a subscriber: MaskRay. · View Herald Transcript
khchen accepted this revision.Feb 24 2021, 7:15 PM

LGTM.

Though now that I've written that. Maybe we should just emit
‘llvm.experimental.vector.extract’ or ‘llvm.experimental.vector.insert’
when we process the builtin in the frontend?

Agree, it makes sense to me.

This revision is now accepted and ready to land.Feb 24 2021, 7:15 PM

I think what you're proposing makes sense, but be aware we can't currently use these subvector intrinsics on RV32. I'm working on a patch to fix that.

I think what you're proposing makes sense, but be aware we can't currently use these subvector intrinsics on RV32. I'm working on a patch to fix that.

D97459 is that patch.

craig.topper abandoned this revision.Mar 4 2021, 9:19 AM

Abandoning because I think we can just use llvm.experimental.insert/extract