[all-commits] [llvm/llvm-project] f15c60: [UpdateTestChecks] Auto-generate stub bodies for u...

Mircea Trofin via All-commits all-commits at lists.llvm.org
Thu May 26 10:34:16 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f15c60218d5c88c9f32942bce119e7ac25cb6d73
      https://github.com/llvm/llvm-project/commit/f15c60218d5c88c9f32942bce119e7ac25cb6d73
  Author: Mircea Trofin <mtrofin at google.com>
  Date:   2022-05-26 (Thu, 26 May 2022)

  Changed paths:
    M llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/amdgpu_no_merge_comments.ll.expected
    A llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/common-label-different-bodies-1-next.ll
    M llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/common-label-different-bodies-1.ll
    M llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/common-label-different-bodies-2.ll
    M llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/common-label-different-bodies-3.ll
    A llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/redundant-and-unmatching-prefixes.ll
    M llvm/test/tools/UpdateTestChecks/update_llc_test_checks/common-label-different-bodies.test
    M llvm/test/tools/UpdateTestChecks/update_llc_test_checks/prefix-never-matches.test
    A llvm/test/tools/UpdateTestChecks/update_llc_test_checks/redundant-and-unmatched-prefixes.test
    M llvm/utils/UpdateTestChecks/asm.py
    M llvm/utils/UpdateTestChecks/common.py
    M llvm/utils/UpdateTestChecks/isel.py
    M llvm/utils/update_cc_test_checks.py
    M llvm/utils/update_llc_test_checks.py

  Log Message:
  -----------
  [UpdateTestChecks] Auto-generate stub bodies for unused prefixes

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".

Differential Revision: https://reviews.llvm.org/D124306




More information about the All-commits mailing list