This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Support vscale intrinsic and ISDNode.
AbandonedPublic

Authored by HsiangKai on Jan 5 2021, 6:51 PM.

Details

Summary

In RISC-V, we have VLENB register to know the real vector size at run time. vscale is the run time constant in LLVM to know the factor in the scalable vector types. We could use VLENB to get vscale value in LLVM.

Diff Detail

Event Timeline

HsiangKai created this revision.Jan 5 2021, 6:51 PM
HsiangKai requested review of this revision.Jan 5 2021, 6:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 5 2021, 6:51 PM
Herald added a subscriber: MaskRay. · View Herald Transcript
craig.topper added inline comments.Jan 5 2021, 7:51 PM
llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
2330

I think int_vscale becomes (vscale 1) in SelectionDAGBuilder so we can probably drop this pattern?

HsiangKai updated this revision to Diff 314811.Jan 5 2021, 11:38 PM
HsiangKai marked an inline comment as done.
HsiangKai abandoned this revision.Jan 7 2021, 6:58 AM