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 --- 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 @@ public: explicit Foo(int x); ~Foo(); -// CHECK-LABEL: @_ZNK3Foo23function_defined_inlineEi( +// CHECK-LABEL: define {{[^@]+}}@_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 @@ inline int function_defined_out_of_line(int arg) const; }; -// CHECK-LABEL: @_ZN3FooC1Ei( +// CHECK-LABEL: define {{[^@]+}}@_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 @@ // CHECK-NEXT: ret void // Foo::Foo(int x) : x(x) {} -// CHECK-LABEL: @_ZN3FooD1Ev( +// CHECK-LABEL: define {{[^@]+}}@_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 @@ // CHECK-NEXT: ret void // Foo::~Foo() {} -// CHECK-LABEL: @_ZNK3Foo28function_defined_out_of_lineEi( +// CHECK-LABEL: define {{[^@]+}}@_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 @@ 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: @main( +// CHECK-LABEL: define {{[^@]+}}@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 --- 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 @@ }; // CHECK: Function Attrs: mustprogress noinline nounwind optnone -// CHECK-LABEL: @_Z3fooP2ST( +// CHECK-LABEL: define {{[^@]+}}@_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 --- 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 RT Z; }; -// CHECK-LABEL: @_Z3fooP2ST( +// CHECK-LABEL: define {{[^@]+}}@_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 --- 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 @@ void empty_function(void); -// CHECK-LABEL: @main( +// CHECK-LABEL: define {{[^@]+}}@main( // CHECK-NEXT: entry: // CHECK-NEXT: [[RETVAL:%.*]] = alloca i32, align 4 // CHECK-NEXT: store i32 0, i32* [[RETVAL]], align 4 @@ -19,7 +19,7 @@ return foo(1); } -// CHECK-LABEL: @foo( +// CHECK-LABEL: define {{[^@]+}}@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 @@ return arg; } -// CHECK-LABEL: @empty_function( +// CHECK-LABEL: define {{[^@]+}}@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 --- 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: @test( +// CHECK1-LABEL: define {{[^@]+}}@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: @test( +// CHECK2-LABEL: define {{[^@]+}}@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: @test( +// CHECK3-LABEL: define {{[^@]+}}@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 --- 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 @@ // These two specializations should generate lines for all of Foo's methods. -// CHECK-LABEL: @_ZN3FooIcEC1Ec( +// CHECK-LABEL: define {{[^@]+}}@_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 @@ // CHECK-NEXT: call void @_ZN3FooIcEC2Ec(%struct.Foo* noundef nonnull align 1 dereferenceable(1) [[THIS1]], i8 noundef signext [[TMP0]]) // CHECK-NEXT: ret void // -// CHECK-LABEL: @_ZN3FooIcED1Ev( +// CHECK-LABEL: define {{[^@]+}}@_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 @@ // CHECK-NEXT: call void @_ZN3FooIcED2Ev(%struct.Foo* noundef nonnull align 1 dereferenceable(1) [[THIS1]]) #[[ATTR2:[0-9]+]] // CHECK-NEXT: ret void // -// CHECK-LABEL: @_ZN3FooIcE3getEv( +// CHECK-LABEL: define {{[^@]+}}@_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 @@ // CHECK-NEXT: [[TMP0:%.*]] = load i8, i8* [[X]], align 1 // CHECK-NEXT: ret i8 [[TMP0]] // -// CHECK-LABEL: @_ZN3FooIcE3setEc( +// CHECK-LABEL: define {{[^@]+}}@_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 @@ // template struct Foo; -// CHECK-LABEL: @_ZN3FooIsEC1Es( +// CHECK-LABEL: define {{[^@]+}}@_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 @@ // 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: @_ZN3FooIsED1Ev( +// CHECK-LABEL: define {{[^@]+}}@_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 @@ // CHECK-NEXT: call void @_ZN3FooIsED2Ev(%struct.Foo.0* noundef nonnull align 2 dereferenceable(2) [[THIS1]]) #[[ATTR2]] // CHECK-NEXT: ret void // -// CHECK-LABEL: @_ZN3FooIsE3getEv( +// CHECK-LABEL: define {{[^@]+}}@_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 @@ // CHECK-NEXT: [[TMP0:%.*]] = load i16, i16* [[X]], align 2 // CHECK-NEXT: ret i16 [[TMP0]] // -// CHECK-LABEL: @_ZN3FooIsE3setEs( +// CHECK-LABEL: define {{[^@]+}}@_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 @@ // This should not generate lines for the implicit specialization of Foo, but // should generate lines for the explicit specialization of Bar. -// CHECK-LABEL: @_ZN3BarIiEC1Ei( +// CHECK-LABEL: define {{[^@]+}}@_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 @@ // CHECK-NEXT: call void @_ZN3BarIiEC2Ei(%struct.Bar* noundef nonnull align 4 dereferenceable(4) [[THIS1]], i32 noundef [[TMP0]]) // CHECK-NEXT: ret void // -// CHECK-LABEL: @_ZN3BarIiED1Ev( +// CHECK-LABEL: define {{[^@]+}}@_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 @@ // CHECK-NEXT: call void @_ZN3BarIiED2Ev(%struct.Bar* noundef nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR2]] // CHECK-NEXT: ret void // -// CHECK-LABEL: @_ZN3BarIiE3getEv( +// CHECK-LABEL: define {{[^@]+}}@_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 @@ // CHECK-NEXT: [[CALL:%.*]] = call noundef i32 @_ZN3FooIiE3getEv(%struct.Foo.1* noundef nonnull align 4 dereferenceable(4) [[FOO]]) // CHECK-NEXT: ret i32 [[CALL]] // -// CHECK-LABEL: @_ZN3BarIiE3setEi( +// CHECK-LABEL: define {{[^@]+}}@_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 @@ // This should not generate lines for the implicit specialization of Foo, but // should generate lines for the explicit specialization of Baz. -// CHECK-LABEL: @_ZN3BazIlEC1El( +// CHECK-LABEL: define {{[^@]+}}@_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 @@ // CHECK-NEXT: call void @_ZN3BazIlEC2El(%struct.Baz* noundef nonnull align 8 dereferenceable(8) [[THIS1]], i64 noundef [[TMP0]]) // CHECK-NEXT: ret void // -// CHECK-LABEL: @_ZN3BazIlED1Ev( +// CHECK-LABEL: define {{[^@]+}}@_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 --- 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 @@ __test_offloading_42_abcdef_bar_l123(); int somevar_abc123_; } -// CHECK-LABEL: @foo( +// CHECK-LABEL: define {{[^@]+}}@foo( // CHECK-NEXT: entry: // CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4 // CHECK-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8 @@ -27,7 +27,7 @@ // CHECK-NEXT: ret void // // -// CHECK-LABEL: @{{__omp_offloading_[a-z0-9]+_[a-z0-9]+_foo_l[0-9]+}}( +// CHECK-LABEL: define {{[^@]+}}@{{__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 --- 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 @@ A[i] = 1.0; } } -// OMP-LABEL: @main( +// OMP-LABEL: define {{[^@]+}}@main( // OMP-NEXT: entry: // OMP-NEXT: [[RETVAL:%.*]] = alloca i32, align 4 // OMP-NEXT: [[I:%.*]] = alloca i32, align 4 @@ -41,7 +41,7 @@ // OMP-NEXT: ret i32 0 // // -// OMP-LABEL: @.omp_outlined.( +// OMP-LABEL: define {{[^@]+}}@.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 @@ // OMP-NEXT: ret void // // -// OMP-LABEL: @foo( +// OMP-LABEL: define {{[^@]+}}@foo( // OMP-NEXT: entry: // OMP-NEXT: [[I:%.*]] = alloca i32, align 4 // OMP-NEXT: store i32 0, i32* [[I]], align 4 @@ -112,7 +112,7 @@ // OMP-NEXT: ret void // // -// OMP-LABEL: @.omp_outlined..1( +// OMP-LABEL: define {{[^@]+}}@.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 @@ // OMP-NEXT: ret void // // -// NOOMP-LABEL: @main( +// NOOMP-LABEL: define {{[^@]+}}@main( // NOOMP-NEXT: entry: // NOOMP-NEXT: [[RETVAL:%.*]] = alloca i32, align 4 // NOOMP-NEXT: [[I:%.*]] = alloca i32, align 4 @@ -203,7 +203,7 @@ // NOOMP-NEXT: ret i32 0 // // -// NOOMP-LABEL: @foo( +// NOOMP-LABEL: define {{[^@]+}}@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 --- 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 @@ void foo(void); -// OMP-LABEL: @main( +// OMP-LABEL: define {{[^@]+}}@main( // OMP-NEXT: entry: // OMP-NEXT: [[RETVAL:%.*]] = alloca i32, align 4 // OMP-NEXT: [[I:%.*]] = alloca i32, align 4 @@ -19,7 +19,7 @@ // OMP-NEXT: call void @foo() // OMP-NEXT: ret i32 0 // -// NOOMP-LABEL: @main( +// NOOMP-LABEL: define {{[^@]+}}@main( // NOOMP-NEXT: entry: // NOOMP-NEXT: [[RETVAL:%.*]] = alloca i32, align 4 // NOOMP-NEXT: [[I:%.*]] = alloca i32, align 4 @@ -59,14 +59,14 @@ return 0; } -// OMP-LABEL: @foo( +// OMP-LABEL: define {{[^@]+}}@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: @foo( +// NOOMP-LABEL: define {{[^@]+}}@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 --- 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: @foo( +// CHECK-LABEL: define {{[^@]+}}@foo( // CHECK-NEXT: entry: // CHECK-NEXT: ret void // @@ -15,7 +15,7 @@ static int hex = 0x10; static int dec = 10; } -// CHECK-LABEL: @bar( +// CHECK-LABEL: define {{[^@]+}}@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 --- 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: @foo( +// CHECK-LABEL: define {{[^@]+}}@foo( // CHECK-NEXT: entry: // CHECK-NEXT: ret void // void foo(void) { static int i, j; } -// CHECK-LABEL: @bar( +// CHECK-LABEL: define {{[^@]+}}@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 --- 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: @foo( +// FOO-LABEL: define {{[^@]+}}@foo( // FOO-NEXT: entry: // FOO-NEXT: ret i32 1 // @@ -12,7 +12,7 @@ } #endif -// CHECK-LABEL: @bar( +// CHECK-LABEL: define {{[^@]+}}@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 --- 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: @test( +// CHECK-LABEL: define {{[^@]+}}@test( // CHECK-NEXT: entry: // CHECK-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8 // CHECK-NEXT: [[B_ADDR:%.*]] = alloca i32, align 4 @@ -19,7 +19,7 @@ } // A function with a mangled name -// CHECK-LABEL: @_Z4testlii( +// CHECK-LABEL: define {{[^@]+}}@_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 --- 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: @checks_please( +// CHECK-LABEL: define {{[^@]+}}@checks_please( // CHECK-NEXT: entry: // CHECK-NEXT: ret i32 1 // @@ -20,7 +20,7 @@ // UTC_ARGS: --enable -// CHECK-LABEL: @checks_again( +// CHECK-LABEL: define {{[^@]+}}@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 --- 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: @foo( +// CHECK-LABEL: define {{[^@]+}}@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 --- 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-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: @foo( + BOTH-NEXT:// CHECK-LABEL: define {{.+}}@foo( BOTH-NEXT:// CHECK-NEXT: entry: BOTH-NEXT:// CHECK-NEXT: ret void BOTH-NEXT:// @@ -64,7 +64,7 @@ NRM-NEXT: static int i, j; NRM-NEXT:} IGF-NEXT:// - BOTH-NEXT:// CHECK-LABEL: @bar( + BOTH-NEXT:// CHECK-LABEL: define {{.+}}@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 --- 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: @reuse_arg_names( +; CHECK-LABEL: define {{[^@]+}}@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 --- 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: @common_sub_operand( +; CHECK-LABEL: define {{[^@]+}}@common_sub_operand( ; CHECK-NEXT: ret i32 [[X:%.*]] ; %Z = sub i32 %X, %Y @@ -12,7 +12,7 @@ } define i32 @negated_operand(i32 %x) { -; CHECK-LABEL: @negated_operand( +; CHECK-LABEL: define {{[^@]+}}@negated_operand( ; CHECK-NEXT: ret i32 0 ; %negx = sub i32 0, %x @@ -21,7 +21,7 @@ } define <2 x i32> @negated_operand_commute_vec(<2 x i32> %x) { -; CHECK-LABEL: @negated_operand_commute_vec( +; CHECK-LABEL: define {{[^@]+}}@negated_operand_commute_vec( ; CHECK-NEXT: ret <2 x i32> zeroinitializer ; %negx = sub <2 x i32> zeroinitializer, %x @@ -30,7 +30,7 @@ } define i8 @knownnegation(i8 %x, i8 %y) { -; CHECK-LABEL: @knownnegation( +; CHECK-LABEL: define {{[^@]+}}@knownnegation( ; CHECK-NEXT: ret i8 0 ; %xy = sub i8 %x, %y @@ -40,7 +40,7 @@ } define <2 x i8> @knownnegation_commute_vec(<2 x i8> %x, <2 x i8> %y) { -; CHECK-LABEL: @knownnegation_commute_vec( +; CHECK-LABEL: define {{[^@]+}}@knownnegation_commute_vec( ; CHECK-NEXT: ret <2 x i8> zeroinitializer ; %xy = sub <2 x i8> %x, %y @@ -50,7 +50,7 @@ } define i32 @nameless_value(i32 %X) { -; CHECK-LABEL: @nameless_value( +; CHECK-LABEL: define {{[^@]+}}@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 --- 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: @foo( +; CHECK-LABEL: define {{[^@]+}}@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 new file mode 100644 --- /dev/null +++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/define_after_call.ll @@ -0,0 +1,10 @@ +; 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 new file mode 100644 --- /dev/null +++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/define_after_call.ll.expected @@ -0,0 +1,18 @@ +; 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 --- 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 @@ declare void @llvm.trap() noreturn cold declare void @_Z10sideeffectv() -; CHECK-LABEL: @foo( +; CHECK-LABEL: define {{[^@]+}}@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 @@ ; CHECK-NEXT: ret void ; ; -; CHECK-LABEL: @bar( +; CHECK-LABEL: define {{[^@]+}}@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 @@ ; CHECK-NEXT: ret void ; ; -; CHECK-LABEL: @foo.cold.1( +; CHECK-LABEL: define {{[^@]+}}@foo.cold.1( ; CHECK-NEXT: newFuncRoot: ; CHECK-NEXT: br label [[SINK:%.*]] ; CHECK: sink: @@ -66,7 +66,7 @@ ; CHECK-NEXT: unreachable ; ; -; CHECK-LABEL: @bar.cold.1( +; CHECK-LABEL: define {{[^@]+}}@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 --- 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 @@ ;. ; CHECK: @[[G:[a-zA-Z0-9_$"\\.-]+]] = external dso_local global i32, align 4 ;. -; CHECK-LABEL: @foo( +; CHECK-LABEL: define {{[^@]+}}@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 @@ ; CHECK-NEXT: ret void ; ; -; CHECK-LABEL: @bar( +; CHECK-LABEL: define {{[^@]+}}@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 @@ ; CHECK-NEXT: ret void ; ; -; CHECK-LABEL: @foo.cold.1( +; CHECK-LABEL: define {{[^@]+}}@foo.cold.1( ; CHECK-NEXT: newFuncRoot: ; CHECK-NEXT: br label [[SINK:%.*]] ; CHECK: sink: @@ -69,7 +69,7 @@ ; CHECK-NEXT: unreachable ; ; -; CHECK-LABEL: @bar.cold.1( +; CHECK-LABEL: define {{[^@]+}}@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 --- 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 @@ @G = external dso_local global i32, align 4 define void @foo(i32) { -; CHECK-LABEL: @foo( +; CHECK-LABEL: define {{[^@]+}}@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 @@ } define void @bar(i32) { -; CHECK-LABEL: @bar( +; CHECK-LABEL: define {{[^@]+}}@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 --- 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 @@ ; CHECK: @[[G:[a-zA-Z0-9_$"\\.-]+]] = external dso_local global i32, align 4 ;. define void @foo(i32) { -; CHECK-LABEL: @foo( +; CHECK-LABEL: define {{[^@]+}}@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 @@ } define void @bar(i32) { -; CHECK-LABEL: @bar( +; CHECK-LABEL: define {{[^@]+}}@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 --- 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 @@ declare void @llvm.trap() noreturn cold declare void @_Z10sideeffectv() -; REUSE-LABEL: @foo( +; REUSE-LABEL: define {{[^@]+}}@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 @@ ; REUSE-NEXT: ret void ; ; -; REUSE-LABEL: @bar( +; REUSE-LABEL: define {{[^@]+}}@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 @@ ; REUSE-NEXT: ret void ; ; -; REUSE-LABEL: @foo.cold.1( +; REUSE-LABEL: define {{[^@]+}}@foo.cold.1( ; REUSE-NEXT: newFuncRoot: ; REUSE-NEXT: br label [[SINK:%.*]] ; REUSE: sink: @@ -67,7 +67,7 @@ ; REUSE-NEXT: unreachable ; ; -; REUSE-LABEL: @bar.cold.1( +; REUSE-LABEL: define {{[^@]+}}@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 --- 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 @@ ;. ; REUSE: @[[G:[a-zA-Z0-9_$"\\.-]+]] = external dso_local global i32, align 4 ;. -; REUSE-LABEL: @foo( +; REUSE-LABEL: define {{[^@]+}}@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 @@ ; REUSE-NEXT: ret void ; ; -; REUSE-LABEL: @bar( +; REUSE-LABEL: define {{[^@]+}}@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 @@ ; REUSE-NEXT: ret void ; ; -; REUSE-LABEL: @foo.cold.1( +; REUSE-LABEL: define {{[^@]+}}@foo.cold.1( ; REUSE-NEXT: newFuncRoot: ; REUSE-NEXT: br label [[SINK:%.*]] ; REUSE: sink: @@ -70,7 +70,7 @@ ; REUSE-NEXT: unreachable ; ; -; REUSE-LABEL: @bar.cold.1( +; REUSE-LABEL: define {{[^@]+}}@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 --- 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 @@ @G = external dso_local global i32, align 4 define void @foo(i32) { -; REUSE-LABEL: @foo( +; REUSE-LABEL: define {{[^@]+}}@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 @@ } define void @bar(i32) { -; REUSE-LABEL: @bar( +; REUSE-LABEL: define {{[^@]+}}@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 --- 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 @@ ; REUSE: @[[G:[a-zA-Z0-9_$"\\.-]+]] = external dso_local global i32, align 4 ;. define void @foo(i32) { -; REUSE-LABEL: @foo( +; REUSE-LABEL: define {{[^@]+}}@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 @@ } define void @bar(i32) { -; REUSE-LABEL: @bar( +; REUSE-LABEL: define {{[^@]+}}@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 --- 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: @bar( +; CHECK-LABEL: define {{[^@]+}}@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 --- 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: @bar( +; CHECK-LABEL: define {{[^@]+}}@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 --- 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: @sometimes_here( +; ONE_AND_FOUR-LABEL: define {{[^@]+}}@sometimes_here( ; ONE_AND_FOUR-NEXT: [[C:%.*]] = add i32 undef, undef ; ONE_AND_FOUR-NEXT: ret void ; -; THREE-LABEL: @sometimes_here( +; THREE-LABEL: define {{[^@]+}}@sometimes_here( ; THREE-NEXT: ret void ; %c = add i32 undef, undef @@ -20,7 +20,7 @@ } define void @always_here() { -; ALL-LABEL: @always_here( +; ALL-LABEL: define {{[^@]+}}@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 --- 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 @@ ; Function Attrs: nounwind uwtable define dso_local void @foo(i32* %A) #0 !dbg !7 { -; CHECK-LABEL: @foo( +; CHECK-LABEL: define {{[^@]+}}@foo( ; CHECK-NEXT: entry: ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32*, align 8 ; CHECK-NEXT: [[I:%.*]] = alloca i32, align 4 @@ -97,7 +97,7 @@ ; Function Attrs: nounwind uwtable define dso_local void @bar(i32* %A) #0 !dbg !39 { -; CHECK-LABEL: @bar( +; CHECK-LABEL: define {{[^@]+}}@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 new file mode 100644 --- /dev/null +++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/define_after_call.test @@ -0,0 +1,4 @@ +# 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 --- a/llvm/utils/UpdateTestChecks/common.py +++ b/llvm/utils/UpdateTestChecks/common.py @@ -1028,7 +1028,7 @@ func_name, preserve_names, function_sig, global_vars_seen_dict, is_filtered): # Label format is based on IR string. - function_def_regex = 'define {{[^@]+}}' if function_sig else '' + function_def_regex = 'define {{[^@]+}}' 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,