This is an archive of the discontinued LLVM Phabricator instance.

[RISCV][NFC] Improve encoding/decoding tests for Zbb instructions
ClosedPublic

Authored by RamNalamothu on Jun 12 2023, 12:47 AM.

Details

Summary

Currently llvm/test/MC/RISCV/rv64zbb-valid.s doesn't cover all
the instructions e.g. maxu and llvm/test/MC/RISCV/rv32zbb-valid.s
can have rv64 run lines, similar to what Zba instruction tests have.

This patch does the following.

  • Add rv64 run lines in llvm/test/MC/RISCV/rv32zbb-valid.s
  • Keep only rv64 specific instructions in llvm/test/MC/RISCV/rv64zbb-valid.s
  • Move rv32 instructions, with different encodings from rv64, into llvm/test/MC/RISCV/rv32zbb-only-valid.s

Diff Detail

Event Timeline

RamNalamothu created this revision.Jun 12 2023, 12:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 12 2023, 12:47 AM
RamNalamothu requested review of this revision.Jun 12 2023, 12:47 AM
asb accepted this revision.Jun 13 2023, 2:11 AM

LGTM, modulo one minor tweak to the rori on RV64 test.

llvm/test/MC/RISCV/rv64zbb-valid.s
13

It would make sense to test the wider shift amount supported on RV64 here

This revision is now accepted and ready to land.Jun 13 2023, 2:11 AM

Test the wider 6-bit shift amount for rori on RV64.

RamNalamothu marked an inline comment as done.Jun 13 2023, 3:20 AM
This revision was landed with ongoing or failed builds.Jun 13 2023, 7:48 AM
This revision was automatically updated to reflect the committed changes.