This is an archive of the discontinued LLVM Phabricator instance.

[RISCV][NFC] Fix RVV intrinsic tests.
ClosedPublic

Authored by khchen on Mar 22 2021, 8:42 AM.

Details

Summary
  1. Skip the temporary file
  2. Test cc1 with -S to verify codegen work well. Add '-target-feature +m' because the backend requires it to calculate the vscaled size/offset.

Diff Detail

Event Timeline

khchen created this revision.Mar 22 2021, 8:42 AM
khchen requested review of this revision.Mar 22 2021, 8:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 22 2021, 8:42 AM
This revision is now accepted and ready to land.Mar 22 2021, 11:01 AM
This revision was automatically updated to reflect the committed changes.

Most likely because you're adding assembly tests in Clang, which won't work if the backend isn't present (and needs a REQUIRES line). Assembly tests in Clang are generally bad practice and best avoided for that reason. If you do want them it's probably best to split them out into their own tests so people can still run the frontend tests regardless.

Most likely because you're adding assembly tests in Clang, which won't work if the backend isn't present (and needs a REQUIRES line). Assembly tests in Clang are generally bad practice and best avoided for that reason. If you do want them it's probably best to split them out into their own tests so people can still run the frontend tests regardless.

@jrtc27 Thanks for point out the problem.
It seems ARM and PPC intrinsic did the same way too. (test assembly in clang with REQUIRES line)
I also feel it's not a good practice, but it's really helpful to find a frontend bug when generated intrinsic IR can not selected in the backend.
It also could help on point out the error if any intrinsic IR are changed.

Do you mean using the same file content in different file for different test purpose?