[PATCH] D73339: [RISCV] Compress instructions based on function features

Luís Marques via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 12 05:54:40 PST 2020


luismarques added a comment.

In D73339#1869058 <https://reviews.llvm.org/D73339#1869058>, @simoncook wrote:

> As for testing this, it feels a shame to have to duplicate testcases like I have with `compress.ll`  to cover both cases. Does it make sense to extend the `ForceFunctionAttrsPass` to add target-features to all functions, in which case we can have just one test case and check both ways of having attributes set? (unless anyone knows any other way we can minimize test duplication?)


It may be a bit of a hacky solution, but how about this? You keep one test file, add the attribute group references to the test functions, but don't add the attribute group definition to the source. Then in the RUN lines you `cat` the test source together with either an empty attribute group (the original tests) or the one with the target features.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73339/new/

https://reviews.llvm.org/D73339





More information about the llvm-commits mailing list