[clang] 697bfa4 - Revert "[UpdateTestChecks] Match define for labels"

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 13 00:15:45 PST 2022


Author: Nikita Popov
Date: 2022-12-13T09:15:35+01:00
New Revision: 697bfa40a3f853d8b9103ead53cd80a4f7c5a7df

URL: https://github.com/llvm/llvm-project/commit/697bfa40a3f853d8b9103ead53cd80a4f7c5a7df
DIFF: https://github.com/llvm/llvm-project/commit/697bfa40a3f853d8b9103ead53cd80a4f7c5a7df.diff

LOG: Revert "[UpdateTestChecks] Match define for labels"

This reverts commit a888825aeef8d6592c6cf5f4e5854cc39af49633.

This changes the default output of UTC, and as such introduces
spurious changes whenever existing tests are regenerated.

I've indicated in https://reviews.llvm.org/D139006#3989954 how
this can be implemented without causing test churn.

Added: 
    

Modified: 
    clang/test/utils/update_cc_test_checks/Inputs/basic-cplusplus.cpp.expected
    clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.funcattrs.expected
    clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.plain.expected
    clang/test/utils/update_cc_test_checks/Inputs/def-and-decl.c.expected
    clang/test/utils/update_cc_test_checks/Inputs/exec-all-runlines.c.expected
    clang/test/utils/update_cc_test_checks/Inputs/explicit-template-instantiation.cpp.expected
    clang/test/utils/update_cc_test_checks/Inputs/generated-funcs-regex.c.expected
    clang/test/utils/update_cc_test_checks/Inputs/generated-funcs.c.generated.expected
    clang/test/utils/update_cc_test_checks/Inputs/generated-funcs.c.no-generated.expected
    clang/test/utils/update_cc_test_checks/Inputs/global-hex-value-regex.c.expected
    clang/test/utils/update_cc_test_checks/Inputs/global-value-regex.c.expected
    clang/test/utils/update_cc_test_checks/Inputs/ifdef.c.expected
    clang/test/utils/update_cc_test_checks/Inputs/mangled_names.c.expected
    clang/test/utils/update_cc_test_checks/Inputs/on_the_fly_arg_change.c.expected
    clang/test/utils/update_cc_test_checks/Inputs/replace-value-regex-across-runs.c.expected
    clang/test/utils/update_cc_test_checks/check-globals.test
    llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/argument_name_reuse.ll.plain.expected
    llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/basic.ll.expected
    llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/custom-tool.ll.expected
    llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll.generated.expected
    llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll.generated.globals.expected
    llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll.nogenerated.expected
    llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll.nogenerated.globals.expected
    llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs_prefix_reuse.ll.generated.expected
    llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs_prefix_reuse.ll.generated.globals.expected
    llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs_prefix_reuse.ll.nogenerated.expected
    llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs_prefix_reuse.ll.nogenerated.globals.expected
    llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/scrub_attrs.ll.plain.expected
    llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/scrub_attrs.ll.scrub.expected
    llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/sometimes_deleted_function.ll.expected
    llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.expected
    llvm/utils/UpdateTestChecks/common.py

Removed: 
    llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/define_after_call.ll
    llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/define_after_call.ll.expected
    llvm/test/tools/UpdateTestChecks/update_test_checks/define_after_call.test


################################################################################
diff  --git a/clang/test/utils/update_cc_test_checks/Inputs/basic-cplusplus.cpp.expected b/clang/test/utils/update_cc_test_checks/Inputs/basic-cplusplus.cpp.expected
index ccd308688374..6c7dd730e543 100644
--- a/clang/test/utils/update_cc_test_checks/Inputs/basic-cplusplus.cpp.expected
+++ b/clang/test/utils/update_cc_test_checks/Inputs/basic-cplusplus.cpp.expected
@@ -8,7 +8,7 @@ class Foo {
 public:
   explicit Foo(int x);
   ~Foo();
-// CHECK-LABEL: define {{[^@]+}}@_ZNK3Foo23function_defined_inlineEi(
+// CHECK-LABEL: @_ZNK3Foo23function_defined_inlineEi(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[THIS_ADDR:%.*]] = alloca %class.Foo*, align 8
 // CHECK-NEXT:    [[ARG_ADDR:%.*]] = alloca i32, align 4
@@ -27,7 +27,7 @@ public:
   inline int function_defined_out_of_line(int arg) const;
 };
 
-// CHECK-LABEL: define {{[^@]+}}@_ZN3FooC1Ei(
+// CHECK-LABEL: @_ZN3FooC1Ei(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[THIS_ADDR:%.*]] = alloca %class.Foo*, align 8
 // CHECK-NEXT:    [[X_ADDR:%.*]] = alloca i32, align 4
@@ -39,7 +39,7 @@ public:
 // CHECK-NEXT:    ret void
 //
 Foo::Foo(int x) : x(x) {}
-// CHECK-LABEL: define {{[^@]+}}@_ZN3FooD1Ev(
+// CHECK-LABEL: @_ZN3FooD1Ev(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[THIS_ADDR:%.*]] = alloca %class.Foo*, align 8
 // CHECK-NEXT:    store %class.Foo* [[THIS:%.*]], %class.Foo** [[THIS_ADDR]], align 8
@@ -48,7 +48,7 @@ Foo::Foo(int x) : x(x) {}
 // CHECK-NEXT:    ret void
 //
 Foo::~Foo() {}
-// CHECK-LABEL: define {{[^@]+}}@_ZNK3Foo28function_defined_out_of_lineEi(
+// CHECK-LABEL: @_ZNK3Foo28function_defined_out_of_lineEi(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[THIS_ADDR:%.*]] = alloca %class.Foo*, align 8
 // CHECK-NEXT:    [[ARG_ADDR:%.*]] = alloca i32, align 4
@@ -64,7 +64,7 @@ Foo::~Foo() {}
 int Foo::function_defined_out_of_line(int arg) const { return x - arg; }
 
 // Call the inline methods to ensure the LLVM IR is generated:
-// CHECK-LABEL: define {{[^@]+}}@main(
+// CHECK-LABEL: @main(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[F:%.*]] = alloca [[CLASS_FOO:%.*]], align 4
 // CHECK-NEXT:    call void @_ZN3FooC1Ei(%class.Foo* noundef nonnull align 4 dereferenceable(4) [[F]], i32 noundef 1)

diff  --git a/clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.funcattrs.expected b/clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.funcattrs.expected
index 9466caa3599b..1551438f3526 100644
--- a/clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.funcattrs.expected
+++ b/clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.funcattrs.expected
@@ -12,7 +12,7 @@ struct ST {
 };
 
 // CHECK: Function Attrs: mustprogress noinline nounwind optnone
-// CHECK-LABEL: define {{[^@]+}}@_Z3fooP2ST(
+// CHECK-LABEL: @_Z3fooP2ST(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[S_ADDR:%.*]] = alloca %struct.ST*, align 8
 // CHECK-NEXT:    store %struct.ST* [[S:%.*]], %struct.ST** [[S_ADDR]], align 8

diff  --git a/clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.plain.expected b/clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.plain.expected
index 8fa0bfc537c4..bb02b7ca9a8d 100644
--- a/clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.plain.expected
+++ b/clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.plain.expected
@@ -11,7 +11,7 @@ struct ST {
   struct RT Z;
 };
 
-// CHECK-LABEL: define {{[^@]+}}@_Z3fooP2ST(
+// CHECK-LABEL: @_Z3fooP2ST(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[S_ADDR:%.*]] = alloca %struct.ST*, align 8
 // CHECK-NEXT:    store %struct.ST* [[S:%.*]], %struct.ST** [[S_ADDR]], align 8

diff  --git a/clang/test/utils/update_cc_test_checks/Inputs/def-and-decl.c.expected b/clang/test/utils/update_cc_test_checks/Inputs/def-and-decl.c.expected
index ac768983f853..f73fdc730e10 100644
--- a/clang/test/utils/update_cc_test_checks/Inputs/def-and-decl.c.expected
+++ b/clang/test/utils/update_cc_test_checks/Inputs/def-and-decl.c.expected
@@ -6,7 +6,7 @@ int foo(int arg);
 
 void empty_function(void);
 
-// CHECK-LABEL: define {{[^@]+}}@main(
+// CHECK-LABEL: @main(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[RETVAL:%.*]] = alloca i32, align 4
 // CHECK-NEXT:    store i32 0, i32* [[RETVAL]], align 4
@@ -19,7 +19,7 @@ int main(void) {
   return foo(1);
 }
 
-// CHECK-LABEL: define {{[^@]+}}@foo(
+// CHECK-LABEL: @foo(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[ARG_ADDR:%.*]] = alloca i32, align 4
 // CHECK-NEXT:    store i32 [[ARG:%.*]], i32* [[ARG_ADDR]], align 4
@@ -30,7 +30,7 @@ int foo(int arg) {
   return arg;
 }
 
-// CHECK-LABEL: define {{[^@]+}}@empty_function(
+// CHECK-LABEL: @empty_function(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret void
 //

diff  --git a/clang/test/utils/update_cc_test_checks/Inputs/exec-all-runlines.c.expected b/clang/test/utils/update_cc_test_checks/Inputs/exec-all-runlines.c.expected
index 92c8a572ce0b..7c817d45e8ef 100644
--- a/clang/test/utils/update_cc_test_checks/Inputs/exec-all-runlines.c.expected
+++ b/clang/test/utils/update_cc_test_checks/Inputs/exec-all-runlines.c.expected
@@ -15,19 +15,19 @@
 
 void use(int);
 
-// CHECK1-LABEL: define {{[^@]+}}@test(
+// CHECK1-LABEL: @test(
 // CHECK1-NEXT:  entry:
 // CHECK1-NEXT:    [[A_ADDR:%.*]] = alloca i32, align 4
 // CHECK1-NEXT:    store i32 [[A:%.*]], i32* [[A_ADDR]], align 4
 // CHECK1-NEXT:    ret void
 //
-// CHECK2-LABEL: define {{[^@]+}}@test(
+// CHECK2-LABEL: @test(
 // CHECK2-NEXT:  entry:
 // CHECK2-NEXT:    [[A_ADDR:%.*]] = alloca i32, align 4
 // CHECK2-NEXT:    store i32 [[A:%.*]], i32* [[A_ADDR]], align 4
 // CHECK2-NEXT:    ret void
 //
-// CHECK3-LABEL: define {{[^@]+}}@test(
+// CHECK3-LABEL: @test(
 // CHECK3-NEXT:  entry:
 // CHECK3-NEXT:    [[A_ADDR:%.*]] = alloca i32, align 4
 // CHECK3-NEXT:    store i32 [[A:%.*]], i32* [[A_ADDR]], align 4

diff  --git a/clang/test/utils/update_cc_test_checks/Inputs/explicit-template-instantiation.cpp.expected b/clang/test/utils/update_cc_test_checks/Inputs/explicit-template-instantiation.cpp.expected
index 660e8033dd67..53466c3a11bb 100644
--- a/clang/test/utils/update_cc_test_checks/Inputs/explicit-template-instantiation.cpp.expected
+++ b/clang/test/utils/update_cc_test_checks/Inputs/explicit-template-instantiation.cpp.expected
@@ -36,7 +36,7 @@ public:
 
 // These two specializations should generate lines for all of Foo's methods.
 
-// CHECK-LABEL: define {{[^@]+}}@_ZN3FooIcEC1Ec(
+// CHECK-LABEL: @_ZN3FooIcEC1Ec(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[THIS_ADDR:%.*]] = alloca %struct.Foo*, align 8
 // CHECK-NEXT:    [[X_ADDR:%.*]] = alloca i8, align 1
@@ -47,7 +47,7 @@ public:
 // CHECK-NEXT:    call void @_ZN3FooIcEC2Ec(%struct.Foo* noundef nonnull align 1 dereferenceable(1) [[THIS1]], i8 noundef signext [[TMP0]])
 // CHECK-NEXT:    ret void
 //
-// CHECK-LABEL: define {{[^@]+}}@_ZN3FooIcED1Ev(
+// CHECK-LABEL: @_ZN3FooIcED1Ev(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[THIS_ADDR:%.*]] = alloca %struct.Foo*, align 8
 // CHECK-NEXT:    store %struct.Foo* [[THIS:%.*]], %struct.Foo** [[THIS_ADDR]], align 8
@@ -55,7 +55,7 @@ public:
 // CHECK-NEXT:    call void @_ZN3FooIcED2Ev(%struct.Foo* noundef nonnull align 1 dereferenceable(1) [[THIS1]]) #[[ATTR2:[0-9]+]]
 // CHECK-NEXT:    ret void
 //
-// CHECK-LABEL: define {{[^@]+}}@_ZN3FooIcE3getEv(
+// CHECK-LABEL: @_ZN3FooIcE3getEv(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[THIS_ADDR:%.*]] = alloca %struct.Foo*, align 8
 // CHECK-NEXT:    store %struct.Foo* [[THIS:%.*]], %struct.Foo** [[THIS_ADDR]], align 8
@@ -64,7 +64,7 @@ public:
 // CHECK-NEXT:    [[TMP0:%.*]] = load i8, i8* [[X]], align 1
 // CHECK-NEXT:    ret i8 [[TMP0]]
 //
-// CHECK-LABEL: define {{[^@]+}}@_ZN3FooIcE3setEc(
+// CHECK-LABEL: @_ZN3FooIcE3setEc(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[THIS_ADDR:%.*]] = alloca %struct.Foo*, align 8
 // CHECK-NEXT:    [[_X_ADDR:%.*]] = alloca i8, align 1
@@ -78,7 +78,7 @@ public:
 //
 template struct Foo<char>;
 
-// CHECK-LABEL: define {{[^@]+}}@_ZN3FooIsEC1Es(
+// CHECK-LABEL: @_ZN3FooIsEC1Es(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[THIS_ADDR:%.*]] = alloca %struct.Foo.0*, align 8
 // CHECK-NEXT:    [[X_ADDR:%.*]] = alloca i16, align 2
@@ -89,7 +89,7 @@ template struct Foo<char>;
 // CHECK-NEXT:    call void @_ZN3FooIsEC2Es(%struct.Foo.0* noundef nonnull align 2 dereferenceable(2) [[THIS1]], i16 noundef signext [[TMP0]])
 // CHECK-NEXT:    ret void
 //
-// CHECK-LABEL: define {{[^@]+}}@_ZN3FooIsED1Ev(
+// CHECK-LABEL: @_ZN3FooIsED1Ev(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[THIS_ADDR:%.*]] = alloca %struct.Foo.0*, align 8
 // CHECK-NEXT:    store %struct.Foo.0* [[THIS:%.*]], %struct.Foo.0** [[THIS_ADDR]], align 8
@@ -97,7 +97,7 @@ template struct Foo<char>;
 // CHECK-NEXT:    call void @_ZN3FooIsED2Ev(%struct.Foo.0* noundef nonnull align 2 dereferenceable(2) [[THIS1]]) #[[ATTR2]]
 // CHECK-NEXT:    ret void
 //
-// CHECK-LABEL: define {{[^@]+}}@_ZN3FooIsE3getEv(
+// CHECK-LABEL: @_ZN3FooIsE3getEv(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[THIS_ADDR:%.*]] = alloca %struct.Foo.0*, align 8
 // CHECK-NEXT:    store %struct.Foo.0* [[THIS:%.*]], %struct.Foo.0** [[THIS_ADDR]], align 8
@@ -106,7 +106,7 @@ template struct Foo<char>;
 // CHECK-NEXT:    [[TMP0:%.*]] = load i16, i16* [[X]], align 2
 // CHECK-NEXT:    ret i16 [[TMP0]]
 //
-// CHECK-LABEL: define {{[^@]+}}@_ZN3FooIsE3setEs(
+// CHECK-LABEL: @_ZN3FooIsE3setEs(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[THIS_ADDR:%.*]] = alloca %struct.Foo.0*, align 8
 // CHECK-NEXT:    [[_X_ADDR:%.*]] = alloca i16, align 2
@@ -123,7 +123,7 @@ template struct Foo<short>;
 // This should not generate lines for the implicit specialization of Foo, but
 // should generate lines for the explicit specialization of Bar.
 
-// CHECK-LABEL: define {{[^@]+}}@_ZN3BarIiEC1Ei(
+// CHECK-LABEL: @_ZN3BarIiEC1Ei(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[THIS_ADDR:%.*]] = alloca %struct.Bar*, align 8
 // CHECK-NEXT:    [[X_ADDR:%.*]] = alloca i32, align 4
@@ -134,7 +134,7 @@ template struct Foo<short>;
 // CHECK-NEXT:    call void @_ZN3BarIiEC2Ei(%struct.Bar* noundef nonnull align 4 dereferenceable(4) [[THIS1]], i32 noundef [[TMP0]])
 // CHECK-NEXT:    ret void
 //
-// CHECK-LABEL: define {{[^@]+}}@_ZN3BarIiED1Ev(
+// CHECK-LABEL: @_ZN3BarIiED1Ev(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[THIS_ADDR:%.*]] = alloca %struct.Bar*, align 8
 // CHECK-NEXT:    store %struct.Bar* [[THIS:%.*]], %struct.Bar** [[THIS_ADDR]], align 8
@@ -142,7 +142,7 @@ template struct Foo<short>;
 // CHECK-NEXT:    call void @_ZN3BarIiED2Ev(%struct.Bar* noundef nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR2]]
 // CHECK-NEXT:    ret void
 //
-// CHECK-LABEL: define {{[^@]+}}@_ZN3BarIiE3getEv(
+// CHECK-LABEL: @_ZN3BarIiE3getEv(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[THIS_ADDR:%.*]] = alloca %struct.Bar*, align 8
 // CHECK-NEXT:    store %struct.Bar* [[THIS:%.*]], %struct.Bar** [[THIS_ADDR]], align 8
@@ -151,7 +151,7 @@ template struct Foo<short>;
 // CHECK-NEXT:    [[CALL:%.*]] = call noundef i32 @_ZN3FooIiE3getEv(%struct.Foo.1* noundef nonnull align 4 dereferenceable(4) [[FOO]])
 // CHECK-NEXT:    ret i32 [[CALL]]
 //
-// CHECK-LABEL: define {{[^@]+}}@_ZN3BarIiE3setEi(
+// CHECK-LABEL: @_ZN3BarIiE3setEi(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[THIS_ADDR:%.*]] = alloca %struct.Bar*, align 8
 // CHECK-NEXT:    [[_X_ADDR:%.*]] = alloca i32, align 4
@@ -168,7 +168,7 @@ template struct Bar<int>;
 // This should not generate lines for the implicit specialization of Foo, but
 // should generate lines for the explicit specialization of Baz.
 
-// CHECK-LABEL: define {{[^@]+}}@_ZN3BazIlEC1El(
+// CHECK-LABEL: @_ZN3BazIlEC1El(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[THIS_ADDR:%.*]] = alloca %struct.Baz*, align 8
 // CHECK-NEXT:    [[X_ADDR:%.*]] = alloca i64, align 8
@@ -179,7 +179,7 @@ template struct Bar<int>;
 // CHECK-NEXT:    call void @_ZN3BazIlEC2El(%struct.Baz* noundef nonnull align 8 dereferenceable(8) [[THIS1]], i64 noundef [[TMP0]])
 // CHECK-NEXT:    ret void
 //
-// CHECK-LABEL: define {{[^@]+}}@_ZN3BazIlED1Ev(
+// CHECK-LABEL: @_ZN3BazIlED1Ev(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[THIS_ADDR:%.*]] = alloca %struct.Baz*, align 8
 // CHECK-NEXT:    store %struct.Baz* [[THIS:%.*]], %struct.Baz** [[THIS_ADDR]], align 8

diff  --git a/clang/test/utils/update_cc_test_checks/Inputs/generated-funcs-regex.c.expected b/clang/test/utils/update_cc_test_checks/Inputs/generated-funcs-regex.c.expected
index e2ed534579d8..f99c2e64cec3 100644
--- a/clang/test/utils/update_cc_test_checks/Inputs/generated-funcs-regex.c.expected
+++ b/clang/test/utils/update_cc_test_checks/Inputs/generated-funcs-regex.c.expected
@@ -12,7 +12,7 @@ void foo(int a)
     __test_offloading_42_abcdef_bar_l123();
     int somevar_abc123_;
 }
-// CHECK-LABEL: define {{[^@]+}}@foo(
+// CHECK-LABEL: @foo(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[A_ADDR:%.*]] = alloca i32, align 4
 // CHECK-NEXT:    [[A_CASTED:%.*]] = alloca i64, align 8
@@ -27,7 +27,7 @@ void foo(int a)
 // CHECK-NEXT:    ret void
 //
 //
-// CHECK-LABEL: define {{[^@]+}}@{{__omp_offloading_[a-z0-9]+_[a-z0-9]+_foo_l[0-9]+}}(
+// CHECK-LABEL: @{{__omp_offloading_[a-z0-9]+_[a-z0-9]+_foo_l[0-9]+}}(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[A_ADDR:%.*]] = alloca i64, align 8
 // CHECK-NEXT:    store i64 [[A:%.*]], i64* [[A_ADDR]], align 8

diff  --git a/clang/test/utils/update_cc_test_checks/Inputs/generated-funcs.c.generated.expected b/clang/test/utils/update_cc_test_checks/Inputs/generated-funcs.c.generated.expected
index b8d6f3e1415a..adc8922658c8 100644
--- a/clang/test/utils/update_cc_test_checks/Inputs/generated-funcs.c.generated.expected
+++ b/clang/test/utils/update_cc_test_checks/Inputs/generated-funcs.c.generated.expected
@@ -30,7 +30,7 @@ void foo(void) {
     A[i] = 1.0;
   }
 }
-// OMP-LABEL: define {{[^@]+}}@main(
+// OMP-LABEL: @main(
 // OMP-NEXT:  entry:
 // OMP-NEXT:    [[RETVAL:%.*]] = alloca i32, align 4
 // OMP-NEXT:    [[I:%.*]] = alloca i32, align 4
@@ -41,7 +41,7 @@ void foo(void) {
 // OMP-NEXT:    ret i32 0
 //
 //
-// OMP-LABEL: define {{[^@]+}}@.omp_outlined.(
+// OMP-LABEL: @.omp_outlined.(
 // OMP-NEXT:  entry:
 // OMP-NEXT:    [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
 // OMP-NEXT:    [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
@@ -104,7 +104,7 @@ void foo(void) {
 // OMP-NEXT:    ret void
 //
 //
-// OMP-LABEL: define {{[^@]+}}@foo(
+// OMP-LABEL: @foo(
 // OMP-NEXT:  entry:
 // OMP-NEXT:    [[I:%.*]] = alloca i32, align 4
 // OMP-NEXT:    store i32 0, i32* [[I]], align 4
@@ -112,7 +112,7 @@ void foo(void) {
 // OMP-NEXT:    ret void
 //
 //
-// OMP-LABEL: define {{[^@]+}}@.omp_outlined..1(
+// OMP-LABEL: @.omp_outlined..1(
 // OMP-NEXT:  entry:
 // OMP-NEXT:    [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
 // OMP-NEXT:    [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
@@ -175,7 +175,7 @@ void foo(void) {
 // OMP-NEXT:    ret void
 //
 //
-// NOOMP-LABEL: define {{[^@]+}}@main(
+// NOOMP-LABEL: @main(
 // NOOMP-NEXT:  entry:
 // NOOMP-NEXT:    [[RETVAL:%.*]] = alloca i32, align 4
 // NOOMP-NEXT:    [[I:%.*]] = alloca i32, align 4
@@ -203,7 +203,7 @@ void foo(void) {
 // NOOMP-NEXT:    ret i32 0
 //
 //
-// NOOMP-LABEL: define {{[^@]+}}@foo(
+// NOOMP-LABEL: @foo(
 // NOOMP-NEXT:  entry:
 // NOOMP-NEXT:    [[I:%.*]] = alloca i32, align 4
 // NOOMP-NEXT:    store i32 0, i32* [[I]], align 4

diff  --git a/clang/test/utils/update_cc_test_checks/Inputs/generated-funcs.c.no-generated.expected b/clang/test/utils/update_cc_test_checks/Inputs/generated-funcs.c.no-generated.expected
index 0aacd69d31b7..700903ff040f 100644
--- a/clang/test/utils/update_cc_test_checks/Inputs/generated-funcs.c.no-generated.expected
+++ b/clang/test/utils/update_cc_test_checks/Inputs/generated-funcs.c.no-generated.expected
@@ -9,7 +9,7 @@ double A[size];
 
 void foo(void);
 
-// OMP-LABEL: define {{[^@]+}}@main(
+// OMP-LABEL: @main(
 // OMP-NEXT:  entry:
 // OMP-NEXT:    [[RETVAL:%.*]] = alloca i32, align 4
 // OMP-NEXT:    [[I:%.*]] = alloca i32, align 4
@@ -19,7 +19,7 @@ void foo(void);
 // OMP-NEXT:    call void @foo()
 // OMP-NEXT:    ret i32 0
 //
-// NOOMP-LABEL: define {{[^@]+}}@main(
+// NOOMP-LABEL: @main(
 // NOOMP-NEXT:  entry:
 // NOOMP-NEXT:    [[RETVAL:%.*]] = alloca i32, align 4
 // NOOMP-NEXT:    [[I:%.*]] = alloca i32, align 4
@@ -59,14 +59,14 @@ int main(void) {
   return 0;
 }
 
-// OMP-LABEL: define {{[^@]+}}@foo(
+// OMP-LABEL: @foo(
 // OMP-NEXT:  entry:
 // OMP-NEXT:    [[I:%.*]] = alloca i32, align 4
 // OMP-NEXT:    store i32 0, i32* [[I]], align 4
 // OMP-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2]], i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* @.omp_outlined..1 to void (i32*, i32*, ...)*))
 // OMP-NEXT:    ret void
 //
-// NOOMP-LABEL: define {{[^@]+}}@foo(
+// NOOMP-LABEL: @foo(
 // NOOMP-NEXT:  entry:
 // NOOMP-NEXT:    [[I:%.*]] = alloca i32, align 4
 // NOOMP-NEXT:    store i32 0, i32* [[I]], align 4

diff  --git a/clang/test/utils/update_cc_test_checks/Inputs/global-hex-value-regex.c.expected b/clang/test/utils/update_cc_test_checks/Inputs/global-hex-value-regex.c.expected
index fab550de7fff..f494971a6a88 100644
--- a/clang/test/utils/update_cc_test_checks/Inputs/global-hex-value-regex.c.expected
+++ b/clang/test/utils/update_cc_test_checks/Inputs/global-hex-value-regex.c.expected
@@ -7,7 +7,7 @@
 // CHECK: @bar.hex = internal global i32 [[#0x20]], align 4
 // CHECK: @bar.dec = internal global i32 20, align 4
 //.
-// CHECK-LABEL: define {{[^@]+}}@foo(
+// CHECK-LABEL: @foo(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret void
 //
@@ -15,7 +15,7 @@ void foo(void) {
   static int hex = 0x10;
   static int dec = 10;
 }
-// CHECK-LABEL: define {{[^@]+}}@bar(
+// CHECK-LABEL: @bar(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret void
 //

diff  --git a/clang/test/utils/update_cc_test_checks/Inputs/global-value-regex.c.expected b/clang/test/utils/update_cc_test_checks/Inputs/global-value-regex.c.expected
index f55c496a269a..94e08ce9553b 100644
--- a/clang/test/utils/update_cc_test_checks/Inputs/global-value-regex.c.expected
+++ b/clang/test/utils/update_cc_test_checks/Inputs/global-value-regex.c.expected
@@ -5,14 +5,14 @@
 // CHECK: @foo.i = internal global i32 0, align 4
 // CHECK: @foo.j = internal global i32 0, align 4
 //.
-// CHECK-LABEL: define {{[^@]+}}@foo(
+// CHECK-LABEL: @foo(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret void
 //
 void foo(void) {
   static int i, j;
 }
-// CHECK-LABEL: define {{[^@]+}}@bar(
+// CHECK-LABEL: @bar(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret void
 //

diff  --git a/clang/test/utils/update_cc_test_checks/Inputs/ifdef.c.expected b/clang/test/utils/update_cc_test_checks/Inputs/ifdef.c.expected
index 2bedf5b88128..c1fb72db9339 100644
--- a/clang/test/utils/update_cc_test_checks/Inputs/ifdef.c.expected
+++ b/clang/test/utils/update_cc_test_checks/Inputs/ifdef.c.expected
@@ -3,7 +3,7 @@
 // RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s -DFOO | FileCheck -check-prefixes=CHECK,FOO %s
 
 #ifdef FOO
-// FOO-LABEL: define {{[^@]+}}@foo(
+// FOO-LABEL: @foo(
 // FOO-NEXT:  entry:
 // FOO-NEXT:    ret i32 1
 //
@@ -12,7 +12,7 @@ int foo() {
 }
 #endif
 
-// CHECK-LABEL: define {{[^@]+}}@bar(
+// CHECK-LABEL: @bar(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 2
 //

diff  --git a/clang/test/utils/update_cc_test_checks/Inputs/mangled_names.c.expected b/clang/test/utils/update_cc_test_checks/Inputs/mangled_names.c.expected
index 290d47cf7875..cf1fc9c50385 100644
--- a/clang/test/utils/update_cc_test_checks/Inputs/mangled_names.c.expected
+++ b/clang/test/utils/update_cc_test_checks/Inputs/mangled_names.c.expected
@@ -2,7 +2,7 @@
 // Example input for update_cc_test_checks
 // RUN: %clang_cc1 -no-opaque-pointers -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
 
-// CHECK-LABEL: define {{[^@]+}}@test(
+// CHECK-LABEL: @test(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[A_ADDR:%.*]] = alloca i64, align 8
 // CHECK-NEXT:    [[B_ADDR:%.*]] = alloca i32, align 4
@@ -19,7 +19,7 @@ long test(long a, int b) {
 }
 
 // A function with a mangled name
-// CHECK-LABEL: define {{[^@]+}}@_Z4testlii(
+// CHECK-LABEL: @_Z4testlii(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[A_ADDR:%.*]] = alloca i64, align 8
 // CHECK-NEXT:    [[B_ADDR:%.*]] = alloca i32, align 4

diff  --git a/clang/test/utils/update_cc_test_checks/Inputs/on_the_fly_arg_change.c.expected b/clang/test/utils/update_cc_test_checks/Inputs/on_the_fly_arg_change.c.expected
index 6ca311681b24..4688ec932b59 100644
--- a/clang/test/utils/update_cc_test_checks/Inputs/on_the_fly_arg_change.c.expected
+++ b/clang/test/utils/update_cc_test_checks/Inputs/on_the_fly_arg_change.c.expected
@@ -1,7 +1,7 @@
 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
 // RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
 
-// CHECK-LABEL: define {{[^@]+}}@checks_please(
+// CHECK-LABEL: @checks_please(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 1
 //
@@ -20,7 +20,7 @@ int no_checks_please(void) {
 // UTC_ARGS: --enable
 
 
-// CHECK-LABEL: define {{[^@]+}}@checks_again(
+// CHECK-LABEL: @checks_again(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 2
 //

diff  --git a/clang/test/utils/update_cc_test_checks/Inputs/replace-value-regex-across-runs.c.expected b/clang/test/utils/update_cc_test_checks/Inputs/replace-value-regex-across-runs.c.expected
index a8024f7cda91..ea3cc9480f6d 100644
--- a/clang/test/utils/update_cc_test_checks/Inputs/replace-value-regex-across-runs.c.expected
+++ b/clang/test/utils/update_cc_test_checks/Inputs/replace-value-regex-across-runs.c.expected
@@ -4,7 +4,7 @@
 // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp -emit-llvm -o - %s | \
 // RUN:     FileCheck %s
 
-// CHECK-LABEL: define {{[^@]+}}@foo(
+// CHECK-LABEL: @foo(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_foo_l7() #[[ATTR2:[0-9]+]]
 // CHECK-NEXT:    ret void

diff  --git a/clang/test/utils/update_cc_test_checks/check-globals.test b/clang/test/utils/update_cc_test_checks/check-globals.test
index 494a58448fa0..9a2e0cca4c4c 100644
--- a/clang/test/utils/update_cc_test_checks/check-globals.test
+++ b/clang/test/utils/update_cc_test_checks/check-globals.test
@@ -56,7 +56,7 @@ BOTH-EMPTY:
  BOTH-NEXT:// CHECK: @bar.i = internal global i32 0, align 4
  BOTH-NEXT:// CHECK: @bar.j = internal global i32 0, align 4
  BOTH-NEXT://.
- BOTH-NEXT:// CHECK-LABEL: define {{.+}}@foo(
+ BOTH-NEXT:// CHECK-LABEL: @foo(
  BOTH-NEXT:// CHECK-NEXT:  entry:
  BOTH-NEXT:// CHECK-NEXT:    ret void
  BOTH-NEXT://
@@ -64,7 +64,7 @@ BOTH-EMPTY:
   NRM-NEXT:  static int i, j;
   NRM-NEXT:}
   IGF-NEXT://
- BOTH-NEXT:// CHECK-LABEL: define {{.+}}@bar(
+ BOTH-NEXT:// CHECK-LABEL: @bar(
  BOTH-NEXT:// CHECK-NEXT:  entry:
  BOTH-NEXT:// CHECK-NEXT:    ret void
  BOTH-NEXT://

diff  --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/argument_name_reuse.ll.plain.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/argument_name_reuse.ll.plain.expected
index a462c843337d..e6cb25980a2f 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/argument_name_reuse.ll.plain.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/argument_name_reuse.ll.plain.expected
@@ -2,7 +2,7 @@
 ; RUN: opt < %s -S | FileCheck %s
 
 define i32 @reuse_arg_names(i32 %X, i32 %Y) {
-; CHECK-LABEL: define {{[^@]+}}@reuse_arg_names(
+; CHECK-LABEL: @reuse_arg_names(
 ; CHECK-NEXT:    [[Z:%.*]] = sub i32 [[X:%.*]], [[Y:%.*]]
 ; CHECK-NEXT:    [[Q:%.*]] = add i32 [[Z]], [[Y]]
 ; CHECK-NEXT:    ret i32 [[Q]]

diff  --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/basic.ll.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/basic.ll.expected
index 771af39d6c21..457540fc7cbb 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/basic.ll.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/basic.ll.expected
@@ -3,7 +3,7 @@
 ; RUN: opt < %s -passes=instsimplify -S | FileCheck %s
 
 define i32 @common_sub_operand(i32 %X, i32 %Y) {
-; CHECK-LABEL: define {{[^@]+}}@common_sub_operand(
+; CHECK-LABEL: @common_sub_operand(
 ; CHECK-NEXT:    ret i32 [[X:%.*]]
 ;
   %Z = sub i32 %X, %Y
@@ -12,7 +12,7 @@ define i32 @common_sub_operand(i32 %X, i32 %Y) {
 }
 
 define i32 @negated_operand(i32 %x) {
-; CHECK-LABEL: define {{[^@]+}}@negated_operand(
+; CHECK-LABEL: @negated_operand(
 ; CHECK-NEXT:    ret i32 0
 ;
   %negx = sub i32 0, %x
@@ -21,7 +21,7 @@ define i32 @negated_operand(i32 %x) {
 }
 
 define <2 x i32> @negated_operand_commute_vec(<2 x i32> %x) {
-; CHECK-LABEL: define {{[^@]+}}@negated_operand_commute_vec(
+; CHECK-LABEL: @negated_operand_commute_vec(
 ; CHECK-NEXT:    ret <2 x i32> zeroinitializer
 ;
   %negx = sub <2 x i32> zeroinitializer, %x
@@ -30,7 +30,7 @@ define <2 x i32> @negated_operand_commute_vec(<2 x i32> %x) {
 }
 
 define i8 @knownnegation(i8 %x, i8 %y) {
-; CHECK-LABEL: define {{[^@]+}}@knownnegation(
+; CHECK-LABEL: @knownnegation(
 ; CHECK-NEXT:    ret i8 0
 ;
   %xy = sub i8 %x, %y
@@ -40,7 +40,7 @@ define i8 @knownnegation(i8 %x, i8 %y) {
 }
 
 define <2 x i8> @knownnegation_commute_vec(<2 x i8> %x, <2 x i8> %y) {
-; CHECK-LABEL: define {{[^@]+}}@knownnegation_commute_vec(
+; CHECK-LABEL: @knownnegation_commute_vec(
 ; CHECK-NEXT:    ret <2 x i8> zeroinitializer
 ;
   %xy = sub <2 x i8> %x, %y
@@ -50,7 +50,7 @@ define <2 x i8> @knownnegation_commute_vec(<2 x i8> %x, <2 x i8> %y) {
 }
 
 define i32 @nameless_value(i32 %X) {
-; CHECK-LABEL: define {{[^@]+}}@nameless_value(
+; CHECK-LABEL: @nameless_value(
 ; CHECK-NEXT:    [[TMP1:%.*]] = sub i32 42, [[X:%.*]]
 ; CHECK-NEXT:    ret i32 [[TMP1]]
 ;

diff  --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/custom-tool.ll.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/custom-tool.ll.expected
index d77d328990d8..6b7ac81bd6d8 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/custom-tool.ll.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/custom-tool.ll.expected
@@ -2,7 +2,7 @@
 ; RUN: llvm-extract -S --func=foo %s | FileCheck --check-prefixes=CHECK %s
 
 define i32 @foo(i32 %x) {
-; CHECK-LABEL: define {{[^@]+}}@foo(
+; CHECK-LABEL: @foo(
 ; CHECK-NEXT:    [[Y:%.*]] = add i32 [[X:%.*]], 1
 ; CHECK-NEXT:    ret i32 [[Y]]
 ;

diff  --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/define_after_call.ll b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/define_after_call.ll
deleted file mode 100644
index d2d247fa3702..000000000000
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/define_after_call.ll
+++ /dev/null
@@ -1,10 +0,0 @@
-; RUN: opt < %s -S | FileCheck %s
-
-define i32 @a() {
-  %val = call i32 @b(i32 0)
-  ret i32 %val
-}
-
-define i32 @b(i32 %arg) {
-  ret i32 %arg
-}

diff  --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/define_after_call.ll.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/define_after_call.ll.expected
deleted file mode 100644
index b81619506185..000000000000
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/define_after_call.ll.expected
+++ /dev/null
@@ -1,18 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -S | FileCheck %s
-
-define i32 @a() {
-; CHECK-LABEL: define {{[^@]+}}@a(
-; CHECK-NEXT:    [[VAL:%.*]] = call i32 @b(i32 0)
-; CHECK-NEXT:    ret i32 [[VAL]]
-;
-  %val = call i32 @b(i32 0)
-  ret i32 %val
-}
-
-define i32 @b(i32 %arg) {
-; CHECK-LABEL: define {{[^@]+}}@b(
-; CHECK-NEXT:    ret i32 [[ARG:%.*]]
-;
-  ret i32 %arg
-}

diff  --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll.generated.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll.generated.expected
index 075ce2b4a0e4..905a79fdff40 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll.generated.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll.generated.expected
@@ -35,7 +35,7 @@ exit:
 
 declare void @llvm.trap() noreturn cold
 declare void @_Z10sideeffectv()
-; CHECK-LABEL: define {{[^@]+}}@foo(
+; CHECK-LABEL: @foo(
 ; CHECK-NEXT:    [[TMP2:%.*]] = icmp eq i32 [[TMP0:%.*]], 0
 ; CHECK-NEXT:    tail call void @_Z10sideeffectv()
 ; CHECK-NEXT:    br i1 [[TMP2]], label [[CODEREPL:%.*]], label [[EXIT:%.*]]
@@ -46,7 +46,7 @@ declare void @_Z10sideeffectv()
 ; CHECK-NEXT:    ret void
 ;
 ;
-; CHECK-LABEL: define {{[^@]+}}@bar(
+; CHECK-LABEL: @bar(
 ; CHECK-NEXT:    [[TMP2:%.*]] = icmp eq i32 [[TMP0:%.*]], 0
 ; CHECK-NEXT:    tail call void @_Z10sideeffectv()
 ; CHECK-NEXT:    br i1 [[TMP2]], label [[CODEREPL:%.*]], label [[EXIT:%.*]]
@@ -57,7 +57,7 @@ declare void @_Z10sideeffectv()
 ; CHECK-NEXT:    ret void
 ;
 ;
-; CHECK-LABEL: define {{[^@]+}}@foo.cold.1(
+; CHECK-LABEL: @foo.cold.1(
 ; CHECK-NEXT:  newFuncRoot:
 ; CHECK-NEXT:    br label [[SINK:%.*]]
 ; CHECK:       sink:
@@ -66,7 +66,7 @@ declare void @_Z10sideeffectv()
 ; CHECK-NEXT:    unreachable
 ;
 ;
-; CHECK-LABEL: define {{[^@]+}}@bar.cold.1(
+; CHECK-LABEL: @bar.cold.1(
 ; CHECK-NEXT:  newFuncRoot:
 ; CHECK-NEXT:    br label [[SINK:%.*]]
 ; CHECK:       sink:

diff  --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll.generated.globals.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll.generated.globals.expected
index b3bda45b5f08..1fee1aa8dfc5 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll.generated.globals.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll.generated.globals.expected
@@ -38,7 +38,7 @@ declare void @_Z10sideeffectv()
 ;.
 ; CHECK: @[[G:[a-zA-Z0-9_$"\\.-]+]] = external dso_local global i32, align 4
 ;.
-; CHECK-LABEL: define {{[^@]+}}@foo(
+; CHECK-LABEL: @foo(
 ; CHECK-NEXT:    [[TMP2:%.*]] = icmp eq i32 [[TMP0:%.*]], 0
 ; CHECK-NEXT:    tail call void @_Z10sideeffectv()
 ; CHECK-NEXT:    br i1 [[TMP2]], label [[CODEREPL:%.*]], label [[EXIT:%.*]]
@@ -49,7 +49,7 @@ declare void @_Z10sideeffectv()
 ; CHECK-NEXT:    ret void
 ;
 ;
-; CHECK-LABEL: define {{[^@]+}}@bar(
+; CHECK-LABEL: @bar(
 ; CHECK-NEXT:    [[TMP2:%.*]] = icmp eq i32 [[TMP0:%.*]], 0
 ; CHECK-NEXT:    tail call void @_Z10sideeffectv()
 ; CHECK-NEXT:    br i1 [[TMP2]], label [[CODEREPL:%.*]], label [[EXIT:%.*]]
@@ -60,7 +60,7 @@ declare void @_Z10sideeffectv()
 ; CHECK-NEXT:    ret void
 ;
 ;
-; CHECK-LABEL: define {{[^@]+}}@foo.cold.1(
+; CHECK-LABEL: @foo.cold.1(
 ; CHECK-NEXT:  newFuncRoot:
 ; CHECK-NEXT:    br label [[SINK:%.*]]
 ; CHECK:       sink:
@@ -69,7 +69,7 @@ declare void @_Z10sideeffectv()
 ; CHECK-NEXT:    unreachable
 ;
 ;
-; CHECK-LABEL: define {{[^@]+}}@bar.cold.1(
+; CHECK-LABEL: @bar.cold.1(
 ; CHECK-NEXT:  newFuncRoot:
 ; CHECK-NEXT:    br label [[SINK:%.*]]
 ; CHECK:       sink:

diff  --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll.nogenerated.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll.nogenerated.expected
index 8189c161b62a..37e98df641ae 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll.nogenerated.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll.nogenerated.expected
@@ -6,7 +6,7 @@ target triple = "x86_64-apple-macosx10.14.0"
 @G = external dso_local global i32, align 4
 
 define void @foo(i32) {
-; CHECK-LABEL: define {{[^@]+}}@foo(
+; CHECK-LABEL: @foo(
 ; CHECK-NEXT:    [[TMP2:%.*]] = icmp eq i32 [[TMP0:%.*]], 0
 ; CHECK-NEXT:    tail call void @_Z10sideeffectv()
 ; CHECK-NEXT:    br i1 [[TMP2]], label [[CODEREPL:%.*]], label [[EXIT:%.*]]
@@ -30,7 +30,7 @@ exit:
 }
 
 define void @bar(i32) {
-; CHECK-LABEL: define {{[^@]+}}@bar(
+; CHECK-LABEL: @bar(
 ; CHECK-NEXT:    [[TMP2:%.*]] = icmp eq i32 [[TMP0:%.*]], 0
 ; CHECK-NEXT:    tail call void @_Z10sideeffectv()
 ; CHECK-NEXT:    br i1 [[TMP2]], label [[CODEREPL:%.*]], label [[EXIT:%.*]]

diff  --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll.nogenerated.globals.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll.nogenerated.globals.expected
index 1375c7de4867..417fe2ac5cb4 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll.nogenerated.globals.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll.nogenerated.globals.expected
@@ -9,7 +9,7 @@ target triple = "x86_64-apple-macosx10.14.0"
 ; CHECK: @[[G:[a-zA-Z0-9_$"\\.-]+]] = external dso_local global i32, align 4
 ;.
 define void @foo(i32) {
-; CHECK-LABEL: define {{[^@]+}}@foo(
+; CHECK-LABEL: @foo(
 ; CHECK-NEXT:    [[TMP2:%.*]] = icmp eq i32 [[TMP0:%.*]], 0
 ; CHECK-NEXT:    tail call void @_Z10sideeffectv()
 ; CHECK-NEXT:    br i1 [[TMP2]], label [[CODEREPL:%.*]], label [[EXIT:%.*]]
@@ -33,7 +33,7 @@ exit:
 }
 
 define void @bar(i32) {
-; CHECK-LABEL: define {{[^@]+}}@bar(
+; CHECK-LABEL: @bar(
 ; CHECK-NEXT:    [[TMP2:%.*]] = icmp eq i32 [[TMP0:%.*]], 0
 ; CHECK-NEXT:    tail call void @_Z10sideeffectv()
 ; CHECK-NEXT:    br i1 [[TMP2]], label [[CODEREPL:%.*]], label [[EXIT:%.*]]

diff  --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs_prefix_reuse.ll.generated.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs_prefix_reuse.ll.generated.expected
index 732d472e70ba..e37caf215c45 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs_prefix_reuse.ll.generated.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs_prefix_reuse.ll.generated.expected
@@ -36,7 +36,7 @@ exit:
 
 declare void @llvm.trap() noreturn cold
 declare void @_Z10sideeffectv()
-; REUSE-LABEL: define {{[^@]+}}@foo(
+; REUSE-LABEL: @foo(
 ; REUSE-NEXT:    [[TMP2:%.*]] = icmp eq i32 [[TMP0:%.*]], 0
 ; REUSE-NEXT:    tail call void @_Z10sideeffectv()
 ; REUSE-NEXT:    br i1 [[TMP2]], label [[CODEREPL:%.*]], label [[EXIT:%.*]]
@@ -47,7 +47,7 @@ declare void @_Z10sideeffectv()
 ; REUSE-NEXT:    ret void
 ;
 ;
-; REUSE-LABEL: define {{[^@]+}}@bar(
+; REUSE-LABEL: @bar(
 ; REUSE-NEXT:    [[TMP2:%.*]] = icmp eq i32 [[TMP0:%.*]], 0
 ; REUSE-NEXT:    tail call void @_Z10sideeffectv()
 ; REUSE-NEXT:    br i1 [[TMP2]], label [[CODEREPL:%.*]], label [[EXIT:%.*]]
@@ -58,7 +58,7 @@ declare void @_Z10sideeffectv()
 ; REUSE-NEXT:    ret void
 ;
 ;
-; REUSE-LABEL: define {{[^@]+}}@foo.cold.1(
+; REUSE-LABEL: @foo.cold.1(
 ; REUSE-NEXT:  newFuncRoot:
 ; REUSE-NEXT:    br label [[SINK:%.*]]
 ; REUSE:       sink:
@@ -67,7 +67,7 @@ declare void @_Z10sideeffectv()
 ; REUSE-NEXT:    unreachable
 ;
 ;
-; REUSE-LABEL: define {{[^@]+}}@bar.cold.1(
+; REUSE-LABEL: @bar.cold.1(
 ; REUSE-NEXT:  newFuncRoot:
 ; REUSE-NEXT:    br label [[SINK:%.*]]
 ; REUSE:       sink:

diff  --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs_prefix_reuse.ll.generated.globals.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs_prefix_reuse.ll.generated.globals.expected
index c728b84cf491..7bc047929488 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs_prefix_reuse.ll.generated.globals.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs_prefix_reuse.ll.generated.globals.expected
@@ -39,7 +39,7 @@ declare void @_Z10sideeffectv()
 ;.
 ; REUSE: @[[G:[a-zA-Z0-9_$"\\.-]+]] = external dso_local global i32, align 4
 ;.
-; REUSE-LABEL: define {{[^@]+}}@foo(
+; REUSE-LABEL: @foo(
 ; REUSE-NEXT:    [[TMP2:%.*]] = icmp eq i32 [[TMP0:%.*]], 0
 ; REUSE-NEXT:    tail call void @_Z10sideeffectv()
 ; REUSE-NEXT:    br i1 [[TMP2]], label [[CODEREPL:%.*]], label [[EXIT:%.*]]
@@ -50,7 +50,7 @@ declare void @_Z10sideeffectv()
 ; REUSE-NEXT:    ret void
 ;
 ;
-; REUSE-LABEL: define {{[^@]+}}@bar(
+; REUSE-LABEL: @bar(
 ; REUSE-NEXT:    [[TMP2:%.*]] = icmp eq i32 [[TMP0:%.*]], 0
 ; REUSE-NEXT:    tail call void @_Z10sideeffectv()
 ; REUSE-NEXT:    br i1 [[TMP2]], label [[CODEREPL:%.*]], label [[EXIT:%.*]]
@@ -61,7 +61,7 @@ declare void @_Z10sideeffectv()
 ; REUSE-NEXT:    ret void
 ;
 ;
-; REUSE-LABEL: define {{[^@]+}}@foo.cold.1(
+; REUSE-LABEL: @foo.cold.1(
 ; REUSE-NEXT:  newFuncRoot:
 ; REUSE-NEXT:    br label [[SINK:%.*]]
 ; REUSE:       sink:
@@ -70,7 +70,7 @@ declare void @_Z10sideeffectv()
 ; REUSE-NEXT:    unreachable
 ;
 ;
-; REUSE-LABEL: define {{[^@]+}}@bar.cold.1(
+; REUSE-LABEL: @bar.cold.1(
 ; REUSE-NEXT:  newFuncRoot:
 ; REUSE-NEXT:    br label [[SINK:%.*]]
 ; REUSE:       sink:

diff  --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs_prefix_reuse.ll.nogenerated.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs_prefix_reuse.ll.nogenerated.expected
index 66b49d0b62a8..50dbb8324acc 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs_prefix_reuse.ll.nogenerated.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs_prefix_reuse.ll.nogenerated.expected
@@ -7,7 +7,7 @@ target triple = "x86_64-apple-macosx10.14.0"
 @G = external dso_local global i32, align 4
 
 define void @foo(i32) {
-; REUSE-LABEL: define {{[^@]+}}@foo(
+; REUSE-LABEL: @foo(
 ; REUSE-NEXT:    [[TMP2:%.*]] = icmp eq i32 [[TMP0:%.*]], 0
 ; REUSE-NEXT:    tail call void @_Z10sideeffectv()
 ; REUSE-NEXT:    br i1 [[TMP2]], label [[CODEREPL:%.*]], label [[EXIT:%.*]]
@@ -31,7 +31,7 @@ exit:
 }
 
 define void @bar(i32) {
-; REUSE-LABEL: define {{[^@]+}}@bar(
+; REUSE-LABEL: @bar(
 ; REUSE-NEXT:    [[TMP2:%.*]] = icmp eq i32 [[TMP0:%.*]], 0
 ; REUSE-NEXT:    tail call void @_Z10sideeffectv()
 ; REUSE-NEXT:    br i1 [[TMP2]], label [[CODEREPL:%.*]], label [[EXIT:%.*]]

diff  --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs_prefix_reuse.ll.nogenerated.globals.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs_prefix_reuse.ll.nogenerated.globals.expected
index 675df6e6e9c3..0049c2ab6149 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs_prefix_reuse.ll.nogenerated.globals.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs_prefix_reuse.ll.nogenerated.globals.expected
@@ -10,7 +10,7 @@ target triple = "x86_64-apple-macosx10.14.0"
 ; REUSE: @[[G:[a-zA-Z0-9_$"\\.-]+]] = external dso_local global i32, align 4
 ;.
 define void @foo(i32) {
-; REUSE-LABEL: define {{[^@]+}}@foo(
+; REUSE-LABEL: @foo(
 ; REUSE-NEXT:    [[TMP2:%.*]] = icmp eq i32 [[TMP0:%.*]], 0
 ; REUSE-NEXT:    tail call void @_Z10sideeffectv()
 ; REUSE-NEXT:    br i1 [[TMP2]], label [[CODEREPL:%.*]], label [[EXIT:%.*]]
@@ -34,7 +34,7 @@ exit:
 }
 
 define void @bar(i32) {
-; REUSE-LABEL: define {{[^@]+}}@bar(
+; REUSE-LABEL: @bar(
 ; REUSE-NEXT:    [[TMP2:%.*]] = icmp eq i32 [[TMP0:%.*]], 0
 ; REUSE-NEXT:    tail call void @_Z10sideeffectv()
 ; REUSE-NEXT:    br i1 [[TMP2]], label [[CODEREPL:%.*]], label [[EXIT:%.*]]

diff  --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/scrub_attrs.ll.plain.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/scrub_attrs.ll.plain.expected
index 8886e3de5c4e..fc6688daeb92 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/scrub_attrs.ll.plain.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/scrub_attrs.ll.plain.expected
@@ -4,7 +4,7 @@
 declare void @foo()
 
 define internal void @bar() {
-; CHECK-LABEL: define {{[^@]+}}@bar(
+; CHECK-LABEL: @bar(
 ; CHECK-NEXT:    call void @foo() #[[ATTR0:[0-9]+]]
 ; CHECK-NEXT:    ret void
 ;

diff  --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/scrub_attrs.ll.scrub.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/scrub_attrs.ll.scrub.expected
index 514bd66bc674..0674a8938e1f 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/scrub_attrs.ll.scrub.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/scrub_attrs.ll.scrub.expected
@@ -4,7 +4,7 @@
 declare void @foo()
 
 define internal void @bar() {
-; CHECK-LABEL: define {{[^@]+}}@bar(
+; CHECK-LABEL: @bar(
 ; CHECK-NEXT:    call void @foo()
 ; CHECK-NEXT:    ret void
 ;

diff  --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/sometimes_deleted_function.ll.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/sometimes_deleted_function.ll.expected
index 60231db8fc92..269ded7a21cf 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/sometimes_deleted_function.ll.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/sometimes_deleted_function.ll.expected
@@ -8,11 +8,11 @@
 ; Also verify we use "ONE_AND_FOUR" for the unmodified @sometimes_here version and "THREE" for the version without the add.
 
 define internal void @sometimes_here() {
-; ONE_AND_FOUR-LABEL: define {{[^@]+}}@sometimes_here(
+; ONE_AND_FOUR-LABEL: @sometimes_here(
 ; ONE_AND_FOUR-NEXT:    [[C:%.*]] = add i32 undef, undef
 ; ONE_AND_FOUR-NEXT:    ret void
 ;
-; THREE-LABEL: define {{[^@]+}}@sometimes_here(
+; THREE-LABEL: @sometimes_here(
 ; THREE-NEXT:    ret void
 ;
   %c = add i32 undef, undef
@@ -20,7 +20,7 @@ define internal void @sometimes_here() {
 }
 
 define void @always_here() {
-; ALL-LABEL: define {{[^@]+}}@always_here(
+; ALL-LABEL: @always_here(
 ; ALL-NEXT:    ret void
 ;
   ret void

diff  --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.expected
index 5c4d9f9795ac..99f5d91159c2 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.expected
@@ -9,7 +9,7 @@ target triple = "x86_64-unknown-linux-gnu"
 
 ; Function Attrs: nounwind uwtable
 define dso_local void @foo(i32* %A) #0 !dbg !7 {
-; CHECK-LABEL: define {{[^@]+}}@foo(
+; CHECK-LABEL: @foo(
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    [[A_ADDR:%.*]] = alloca i32*, align 8
 ; CHECK-NEXT:    [[I:%.*]] = alloca i32, align 4
@@ -97,7 +97,7 @@ declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture) #2
 
 ; Function Attrs: nounwind uwtable
 define dso_local void @bar(i32* %A) #0 !dbg !39 {
-; CHECK-LABEL: define {{[^@]+}}@bar(
+; CHECK-LABEL: @bar(
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    [[A_ADDR:%.*]] = alloca i32*, align 8
 ; CHECK-NEXT:    [[I:%.*]] = alloca i32, align 4

diff  --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/define_after_call.test b/llvm/test/tools/UpdateTestChecks/update_test_checks/define_after_call.test
deleted file mode 100644
index c3c55636b6b1..000000000000
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/define_after_call.test
+++ /dev/null
@@ -1,4 +0,0 @@
-# Verify that calls and defines of the same function can be mixed
-# RUN: cp -f %S/Inputs/define_after_call.ll %t.ll && %update_test_checks %t.ll
-# RUN: 
diff  -u %t.ll %S/Inputs/define_after_call.ll.expected
-# RUN: opt < %t.ll -S | FileCheck %t.ll

diff  --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py
index 7a66229693b0..6a2c2f4e01f5 100644
--- a/llvm/utils/UpdateTestChecks/common.py
+++ b/llvm/utils/UpdateTestChecks/common.py
@@ -1028,7 +1028,7 @@ def add_ir_checks(output_lines, comment_marker, prefix_list, func_dict,
                   func_name, preserve_names, function_sig,
                   global_vars_seen_dict, is_filtered):
   # Label format is based on IR string.
-  function_def_regex = 'define {{[^@]+}}'
+  function_def_regex = 'define {{[^@]+}}' if function_sig else ''
   check_label_format = '{} %s-LABEL: {}@%s%s%s'.format(comment_marker, function_def_regex)
   return add_checks(output_lines, comment_marker, prefix_list, func_dict, func_name,
                     check_label_format, False, preserve_names, global_vars_seen_dict,


        


More information about the cfe-commits mailing list