This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Fix incorrect policy implement for unmasked vslidedown and vslideup.
ClosedPublic

Authored by khchen on Apr 21 2022, 9:57 AM.

Details

Summary

vslideup works by leaving elements 0<i<OFFSET undisturbed.
so it need the destination operand as input for correctness
regardless of policy. Add a operand to indicate policy.

We also add policy operand for unmaksed vslidedown to keep the interface consistent with vslideup
because vslidedown have only undisturbed at 0<i<vstart but user have no way to control of vstart.

Diff Detail

Event Timeline

khchen created this revision.Apr 21 2022, 9:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 21 2022, 9:57 AM
khchen requested review of this revision.Apr 21 2022, 9:57 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 21 2022, 9:57 AM

The intrinsic interface doesn't care about 0<i<vstart for slidedown. We don't give user control of vstart. Nearly every instruction is undisturbed for 0<i<vstart.

But having said that it probably makes sense to keep the vslideup/down interface the same.

khchen edited the summary of this revision. (Show Details)EditedApr 21 2022, 10:00 PM

The intrinsic interface doesn't care about 0<i<vstart for slidedown. We don't give user control of vstart. Nearly every instruction is undisturbed for 0<i<vstart.

But having said that it probably makes sense to keep the vslideup/down interface the same.

Yes I know, but I didn't clarify that in comment, thanks for your advice.

khchen updated this revision to Diff 424517.Apr 22 2022, 10:08 AM
khchen edited the summary of this revision. (Show Details)

update clang tests.

rogfer01 accepted this revision.Apr 25 2022, 3:23 AM

LGTM. Thanks @khchen !

This revision is now accepted and ready to land.Apr 25 2022, 3:23 AM
This revision was landed with ongoing or failed builds.Apr 25 2022, 9:20 AM
This revision was automatically updated to reflect the committed changes.