This is an archive of the discontinued LLVM Phabricator instance.

[RISCVInsertVSETVLI] Handle scalar extract (vmv.x.s, and vmx.f.s)
ClosedPublic

Authored by reames on Aug 15 2023, 8:44 AM.

Details

Summary

vmv.x.s and vmv.f.s are unconditional. They read the low element of a vector register (not vector group), and function even when VL=0 or VSTART>0. As such, they are don't care with respect to both VL and LMUL. (And also policy, but that should already be handled generically.)

We apparently never added these. As can be seen in the test diffs, these mostly show up when exploding a vector into a set of scalars.

Diff Detail

Event Timeline

reames created this revision.Aug 15 2023, 8:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 15 2023, 8:44 AM
reames requested review of this revision.Aug 15 2023, 8:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 15 2023, 8:44 AM
reames planned changes to this revision.Aug 15 2023, 9:21 AM

I realized there's a more general way to handle this...

reames updated this revision to Diff 550445.Aug 15 2023, 1:19 PM

Slightly more generic - some bits of the !hasVLOp path in vsetvli emission are still required to work around a limitation in the backwards walk. Going to take a fix at fixing that limitation in a following change.

This revision is now accepted and ready to land.Aug 15 2023, 8:04 PM
This revision was landed with ongoing or failed builds.Aug 16 2023, 7:51 AM
This revision was automatically updated to reflect the committed changes.