[PATCH] D124306: [UpdateTestChecks] Auto-generate stub bodies for conflicting outputs

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 22 15:06:11 PDT 2022


mtrofin created this revision.
mtrofin added reviewers: RKSimon, lebedev.ri, MaskRay, probinson, nikic, xbolva00.
Herald added subscribers: StephenFan, kerbowa, pengfei, arichardson, jvesely.
Herald added a project: All.
mtrofin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This is scoped to autogenerated tests.

The goal is to support having each RUN line specify a list of
check-prefixes where one can specify potentially redundant prefixes. For example,
for X86, if one specified prefixes for  both AVX1 and AVX2, and the codegen happened to
match today, one of the prefixes would be used and the onther one not.
If the unused prefix were dropped, and later, codegen differences were
introduced, one would have to go figure out where to add what prefix
(paraphrasing
https://lists.llvm.org/pipermail/llvm-dev/2021-February/148326.html)

To avoid getting errors due to unused prefixes, whole directories can be
opted out (as discussed on that thread), but that means that tests that
aren't autogenerated in such directories could have undetected unused
prefix bugs.

This patch proposes an alternative that both avoids the above, dir-level
optout, and supports the main autogen scenario discussed first. The autogen
tool appends at the end of the test file the list of unused prefixes,
together with a note explaining that is the case. Each prefix is set up
to always pass.

This way, unexpected unused prefixes are easily discoverable, and
expected cases "just work".


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124306

Files:
  llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/amdgpu_no_merge_comments.ll.expected
  llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/redundant-and-unmatching-prefixes.ll
  llvm/test/tools/UpdateTestChecks/update_llc_test_checks/common-label-different-bodies.test
  llvm/test/tools/UpdateTestChecks/update_llc_test_checks/prefix-never-matches.test
  llvm/test/tools/UpdateTestChecks/update_llc_test_checks/redundant-and-unmatched-prefixes.test
  llvm/utils/UpdateTestChecks/asm.py
  llvm/utils/UpdateTestChecks/common.py
  llvm/utils/UpdateTestChecks/isel.py
  llvm/utils/update_llc_test_checks.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124306.424627.patch
Type: text/x-patch
Size: 13650 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220422/2d602aba/attachment.bin>


More information about the llvm-commits mailing list