[all-commits] [llvm/llvm-project] dd1cf3: [UTC] Precommit testcase for function definition l...

Jannik Silvanus via All-commits all-commits at lists.llvm.org
Tue Aug 29 07:40:33 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dd1cf3a9aa070101a92194fc4a3c1210c66817ca
      https://github.com/llvm/llvm-project/commit/dd1cf3a9aa070101a92194fc4a3c1210c66817ca
  Author: Jannik Silvanus <jannik.silvanus at amd.com>
  Date:   2023-08-29 (Tue, 29 Aug 2023)

  Changed paths:
    A llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/named_function_arguments_split.ll
    A llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/named_function_arguments_split.ll.expected
    A llvm/test/tools/UpdateTestChecks/update_test_checks/named_function_arguments_split.test

  Log Message:
  -----------
  [UTC] Precommit testcase for function definition line-splitting

Review of the actual change: https://reviews.llvm.org/D158497


  Commit: 998c323910134ba5e88046a7f52cc2100cf30282
      https://github.com/llvm/llvm-project/commit/998c323910134ba5e88046a7f52cc2100cf30282
  Author: Jannik Silvanus <jannik.silvanus at amd.com>
  Date:   2023-08-29 (Tue, 29 Aug 2023)

  Changed paths:
    M llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/named_function_arguments_split.ll.expected
    M llvm/test/tools/UpdateTestChecks/update_test_checks/named_function_arguments_split.test
    M llvm/utils/UpdateTestChecks/common.py

  Log Message:
  -----------
  [UTC] Keep function args parenthesis on label line (bumps version to 3)

If the function argument block contains patterns, we split argument
matching into a separate SAME line, because LABEL labels may not contain
pattern matches.

Until now, in this case we moved the parenthesis opening the argument block
into the second line.

This generates incorrect labels in case function names are not prefix-free.

For example, for a function `foo` we generated:

   CHECK-LABEL: foo
   CHECK-SAME: (<args of foo>)

If the output also contains a function `foo.specialzied`, then the label for
`foo` can match `foo.specialized`, depending on output order.

This patch moves opening parenthesis to the first line, breaking common prefixes:

   CHECK-LABEL: foo(
   CHECK-SAME: <args of foo>)

Bump the UTC version to 3, and only move the parenthesis for version 3 and later.

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


Compare: https://github.com/llvm/llvm-project/compare/4737f91353da...998c32391013


More information about the All-commits mailing list