This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Remove zvk uimm constraints
ClosedPublic

Authored by 4vtomat on Jul 18 2023, 7:11 PM.

Details

Summary

Since the spec doesn't describe these behaviors as invalid,
the llvm-mc should just make them take care by hardware.

Diff Detail

Event Timeline

4vtomat created this revision.Jul 18 2023, 7:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 18 2023, 7:11 PM
4vtomat requested review of this revision.Jul 18 2023, 7:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 18 2023, 7:11 PM

LGTM, but I'll give others time to chime in.

asb added a comment.Jul 19 2023, 6:12 AM

This change overall looks good to me, but you should add additional lines to the ext-valid.s files so that we have test coverage for inputs using these immediates.

ego added a comment.Jul 19 2023, 7:14 AM

LGTM.
I was initially surprised however the current spec makes all values valid by prescribing how seemingly "out of range" immediate field values get re-interpreted as being in-range. This wasn't the case in early version of the spec.

Thanks for bringing the behavior in line with the spec.

Reverse ping. Can we get this updated and committed before the branch?

4vtomat updated this revision to Diff 543781.Jul 24 2023, 7:00 PM

Sorry for late update.
This update adds test case to zvkned.s and zvksed.s for more coverage as Alex mentioned.

This revision is now accepted and ready to land.Jul 24 2023, 7:18 PM
This revision was landed with ongoing or failed builds.Jul 25 2023, 3:45 AM
This revision was automatically updated to reflect the committed changes.
llvm/test/MC/RISCV/rvv/zvkned.s