This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add tests for SHFLI and UNSHFLI aliases in Zbp extension
ClosedPublic

Authored by Jimerlife on Feb 17 2022, 12:49 AM.

Details

Summary

Supplement tests alias of SHFLI and UNSHFLI instructions.
RV32:
zip8/zip4/zip2/unzip8/unzip4/unzip2 aliases

RV64:
zip8.w/zip4.w/zip2.w/zip.w/zip8/zip4/zip2/zip/unzip8.w/unzip4.w/unzip2.w/unzip.w/unzip8/unzip4/unzip2/unzip aliases

Diff Detail

Event Timeline

Jimerlife created this revision.Feb 17 2022, 12:49 AM
Jimerlife requested review of this revision.Feb 17 2022, 12:49 AM

add tests of i32 value type for RV64

Why test zip8 and zip8.w with RV64, but not RV32?

llvm/test/CodeGen/RISCV/rv64zbp-intrinsic.ll
133

zip8.w/unzip8.w isn't listed in the patch description

135

zip8.w is 8 not 24 right? I think type legalization is masking it off by adding with 0xf?

Jimerlife edited the summary of this revision. (Show Details)
  1. add zip8/unzip8 for RV32
  2. update zip8.w/unzip8.w for Rv64
  3. undate description of this patch
Jimerlife marked an inline comment as done.Feb 20 2022, 11:27 PM

Why test zip8 and zip8.w with RV64, but not RV32?

I found test of zip8 in rv32zbp.ll, so I didn't add this test. But now I also add zip8/unzip8 tests in rv32zbp-intrinsic.ll.

llvm/test/CodeGen/RISCV/rv64zbp-intrinsic.ll
135

yes, zip8.w is 8. I updated this test.

Jimerlife edited the summary of this revision. (Show Details)Feb 20 2022, 11:28 PM
This revision is now accepted and ready to land.Feb 20 2022, 11:43 PM