From 82422eb3bcc4b625cb328c9ca1c207cd3a7f4a6c Mon Sep 17 00:00:00 2001 From: xlauko Date: Sun, 23 Nov 2025 20:41:50 +0100 Subject: [PATCH] [CIR] Remove explicit checks of function attributes in unrelated tests This will simplify transition to other explicit attributes from extra attrs. --- .../AArch64/aarch64-cc-structs.c | 44 +-- .../CIR/CallConvLowering/AArch64/basic.cpp | 24 +- .../CIR/CallConvLowering/AArch64/ptr-fields.c | 4 +- .../CIR/CallConvLowering/AArch64/struct.c | 10 +- .../test/CIR/CallConvLowering/AArch64/union.c | 4 +- .../test/CIR/CallConvLowering/NVPTX/basic.cpp | 22 +- .../CIR/CallConvLowering/x86_64/basic.cpp | 26 +- clang/test/CIR/CodeGen/AArch64/neon-arith.c | 6 +- clang/test/CIR/CodeGen/CUDA/address-spaces.cu | 2 +- .../CIR/CodeGen/CUDA/cuda-builtin-vars.cu | 24 +- clang/test/CIR/CodeGen/CUDA/destructor.cu | 2 +- clang/test/CIR/CodeGen/CUDA/mangling.cu | 48 +-- clang/test/CIR/CodeGen/CUDA/printf.cu | 4 +- clang/test/CIR/CodeGen/CUDA/registration.cu | 2 +- .../CIR/CodeGen/CUDA/simple-nvptx-triple.cu | 2 +- clang/test/CIR/CodeGen/CUDA/simple.cu | 12 +- clang/test/CIR/CodeGen/HIP/address-spaces.cpp | 2 +- clang/test/CIR/CodeGen/HIP/simple.cpp | 12 +- .../CIR/CodeGen/OpenCL/addrspace-alloca.cl | 2 +- .../CIR/CodeGen/OpenCL/cl-uniform-wg-size.cl | 4 +- clang/test/CIR/CodeGen/OpenCL/convergent.cl | 6 +- .../CIR/CodeGen/OpenCL/kernel-arg-info.cl | 16 +- .../CIR/CodeGen/OpenCL/kernel-arg-metadata.cl | 2 +- .../CIR/CodeGen/OpenCL/kernel-attributes.cl | 6 +- .../CIR/CodeGen/OpenCL/kernel-unit-attr.cl | 4 +- .../CIR/CodeGen/OpenCL/spir-calling-conv.cl | 4 +- clang/test/CIR/CodeGen/OpenCL/spirv-target.cl | 4 +- clang/test/CIR/CodeGen/String.cpp | 10 +- .../CIR/CodeGen/aapcs-volatile-bitfields.c | 14 +- .../CIR/CodeGen/address-space-conversion.cpp | 6 +- clang/test/CIR/CodeGen/address-space.c | 6 +- clang/test/CIR/CodeGen/agg-copy.c | 8 +- clang/test/CIR/CodeGen/agg-init-inherit.cpp | 6 +- clang/test/CIR/CodeGen/agg-init.cpp | 4 +- clang/test/CIR/CodeGen/agg-init2.cpp | 2 +- clang/test/CIR/CodeGen/align-load.c | 4 +- .../CIR/CodeGen/applearm64-array-cookies.cpp | 4 +- clang/test/CIR/CodeGen/array-init-destroy.cpp | 4 +- clang/test/CIR/CodeGen/array-init.c | 8 +- clang/test/CIR/CodeGen/array-new-init.cpp | 4 +- .../test/CIR/CodeGen/array-unknown-bound.cpp | 2 +- clang/test/CIR/CodeGen/array.cpp | 12 +- clang/test/CIR/CodeGen/assign-operator.cpp | 16 +- clang/test/CIR/CodeGen/atomic.cpp | 14 +- .../CodeGen/attribute-annotate-multiple.cpp | 4 +- clang/test/CIR/CodeGen/basic.c | 6 +- clang/test/CIR/CodeGen/basic.cpp | 20 +- clang/test/CIR/CodeGen/binassign.cpp | 2 +- clang/test/CIR/CodeGen/bitfield-union.c | 2 +- clang/test/CIR/CodeGen/bitfields.cpp | 8 +- clang/test/CIR/CodeGen/bitint.c | 2 +- clang/test/CIR/CodeGen/bitint.cpp | 16 +- clang/test/CIR/CodeGen/bool.c | 6 +- clang/test/CIR/CodeGen/bswap.cpp | 6 +- clang/test/CIR/CodeGen/build-deferred.cpp | 9 +- clang/test/CIR/CodeGen/builtin-alloca.c | 6 +- clang/test/CIR/CodeGen/builtin-assume.cpp | 10 +- clang/test/CIR/CodeGen/builtin-bcopy.cpp | 6 +- clang/test/CIR/CodeGen/builtin-bit-cast.cpp | 14 +- .../CodeGen/builtin-constant-evaluated.cpp | 6 +- clang/test/CIR/CodeGen/builtin-constant-p.c | 2 +- .../test/CIR/CodeGen/builtin-floating-point.c | 288 +++++++++--------- clang/test/CIR/CodeGen/builtin-isfpclass.c | 10 +- clang/test/CIR/CodeGen/builtin-ms-alloca.c | 2 +- clang/test/CIR/CodeGen/builtin-prefetch.c | 2 +- clang/test/CIR/CodeGen/builtins-memory.c | 6 +- clang/test/CIR/CodeGen/builtins-overflow.cpp | 60 ++-- clang/test/CIR/CodeGen/c89-implicit-int.c | 2 +- clang/test/CIR/CodeGen/call-extra-attrs.cpp | 6 +- .../CodeGen/call-via-class-member-funcptr.cpp | 6 +- clang/test/CIR/CodeGen/call.c | 16 +- clang/test/CIR/CodeGen/call.cpp | 2 +- clang/test/CIR/CodeGen/cast.c | 2 +- clang/test/CIR/CodeGen/cast.cpp | 14 +- clang/test/CIR/CodeGen/comma.cpp | 4 +- clang/test/CIR/CodeGen/compound-literal.c | 4 +- .../CIR/CodeGen/concept-specialization.cpp | 12 +- clang/test/CIR/CodeGen/cond.cpp | 2 +- clang/test/CIR/CodeGen/const-array.c | 2 +- clang/test/CIR/CodeGen/copy-constructor.cpp | 8 +- clang/test/CIR/CodeGen/ctor-alias.cpp | 6 +- .../CodeGen/ctor-member-lvalue-to-rvalue.cpp | 4 +- clang/test/CIR/CodeGen/ctor.cpp | 6 +- clang/test/CIR/CodeGen/cxx-default-arg.cpp | 2 +- clang/test/CIR/CodeGen/default-methods.cpp | 2 +- .../CIR/CodeGen/defined-pure-virtual-func.cpp | 8 +- clang/test/CIR/CodeGen/delegating-ctor.cpp | 4 +- clang/test/CIR/CodeGen/delete.cpp | 4 +- clang/test/CIR/CodeGen/derived-to-base.cpp | 10 +- clang/test/CIR/CodeGen/dtors-scopes.cpp | 6 +- clang/test/CIR/CodeGen/dtors.cpp | 20 +- .../CodeGen/dynamic-cast-relative-layout.cpp | 4 +- clang/test/CIR/CodeGen/dynamic-cast.cpp | 12 +- clang/test/CIR/CodeGen/dynamic-cast.mlir | 123 ++++++++ clang/test/CIR/CodeGen/evaluate-expr.c | 4 +- clang/test/CIR/CodeGen/expressions.cpp | 2 +- clang/test/CIR/CodeGen/fixedpoint-literal.c | 10 +- clang/test/CIR/CodeGen/fullexpr.cpp | 4 +- clang/test/CIR/CodeGen/fun-ptr.c | 4 +- clang/test/CIR/CodeGen/func_dsolocal_pie.c | 4 +- clang/test/CIR/CodeGen/function-attrs.cpp | 6 +- .../CIR/CodeGen/function-to-pointer-decay.c | 2 +- clang/test/CIR/CodeGen/global-ctor-dtor.cpp | 8 +- clang/test/CIR/CodeGen/globals.cpp | 12 +- clang/test/CIR/CodeGen/gnu-extension.c | 4 +- clang/test/CIR/CodeGen/goto.cpp | 32 +- clang/test/CIR/CodeGen/hello.c | 2 +- clang/test/CIR/CodeGen/hot-attr.cpp | 2 +- clang/test/CIR/CodeGen/if-constexpr.cpp | 2 +- clang/test/CIR/CodeGen/implicit-return.cpp | 8 +- clang/test/CIR/CodeGen/inc-bool.cpp | 2 +- clang/test/CIR/CodeGen/inc-dec.cpp | 8 +- clang/test/CIR/CodeGen/initlist-ptr-ptr.cpp | 4 +- .../CIR/CodeGen/initlist-ptr-unsigned.cpp | 4 +- clang/test/CIR/CodeGen/kr-func-promote.c | 4 +- clang/test/CIR/CodeGen/label-values.c | 10 +- clang/test/CIR/CodeGen/lambda.cpp | 2 +- clang/test/CIR/CodeGen/libcall.cpp | 6 +- clang/test/CIR/CodeGen/linkage.c | 8 +- clang/test/CIR/CodeGen/loop-scope.cpp | 4 +- clang/test/CIR/CodeGen/loop.cpp | 18 +- clang/test/CIR/CodeGen/lvalue-refs.cpp | 4 +- .../CIR/CodeGen/materialize-temporary.cpp | 8 +- clang/test/CIR/CodeGen/move.cpp | 2 +- clang/test/CIR/CodeGen/multi-vtable.cpp | 6 +- clang/test/CIR/CodeGen/new-null.cpp | 8 +- clang/test/CIR/CodeGen/new.cpp | 34 +-- clang/test/CIR/CodeGen/no-proto-fun-ptr.c | 4 +- clang/test/CIR/CodeGen/no-proto-is-void.cpp | 2 +- clang/test/CIR/CodeGen/no-prototype.c | 16 +- clang/test/CIR/CodeGen/nrvo.cpp | 2 +- clang/test/CIR/CodeGen/nullptr-init.cpp | 4 +- clang/test/CIR/CodeGen/offsetof.c | 2 +- clang/test/CIR/CodeGen/ofstream.cpp | 2 +- clang/test/CIR/CodeGen/opaque.c | 2 +- clang/test/CIR/CodeGen/optnone.cpp | 2 +- clang/test/CIR/CodeGen/paren-list-init.cpp | 4 +- clang/test/CIR/CodeGen/pass-object-size.c | 2 +- .../CIR/CodeGen/pointer-to-data-member.cpp | 14 +- .../CIR/CodeGen/pointer-to-member-func.cpp | 8 +- clang/test/CIR/CodeGen/pred-info-builtins.c | 10 +- clang/test/CIR/CodeGen/predefined.cpp | 2 +- clang/test/CIR/CodeGen/ptrdiff.cpp | 4 +- clang/test/CIR/CodeGen/rangefor.cpp | 2 +- clang/test/CIR/CodeGen/requires-expr.cpp | 14 +- clang/test/CIR/CodeGen/return.cpp | 4 +- clang/test/CIR/CodeGen/same-mangled-name.cpp | 4 +- clang/test/CIR/CodeGen/sizeof-pack.cpp | 6 +- .../skip-functions-from-system-headers.cpp | 9 +- clang/test/CIR/CodeGen/source-loc-expr.cpp | 14 +- clang/test/CIR/CodeGen/sourcelocation.cpp | 2 +- .../test/CIR/CodeGen/special-virtual-func.cpp | 4 +- clang/test/CIR/CodeGen/static.cpp | 12 +- clang/test/CIR/CodeGen/std-find.cpp | 2 +- clang/test/CIR/CodeGen/store.c | 2 +- clang/test/CIR/CodeGen/struct.c | 12 +- clang/test/CIR/CodeGen/struct.cpp | 14 +- clang/test/CIR/CodeGen/switch-gnurange.cpp | 14 +- clang/test/CIR/CodeGen/switch.cpp | 30 +- clang/test/CIR/CodeGen/tbaa-enum.c | 8 +- clang/test/CIR/CodeGen/tbaa-enum.cpp | 8 +- clang/test/CIR/CodeGen/tbaa-scalar.c | 8 +- clang/test/CIR/CodeGen/tbaa-struct.cpp | 28 +- clang/test/CIR/CodeGen/tbaa-union.c | 2 +- clang/test/CIR/CodeGen/temporaries.cpp | 2 +- .../CIR/CodeGen/temporary-materialization.cpp | 4 +- clang/test/CIR/CodeGen/tempref.cpp | 4 +- clang/test/CIR/CodeGen/ternary.cpp | 8 +- .../test/CIR/CodeGen/three-way-comparison.cpp | 12 +- clang/test/CIR/CodeGen/throw.cpp | 6 +- clang/test/CIR/CodeGen/tls.c | 2 +- clang/test/CIR/CodeGen/trap.cpp | 4 +- clang/test/CIR/CodeGen/try-catch-dtors.cpp | 12 +- clang/test/CIR/CodeGen/try-catch.cpp | 16 +- clang/test/CIR/CodeGen/type-trait.cpp | 2 +- clang/test/CIR/CodeGen/typedef.c | 2 +- clang/test/CIR/CodeGen/types-IEEE-quad.c | 2 +- clang/test/CIR/CodeGen/types.c | 44 +-- clang/test/CIR/CodeGen/unary-deref.cpp | 2 +- clang/test/CIR/CodeGen/unary.c | 10 +- clang/test/CIR/CodeGen/unary.cpp | 26 +- clang/test/CIR/CodeGen/union-empty.cpp | 2 +- clang/test/CIR/CodeGen/union-init.c | 4 +- clang/test/CIR/CodeGen/union.cpp | 2 +- clang/test/CIR/CodeGen/unreachable.cpp | 4 +- clang/test/CIR/CodeGen/uwtable.cpp | 8 +- clang/test/CIR/CodeGen/var-arg-float.c | 4 +- clang/test/CIR/CodeGen/var-arg-scope.c | 4 +- clang/test/CIR/CodeGen/var-arg.c | 4 +- clang/test/CIR/CodeGen/variadic-ctor.cpp | 2 +- clang/test/CIR/CodeGen/variadics.c | 4 +- clang/test/CIR/CodeGen/vector.cpp | 2 +- clang/test/CIR/CodeGen/vectype-ext.cpp | 14 +- .../CIR/CodeGen/virtual-destructor-calls.cpp | 14 +- ...l-destructor-explicit-unqualified-call.cpp | 2 +- clang/test/CIR/CodeGen/visibility-attribute.c | 12 +- clang/test/CIR/CodeGen/vla.c | 10 +- clang/test/CIR/CodeGen/volatile.cpp | 16 +- clang/test/CIR/CodeGen/vtable-emission.cpp | 2 +- clang/test/CIR/CodeGen/vtable-rtti.cpp | 8 +- clang/test/CIR/CodeGen/vtt.cpp | 10 +- clang/test/CIR/CodeGen/weak.c | 2 +- clang/test/CIR/IR/dynamic-cast.cir | 4 +- clang/test/CIR/IR/func-dsolocal-parser.cir | 2 +- clang/test/CIR/Lowering/try-catch.cpp | 8 +- clang/test/CIR/Lowering/var-arg-x86_64.c | 8 +- clang/test/CIR/driver.c | 4 +- clang/test/CIR/emit-mlir.c | 4 +- clang/test/CIR/hello.c | 2 +- clang/test/CIR/mlirprint.c | 12 +- 210 files changed, 1088 insertions(+), 967 deletions(-) create mode 100644 clang/test/CIR/CodeGen/dynamic-cast.mlir diff --git a/clang/test/CIR/CallConvLowering/AArch64/aarch64-cc-structs.c b/clang/test/CIR/CallConvLowering/AArch64/aarch64-cc-structs.c index 3582523378f8..d0742456084f 100644 --- a/clang/test/CIR/CallConvLowering/AArch64/aarch64-cc-structs.c +++ b/clang/test/CIR/CallConvLowering/AArch64/aarch64-cc-structs.c @@ -27,7 +27,7 @@ typedef struct { int64_t c; } GT_128; -// CHECK: cir.func {{.*@ret_lt_64}}() -> !u16i +// CHECK: cir.func {{.*}} @ret_lt_64() -> !u16i // CHECK: %[[#V0:]] = cir.alloca !rec_LT_64, !cir.ptr, ["__retval"] // CHECK: %[[#V1:]] = cir.cast bitcast %[[#V0]] : !cir.ptr -> !cir.ptr // CHECK: %[[#V2:]] = cir.load{{.*}} %[[#V1]] : !cir.ptr, !u16i @@ -37,7 +37,7 @@ LT_64 ret_lt_64() { return x; } -// CHECK: cir.func {{.*@ret_eq_64}}() -> !u64i +// CHECK: cir.func {{.*}} @ret_eq_64() -> !u64i // CHECK: %[[#V0:]] = cir.alloca !rec_EQ_64, !cir.ptr, ["__retval"] // CHECK: %[[#V1:]] = cir.cast bitcast %[[#V0]] : !cir.ptr -> !cir.ptr // CHECK: %[[#V2:]] = cir.load{{.*}} %[[#V1]] : !cir.ptr, !u64i @@ -47,7 +47,7 @@ EQ_64 ret_eq_64() { return x; } -// CHECK: cir.func {{.*@ret_lt_128}}() -> !cir.array +// CHECK: cir.func {{.*}} @ret_lt_128() -> !cir.array // CHECK: %[[#V0:]] = cir.alloca !rec_LT_128, !cir.ptr, ["__retval"] // CHECK: %[[#V1:]] = cir.cast bitcast %[[#V0]] : !cir.ptr -> !cir.ptr> // CHECK: %[[#V2:]] = cir.load{{.*}} %[[#V1]] : !cir.ptr>, !cir.array @@ -57,7 +57,7 @@ LT_128 ret_lt_128() { return x; } -// CHECK: cir.func {{.*@ret_eq_128}}() -> !cir.array +// CHECK: cir.func {{.*}} @ret_eq_128() -> !cir.array // CHECK: %[[#V0:]] = cir.alloca !rec_EQ_128, !cir.ptr, ["__retval"] // CHECK: %[[#V1:]] = cir.cast bitcast %[[#V0]] : !cir.ptr -> !cir.ptr> // CHECK: %[[#V2:]] = cir.load{{.*}} %[[#V1]] : !cir.ptr>, !cir.array @@ -67,7 +67,7 @@ EQ_128 ret_eq_128() { return x; } -// CHECK: cir.func {{.*@ret_gt_128}}(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @ret_gt_128(%arg0: !cir.ptr // CHECK-NOT: cir.return {{%.*}} GT_128 ret_gt_128() { GT_128 x; @@ -80,7 +80,7 @@ typedef struct { int c; } S; -// CHECK: cir.func {{.*@retS}}() -> !cir.array +// CHECK: cir.func {{.*}} @retS() -> !cir.array // CHECK: %[[#V0:]] = cir.alloca !rec_S, !cir.ptr, ["__retval"] {alignment = 4 : i64} // CHECK: %[[#V1:]] = cir.alloca !cir.array, !cir.ptr>, ["tmp"] {alignment = 8 : i64} // CHECK: %[[#V2:]] = cir.cast bitcast %[[#V0]] : !cir.ptr -> !cir.ptr @@ -100,7 +100,7 @@ S retS() { S s; return s; } -// CHECK: cir.func {{.*@pass_lt_64}}(%arg0: !u64 +// CHECK: cir.func {{.*}} @pass_lt_64(%arg0: !u64 // CHECK: %[[#V0:]] = cir.alloca !rec_LT_64, !cir.ptr // CHECK: %[[#V1:]] = cir.cast integral %arg0 : !u64i -> !u16i // CHECK: %[[#V2:]] = cir.cast bitcast %[[#V0]] : !cir.ptr -> !cir.ptr @@ -112,7 +112,7 @@ S retS() { // LLVM: store i16 %[[#V2]], ptr %[[#V1]], align 2 void pass_lt_64(LT_64 s) {} -// CHECK: cir.func {{.*@pass_eq_64}}(%arg0: !u64i +// CHECK: cir.func {{.*}} @pass_eq_64(%arg0: !u64i // CHECK: %[[#V0:]] = cir.alloca !rec_EQ_64, !cir.ptr // CHECK: %[[#V1:]] = cir.cast bitcast %[[#V0]] : !cir.ptr -> !cir.ptr // CHECK: cir.store{{.*}} %arg0, %[[#V1]] : !u64i, !cir.ptr @@ -122,7 +122,7 @@ void pass_lt_64(LT_64 s) {} // LLVM: store i64 %0, ptr %[[#V1]], align 8 void pass_eq_64(EQ_64 s) {} -// CHECK: cir.func {{.*@pass_lt_128}}(%arg0: !cir.array +// CHECK: cir.func {{.*}} @pass_lt_128(%arg0: !cir.array // CHECK: %[[#V0:]] = cir.alloca !rec_LT_128, !cir.ptr // CHECK: %[[#V1:]] = cir.cast bitcast %[[#V0]] : !cir.ptr -> !cir.ptr> // CHECK: cir.store{{.*}} %arg0, %[[#V1]] : !cir.array, !cir.ptr> @@ -132,7 +132,7 @@ void pass_eq_64(EQ_64 s) {} // LLVM: store [2 x i64] %0, ptr %[[#V1]], align 8 void pass_lt_128(LT_128 s) {} -// CHECK: cir.func {{.*@pass_eq_128}}(%arg0: !cir.array +// CHECK: cir.func {{.*}} @pass_eq_128(%arg0: !cir.array // CHECK: %[[#V0:]] = cir.alloca !rec_EQ_128, !cir.ptr // CHECK: %[[#V1:]] = cir.cast bitcast %[[#V0]] : !cir.ptr -> !cir.ptr> // CHECK: cir.store{{.*}} %arg0, %[[#V1]] : !cir.array, !cir.ptr> @@ -142,7 +142,7 @@ void pass_lt_128(LT_128 s) {} // LLVM: store [2 x i64] %0, ptr %[[#V1]], align 8 void pass_eq_128(EQ_128 s) {} -// CHECK: cir.func dso_local @pass_gt_128(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @pass_gt_128(%arg0: !cir.ptr // CHECK: %[[#V0:]] = cir.alloca !cir.ptr, !cir.ptr>, [""] {alignment = 8 : i64} // CHECK: cir.store{{.*}} %arg0, %[[#V0]] : !cir.ptr, !cir.ptr> // CHECK: %[[#V1:]] = cir.load{{.*}} %[[#V0]] : !cir.ptr>, !cir.ptr @@ -153,7 +153,7 @@ void pass_eq_128(EQ_128 s) {} // LLVM: %[[#V2:]] = load ptr, ptr %[[#V1]], align 8 void pass_gt_128(GT_128 s) {} -// CHECK: cir.func dso_local @get_gt_128(%arg0: !cir.ptr {{.*}}, %arg1: !cir.ptr +// CHECK: cir.func {{.*}} @get_gt_128(%arg0: !cir.ptr {{.*}}, %arg1: !cir.ptr // CHECK: %[[#V0:]] = cir.alloca !cir.ptr, !cir.ptr>, [""] {alignment = 8 : i64} // CHECK: cir.store{{.*}} %arg1, %[[#V0]] : !cir.ptr, !cir.ptr> // CHECK: %[[#V1:]] = cir.load{{.*}} %[[#V0]] : !cir.ptr>, !cir.ptr @@ -170,7 +170,7 @@ GT_128 get_gt_128(GT_128 s) { return s; } -// CHECK: cir.func no_proto dso_local @call_and_get_gt_128(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @call_and_get_gt_128(%arg0: !cir.ptr // CHECK: %[[#V0:]] = cir.alloca !rec_GT_128, !cir.ptr, ["tmp"] {alignment = 8 : i64} // CHECK: %[[#V1:]] = cir.load{{.*}} %arg0 : !cir.ptr, !rec_GT_128 // CHECK: %[[#V2:]] = cir.alloca !rec_GT_128, !cir.ptr, [""] {alignment = 8 : i64} @@ -194,7 +194,7 @@ GT_128 call_and_get_gt_128() { s = get_gt_128(s); return s; } -// CHECK: cir.func dso_local @passS(%arg0: !cir.array +// CHECK: cir.func {{.*}} @passS(%arg0: !cir.array // CHECK: %[[#V0:]] = cir.alloca !rec_S, !cir.ptr, [""] {alignment = 4 : i64} // CHECK: %[[#V1:]] = cir.alloca !cir.array, !cir.ptr>, ["tmp"] {alignment = 8 : i64} // CHECK: cir.store{{.*}} %arg0, %[[#V1]] : !cir.array, !cir.ptr> @@ -210,7 +210,7 @@ GT_128 call_and_get_gt_128() { // LLVM: call void @llvm.memcpy.p0.p0.i64(ptr %[[#V1]], ptr %[[#V2]], i64 12, i1 false) void passS(S s) {} -// CHECK: @callS() +// CHECK: cir.func {{.*}} @callS() // CHECK: %[[#V0:]] = cir.alloca !rec_S, !cir.ptr, ["s"] {alignment = 4 : i64} // CHECK: %[[#V1:]] = cir.alloca !cir.array, !cir.ptr>, ["tmp"] {alignment = 8 : i64} // CHECK: %[[#V2:]] = cir.load{{.*}} %[[#V0]] : !cir.ptr, !rec_S @@ -241,7 +241,7 @@ typedef struct { uint8_t c; } S_PAD; -// CHECK: cir.func {{.*@ret_s_pad}}() -> !u48i +// CHECK: cir.func {{.*}} @ret_s_pad() -> !u48i // CHECK: %[[#V0:]] = cir.alloca !rec_S_PAD, !cir.ptr, ["__retval"] {alignment = 2 : i64} // CHECK: %[[#V1:]] = cir.load{{.*}} %[[#V0]] : !cir.ptr, !rec_S_PAD // CHECK: %[[#V2:]] = cir.alloca !u48i, !cir.ptr, [""] {alignment = 2 : i64} @@ -268,7 +268,7 @@ typedef struct { int a[42]; } CAT; -// CHECK: cir.func dso_local @pass_cat(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @pass_cat // CHECK: %[[#V0:]] = cir.alloca !cir.ptr, !cir.ptr>, [""] {alignment = 8 : i64} // CHECK: cir.store{{.*}} %arg0, %[[#V0]] : !cir.ptr, !cir.ptr> // CHECK: %[[#V1:]] = cir.load{{.*}} %[[#V0]] : !cir.ptr>, !cir.ptr @@ -290,9 +290,9 @@ typedef struct { }; } NESTED_U; -// CHECK: cir.func dso_local @pass_nested_u(%arg0: !u64i +// CHECK: cir.func {{.*}} @pass_nested_u(%[[ARG0:[a-z0-9]+]]: !u64i // CHECK: %[[#V0:]] = cir.alloca !rec_NESTED_U, !cir.ptr, [""] {alignment = 4 : i64} -// CHECK: %[[#V1:]] = cir.cast integral %arg0 : !u64i -> !u16i +// CHECK: %[[#V1:]] = cir.cast integral %[[ARG0]] : !u64i -> !u16i // CHECK: %[[#V2:]] = cir.cast bitcast %[[#V0]] : !cir.ptr // CHECK: cir.store{{.*}} %[[#V1]], %[[#V2]] : !u16i // CHECK: cir.return @@ -304,7 +304,7 @@ typedef struct { // LLVM: ret void void pass_nested_u(NESTED_U a) {} -// CHECK: cir.func no_proto dso_local @call_nested_u() +// CHECK: cir.func {{.*}} @call_nested_u() // CHECK: %[[#V0:]] = cir.alloca !rec_NESTED_U, !cir.ptr // CHECK: %[[#V1:]] = cir.alloca !u64i, !cir.ptr, ["tmp"] // CHECK: %[[#V2:]] = cir.load{{.*}} %[[#V0]] : !cir.ptr, !rec_NESTED_U @@ -355,7 +355,7 @@ void bar(void) { PackedS1 y = foo(); } -// CHECK: cir.func dso_local @bar +// CHECK: cir.func {{.*}} @bar // CHECK: %[[#V0:]] = cir.alloca !rec_PackedS1, !cir.ptr, ["y", init] // CHECK: %[[#V1:]] = cir.alloca !cir.array, !cir.ptr>, ["tmp"] // CHECK: %[[#V2:]] = cir.call @foo() : () -> !cir.array @@ -394,7 +394,7 @@ void qux(void) { } // check source of memcpy -// CHECK: cir.func dso_local @qux +// CHECK: cir.func {{.*}} @qux // CHECK: %[[#V0:]] = cir.alloca !cir.ptr, !cir.ptr>, ["s1", init] // CHECK: %[[#V1:]] = cir.alloca !u64i, !cir.ptr, ["tmp"] // CHECK: %[[#V2:]] = cir.get_global @g : !cir.ptr> diff --git a/clang/test/CIR/CallConvLowering/AArch64/basic.cpp b/clang/test/CIR/CallConvLowering/AArch64/basic.cpp index a9af1a5d4ba2..364aee510962 100644 --- a/clang/test/CIR/CallConvLowering/AArch64/basic.cpp +++ b/clang/test/CIR/CallConvLowering/AArch64/basic.cpp @@ -15,27 +15,27 @@ bool Bool(bool a) { return Bool(a); } -// CHECK: cir.func dso_local @_Z5UCharh(%arg0: !u8i loc({{.+}})) -> !u8i +// CHECK: cir.func {{.*}} @_Z5UCharh(%arg0: !u8i loc({{.+}})) -> !u8i unsigned char UChar(unsigned char c) { // CHECK: cir.call @_Z5UCharh(%2) : (!u8i) -> !u8i return UChar(c); } -// CHECK: cir.func dso_local @_Z6UShortt(%arg0: !u16i loc({{.+}})) -> !u16i +// CHECK: cir.func {{.*}} @_Z6UShortt(%arg0: !u16i loc({{.+}})) -> !u16i unsigned short UShort(unsigned short s) { // CHECK: cir.call @_Z6UShortt(%2) : (!u16i) -> !u16i return UShort(s); } -// CHECK: cir.func dso_local @_Z4UIntj(%arg0: !u32i loc({{.+}})) -> !u32i +// CHECK: cir.func {{.*}} @_Z4UIntj(%arg0: !u32i loc({{.+}})) -> !u32i unsigned int UInt(unsigned int i) { // CHECK: cir.call @_Z4UIntj(%2) : (!u32i) -> !u32i return UInt(i); } -// CHECK: cir.func dso_local @_Z5ULongm(%arg0: !u64i loc({{.+}})) -> !u64i +// CHECK: cir.func {{.*}} @_Z5ULongm(%arg0: !u64i loc({{.+}})) -> !u64i unsigned long ULong(unsigned long l) { // CHECK: cir.call @_Z5ULongm(%2) : (!u64i) -> !u64i return ULong(l); } -// CHECK: cir.func dso_local @_Z9ULongLongy(%arg0: !u64i loc({{.+}})) -> !u64i +// CHECK: cir.func {{.*}} @_Z9ULongLongy(%arg0: !u64i loc({{.+}})) -> !u64i unsigned long long ULongLong(unsigned long long l) { // CHECK: cir.call @_Z9ULongLongy(%2) : (!u64i) -> !u64i return ULongLong(l); @@ -44,27 +44,27 @@ unsigned long long ULongLong(unsigned long long l) { /// Test call conv lowering for trivial signed cases. /// -// CHECK: cir.func dso_local @_Z4Chara(%arg0: !s8i loc({{.+}})) -> !s8i +// CHECK: cir.func {{.*}} @_Z4Chara(%arg0: !s8i loc({{.+}})) -> !s8i char Char(signed char c) { // CHECK: cir.call @_Z4Chara(%{{.+}}) : (!s8i) -> !s8i return Char(c); } -// CHECK: cir.func dso_local @_Z5Shorts(%arg0: !s16i loc({{.+}})) -> !s16i +// CHECK: cir.func {{.*}} @_Z5Shorts(%arg0: !s16i loc({{.+}})) -> !s16i short Short(short s) { // CHECK: cir.call @_Z5Shorts(%{{.+}}) : (!s16i) -> !s16i return Short(s); } -// CHECK: cir.func dso_local @_Z3Inti(%arg0: !s32i loc({{.+}})) -> !s32i +// CHECK: cir.func {{.*}} @_Z3Inti(%arg0: !s32i loc({{.+}})) -> !s32i int Int(int i) { // CHECK: cir.call @_Z3Inti(%{{.+}}) : (!s32i) -> !s32i return Int(i); } -// CHECK: cir.func dso_local @_Z4Longl(%arg0: !s64i loc({{.+}})) -> !s64i +// CHECK: cir.func {{.*}} @_Z4Longl(%arg0: !s64i loc({{.+}})) -> !s64i long Long(long l) { // CHECK: cir.call @_Z4Longl(%{{.+}}) : (!s64i) -> !s64i return Long(l); } -// CHECK: cir.func dso_local @_Z8LongLongx(%arg0: !s64i loc({{.+}})) -> !s64i +// CHECK: cir.func {{.*}} @_Z8LongLongx(%arg0: !s64i loc({{.+}})) -> !s64i long long LongLong(long long l) { // CHECK: cir.call @_Z8LongLongx(%{{.+}}) : (!s64i) -> !s64i return LongLong(l); @@ -73,12 +73,12 @@ long long LongLong(long long l) { /// Test call conv lowering for floating point. /// -// CHECK: cir.func dso_local @_Z5Floatf(%arg0: !cir.float loc({{.+}})) -> !cir.float +// CHECK: cir.func {{.*}} @_Z5Floatf(%arg0: !cir.float loc({{.+}})) -> !cir.float float Float(float f) { // cir.call @_Z5Floatf(%{{.+}}) : (!cir.float) -> !cir.float return Float(f); } -// CHECK: cir.func dso_local @_Z6Doubled(%arg0: !cir.double loc({{.+}})) -> !cir.double +// CHECK: cir.func {{.*}} @_Z6Doubled(%arg0: !cir.double loc({{.+}})) -> !cir.double double Double(double d) { // cir.call @_Z6Doubled(%{{.+}}) : (!cir.double) -> !cir.double return Double(d); diff --git a/clang/test/CIR/CallConvLowering/AArch64/ptr-fields.c b/clang/test/CIR/CallConvLowering/AArch64/ptr-fields.c index a28c50f85127..79e4e437d791 100644 --- a/clang/test/CIR/CallConvLowering/AArch64/ptr-fields.c +++ b/clang/test/CIR/CallConvLowering/AArch64/ptr-fields.c @@ -11,7 +11,7 @@ typedef struct { int foo(int x) { return x; } -// CIR: cir.func dso_local @passA(%arg0: !u64i +// CIR: cir.func {{.*}} @passA(%arg0: !u64i // CIR: %[[#V0:]] = cir.alloca !rec_A, !cir.ptr, [""] {alignment = 4 : i64} // CIR: %[[#V1:]] = cir.cast bitcast %[[#V0]] : !cir.ptr -> !cir.ptr // CIR: cir.store{{.*}} %arg0, %[[#V1]] : !u64i, !cir.ptr @@ -36,7 +36,7 @@ typedef struct { S_1* s; } S_2; -// CIR: cir.func dso_local @passB(%arg0: !u64i +// CIR: cir.func {{.*}} @passB(%arg0: !u64i // CIR: %[[#V0:]] = cir.alloca !rec_S_2, !cir.ptr, [""] {alignment = 4 : i64} // CIR: %[[#V1:]] = cir.cast bitcast %[[#V0]] : !cir.ptr -> !cir.ptr // CIR: cir.store{{.*}} %arg0, %[[#V1]] : !u64i, !cir.ptr diff --git a/clang/test/CIR/CallConvLowering/AArch64/struct.c b/clang/test/CIR/CallConvLowering/AArch64/struct.c index 21c5d5fcb7bf..d542502bf33a 100644 --- a/clang/test/CIR/CallConvLowering/AArch64/struct.c +++ b/clang/test/CIR/CallConvLowering/AArch64/struct.c @@ -7,7 +7,7 @@ typedef struct { int a, b; } S; -// CIR: cir.func dso_local @init(%arg0: !u64i +// CIR: cir.func {{.*}} @init(%arg0: !u64i // CIR: %[[#V0:]] = cir.alloca !rec_S, !cir.ptr, [""] {alignment = 4 : i64} // CIR: %[[#V1:]] = cir.cast bitcast %[[#V0]] : !cir.ptr -> !cir.ptr // CIR: cir.store{{.*}} %arg0, %[[#V1]] : !u64i, !cir.ptr @@ -40,7 +40,7 @@ S init(S s) { return s; } -// CIR: cir.func no_proto dso_local @foo1 +// CIR: cir.func {{.*}} @foo1 // CIR: %[[#V0:]] = cir.alloca !rec_S, !cir.ptr, ["s"] // CIR: %[[#V1:]] = cir.alloca !rec_S, !cir.ptr, ["tmp"] {alignment = 4 : i64} // CIR: %[[#V2:]] = cir.cast bitcast %[[#V0]] : !cir.ptr -> !cir.ptr @@ -63,7 +63,7 @@ void foo1() { s = init(s); } -// CIR: cir.func dso_local @foo2(%arg0: !u64i +// CIR: cir.func {{.*}} @foo2(%arg0: !u64i // CIR: %[[#V0:]] = cir.alloca !rec_S, !cir.ptr, [""] {alignment = 4 : i64} // CIR: %[[#V1:]] = cir.cast bitcast %[[#V0]] : !cir.ptr -> !cir.ptr // CIR: cir.store{{.*}} %arg0, %[[#V1]] : !u64i, !cir.ptr @@ -108,7 +108,7 @@ typedef struct { char b; } S2; -// CIR: cir.func dso_local @init2(%arg0: !u16i +// CIR: cir.func {{.*}} @init2(%arg0: !u16i // CIR: %[[#V0:]] = cir.alloca !rec_S2, !cir.ptr, [""] {alignment = 4 : i64} // CIR: %[[#V1:]] = cir.cast bitcast %[[#V0]] : !cir.ptr -> !cir.ptr // CIR: cir.store{{.*}} %arg0, %[[#V1]] : !u16i, !cir.ptr @@ -143,7 +143,7 @@ S2 init2(S2 s) { return s; } -// CIR: cir.func no_proto dso_local @foo3() +// CIR: cir.func {{.*}} @foo3() // CIR: %[[#V0:]] = cir.alloca !rec_S2, !cir.ptr, ["s"] // CIR: %[[#V1:]] = cir.alloca !rec_S2, !cir.ptr, ["tmp"] {alignment = 1 : i64} // CIR: %[[#V2:]] = cir.cast bitcast %[[#V0]] : !cir.ptr -> !cir.ptr diff --git a/clang/test/CIR/CallConvLowering/AArch64/union.c b/clang/test/CIR/CallConvLowering/AArch64/union.c index feeb054aeb00..708c151e5591 100644 --- a/clang/test/CIR/CallConvLowering/AArch64/union.c +++ b/clang/test/CIR/CallConvLowering/AArch64/union.c @@ -9,7 +9,7 @@ typedef union { int a, b, c; } U; -// CIR: cir.func dso_local @foo(%arg0: !u64i +// CIR: cir.func {{.*}} @foo(%arg0: !u64i // CIR: %[[#V0:]] = cir.alloca !rec_U, !cir.ptr, [""] {alignment = 4 : i64} // CIR: %[[#V1:]] = cir.cast integral %arg0 : !u64i -> !u32i // CIR: %[[#V2:]] = cir.cast bitcast %[[#V0]] : !cir.ptr -> !cir.ptr @@ -23,7 +23,7 @@ typedef union { // LLVM: ret void void foo(U u) {} -// CIR: cir.func no_proto dso_local @init() -> !u32i +// CIR: cir.func {{.*}} @init() -> !u32i // CIR: %[[#V0:]] = cir.alloca !rec_U, !cir.ptr, ["__retval"] {alignment = 4 : i64} // CIR: %[[#V1:]] = cir.load %[[#V0]] : !cir.ptr, !rec_U // CIR: %[[#V2:]] = cir.cast bitcast %[[#V0]] : !cir.ptr -> !cir.ptr diff --git a/clang/test/CIR/CallConvLowering/NVPTX/basic.cpp b/clang/test/CIR/CallConvLowering/NVPTX/basic.cpp index b03f2f3e9626..d4af31c3c880 100644 --- a/clang/test/CIR/CallConvLowering/NVPTX/basic.cpp +++ b/clang/test/CIR/CallConvLowering/NVPTX/basic.cpp @@ -17,61 +17,61 @@ bool Bool(bool a) { return Bool(a); } -// CHECK: cir.func dso_local @_Z5UCharh(%arg0: !u8i {cir.zeroext} loc({{.+}})) -> (!u8i {cir.zeroext}) +// CHECK: cir.func {{.*}} @_Z5UCharh(%arg0: !u8i {cir.zeroext} loc({{.+}})) -> (!u8i {cir.zeroext}) unsigned char UChar(unsigned char c) { // CHECK: cir.call @_Z5UCharh(%{{.+}}) : (!u8i) -> !u8i return UChar(c); } -// CHECK: cir.func dso_local @_Z6UShortt(%arg0: !u16i {cir.zeroext} loc({{.+}})) -> (!u16i {cir.zeroext}) +// CHECK: cir.func {{.*}} @_Z6UShortt(%arg0: !u16i {cir.zeroext} loc({{.+}})) -> (!u16i {cir.zeroext}) unsigned short UShort(unsigned short s) { // CHECK: cir.call @_Z6UShortt(%{{.+}}) : (!u16i) -> !u16i return UShort(s); } -// CHECK: cir.func dso_local @_Z4UIntj(%arg0: !u32i loc({{.+}})) -> !u32i +// CHECK: cir.func {{.*}} @_Z4UIntj(%arg0: !u32i loc({{.+}})) -> !u32i unsigned int UInt(unsigned int i) { // CHECK: cir.call @_Z4UIntj(%{{.+}}) : (!u32i) -> !u32i return UInt(i); } -// CHECK: cir.func dso_local @_Z5ULongm(%arg0: !u32i loc({{.+}})) -> !u32i +// CHECK: cir.func {{.*}} @_Z5ULongm(%arg0: !u32i loc({{.+}})) -> !u32i unsigned long ULong(unsigned long l) { // CHECK: cir.call @_Z5ULongm(%{{.+}}) : (!u32i) -> !u32i return ULong(l); } -// CHECK: cir.func dso_local @_Z9ULongLongy(%arg0: !u64i loc({{.+}})) -> !u64i +// CHECK: cir.func {{.*}} @_Z9ULongLongy(%arg0: !u64i loc({{.+}})) -> !u64i unsigned long long ULongLong(unsigned long long l) { // CHECK: cir.call @_Z9ULongLongy(%{{.+}}) : (!u64i) -> !u64i return ULongLong(l); } -// CHECK: cir.func dso_local @_Z4Chara(%arg0: !s8i {cir.signext} loc({{.+}})) -> (!s8i {cir.signext}) +// CHECK: cir.func {{.*}} @_Z4Chara(%arg0: !s8i {cir.signext} loc({{.+}})) -> (!s8i {cir.signext}) char Char(signed char c) { // CHECK: cir.call @_Z4Chara(%{{.+}}) : (!s8i) -> !s8i return Char(c); } -// CHECK: cir.func dso_local @_Z5Shorts(%arg0: !s16i {cir.signext} loc({{.+}})) -> (!s16i {cir.signext}) +// CHECK: cir.func {{.*}} @_Z5Shorts(%arg0: !s16i {cir.signext} loc({{.+}})) -> (!s16i {cir.signext}) short Short(short s) { // CHECK: cir.call @_Z5Shorts(%{{.+}}) : (!s16i) -> !s16i return Short(s); } -// CHECK: cir.func dso_local @_Z3Inti(%arg0: !s32i loc({{.+}})) -> !s32i +// CHECK: cir.func {{.*}} @_Z3Inti(%arg0: !s32i loc({{.+}})) -> !s32i int Int(int i) { // CHECK: cir.call @_Z3Inti(%{{.+}}) : (!s32i) -> !s32i return Int(i); } -// CHECK: cir.func dso_local @_Z4Longl(%arg0: !s32i loc({{.+}})) -> !s32i +// CHECK: cir.func {{.*}} @_Z4Longl(%arg0: !s32i loc({{.+}})) -> !s32i long Long(long l) { // CHECK: cir.call @_Z4Longl(%{{.+}}) : (!s32i) -> !s32i return Long(l); } -// CHECK: cir.func dso_local @_Z8LongLongx(%arg0: !s64i loc({{.+}})) -> !s64i +// CHECK: cir.func {{.*}} @_Z8LongLongx(%arg0: !s64i loc({{.+}})) -> !s64i long long LongLong(long long l) { // CHECK: cir.call @_Z8LongLongx(%{{.+}}) : (!s64i) -> !s64i return LongLong(l); @@ -84,7 +84,7 @@ struct Struct { int a, b, c, d, e; }; -// CHECK: cir.func dso_local @_Z10StructFuncv() -> !rec_Struct +// CHECK: cir.func {{.*}} @_Z10StructFuncv() -> !rec_Struct Struct StructFunc() { return { 0, 1, 2, 3, 4 }; } diff --git a/clang/test/CIR/CallConvLowering/x86_64/basic.cpp b/clang/test/CIR/CallConvLowering/x86_64/basic.cpp index bacea3fa19fe..21e2cb483698 100644 --- a/clang/test/CIR/CallConvLowering/x86_64/basic.cpp +++ b/clang/test/CIR/CallConvLowering/x86_64/basic.cpp @@ -21,27 +21,27 @@ bool Bool(bool a) { return Bool(a); } -// CHECK: cir.func dso_local @_Z5UCharh(%arg0: !u8i {cir.zeroext} loc({{.+}})) -> (!u8i {cir.zeroext}) +// CHECK: cir.func {{.*}} @_Z5UCharh(%arg0: !u8i {cir.zeroext} loc({{.+}})) -> (!u8i {cir.zeroext}) unsigned char UChar(unsigned char c) { // CHECK: cir.call @_Z5UCharh(%2) : (!u8i) -> !u8i return UChar(c); } -// CHECK: cir.func dso_local @_Z6UShortt(%arg0: !u16i {cir.zeroext} loc({{.+}})) -> (!u16i {cir.zeroext}) +// CHECK: cir.func {{.*}} @_Z6UShortt(%arg0: !u16i {cir.zeroext} loc({{.+}})) -> (!u16i {cir.zeroext}) unsigned short UShort(unsigned short s) { // CHECK: cir.call @_Z6UShortt(%2) : (!u16i) -> !u16i return UShort(s); } -// CHECK: cir.func dso_local @_Z4UIntj(%arg0: !u32i loc({{.+}})) -> !u32i +// CHECK: cir.func {{.*}} @_Z4UIntj(%arg0: !u32i loc({{.+}})) -> !u32i unsigned int UInt(unsigned int i) { // CHECK: cir.call @_Z4UIntj(%2) : (!u32i) -> !u32i return UInt(i); } -// CHECK: cir.func dso_local @_Z5ULongm(%arg0: !u64i loc({{.+}})) -> !u64i +// CHECK: cir.func {{.*}} @_Z5ULongm(%arg0: !u64i loc({{.+}})) -> !u64i unsigned long ULong(unsigned long l) { // CHECK: cir.call @_Z5ULongm(%2) : (!u64i) -> !u64i return ULong(l); } -// CHECK: cir.func dso_local @_Z9ULongLongy(%arg0: !u64i loc({{.+}})) -> !u64i +// CHECK: cir.func {{.*}} @_Z9ULongLongy(%arg0: !u64i loc({{.+}})) -> !u64i unsigned long long ULongLong(unsigned long long l) { // CHECK: cir.call @_Z9ULongLongy(%2) : (!u64i) -> !u64i return ULongLong(l); @@ -49,27 +49,27 @@ unsigned long long ULongLong(unsigned long long l) { /// Test call conv lowering for trivial signext cases. /// -// CHECK: cir.func dso_local @_Z4Chara(%arg0: !s8i {cir.signext} loc({{.+}})) -> (!s8i {cir.signext}) +// CHECK: cir.func {{.*}} @_Z4Chara(%arg0: !s8i {cir.signext} loc({{.+}})) -> (!s8i {cir.signext}) char Char(signed char c) { // CHECK: cir.call @_Z4Chara(%{{.+}}) : (!s8i) -> !s8i return Char(c); } -// CHECK: cir.func dso_local @_Z5Shorts(%arg0: !s16i {cir.signext} loc({{.+}})) -> (!s16i {cir.signext}) +// CHECK: cir.func {{.*}} @_Z5Shorts(%arg0: !s16i {cir.signext} loc({{.+}})) -> (!s16i {cir.signext}) short Short(short s) { // CHECK: cir.call @_Z5Shorts(%{{.+}}) : (!s16i) -> !s16i return Short(s); } -// CHECK: cir.func dso_local @_Z3Inti(%arg0: !s32i loc({{.+}})) -> !s32i +// CHECK: cir.func {{.*}} @_Z3Inti(%arg0: !s32i loc({{.+}})) -> !s32i int Int(int i) { // CHECK: cir.call @_Z3Inti(%{{.+}}) : (!s32i) -> !s32i return Int(i); } -// CHECK: cir.func dso_local @_Z4Longl(%arg0: !s64i loc({{.+}})) -> !s64i +// CHECK: cir.func {{.*}} @_Z4Longl(%arg0: !s64i loc({{.+}})) -> !s64i long Long(long l) { // CHECK: cir.call @_Z4Longl(%{{.+}}) : (!s64i) -> !s64i return Long(l); } -// CHECK: cir.func dso_local @_Z8LongLongx(%arg0: !s64i loc({{.+}})) -> !s64i +// CHECK: cir.func {{.*}} @_Z8LongLongx(%arg0: !s64i loc({{.+}})) -> !s64i long long LongLong(long long l) { // CHECK: cir.call @_Z8LongLongx(%{{.+}}) : (!s64i) -> !s64i return LongLong(l); @@ -77,12 +77,12 @@ long long LongLong(long long l) { /// Test call conv lowering for floating point. /// -// CHECK: cir.func dso_local @_Z5Floatf(%arg0: !cir.float loc({{.+}})) -> !cir.float +// CHECK: cir.func {{.*}} @_Z5Floatf(%arg0: !cir.float loc({{.+}})) -> !cir.float float Float(float f) { // cir.call @_Z5Floatf(%{{.+}}) : (!cir.float) -> !cir.float return Float(f); } -// CHECK: cir.func dso_local @_Z6Doubled(%arg0: !cir.double loc({{.+}})) -> !cir.double +// CHECK: cir.func {{.*}} @_Z6Doubled(%arg0: !cir.double loc({{.+}})) -> !cir.double double Double(double d) { // cir.call @_Z6Doubled(%{{.+}}) : (!cir.double) -> !cir.double return Double(d); @@ -135,7 +135,7 @@ struct S2 { // COM: Function prologue -// CHECK: cir.func dso_local @_Z2s22S2(%[[ARG0:[a-z0-9]+]]: !u64i {{.*}}, %[[ARG1:[a-z0-9]+]]: !s32i {{.*}}) -> !rec_anon_struct +// CHECK: cir.func {{.*}} @_Z2s22S2(%[[ARG0:[a-z0-9]+]]: !u64i {{.*}}, %[[ARG1:[a-z0-9]+]]: !s32i {{.*}}) -> !rec_anon_struct // CHECK: %[[#F0:]] = cir.alloca !rec_S2, !cir.ptr // CHECK: %[[#F1:]] = cir.alloca !rec_anon_struct, !cir.ptr // CHECK: %[[#F2:]] = cir.get_member %[[#F1]][0]{{.*}} : !cir.ptr -> !cir.ptr diff --git a/clang/test/CIR/CodeGen/AArch64/neon-arith.c b/clang/test/CIR/CodeGen/AArch64/neon-arith.c index 439621cb8ca8..f73d6e329759 100644 --- a/clang/test/CIR/CodeGen/AArch64/neon-arith.c +++ b/clang/test/CIR/CodeGen/AArch64/neon-arith.c @@ -20,7 +20,7 @@ float32_t test_vrndns_f32(float32_t a) { return vrndns_f32(a); } -// CIR: cir.func internal private dso_local @vrndns_f32(%arg0: !cir.float {{.*}}) -> !cir.float +// CIR: cir.func {{.*}} @vrndns_f32(%arg0: !cir.float {{.*}}) -> !cir.float // CIR: cir.store %arg0, [[ARG_SAVE:%.*]] : !cir.float, !cir.ptr // CIR: [[INTRIN_ARG:%.*]] = cir.load{{.*}} [[ARG_SAVE]] : !cir.ptr, !cir.float // CIR: {{%.*}} = cir.roundeven [[INTRIN_ARG]] : !cir.float @@ -42,7 +42,7 @@ float32x2_t test_vrnda_f32(float32x2_t a) { return vrnda_f32(a); } -// CIR: cir.func internal private dso_local @vrnda_f32(%arg0: !cir.vector +// CIR: cir.func {{.*}} @vrnda_f32(%arg0: !cir.vector // CIR: {{%.*}} = cir.round {{.*}} : !cir.vector // CIR: cir.return {{%.*}} : !cir.vector @@ -62,7 +62,7 @@ float32x4_t test_vrndaq_f32(float32x4_t a) { return vrndaq_f32(a); } -// CIR: cir.func internal private dso_local @vrndaq_f32(%arg0: !cir.vector +// CIR: cir.func {{.*}} @vrndaq_f32(%arg0: !cir.vector // CIR: cir.store %arg0, [[ARG_SAVE:%.*]] : !cir.vector, !cir.ptr> // CIR: {{%.*}} = cir.round {{.*}} : !cir.vector // CIR: cir.return {{%.*}} : !cir.vector diff --git a/clang/test/CIR/CodeGen/CUDA/address-spaces.cu b/clang/test/CIR/CodeGen/CUDA/address-spaces.cu index fc4fc831a8d5..66862fdfc356 100644 --- a/clang/test/CIR/CodeGen/CUDA/address-spaces.cu +++ b/clang/test/CIR/CodeGen/CUDA/address-spaces.cu @@ -12,7 +12,7 @@ __global__ void fn() { } // CIR: cir.global "private" internal dso_local lang_address_space(offload_local) @_ZZ2fnvE1j : !s32i -// CIR: cir.func dso_local @_Z2fnv +// CIR: cir.func {{.*}} @_Z2fnv // CIR: [[Local:%[0-9]+]] = cir.alloca !s32i, !cir.ptr, ["i", init] // CIR: [[Shared:%[0-9]+]] = cir.get_global @_ZZ2fnvE1j : !cir.ptr // CIR: [[Tmp:%[0-9]+]] = cir.load {{.*}} [[Local]] : !cir.ptr, !s32i diff --git a/clang/test/CIR/CodeGen/CUDA/cuda-builtin-vars.cu b/clang/test/CIR/CodeGen/CUDA/cuda-builtin-vars.cu index 1f4042f01bda..da4e3daee02b 100644 --- a/clang/test/CIR/CodeGen/CUDA/cuda-builtin-vars.cu +++ b/clang/test/CIR/CodeGen/CUDA/cuda-builtin-vars.cu @@ -19,76 +19,76 @@ void kernel(int *out) { int i = 0; out[i++] = threadIdx.x; - // CIR: cir.func linkonce_odr @_ZN26__cuda_builtin_threadIdx_t17__fetch_builtin_xEv() + // CIR: cir.func {{.*}} @_ZN26__cuda_builtin_threadIdx_t17__fetch_builtin_xEv() // CIR: cir.llvm.intrinsic "nvvm.read.ptx.sreg.tid.x" // LLVM: call{{.*}} i32 @llvm.nvvm.read.ptx.sreg.tid.x() // OGCG: call noundef{{.*}} i32 @llvm.nvvm.read.ptx.sreg.tid.x() out[i++] = threadIdx.y; - // CIR: cir.func linkonce_odr @_ZN26__cuda_builtin_threadIdx_t17__fetch_builtin_yEv() + // CIR: cir.func {{.*}} @_ZN26__cuda_builtin_threadIdx_t17__fetch_builtin_yEv() // CIR: cir.llvm.intrinsic "nvvm.read.ptx.sreg.tid.y" // LLVM: call{{.*}} i32 @llvm.nvvm.read.ptx.sreg.tid.y() // OGCG: call noundef{{.*}} i32 @llvm.nvvm.read.ptx.sreg.tid.y() out[i++] = threadIdx.z; - // CIR: cir.func linkonce_odr @_ZN26__cuda_builtin_threadIdx_t17__fetch_builtin_zEv() + // CIR: cir.func {{.*}} @_ZN26__cuda_builtin_threadIdx_t17__fetch_builtin_zEv() // CIR: cir.llvm.intrinsic "nvvm.read.ptx.sreg.tid.z" // LLVM: call{{.*}} i32 @llvm.nvvm.read.ptx.sreg.tid.z() // OGCG: call noundef{{.*}} i32 @llvm.nvvm.read.ptx.sreg.tid.z() out[i++] = blockIdx.x; - // CIR: cir.func linkonce_odr @_ZN25__cuda_builtin_blockIdx_t17__fetch_builtin_xEv() + // CIR: cir.func {{.*}} @_ZN25__cuda_builtin_blockIdx_t17__fetch_builtin_xEv() // CIR: cir.llvm.intrinsic "nvvm.read.ptx.sreg.ctaid.x" // LLVM: call{{.*}} i32 @llvm.nvvm.read.ptx.sreg.ctaid.x() // OGCG: call noundef{{.*}} i32 @llvm.nvvm.read.ptx.sreg.ctaid.x() out[i++] = blockIdx.y; - // CIR: cir.func linkonce_odr @_ZN25__cuda_builtin_blockIdx_t17__fetch_builtin_yEv() + // CIR: cir.func {{.*}} @_ZN25__cuda_builtin_blockIdx_t17__fetch_builtin_yEv() // CIR: cir.llvm.intrinsic "nvvm.read.ptx.sreg.ctaid.y" // LLVM: call{{.*}} i32 @llvm.nvvm.read.ptx.sreg.ctaid.y() // OGCG: call noundef{{.*}} i32 @llvm.nvvm.read.ptx.sreg.ctaid.y() out[i++] = blockIdx.z; - // CIR: cir.func linkonce_odr @_ZN25__cuda_builtin_blockIdx_t17__fetch_builtin_zEv() + // CIR: cir.func {{.*}} @_ZN25__cuda_builtin_blockIdx_t17__fetch_builtin_zEv() // CIR: cir.llvm.intrinsic "nvvm.read.ptx.sreg.ctaid.z" // LLVM: call{{.*}} i32 @llvm.nvvm.read.ptx.sreg.ctaid.z() // OGCG: call noundef{{.*}} i32 @llvm.nvvm.read.ptx.sreg.ctaid.z() out[i++] = blockDim.x; - // CIR: cir.func linkonce_odr @_ZN25__cuda_builtin_blockDim_t17__fetch_builtin_xEv() + // CIR: cir.func {{.*}} @_ZN25__cuda_builtin_blockDim_t17__fetch_builtin_xEv() // CIR: cir.llvm.intrinsic "nvvm.read.ptx.sreg.ntid.x" // LLVM: call{{.*}} i32 @llvm.nvvm.read.ptx.sreg.ntid.x() // OGCG: call noundef{{.*}} i32 @llvm.nvvm.read.ptx.sreg.ntid.x() out[i++] = blockDim.y; - // CIR: cir.func linkonce_odr @_ZN25__cuda_builtin_blockDim_t17__fetch_builtin_yEv() + // CIR: cir.func {{.*}} @_ZN25__cuda_builtin_blockDim_t17__fetch_builtin_yEv() // CIR: cir.llvm.intrinsic "nvvm.read.ptx.sreg.ntid.y" // LLVM: call{{.*}} i32 @llvm.nvvm.read.ptx.sreg.ntid.y() // OGCG: call noundef{{.*}} i32 @llvm.nvvm.read.ptx.sreg.ntid.y() out[i++] = blockDim.z; - // CIR: cir.func linkonce_odr @_ZN25__cuda_builtin_blockDim_t17__fetch_builtin_zEv() + // CIR: cir.func {{.*}} @_ZN25__cuda_builtin_blockDim_t17__fetch_builtin_zEv() // CIR: cir.llvm.intrinsic "nvvm.read.ptx.sreg.ntid.z" // LLVM: call{{.*}} i32 @llvm.nvvm.read.ptx.sreg.ntid.z() // OGCG: call noundef{{.*}} i32 @llvm.nvvm.read.ptx.sreg.ntid.z() out[i++] = gridDim.x; - // CIR: cir.func linkonce_odr @_ZN24__cuda_builtin_gridDim_t17__fetch_builtin_xEv() + // CIR: cir.func {{.*}} @_ZN24__cuda_builtin_gridDim_t17__fetch_builtin_xEv() // CIR: cir.llvm.intrinsic "nvvm.read.ptx.sreg.nctaid.x" // LLVM: call{{.*}} i32 @llvm.nvvm.read.ptx.sreg.nctaid.x() // OGCG: call noundef{{.*}} i32 @llvm.nvvm.read.ptx.sreg.nctaid.x() out[i++] = gridDim.y; - // CIR: cir.func linkonce_odr @_ZN24__cuda_builtin_gridDim_t17__fetch_builtin_yEv() + // CIR: cir.func {{.*}} @_ZN24__cuda_builtin_gridDim_t17__fetch_builtin_yEv() // CIR: cir.llvm.intrinsic "nvvm.read.ptx.sreg.nctaid.y" // LLVM: call{{.*}} i32 @llvm.nvvm.read.ptx.sreg.nctaid.y() // OGCG: call noundef{{.*}} i32 @llvm.nvvm.read.ptx.sreg.nctaid.y() out[i++] = gridDim.z; - // CIR: cir.func linkonce_odr @_ZN24__cuda_builtin_gridDim_t17__fetch_builtin_zEv() + // CIR: cir.func {{.*}} @_ZN24__cuda_builtin_gridDim_t17__fetch_builtin_zEv() // CIR: cir.llvm.intrinsic "nvvm.read.ptx.sreg.nctaid.z" // LLVM: call{{.*}} i32 @llvm.nvvm.read.ptx.sreg.nctaid.z() // OGCG: call noundef{{.*}} i32 @llvm.nvvm.read.ptx.sreg.nctaid.z() diff --git a/clang/test/CIR/CodeGen/CUDA/destructor.cu b/clang/test/CIR/CodeGen/CUDA/destructor.cu index 001f27597e43..0447d0b84dd8 100644 --- a/clang/test/CIR/CodeGen/CUDA/destructor.cu +++ b/clang/test/CIR/CodeGen/CUDA/destructor.cu @@ -39,7 +39,7 @@ template struct A { // CIR-HOST: module // CIR-DEVICE: module -// CIR-DEVICE: cir.func dso_local @_Z1fIiEvT_ +// CIR-DEVICE: cir.func {{.*}} @_Z1fIiEvT_ // LLVM-DEVICE: define dso_local ptx_kernel void @_Z1fIiEvT_ // OGCG-DEVICE: define ptx_kernel void @_Z1fIiEvT_ diff --git a/clang/test/CIR/CodeGen/CUDA/mangling.cu b/clang/test/CIR/CodeGen/CUDA/mangling.cu index 3c8306df9e89..02bb4000186d 100644 --- a/clang/test/CIR/CodeGen/CUDA/mangling.cu +++ b/clang/test/CIR/CodeGen/CUDA/mangling.cu @@ -12,81 +12,81 @@ namespace ns { __global__ void cpp_global_function_1(int a, int* b, float c) {} - // CIR-HOST: cir.func dso_local @_ZN2ns36__device_stub__cpp_global_function_1EiPif - // CIR-DEVICE: cir.func dso_local @_ZN2ns21cpp_global_function_1EiPif + // CIR-HOST: cir.func {{.*}} @_ZN2ns36__device_stub__cpp_global_function_1EiPif + // CIR-DEVICE: cir.func {{.*}} @_ZN2ns21cpp_global_function_1EiPif __global__ void cpp_global_function_2(int a, int* b, float c) {} - // CIR-HOST: cir.func dso_local @_ZN2ns36__device_stub__cpp_global_function_2EiPif - // CIR-DEVICE: cir.func dso_local @_ZN2ns21cpp_global_function_2EiPif + // CIR-HOST: cir.func {{.*}} @_ZN2ns36__device_stub__cpp_global_function_2EiPif + // CIR-DEVICE: cir.func {{.*}} @_ZN2ns21cpp_global_function_2EiPif __host__ void cpp_host_function_1(int a, int* b, float c) {} - // CIR-HOST: cir.func dso_local @_ZN2ns19cpp_host_function_1EiPif + // CIR-HOST: cir.func {{.*}} @_ZN2ns19cpp_host_function_1EiPif __host__ void cpp_host_function_2(int a, int* b, float c) {} - // CIR-HOST: cir.func dso_local @_ZN2ns19cpp_host_function_2EiPif + // CIR-HOST: cir.func {{.*}} @_ZN2ns19cpp_host_function_2EiPif __device__ void cpp_device_function_1(int a, int* b, float c) {} - // CIR-DEVICE: cir.func dso_local @_ZN2ns21cpp_device_function_1EiPif + // CIR-DEVICE: cir.func {{.*}} @_ZN2ns21cpp_device_function_1EiPif __device__ void cpp_device_function_2(int a, int* b, float c) {} - // CIR-DEVICE: cir.func dso_local @_ZN2ns21cpp_device_function_2EiPif + // CIR-DEVICE: cir.func {{.*}} @_ZN2ns21cpp_device_function_2EiPif } __global__ void cpp_global_function_1(int a, int* b, float c) {} -// CIR-HOST: cir.func dso_local @_Z36__device_stub__cpp_global_function_1iPif -// CIR-DEVICE: cir.func dso_local @_Z21cpp_global_function_1iPif +// CIR-HOST: cir.func {{.*}} @_Z36__device_stub__cpp_global_function_1iPif +// CIR-DEVICE: cir.func {{.*}} @_Z21cpp_global_function_1iPif __global__ void cpp_global_function_2(int a, int* b, float c) {} -// CIR-HOST: cir.func dso_local @_Z36__device_stub__cpp_global_function_2iPif -// CIR-DEVICE: cir.func dso_local @_Z21cpp_global_function_2iPif +// CIR-HOST: cir.func {{.*}} @_Z36__device_stub__cpp_global_function_2iPif +// CIR-DEVICE: cir.func {{.*}} @_Z21cpp_global_function_2iPif __host__ void cpp_host_function_1(int a, int* b, float c) {} -// CIR-HOST: cir.func dso_local @_Z19cpp_host_function_1iPif +// CIR-HOST: cir.func {{.*}} @_Z19cpp_host_function_1iPif __host__ void cpp_host_function_2(int a, int* b, float c) {} -// CIR-HOST: cir.func dso_local @_Z19cpp_host_function_2iPif +// CIR-HOST: cir.func {{.*}} @_Z19cpp_host_function_2iPif __device__ void cpp_device_function_1(int a, int* b, float c) {} -// CIR-DEVICE: cir.func dso_local @_Z21cpp_device_function_1iPif +// CIR-DEVICE: cir.func {{.*}} @_Z21cpp_device_function_1iPif __device__ void cpp_device_function_2(int a, int* b, float c) {} -// CIR-DEVICE: cir.func dso_local @_Z21cpp_device_function_2iPif +// CIR-DEVICE: cir.func {{.*}} @_Z21cpp_device_function_2iPif extern "C" { __global__ void c_global_function_1(int a, int* b, float c) {} - // CIR-HOST: cir.func dso_local @__device_stub__c_global_function_1 - // CIR-DEVICE: cir.func dso_local @c_global_function_1 + // CIR-HOST: cir.func {{.*}} @__device_stub__c_global_function_1 + // CIR-DEVICE: cir.func {{.*}} @c_global_function_1 __global__ void c_global_function_2(int a, int* b, float c) {} - // CIR-HOST: cir.func dso_local @__device_stub__c_global_function_2 - // CIR-DEVICE: cir.func dso_local @c_global_function_2 + // CIR-HOST: cir.func {{.*}} @__device_stub__c_global_function_2 + // CIR-DEVICE: cir.func {{.*}} @c_global_function_2 __host__ void c_host_function_1(int a, int* b, float c) {} - // CIR-HOST: cir.func dso_local @c_host_function_1 + // CIR-HOST: cir.func {{.*}} @c_host_function_1 __host__ void c_host_function_2(int a, int* b, float c) {} - // CIR-HOST: cir.func dso_local @c_host_function_2 + // CIR-HOST: cir.func {{.*}} @c_host_function_2 __device__ void c_device_function_1(int a, int* b, float c) {} - // CIR-DEVICE: cir.func dso_local @c_device_function_1 + // CIR-DEVICE: cir.func {{.*}} @c_device_function_1 __device__ void c_device_function_2(int a, int* b, float c) {} - // CIR-DEVICE: cir.func dso_local @c_device_function_2 + // CIR-DEVICE: cir.func {{.*}} @c_device_function_2 } diff --git a/clang/test/CIR/CodeGen/CUDA/printf.cu b/clang/test/CIR/CodeGen/CUDA/printf.cu index e3ae515c862c..f923f16dd04a 100644 --- a/clang/test/CIR/CodeGen/CUDA/printf.cu +++ b/clang/test/CIR/CodeGen/CUDA/printf.cu @@ -14,7 +14,7 @@ __device__ void printer() { printf("%d", 0); } -// CIR-DEVICE: cir.func dso_local @_Z7printerv() extra({{.*}}) { +// CIR-DEVICE: cir.func {{.*}} @_Z7printerv() extra({{.*}}) { // CIR-DEVICE: %[[#Packed:]] = cir.alloca !rec_anon_struct // CIR-DEVICE: %[[#Zero:]] = cir.const #cir.int<0> : !s32i loc(#loc5) // CIR-DEVICE: %[[#Field0:]] = cir.get_member %0[0] @@ -36,7 +36,7 @@ __device__ void no_extra() { printf("hello world"); } -// CIR-DEVICE: cir.func dso_local @_Z8no_extrav() extra(#fn_attr) { +// CIR-DEVICE: cir.func {{.*}} @_Z8no_extrav() extra(#fn_attr) { // CIR-DEVICE: %[[#NULLPTR:]] = cir.const #cir.ptr // CIR-DEVICE: cir.call @vprintf(%{{.+}}, %[[#NULLPTR]]) // CIR-DEVICE: cir.return diff --git a/clang/test/CIR/CodeGen/CUDA/registration.cu b/clang/test/CIR/CodeGen/CUDA/registration.cu index ea0e82873fad..65852b8d460b 100644 --- a/clang/test/CIR/CodeGen/CUDA/registration.cu +++ b/clang/test/CIR/CodeGen/CUDA/registration.cu @@ -114,7 +114,7 @@ __device__ int a; // CIR-HOST: }> // CIR-HOST-SAME: {{.*}}section = ".nvFatBinSegment" -// CIR-HOST: cir.func private @__cudaRegisterFatBinary +// CIR-HOST: cir.func {{.*}} @__cudaRegisterFatBinary // CIR-HOST: cir.func {{.*}} @__cuda_module_ctor() { // CIR-HOST: %[[#Fatbin:]] = cir.call @__cudaRegisterFatBinary // CIR-HOST: %[[#FatbinGlobal:]] = cir.get_global @__cuda_gpubin_handle diff --git a/clang/test/CIR/CodeGen/CUDA/simple-nvptx-triple.cu b/clang/test/CIR/CodeGen/CUDA/simple-nvptx-triple.cu index 04ad44d788dd..acdf54a28df1 100644 --- a/clang/test/CIR/CodeGen/CUDA/simple-nvptx-triple.cu +++ b/clang/test/CIR/CodeGen/CUDA/simple-nvptx-triple.cu @@ -6,4 +6,4 @@ // RUN: FileCheck --input-file=%t.cir %s __device__ void device_fn(int* a, double b, float c) {} -// CHECK: cir.func dso_local @_Z9device_fnPidf +// CHECK: cir.func {{.*}} @_Z9device_fnPidf diff --git a/clang/test/CIR/CodeGen/CUDA/simple.cu b/clang/test/CIR/CodeGen/CUDA/simple.cu index 1c55a89a0670..04962421ea5c 100644 --- a/clang/test/CIR/CodeGen/CUDA/simple.cu +++ b/clang/test/CIR/CodeGen/CUDA/simple.cu @@ -54,12 +54,12 @@ // CIR-HOST: [[Kernel:#[a-zA-Z_0-9]+]] = {{.*}}#cir.cu.kernel_name<_Z9global_fni>{{.*}} __host__ void host_fn(int *a, int *b, int *c) {} -// CIR-HOST: cir.func dso_local @_Z7host_fnPiS_S_ -// CIR-DEVICE-NOT: cir.func dso_local @_Z7host_fnPiS_S_ +// CIR-HOST: cir.func {{.*}} @_Z7host_fnPiS_S_ +// CIR-DEVICE-NOT: cir.func {{.*}} @_Z7host_fnPiS_S_ __device__ void device_fn(int* a, double b, float c) {} -// CIR-HOST-NOT: cir.func dso_local @_Z9device_fnPidf -// CIR-DEVICE: cir.func dso_local @_Z9device_fnPidf +// CIR-HOST-NOT: cir.func {{.*}} @_Z9device_fnPidf +// CIR-DEVICE: cir.func {{.*}} @_Z9device_fnPidf __global__ void global_fn(int a) {} // CIR-DEVICE: @_Z9global_fni({{.*}} cc(ptx_kernel) @@ -95,9 +95,9 @@ __global__ void global_fn(int a) {} int main() { global_fn<<<1, 1>>>(1); } -// CIR-DEVICE-NOT: cir.func dso_local @main() +// CIR-DEVICE-NOT: cir.func {{.*}} @main() -// CIR-HOST: cir.func dso_local @main() +// CIR-HOST: cir.func {{.*}} @main() // CIR-HOST: cir.call @_ZN4dim3C1Ejjj // CIR-HOST: cir.call @_ZN4dim3C1Ejjj // CIR-HOST: [[Push:%[0-9]+]] = cir.call @__cudaPushCallConfiguration diff --git a/clang/test/CIR/CodeGen/HIP/address-spaces.cpp b/clang/test/CIR/CodeGen/HIP/address-spaces.cpp index 6caa76a8c795..508c01b038dd 100644 --- a/clang/test/CIR/CodeGen/HIP/address-spaces.cpp +++ b/clang/test/CIR/CodeGen/HIP/address-spaces.cpp @@ -12,7 +12,7 @@ __global__ void fn() { } // CIR: cir.global "private" internal dso_local lang_address_space(offload_local) @_ZZ2fnvE1j : !s32i -// CIR: cir.func dso_local @_Z2fnv +// CIR: cir.func {{.*}} @_Z2fnv // CIR: [[Local:%[0-9]+]] = cir.alloca !s32i, !cir.ptr, ["i", init] // CIR: [[Shared:%[0-9]+]] = cir.get_global @_ZZ2fnvE1j : !cir.ptr // CIR: [[Tmp:%[0-9]+]] = cir.load {{.*}} [[Local]] : !cir.ptr, !s32i diff --git a/clang/test/CIR/CodeGen/HIP/simple.cpp b/clang/test/CIR/CodeGen/HIP/simple.cpp index c1dc08a5abee..c1850417c69e 100644 --- a/clang/test/CIR/CodeGen/HIP/simple.cpp +++ b/clang/test/CIR/CodeGen/HIP/simple.cpp @@ -56,12 +56,12 @@ __host__ void host_fn(int *a, int *b, int *c) {} -// CIR-HOST: cir.func dso_local @_Z7host_fnPiS_S_ -// CIR-DEVICE-NOT: cir.func dso_local @_Z7host_fnPiS_S_ +// CIR-HOST: cir.func {{.*}} @_Z7host_fnPiS_S_ +// CIR-DEVICE-NOT: cir.func {{.*}} @_Z7host_fnPiS_S_ __device__ void device_fn(int* a, double b, float c) {} -// CIR-HOST-NOT: cir.func dso_local @_Z9device_fnPidf -// CIR-DEVICE: cir.func dso_local @_Z9device_fnPidf +// CIR-HOST-NOT: cir.func {{.*}} @_Z9device_fnPidf +// CIR-DEVICE: cir.func {{.*}} @_Z9device_fnPidf __global__ void global_fn(int a) {} // CIR-DEVICE: @_Z9global_fni @@ -95,9 +95,9 @@ __global__ void global_fn(int a) {} int main() { global_fn<<<1, 1>>>(1); } -// CIR-DEVICE-NOT: cir.func dso_local @main() +// CIR-DEVICE-NOT: cir.func {{.*}} @main() -// CIR-HOST: cir.func dso_local @main() +// CIR-HOST: cir.func {{.*}} @main() // CIR-HOST: cir.call @_ZN4dim3C1Ejjj // CIR-HOST: cir.call @_ZN4dim3C1Ejjj // CIR-HOST: [[Push:%[0-9]+]] = cir.call @__hipPushCallConfiguration diff --git a/clang/test/CIR/CodeGen/OpenCL/addrspace-alloca.cl b/clang/test/CIR/CodeGen/OpenCL/addrspace-alloca.cl index d4740560b497..34f9f3f298e9 100644 --- a/clang/test/CIR/CodeGen/OpenCL/addrspace-alloca.cl +++ b/clang/test/CIR/CodeGen/OpenCL/addrspace-alloca.cl @@ -4,7 +4,7 @@ // RUN: FileCheck --input-file=%t.ll %s --check-prefix=LLVM -// CIR: cir.func @func(%arg0: !cir.ptr +// CIR: cir.func{{.*}} @func(%arg0: !cir.ptr // LLVM: @func(ptr addrspace(3) kernel void func(local int *p) { // CIR-NEXT: %[[#ALLOCA_P:]] = cir.alloca !cir.ptr, !cir.ptr, lang_address_space(offload_private)>, ["p", init] {alignment = 8 : i64} diff --git a/clang/test/CIR/CodeGen/OpenCL/cl-uniform-wg-size.cl b/clang/test/CIR/CodeGen/OpenCL/cl-uniform-wg-size.cl index 51d64e717b9f..8a6e09f8676e 100644 --- a/clang/test/CIR/CodeGen/OpenCL/cl-uniform-wg-size.cl +++ b/clang/test/CIR/CodeGen/OpenCL/cl-uniform-wg-size.cl @@ -26,11 +26,11 @@ // CIR-NOT: cl.uniform_work_group_size kernel void ker() {}; -// CIR: cir.func @ker{{.*}} extra(#fn_attr) { +// CIR: cir.func{{.*}} @ker{{.*}} extra(#fn_attr) // LLVM: define{{.*}}@ker() #0 void foo() {}; -// CIR: cir.func @foo{{.*}} extra(#fn_attr1) { +// CIR: cir.func{{.*}} @foo{{.*}} extra(#fn_attr1) // LLVM: define{{.*}}@foo() #1 // LLVM-LABEL: attributes #0 diff --git a/clang/test/CIR/CodeGen/OpenCL/convergent.cl b/clang/test/CIR/CodeGen/OpenCL/convergent.cl index 5726483fde8a..6ed163e859b9 100644 --- a/clang/test/CIR/CodeGen/OpenCL/convergent.cl +++ b/clang/test/CIR/CodeGen/OpenCL/convergent.cl @@ -14,7 +14,7 @@ void non_convfun(void) { volatile int* p; *p = 0; } -// CIR: cir.func @non_convfun(){{.*}} extra(#fn_attr[[CONV_NOINLINE_ATTR]]) +// CIR: cir.func{{.*}} @non_convfun(){{.*}} extra(#fn_attr[[CONV_NOINLINE_ATTR]]) // LLVM: define{{.*}} spir_func void @non_convfun() local_unnamed_addr #[[NON_CONV_ATTR:[0-9]+]] // LLVM: ret void @@ -36,7 +36,7 @@ void test_merge_if(int a) { g(); } } -// CIR: cir.func @test_merge_if{{.*}} extra(#fn_attr[[CONV_DECL_ATTR]]) +// CIR: cir.func{{.*}} @test_merge_if{{.*}} extra(#fn_attr[[CONV_DECL_ATTR]]) // The LLVM IR below is equivalent to: // if (a) { @@ -80,7 +80,7 @@ void test_no_merge_if(int a) { g(); } } -// CIR: cir.func @test_no_merge_if{{.*}} extra(#fn_attr[[CONV_DECL_ATTR]]) +// CIR: cir.func{{.*}} @test_no_merge_if{{.*}} extra(#fn_attr[[CONV_DECL_ATTR]]) // LLVM-LABEL: define{{.*}} spir_func void @test_no_merge_if // LLVM: %[[tobool:.+]] = icmp eq i32 %[[ARG:.+]], 0 diff --git a/clang/test/CIR/CodeGen/OpenCL/kernel-arg-info.cl b/clang/test/CIR/CodeGen/OpenCL/kernel-arg-info.cl index 8162a04f97b2..d38056efc031 100644 --- a/clang/test/CIR/CodeGen/OpenCL/kernel-arg-info.cl +++ b/clang/test/CIR/CodeGen/OpenCL/kernel-arg-info.cl @@ -29,9 +29,9 @@ kernel void foo(global int * globalintp, global int * restrict globalintrestrict *globalintrestrictp = constint + volatileint; } // CIR-DAG: #fn_attr[[KERNEL0:[0-9]*]] = {{.+}}cl.kernel_arg_metadata = #cir.cl.kernel_arg_metadata -// CIR-DAG: cir.func @foo({{.+}}) extra(#fn_attr[[KERNEL0]]) +// CIR-DAG: cir.func{{.*}} @foo({{.+}}) extra(#fn_attr[[KERNEL0]]) // CIR-ARGINFO-DAG: #fn_attr[[KERNEL0:[0-9]*]] = {{.+}}cl.kernel_arg_metadata = #cir.cl.kernel_arg_metadata -// CIR-ARGINFO-DAG: cir.func @foo({{.+}}) extra(#fn_attr[[KERNEL0]]) +// CIR-ARGINFO-DAG: cir.func{{.*}} @foo({{.+}}) extra(#fn_attr[[KERNEL0]]) // LLVM-DAG: define{{.*}} void @foo{{.+}} !kernel_arg_addr_space ![[MD11:[0-9]+]] !kernel_arg_access_qual ![[MD12:[0-9]+]] !kernel_arg_type ![[MD13:[0-9]+]] !kernel_arg_base_type ![[MD13]] !kernel_arg_type_qual ![[MD14:[0-9]+]] { // LLVM-ARGINFO-DAG: define{{.*}} void @foo{{.+}} !kernel_arg_addr_space ![[MD11:[0-9]+]] !kernel_arg_access_qual ![[MD12:[0-9]+]] !kernel_arg_type ![[MD13:[0-9]+]] !kernel_arg_base_type ![[MD13]] !kernel_arg_type_qual ![[MD14:[0-9]+]] !kernel_arg_name ![[MD15:[0-9]+]] { @@ -47,9 +47,9 @@ kernel void foo4(__global unsigned int * X, __global myunsignedint * Y) { } // CIR-DAG: #fn_attr[[KERNEL4:[0-9]*]] = {{.+}}cl.kernel_arg_metadata = #cir.cl.kernel_arg_metadata -// CIR-DAG: cir.func @foo4({{.+}}) extra(#fn_attr[[KERNEL4]]) +// CIR-DAG: cir.func{{.*}} @foo4({{.+}}) extra(#fn_attr[[KERNEL4]]) // CIR-ARGINFO-DAG: #fn_attr[[KERNEL4:[0-9]*]] = {{.+}}cl.kernel_arg_metadata = #cir.cl.kernel_arg_metadata -// CIR-ARGINFO-DAG: cir.func @foo4({{.+}}) extra(#fn_attr[[KERNEL4]]) +// CIR-ARGINFO-DAG: cir.func{{.*}} @foo4({{.+}}) extra(#fn_attr[[KERNEL4]]) // LLVM-DAG: define{{.*}} void @foo4{{.+}} !kernel_arg_addr_space ![[MD41:[0-9]+]] !kernel_arg_access_qual ![[MD42:[0-9]+]] !kernel_arg_type ![[MD43:[0-9]+]] !kernel_arg_base_type ![[MD44:[0-9]+]] !kernel_arg_type_qual ![[MD45:[0-9]+]] { // LLVM-ARGINFO-DAG: define{{.*}} void @foo4{{.+}} !kernel_arg_addr_space ![[MD41:[0-9]+]] !kernel_arg_access_qual ![[MD42:[0-9]+]] !kernel_arg_type ![[MD43:[0-9]+]] !kernel_arg_base_type ![[MD44:[0-9]+]] !kernel_arg_type_qual ![[MD45:[0-9]+]] !kernel_arg_name ![[MD46:[0-9]+]] { @@ -65,9 +65,9 @@ typedef char char16 __attribute__((ext_vector_type(16))); __kernel void foo6(__global char16 arg[]) {} // CIR-DAG: #fn_attr[[KERNEL6:[0-9]*]] = {{.+}}cl.kernel_arg_metadata = #cir.cl.kernel_arg_metadata -// CIR-DAG: cir.func @foo6({{.+}}) extra(#fn_attr[[KERNEL6]]) +// CIR-DAG: cir.func{{.*}} @foo6({{.+}}) extra(#fn_attr[[KERNEL6]]) // CIR-ARGINFO-DAG: #fn_attr[[KERNEL6:[0-9]*]] = {{.+}}cl.kernel_arg_metadata = #cir.cl.kernel_arg_metadata -// CIR-ARGINFO-DAG: cir.func @foo6({{.+}}) extra(#fn_attr[[KERNEL6]]) +// CIR-ARGINFO-DAG: cir.func{{.*}} @foo6({{.+}}) extra(#fn_attr[[KERNEL6]]) // LLVM-DAG: !kernel_arg_type ![[MD61:[0-9]+]] // LLVM-ARGINFO-DAG: !kernel_arg_name ![[MD62:[0-9]+]] @@ -77,9 +77,9 @@ __kernel void foo6(__global char16 arg[]) {} kernel void foo9(signed char sc1, global const signed char* sc2) {} // CIR-DAG: #fn_attr[[KERNEL9:[0-9]*]] = {{.+}}cl.kernel_arg_metadata = #cir.cl.kernel_arg_metadata -// CIR-DAG: cir.func @foo9({{.+}}) extra(#fn_attr[[KERNEL9]]) +// CIR-DAG: cir.func{{.*}} @foo9({{.+}}) extra(#fn_attr[[KERNEL9]]) // CIR-ARGINFO-DAG: #fn_attr[[KERNEL9:[0-9]*]] = {{.+}}cl.kernel_arg_metadata = #cir.cl.kernel_arg_metadata -// CIR-ARGINFO-DAG: cir.func @foo9({{.+}}) extra(#fn_attr[[KERNEL9]]) +// CIR-ARGINFO-DAG: cir.func{{.*}} @foo9({{.+}}) extra(#fn_attr[[KERNEL9]]) // LLVM-DAG: define{{.*}} void @foo9{{.+}} !kernel_arg_addr_space ![[SCHAR_AS_QUAL:[0-9]+]] !kernel_arg_access_qual ![[MD42]] !kernel_arg_type ![[SCHAR_TY:[0-9]+]] !kernel_arg_base_type ![[SCHAR_TY]] !kernel_arg_type_qual ![[SCHAR_QUAL:[0-9]+]] { // LLVM-ARGINFO-DAG: define{{.*}} void @foo9{{.+}} !kernel_arg_addr_space ![[SCHAR_AS_QUAL:[0-9]+]] !kernel_arg_access_qual ![[MD42]] !kernel_arg_type ![[SCHAR_TY:[0-9]+]] !kernel_arg_base_type ![[SCHAR_TY]] !kernel_arg_type_qual ![[SCHAR_QUAL:[0-9]+]] !kernel_arg_name ![[SCHAR_ARG_NAMES:[0-9]+]] { diff --git a/clang/test/CIR/CodeGen/OpenCL/kernel-arg-metadata.cl b/clang/test/CIR/CodeGen/OpenCL/kernel-arg-metadata.cl index be8d2eb2fef7..2002c75936c3 100644 --- a/clang/test/CIR/CodeGen/OpenCL/kernel-arg-metadata.cl +++ b/clang/test/CIR/CodeGen/OpenCL/kernel-arg-metadata.cl @@ -6,7 +6,7 @@ __kernel void kernel_function() {} // CIR: #fn_attr[[ATTR:[0-9]*]] = {{.+}}cl.kernel_arg_metadata = #cir.cl.kernel_arg_metadata{{.+}} -// CIR: cir.func @kernel_function() cc(spir_kernel) extra(#fn_attr[[ATTR]]) +// CIR: cir.func{{.*}} @kernel_function() cc(spir_kernel) extra(#fn_attr[[ATTR]]) // LLVM: define {{.*}}spir_kernel void @kernel_function() {{[^{]+}} !kernel_arg_addr_space ![[MD:[0-9]+]] !kernel_arg_access_qual ![[MD]] !kernel_arg_type ![[MD]] !kernel_arg_base_type ![[MD]] !kernel_arg_type_qual ![[MD]] { // LLVM: ![[MD]] = !{} diff --git a/clang/test/CIR/CodeGen/OpenCL/kernel-attributes.cl b/clang/test/CIR/CodeGen/OpenCL/kernel-attributes.cl index f8cd9e5c1ed9..9f1aa851e4e6 100644 --- a/clang/test/CIR/CodeGen/OpenCL/kernel-attributes.cl +++ b/clang/test/CIR/CodeGen/OpenCL/kernel-attributes.cl @@ -9,7 +9,7 @@ typedef unsigned int uint4 __attribute__((ext_vector_type(4))); kernel __attribute__((vec_type_hint(int))) __attribute__((reqd_work_group_size(1,2,4))) void kernel1(int a) {} // CIR-DAG: #fn_attr[[KERNEL1:[0-9]*]] = {{.+}}cl.kernel_metadata = #cir.cl.kernel_metadata{{.+}} -// CIR-DAG: cir.func @kernel1{{.+}} extra(#fn_attr[[KERNEL1]]) +// CIR-DAG: cir.func{{.*}} @kernel1{{.+}} extra(#fn_attr[[KERNEL1]]) // LLVM-DAG: define {{(dso_local )?}}spir_kernel void @kernel1(i32 {{[^%]*}}%0) {{[^{]+}} !reqd_work_group_size ![[MD1_REQD_WG:[0-9]+]] !vec_type_hint ![[MD1_VEC_TYPE:[0-9]+]] // LLVM-DAG: [[MD1_VEC_TYPE]] = !{i32 undef, i32 1} @@ -19,7 +19,7 @@ kernel __attribute__((vec_type_hint(int))) __attribute__((reqd_work_group_size( kernel __attribute__((vec_type_hint(uint4))) __attribute__((work_group_size_hint(8,16,32))) void kernel2(int a) {} // CIR-DAG: #fn_attr[[KERNEL2:[0-9]*]] = {{.+}}cl.kernel_metadata = #cir.cl.kernel_metadata, vec_type_hint_signedness = 0>{{.+}} -// CIR-DAG: cir.func @kernel2{{.+}} extra(#fn_attr[[KERNEL2]]) +// CIR-DAG: cir.func{{.*}} @kernel2{{.+}} extra(#fn_attr[[KERNEL2]]) // LLVM-DAG: define {{(dso_local )?}}spir_kernel void @kernel2(i32 {{[^%]*}}%0) {{[^{]+}} !vec_type_hint ![[MD2_VEC_TYPE:[0-9]+]] !work_group_size_hint ![[MD2_WG_SIZE:[0-9]+]] // LLVM-DAG: [[MD2_VEC_TYPE]] = !{<4 x i32> undef, i32 0} @@ -29,7 +29,7 @@ kernel __attribute__((vec_type_hint(uint4))) __attribute__((work_group_size_hint kernel __attribute__((intel_reqd_sub_group_size(8))) void kernel3(int a) {} // CIR-DAG: #fn_attr[[KERNEL3:[0-9]*]] = {{.+}}cl.kernel_metadata = #cir.cl.kernel_metadata{{.+}} -// CIR-DAG: cir.func @kernel3{{.+}} extra(#fn_attr[[KERNEL3]]) +// CIR-DAG: cir.func{{.*}} @kernel3{{.+}} extra(#fn_attr[[KERNEL3]]) // LLVM-DAG: define {{(dso_local )?}}spir_kernel void @kernel3(i32 {{[^%]*}}%0) {{[^{]+}} !intel_reqd_sub_group_size ![[MD3_INTEL:[0-9]+]] // LLVM-DAG: [[MD3_INTEL]] = !{i32 8} diff --git a/clang/test/CIR/CodeGen/OpenCL/kernel-unit-attr.cl b/clang/test/CIR/CodeGen/OpenCL/kernel-unit-attr.cl index 01348013bbf0..d17ee35a49d9 100644 --- a/clang/test/CIR/CodeGen/OpenCL/kernel-unit-attr.cl +++ b/clang/test/CIR/CodeGen/OpenCL/kernel-unit-attr.cl @@ -7,8 +7,8 @@ // CIR-NOT: cl.kernel = #cir.cl.kernel kernel void kernel1() {} -// CIR: cir.func @kernel1{{.+}} extra(#fn_attr[[KERNEL1]]) +// CIR: cir.func{{.*}} @kernel1{{.+}} extra(#fn_attr[[KERNEL1]]) void func1() {} -// CIR: cir.func @func1{{.+}} extra(#fn_attr[[FUNC1]]) +// CIR: cir.func{{.*}} @func1{{.+}} extra(#fn_attr[[FUNC1]]) diff --git a/clang/test/CIR/CodeGen/OpenCL/spir-calling-conv.cl b/clang/test/CIR/CodeGen/OpenCL/spir-calling-conv.cl index 8fa8af2578a8..3008f68d7cb1 100644 --- a/clang/test/CIR/CodeGen/OpenCL/spir-calling-conv.cl +++ b/clang/test/CIR/CodeGen/OpenCL/spir-calling-conv.cl @@ -3,11 +3,11 @@ // RUN: %clang_cc1 -fclangir %s -O0 -triple "spirv64-unknown-unknown" -emit-llvm -fno-clangir-call-conv-lowering -o %t.ll // RUN: FileCheck %s --input-file=%t.ll --check-prefix=LLVM -// CIR: cir.func {{.*}}@get_dummy_id{{.*}} cc(spir_function) +// CIR: cir.func{{.*}} @get_dummy_id{{.*}} cc(spir_function) // LLVM-DAG: declare{{.*}} spir_func i32 @get_dummy_id( int get_dummy_id(int D); -// CIR: cir.func {{.*}}@foo{{.*}} cc(spir_kernel) +// CIR: cir.func{{.*}} @foo{{.*}} cc(spir_kernel) // LLVM-DAG: define{{.*}} spir_kernel void @foo( kernel void foo(global int *A) { int id = get_dummy_id(0); diff --git a/clang/test/CIR/CodeGen/OpenCL/spirv-target.cl b/clang/test/CIR/CodeGen/OpenCL/spirv-target.cl index ef8bd27076c5..ea9b7a147984 100644 --- a/clang/test/CIR/CodeGen/OpenCL/spirv-target.cl +++ b/clang/test/CIR/CodeGen/OpenCL/spirv-target.cl @@ -14,8 +14,8 @@ typedef struct { void *v2; } my_st; -// CIR-SPIRV64: cir.func @func( -// LLVM-SPIRV64: define spir_kernel void @func( +// CIR-SPIRV64: cir.func{{.*}} @func +// LLVM-SPIRV64: define spir_kernel void @func kernel void func(global long *arg) { int res1[sizeof(my_st) == 24 ? 1 : -1]; // expected-no-diagnostics int res2[sizeof(void *) == 8 ? 1 : -1]; // expected-no-diagnostics diff --git a/clang/test/CIR/CodeGen/String.cpp b/clang/test/CIR/CodeGen/String.cpp index c5f77a792139..dd24291e3622 100644 --- a/clang/test/CIR/CodeGen/String.cpp +++ b/clang/test/CIR/CodeGen/String.cpp @@ -17,7 +17,7 @@ void test() { String s3{"abcdefghijklmnop"}; } -// CHECK: cir.func linkonce_odr @_ZN6StringC2Ev +// CHECK: cir.func {{.*}} @_ZN6StringC2Ev // CHECK-NEXT: %0 = cir.alloca !cir.ptr // CHECK-NEXT: cir.store{{.*}} %arg0, %0 // CHECK-NEXT: %1 = cir.load{{.*}} %0 @@ -30,7 +30,7 @@ void test() { // CHECK-NEXT: cir.store{{.*}} %6, %4 : !s64i, !cir.ptr // CHECK-NEXT: cir.return // CHECK-NEXT: } -// CHECK: cir.func linkonce_odr @_ZN6StringC2Ei +// CHECK: cir.func {{.*}} @_ZN6StringC2Ei // CHECK-NEXT: %0 = cir.alloca !cir.ptr // CHECK-NEXT: %1 = cir.alloca !s32i, !cir.ptr, ["size", init] // CHECK-NEXT: cir.store{{.*}} %arg0, %0 @@ -46,7 +46,7 @@ void test() { // CHECK-NEXT: cir.return // CHECK-NEXT: } -// CHECK: cir.func linkonce_odr @_ZN6StringC2EPKc +// CHECK: cir.func {{.*}} @_ZN6StringC2EPKc // CHECK-NEXT: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK-NEXT: %1 = cir.alloca !cir.ptr, !cir.ptr>, ["s", init] {alignment = 8 : i64} // CHECK-NEXT: cir.store{{.*}} %arg0, %0 : !cir.ptr, !cir.ptr> @@ -57,7 +57,7 @@ void test() { // CHECK-NEXT: cir.store{{.*}} %4, %3 : !cir.ptr, !cir.ptr> // CHECK-NEXT: cir.return -// CHECK: cir.func linkonce_odr @_ZN6StringC1EPKc +// CHECK: cir.func {{.*}} @_ZN6StringC1EPKc // CHECK-NEXT: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK-NEXT: %1 = cir.alloca !cir.ptr, !cir.ptr>, ["s", init] {alignment = 8 : i64} // CHECK-NEXT: cir.store{{.*}} %arg0, %0 : !cir.ptr, !cir.ptr> @@ -67,7 +67,7 @@ void test() { // CHECK-NEXT: cir.call @_ZN6StringC2EPKc(%2, %3) : (!cir.ptr, !cir.ptr) -> () // CHECK-NEXT: cir.return -// CHECK: cir.func dso_local @_Z4testv() +// CHECK: cir.func {{.*}} @_Z4testv() // CHECK: cir.call @_ZN6StringC1Ev(%0) : (!cir.ptr) -> () // CHECK: cir.call @_ZN6StringC1Ei(%1, %3) : (!cir.ptr, !s32i) -> () // CHECK: cir.call @_ZN6StringC1EPKc(%2, %5) : (!cir.ptr, !cir.ptr) -> () diff --git a/clang/test/CIR/CodeGen/aapcs-volatile-bitfields.c b/clang/test/CIR/CodeGen/aapcs-volatile-bitfields.c index 8334158ef756..3b9d4a8c0b44 100644 --- a/clang/test/CIR/CodeGen/aapcs-volatile-bitfields.c +++ b/clang/test/CIR/CodeGen/aapcs-volatile-bitfields.c @@ -82,7 +82,7 @@ int check_load(st1 *s1) { return s1->b; } -// CIR: cir.func dso_local @check_load +// CIR: cir.func {{.*}} @check_load // CIR: [[LOAD:%.*]] = cir.load align(8) {{.*}} : !cir.ptr>, !cir.ptr // CIR: [[MEMBER:%.*]] = cir.get_member [[LOAD]][0] {name = "b"} : !cir.ptr -> !cir.ptr // CIR: [[BITFI:%.*]] = cir.get_bitfield align(4) (#bfi_b, [[MEMBER]] {is_volatile} : !cir.ptr) -> !u32i @@ -114,7 +114,7 @@ int check_load_exception(st3 *s3) { return s3->b; } -// CIR: cir.func dso_local @check_load_exception +// CIR: cir.func {{.*}} @check_load_exception // CIR: [[LOAD:%.*]] = cir.load align(8) {{.*}} : !cir.ptr>, !cir.ptr // CIR: [[MEMBER:%.*]] = cir.get_member [[LOAD]][2] {name = "b"} : !cir.ptr -> !cir.ptr // CIR: [[BITFI:%.*]] = cir.get_bitfield align(4) (#bfi_b1, [[MEMBER]] {is_volatile} : !cir.ptr) -> !u32i @@ -151,7 +151,7 @@ int clip_load_exception2(clip *c) { return c->a; } -// CIR: cir.func dso_local @clip_load_exception2 +// CIR: cir.func {{.*}} @clip_load_exception2 // CIR: [[LOAD:%.*]] = cir.load align(8) {{.*}} : !cir.ptr>, !cir.ptr // CIR: [[MEMBER:%.*]] = cir.get_member [[LOAD]][0] {name = "a"} : !cir.ptr -> !cir.ptr> // CIR: [[BITFI:%.*]] = cir.get_bitfield align(4) (#bfi_a1, [[MEMBER]] {is_volatile} : !cir.ptr>) -> !s32i @@ -178,7 +178,7 @@ void check_store(st2 *s2) { s2->a = 1; } -// CIR: cir.func dso_local @check_store +// CIR: cir.func {{.*}} @check_store // CIR: [[CONST:%.*]] = cir.const #cir.int<1> : !s32i // CIR: [[CAST:%.*]] = cir.cast integral [[CONST]] : !s32i -> !s16i // CIR: [[LOAD:%.*]] = cir.load align(8) {{.*}} : !cir.ptr>, !cir.ptr @@ -209,7 +209,7 @@ void check_store_exception(st3 *s3) { s3->b = 2; } -// CIR: cir.func dso_local @check_store_exception +// CIR: cir.func {{.*}} @check_store_exception // CIR: [[CONST:%.*]] = cir.const #cir.int<2> : !s32i // CIR: [[CAST:%.*]] = cir.cast integral [[CONST]] : !s32i -> !u32i // CIR: [[LOAD:%.*]] = cir.load align(8) {{.*}} : !cir.ptr>, !cir.ptr @@ -239,7 +239,7 @@ void clip_store_exception2(clip *c) { c->a = 3; } -// CIR: cir.func dso_local @clip_store_exception2 +// CIR: cir.func {{.*}} @clip_store_exception2 // CIR: [[CONST:%.*]] = cir.const #cir.int<3> : !s32i // CIR: [[LOAD:%.*]] = cir.load align(8) {{.*}} : !cir.ptr>, !cir.ptr // CIR: [[MEMBER:%.*]] = cir.get_member [[LOAD]][0] {name = "a"} : !cir.ptr -> !cir.ptr> @@ -261,7 +261,7 @@ void check_store_second_member (st4 *s4) { s4->b = 1; } -// CIR: cir.func dso_local @check_store_second_member +// CIR: cir.func {{.*}} @check_store_second_member // CIR: [[ONE:%.*]] = cir.const #cir.int<1> : !s32i // CIR: [[CAST:%.*]] = cir.cast integral [[ONE]] : !s32i -> !u64i // CIR: [[LOAD:%.*]] = cir.load align(8) {{.*}} : !cir.ptr>, !cir.ptr diff --git a/clang/test/CIR/CodeGen/address-space-conversion.cpp b/clang/test/CIR/CodeGen/address-space-conversion.cpp index 55c857eb08f4..b9a5aec1c2b5 100644 --- a/clang/test/CIR/CodeGen/address-space-conversion.cpp +++ b/clang/test/CIR/CodeGen/address-space-conversion.cpp @@ -9,7 +9,7 @@ using pi2_t = int __attribute__((address_space(2))) *; using ri1_t = int __attribute__((address_space(1))) &; using ri2_t = int __attribute__((address_space(2))) &; -// CIR: cir.func dso_local @{{.*test_ptr.*}} +// CIR: cir.func {{.*}} @{{.*test_ptr.*}} // LLVM: define dso_local void @{{.*test_ptr.*}} void test_ptr() { pi1_t ptr1; @@ -23,7 +23,7 @@ void test_ptr() { // LLVM-NEXT: store ptr addrspace(2) %[[#CAST]], ptr %{{[0-9]+}}, align 8 } -// CIR: cir.func dso_local @{{.*test_ref.*}} +// CIR: cir.func {{.*}} @{{.*test_ref.*}} // LLVM: define dso_local void @{{.*test_ref.*}} void test_ref() { pi1_t ptr; @@ -42,7 +42,7 @@ void test_ref() { // LLVM-NEXT: store ptr addrspace(2) %[[#CAST]], ptr %{{[0-9]+}}, align 8 } -// CIR: cir.func dso_local @{{.*test_nullptr.*}} +// CIR: cir.func {{.*}} @{{.*test_nullptr.*}} // LLVM: define dso_local void @{{.*test_nullptr.*}} void test_nullptr() { constexpr pi1_t null1 = nullptr; diff --git a/clang/test/CIR/CodeGen/address-space.c b/clang/test/CIR/CodeGen/address-space.c index c2776a9ca5ab..84b6cbaae7ae 100644 --- a/clang/test/CIR/CodeGen/address-space.c +++ b/clang/test/CIR/CodeGen/address-space.c @@ -3,19 +3,19 @@ // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t.ll // RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM -// CIR: cir.func dso_local {{@.*foo.*}}(%arg0: !cir.ptr +// CIR: cir.func {{.*}} {{@.*foo.*}}(%arg0: !cir.ptr // LLVM: define dso_local void @foo(ptr addrspace(1) %0) void foo(int __attribute__((address_space(1))) *arg) { return; } -// CIR: cir.func dso_local {{@.*bar.*}}(%arg0: !cir.ptr +// CIR: cir.func {{.*}} {{@.*bar.*}}(%arg0: !cir.ptr // LLVM: define dso_local void @bar(ptr %0) void bar(int __attribute__((address_space(0))) *arg) { return; } -// CIR: cir.func dso_local {{@.*baz.*}}(%arg0: !cir.ptr +// CIR: cir.func {{.*}} {{@.*baz.*}}(%arg0: !cir.ptr // LLVM: define dso_local void @baz(ptr %0) void baz(int *arg) { return; diff --git a/clang/test/CIR/CodeGen/agg-copy.c b/clang/test/CIR/CodeGen/agg-copy.c index 6c360ccecbde..e05c6e39c3bd 100644 --- a/clang/test/CIR/CodeGen/agg-copy.c +++ b/clang/test/CIR/CodeGen/agg-copy.c @@ -9,7 +9,7 @@ typedef struct { S s; } A; -// CHECK: cir.func dso_local @foo1 +// CHECK: cir.func {{.*}} @foo1 // CHECK: [[TMP0:%.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["a1", init] // CHECK: [[TMP1:%.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["a2", init] // CHECK: cir.store{{.*}} %arg0, [[TMP0]] : !cir.ptr, !cir.ptr> @@ -25,7 +25,7 @@ void foo1(A* a1, A* a2) { a1[1] = a2[1]; } -// CHECK: cir.func dso_local @foo2 +// CHECK: cir.func {{.*}} @foo2 // CHECK: [[TMP0:%.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["a1", init] // CHECK: [[TMP1:%.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["a2", init] // CHECK: cir.store{{.*}} %arg0, [[TMP0]] : !cir.ptr, !cir.ptr> @@ -40,7 +40,7 @@ void foo2(A* a1, A* a2) { } // CHECK: cir.global external @a = #cir.zero : !rec_A -// CHECK: cir.func dso_local @foo3 +// CHECK: cir.func {{.*}} @foo3 // CHECK: [[TMP0]] = cir.alloca !rec_A, !cir.ptr, ["__retval"] {alignment = 4 : i64} // CHECK: [[TMP1]] = cir.get_global @a : !cir.ptr // CHECK: cir.copy [[TMP1]] to [[TMP0]] : !cir.ptr @@ -51,7 +51,7 @@ A foo3(void) { return a; } -// CHECK: cir.func dso_local @foo4 +// CHECK: cir.func {{.*}} @foo4 // CHECK: [[TMP0]] = cir.alloca !cir.ptr, !cir.ptr>, ["a1", init] // CHECK: [[TMP1]] = cir.alloca !rec_A, !cir.ptr, ["a2", init] // CHECK: cir.store{{.*}} %arg0, [[TMP0]] : !cir.ptr, !cir.ptr> diff --git a/clang/test/CIR/CodeGen/agg-init-inherit.cpp b/clang/test/CIR/CodeGen/agg-init-inherit.cpp index a770ea73363f..321d7752ed6c 100644 --- a/clang/test/CIR/CodeGen/agg-init-inherit.cpp +++ b/clang/test/CIR/CodeGen/agg-init-inherit.cpp @@ -13,7 +13,7 @@ void f1() { B v{}; } -// CIR: cir.func dso_local @_Z2f1v() +// CIR: cir.func {{.*}} @_Z2f1v() // CIR: %0 = cir.alloca !rec_B, !cir.ptr, ["v", init] // CIR: %1 = cir.base_class_addr %0 : !cir.ptr nonnull [0] -> !cir.ptr // CIR: cir.call @_ZN2A1C2Ev(%1) : (!cir.ptr) -> () @@ -32,7 +32,7 @@ void f2() { C v{}; } -// CIR: cir.func dso_local @_Z2f2v() +// CIR: cir.func {{.*}} @_Z2f2v() // CIR: %0 = cir.alloca !rec_C, !cir.ptr, ["v", init] // CIR: %1 = cir.base_class_addr %0 : !cir.ptr nonnull [0] -> !cir.ptr // CIR: cir.call @_ZN2A1C2Ev(%1) : (!cir.ptr) -> () @@ -55,7 +55,7 @@ void f3() { D v{}; } -// CIR: cir.func dso_local @_Z2f3v() +// CIR: cir.func {{.*}} @_Z2f3v() // CIR: %0 = cir.alloca !rec_D, !cir.ptr, ["v", init] // CIR: %1 = cir.base_class_addr %0 : !cir.ptr nonnull [0] -> !cir.ptr // CIR: cir.call @_ZN2A3C2Ev(%1) : (!cir.ptr) -> () diff --git a/clang/test/CIR/CodeGen/agg-init.cpp b/clang/test/CIR/CodeGen/agg-init.cpp index f5909d4d2263..577f67e73529 100644 --- a/clang/test/CIR/CodeGen/agg-init.cpp +++ b/clang/test/CIR/CodeGen/agg-init.cpp @@ -16,7 +16,7 @@ typedef struct yep_ { void use() { yop{}; } -// CHECK: cir.func dso_local @_Z3usev() +// CHECK: cir.func {{.*}} @_Z3usev() // CHECK: %0 = cir.alloca !rec_yep_, !cir.ptr, ["agg.tmp.ensured"] {alignment = 4 : i64} // CHECK: %1 = cir.get_member %0[0] {name = "Status"} : !cir.ptr -> !cir.ptr // CHECK: %2 = cir.const #cir.int<0> : !u32i @@ -46,7 +46,7 @@ void yo() { Yo ext2 = {Y, &ext}; } -// CHECK: cir.func dso_local @_Z2yov() +// CHECK: cir.func {{.*}} @_Z2yov() // CHECK: %0 = cir.alloca !rec_Yo, !cir.ptr, ["ext", init] {alignment = 8 : i64} // CHECK: %1 = cir.alloca !rec_Yo, !cir.ptr, ["ext2", init] {alignment = 8 : i64} // CHECK: %2 = cir.const #cir.const_record<{#cir.int<1000070000> : !u32i, #cir.ptr : !cir.ptr, #cir.int<0> : !u64i}> : !rec_Yo diff --git a/clang/test/CIR/CodeGen/agg-init2.cpp b/clang/test/CIR/CodeGen/agg-init2.cpp index cf4b399a9852..30b9e3537ac5 100644 --- a/clang/test/CIR/CodeGen/agg-init2.cpp +++ b/clang/test/CIR/CodeGen/agg-init2.cpp @@ -16,7 +16,7 @@ void f() { // TODO: In this case, z1 gets "initialized" with an undef value. Should we // treat that as uninitialized? Should it even be happening? -// CHECK: cir.func dso_local @_Z1fv() +// CHECK: cir.func {{.*}} @_Z1fv() // CHECK: %[[Z0:.*]] = cir.alloca !rec_Zero, !cir.ptr, ["z0", init] // CHECK: %[[Z1:.*]] = cir.alloca !rec_Zero, !cir.ptr, ["z1", init] // CHECK: cir.call @_ZN4ZeroC1Ev(%[[Z0]]) : (!cir.ptr) -> () diff --git a/clang/test/CIR/CodeGen/align-load.c b/clang/test/CIR/CodeGen/align-load.c index 93937320392a..a2e386d7f916 100644 --- a/clang/test/CIR/CodeGen/align-load.c +++ b/clang/test/CIR/CodeGen/align-load.c @@ -21,7 +21,7 @@ void accessStruct(struct S u) { u.d; } -// CIR: cir.func dso_local @accessStruct +// CIR: cir.func {{.*}} @accessStruct // CIR: cir.load align(8) // CIR: cir.load align(2) // CIR: cir.load align(4) @@ -58,7 +58,7 @@ void accessUnion(union U u) { u.d; } -// CIR: cir.func dso_local @accessUnion +// CIR: cir.func {{.*}} @accessUnion // CIR: cir.load align(8) // CIR: cir.load align(8) // CIR: cir.load align(8) diff --git a/clang/test/CIR/CodeGen/applearm64-array-cookies.cpp b/clang/test/CIR/CodeGen/applearm64-array-cookies.cpp index 13a1e5475770..eea677a09606 100644 --- a/clang/test/CIR/CodeGen/applearm64-array-cookies.cpp +++ b/clang/test/CIR/CodeGen/applearm64-array-cookies.cpp @@ -10,7 +10,7 @@ void t_constant_size_nontrivial() { auto p = new C[3]; } -// CHECK: cir.func @_Z26t_constant_size_nontrivialv() +// CHECK: cir.func{{.*}} @_Z26t_constant_size_nontrivialv() // CHECK: %[[#NUM_ELEMENTS:]] = cir.const #cir.int<3> : !u64i // CHECK: %[[#SIZE_WITHOUT_COOKIE:]] = cir.const #cir.int<3> : !u64i // CHECK: %[[#ALLOCATION_SIZE:]] = cir.const #cir.int<19> : !u64i @@ -38,7 +38,7 @@ void t_constant_size_nontrivial2() { // In this test SIZE_WITHOUT_COOKIE isn't used, but it would be if there were // an initializer. -// CHECK: cir.func @_Z27t_constant_size_nontrivial2v() +// CHECK: cir.func{{.*}} @_Z27t_constant_size_nontrivial2v() // CHECK: %[[#NUM_ELEMENTS:]] = cir.const #cir.int<3> : !u64i // CHECK: %[[#SIZE_WITHOUT_COOKIE:]] = cir.const #cir.int<12> : !u64i // CHECK: %[[#ALLOCATION_SIZE:]] = cir.const #cir.int<28> : !u64i diff --git a/clang/test/CIR/CodeGen/array-init-destroy.cpp b/clang/test/CIR/CodeGen/array-init-destroy.cpp index a4fe0c6a7eeb..938931c2d872 100644 --- a/clang/test/CIR/CodeGen/array-init-destroy.cpp +++ b/clang/test/CIR/CodeGen/array-init-destroy.cpp @@ -22,7 +22,7 @@ void x() { xpto array[2]; } -// BEFORE: cir.func dso_local @_Z1xv() +// BEFORE: cir.func {{.*}} @_Z1xv() // BEFORE: %[[ArrayAddr:.*]] = cir.alloca !cir.array // BEFORE: cir.array.ctor(%[[ArrayAddr]] : !cir.ptr>) { @@ -37,7 +37,7 @@ void x() { // BEFORE: cir.yield // BEFORE: } -// AFTER: cir.func dso_local @_Z1xv() +// AFTER: cir.func {{.*}} @_Z1xv() // AFTER: %[[ArrayAddr0:.*]] = cir.alloca !cir.array // AFTER: %[[ConstTwo:.*]] = cir.const #cir.int<2> : !u64i // AFTER: %[[ArrayBegin:.*]] = cir.cast array_to_ptrdecay %[[ArrayAddr0]] : !cir.ptr> -> !cir.ptr diff --git a/clang/test/CIR/CodeGen/array-init.c b/clang/test/CIR/CodeGen/array-init.c index 26b541225e0f..f8ed55bdc15b 100644 --- a/clang/test/CIR/CodeGen/array-init.c +++ b/clang/test/CIR/CodeGen/array-init.c @@ -54,7 +54,7 @@ Outer outers[2] = { void buz(int x) { T arr[] = { {x, x}, {0, 0} }; } -// CIR: cir.func dso_local @buz +// CIR: cir.func {{.*}} @buz // CIR-NEXT: [[X_ALLOCA:%.*]] = cir.alloca !s32i, !cir.ptr, ["x", init] {alignment = 4 : i64} // CIR-NEXT: [[ARR:%.*]] = cir.alloca !cir.array, !cir.ptr>, ["arr", init] {alignment = 16 : i64} // CIR-NEXT: cir.store{{.*}} %arg0, [[X_ALLOCA]] : !s32i, !cir.ptr @@ -89,7 +89,7 @@ void foo() { void bar(int a, int b, int c) { int arr[] = {a,b,c}; } -// CIR: cir.func dso_local @bar +// CIR: cir.func {{.*}} @bar // CIR: [[ARR:%.*]] = cir.alloca !cir.array, !cir.ptr>, ["arr", init] {alignment = 4 : i64} // CIR-NEXT: cir.store{{.*}} %arg0, [[A:%.*]] : !s32i, !cir.ptr // CIR-NEXT: cir.store{{.*}} %arg1, [[B:%.*]] : !s32i, !cir.ptr @@ -110,7 +110,7 @@ void bar(int a, int b, int c) { void zero_init(int x) { int arr[3] = {x}; } -// CIR: cir.func dso_local @zero_init +// CIR: cir.func {{.*}} @zero_init // CIR: [[VAR_ALLOC:%.*]] = cir.alloca !s32i, !cir.ptr, ["x", init] {alignment = 4 : i64} // CIR: [[ARR:%.*]] = cir.alloca !cir.array, !cir.ptr>, ["arr", init] {alignment = 4 : i64} // CIR: [[TEMP:%.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["arrayinit.temp", init] {alignment = 8 : i64} @@ -143,7 +143,7 @@ void aggr_init() { int g = 5; int g_arr[5] = {1, 2, 3, g}; } -// CIR-LABEL: cir.func no_proto dso_local @aggr_init +// CIR-LABEL: cir.func {{.*}} @aggr_init // CIR: [[VAR_ALLOC:%.*]] = cir.alloca !s32i, !cir.ptr, ["g", init] {alignment = 4 : i64} // CIR: %1 = cir.alloca !cir.array, !cir.ptr>, ["g_arr", init] {alignment = 16 : i64} // CIR: [[TEMP:%.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["arrayinit.temp", init] {alignment = 8 : i64} diff --git a/clang/test/CIR/CodeGen/array-new-init.cpp b/clang/test/CIR/CodeGen/array-new-init.cpp index 791260f2c52e..efe56a509f63 100644 --- a/clang/test/CIR/CodeGen/array-new-init.cpp +++ b/clang/test/CIR/CodeGen/array-new-init.cpp @@ -11,7 +11,7 @@ void t_new_constant_size_constructor() { auto p = new E[3]; } -// BEFORE: cir.func dso_local @_Z31t_new_constant_size_constructorv +// BEFORE: cir.func {{.*}} @_Z31t_new_constant_size_constructorv // BEFORE: %[[NUM_ELEMENTS:.*]] = cir.const #cir.int<3> : !u64i // BEFORE: %[[SIZE_WITHOUT_COOKIE:.*]] = cir.const #cir.int<3> : !u64i // BEFORE: %[[ALLOC_SIZE:.*]] = cir.const #cir.int<11> : !u64i @@ -29,7 +29,7 @@ void t_new_constant_size_constructor() { // BEFORE: cir.yield // BEFORE: } -// AFTER: cir.func dso_local @_Z31t_new_constant_size_constructorv +// AFTER: cir.func {{.*}} @_Z31t_new_constant_size_constructorv // AFTER: %[[NUM_ELEMENTS:.*]] = cir.const #cir.int<3> : !u64i // AFTER: %[[SIZE_WITHOUT_COOKIE:.*]] = cir.const #cir.int<3> : !u64i // AFTER: %[[ALLOC_SIZE:.*]] = cir.const #cir.int<11> : !u64i diff --git a/clang/test/CIR/CodeGen/array-unknown-bound.cpp b/clang/test/CIR/CodeGen/array-unknown-bound.cpp index c18e44d8faf4..93c0f97fa905 100644 --- a/clang/test/CIR/CodeGen/array-unknown-bound.cpp +++ b/clang/test/CIR/CodeGen/array-unknown-bound.cpp @@ -7,7 +7,7 @@ int *table_ptr = table; // CHECK: cir.global external @table_ptr = #cir.global_view<@table> : !cir.ptr int test() { return table[1]; } -// CHECK: cir.func dso_local @_Z4testv() +// CHECK: cir.func {{.*}} @_Z4testv() // CHECK-NEXT: %0 = cir.alloca !s32i, !cir.ptr, ["__retval"] {alignment = 4 : i64} // CHECK-NEXT: %1 = cir.get_global @table : !cir.ptr> diff --git a/clang/test/CIR/CodeGen/array.cpp b/clang/test/CIR/CodeGen/array.cpp index 5fa3b09dd1ce..f56386b71917 100644 --- a/clang/test/CIR/CodeGen/array.cpp +++ b/clang/test/CIR/CodeGen/array.cpp @@ -5,7 +5,7 @@ void a0() { int a[10]; } -// CHECK: cir.func dso_local @_Z2a0v() +// CHECK: cir.func {{.*}} @_Z2a0v() // CHECK-NEXT: %0 = cir.alloca !cir.array, !cir.ptr>, ["a"] {alignment = 16 : i64} void a1() { @@ -13,7 +13,7 @@ void a1() { a[0] = 1; } -// CHECK: cir.func dso_local @_Z2a1v() +// CHECK: cir.func {{.*}} @_Z2a1v() // CHECK-NEXT: %0 = cir.alloca !cir.array, !cir.ptr>, ["a"] {alignment = 16 : i64} // CHECK-NEXT: %1 = cir.const #cir.int<1> : !s32i // CHECK-NEXT: %2 = cir.const #cir.int<0> : !s32i @@ -25,7 +25,7 @@ int *a2() { return &a[0]; } -// CHECK: cir.func dso_local @_Z2a2v() -> !cir.ptr +// CHECK: cir.func {{.*}} @_Z2a2v() -> !cir.ptr // CHECK-NEXT: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["__retval"] {alignment = 8 : i64} // CHECK-NEXT: %1 = cir.alloca !cir.array, !cir.ptr>, ["a"] {alignment = 16 : i64} // CHECK-NEXT: %2 = cir.const #cir.int<0> : !s32i @@ -39,7 +39,7 @@ void local_stringlit() { } // CHECK: cir.global "private" constant cir_private dso_local @".str" = #cir.const_array<"whatnow\00" : !cir.array> : !cir.array {alignment = 1 : i64} -// CHECK: cir.func dso_local @_Z15local_stringlitv() +// CHECK: cir.func {{.*}} @_Z15local_stringlitv() // CHECK-NEXT: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["s", init] {alignment = 8 : i64} // CHECK-NEXT: %1 = cir.get_global @".str" : !cir.ptr> // CHECK-NEXT: %2 = cir.cast array_to_ptrdecay %1 : !cir.ptr> -> !cir.ptr @@ -69,7 +69,7 @@ struct S { // CHECK: cir.global external @arr = #cir.const_array<[#cir.const_record<{#cir.int<1> : !s32i}> : !rec_S, #cir.zero : !rec_S, #cir.zero : !rec_S]> : !cir.array void testPointerDecaySubscriptAccess(int arr[]) { -// CHECK: cir.func dso_local @{{.+}}testPointerDecaySubscriptAccess +// CHECK: cir.func {{.*}} @{{.+}}testPointerDecaySubscriptAccess arr[1] = 2; // CHECK: %[[#TWO:]] = cir.const #cir.int<2> : !s32i // CHECK: %[[#BASE:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -79,7 +79,7 @@ void testPointerDecaySubscriptAccess(int arr[]) { } void testPointerDecayedArrayMultiDimSubscriptAccess(int arr[][3]) { -// CHECK: cir.func dso_local @{{.+}}testPointerDecayedArrayMultiDimSubscriptAccess +// CHECK: cir.func {{.*}} @{{.+}}testPointerDecayedArrayMultiDimSubscriptAccess arr[1][2] = 3; // CHECK: %[[#THREE:]] = cir.const #cir.int<3> : !s32i // CHECK: %[[#ARRAY:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>>, !cir.ptr> diff --git a/clang/test/CIR/CodeGen/assign-operator.cpp b/clang/test/CIR/CodeGen/assign-operator.cpp index b6f436da07cb..c633556a9107 100644 --- a/clang/test/CIR/CodeGen/assign-operator.cpp +++ b/clang/test/CIR/CodeGen/assign-operator.cpp @@ -11,7 +11,7 @@ struct String { String(char const *s) : size{strlen(s)}, capacity{size} {} // StringView::StringView(String const&) // - // CHECK: cir.func linkonce_odr @_ZN10StringViewC2ERK6String + // CHECK: cir.func {{.*}} @_ZN10StringViewC2ERK6String // CHECK: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK: %1 = cir.alloca !cir.ptr, !cir.ptr>, ["s", init, const] {alignment = 8 : i64} // CHECK: cir.store{{.*}} %arg0, %0 : !cir.ptr @@ -39,7 +39,7 @@ struct String { // StringView::operator=(StringView&&) // - // CHECK: cir.func linkonce_odr @_ZN10StringViewaSEOS_ + // CHECK: cir.func {{.*}} @_ZN10StringViewaSEOS_ // CHECK-SAME: special_member<#cir.cxx_assign> // CHECK: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK: %1 = cir.alloca !cir.ptr, !cir.ptr>, ["", init, const] {alignment = 8 : i64} @@ -73,7 +73,7 @@ int main() { } } -// CHECK: cir.func dso_local @main() -> !s32i +// CHECK: cir.func {{.*}} @main() -> !s32i // CHECK: %0 = cir.alloca !s32i, !cir.ptr, ["__retval"] {alignment = 4 : i64} // CHECK: %1 = cir.alloca !rec_StringView, !cir.ptr, ["sv", init] {alignment = 8 : i64} // CHECK: cir.call @_ZN10StringViewC2Ev(%1) : (!cir.ptr) -> () @@ -108,7 +108,7 @@ struct ContainsNonTrivial { ContainsNonTrivial &operator=(const ContainsNonTrivial &); }; -// CHECK-LABEL: cir.func dso_local @_ZN18ContainsNonTrivialaSERKS_( +// CHECK-LABEL: cir.func {{.*}} @_ZN18ContainsNonTrivialaSERKS_( // CHECK-SAME: special_member<#cir.cxx_assign> // CHECK-NEXT: %[[#THIS:]] = cir.alloca !cir.ptr // CHECK-NEXT: %[[#OTHER:]] = cir.alloca !cir.ptr @@ -156,7 +156,7 @@ struct Trivial { int l[3]; }; -// CHECK-LABEL: cir.func linkonce_odr @_ZN7TrivialaSERKS_( +// CHECK-LABEL: cir.func {{.*}} @_ZN7TrivialaSERKS_( // CHECK-NEXT: %[[#THIS:]] = cir.alloca !cir.ptr // CHECK-NEXT: %[[#OTHER:]] = cir.alloca !cir.ptr // CHECK-NEXT: %[[#RETVAL:]] = cir.alloca !cir.ptr @@ -177,7 +177,7 @@ struct Trivial { // CHECK-NEXT: } // We should explicitly call operator= even for trivial types. -// CHECK-LABEL: cir.func dso_local @_Z11copyTrivialR7TrivialS0_( +// CHECK-LABEL: cir.func {{.*}} @_Z11copyTrivialR7TrivialS0_( // CHECK: cir.call @_ZN7TrivialaSERKS_( void copyTrivial(Trivial &a, Trivial &b) { a = b; @@ -190,7 +190,7 @@ struct ContainsTrivial { }; // We should explicitly call operator= even for trivial types. -// CHECK-LABEL: cir.func dso_local @_ZN15ContainsTrivialaSERKS_( +// CHECK-LABEL: cir.func {{.*}} @_ZN15ContainsTrivialaSERKS_( // CHECK-SAME: special_member<#cir.cxx_assign> // CHECK: cir.call @_ZN7TrivialaSERKS_( // CHECK: cir.call @_ZN7TrivialaSERKS_( @@ -202,7 +202,7 @@ struct ContainsTrivialArray { }; // We should be calling operator= here but don't currently. -// CHECK-LABEL: cir.func dso_local @_ZN20ContainsTrivialArrayaSERKS_( +// CHECK-LABEL: cir.func {{.*}} @_ZN20ContainsTrivialArrayaSERKS_( // CHECK-SAME: special_member<#cir.cxx_assign> // CHECK: %[[#THIS_LOAD:]] = cir.load{{.*}} deref %[[#]] // CHECK-NEXT: %[[#THIS_ARR:]] = cir.get_member %[[#THIS_LOAD]][0] {name = "arr"} diff --git a/clang/test/CIR/CodeGen/atomic.cpp b/clang/test/CIR/CodeGen/atomic.cpp index 10dcfbd7ccd3..47340ae0acc9 100644 --- a/clang/test/CIR/CodeGen/atomic.cpp +++ b/clang/test/CIR/CodeGen/atomic.cpp @@ -27,7 +27,7 @@ int basic_binop_fetch(int *i) { return __atomic_add_fetch(i, 1, memory_order_seq_cst); } -// CHECK: cir.func dso_local @_Z17basic_binop_fetchPi +// CHECK: cir.func {{.*}} @_Z17basic_binop_fetchPi // CHECK: %[[ARGI:.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["i", init] {alignment = 8 : i64} // CHECK: %[[ONE_ADDR:.*]] = cir.alloca !s32i, !cir.ptr, [".atomictmp"] {alignment = 4 : i64} // CHECK: cir.store{{.*}} %arg0, %[[ARGI]] : !cir.ptr, !cir.ptr> @@ -48,7 +48,7 @@ int other_binop_fetch(int *i) { return __atomic_xor_fetch(i, 1, memory_order_release); } -// CHECK: cir.func dso_local @_Z17other_binop_fetchPi +// CHECK: cir.func {{.*}} @_Z17other_binop_fetchPi // CHECK: cir.atomic.fetch(sub, {{.*}}, relaxed // CHECK: cir.atomic.fetch(and, {{.*}}, acquire // CHECK: cir.atomic.fetch(or, {{.*}}, acquire @@ -68,7 +68,7 @@ int nand_binop_fetch(int *i) { return __atomic_nand_fetch(i, 1, memory_order_acq_rel); } -// CHECK: cir.func dso_local @_Z16nand_binop_fetchPi +// CHECK: cir.func {{.*}} @_Z16nand_binop_fetchPi // CHECK: cir.atomic.fetch(nand, {{.*}}, acq_rel // LLVM: define dso_local i32 @_Z16nand_binop_fetchPi @@ -81,7 +81,7 @@ int fp_binop_fetch(float *i) { return __atomic_sub_fetch(i, 1, memory_order_seq_cst); } -// CHECK: cir.func dso_local @_Z14fp_binop_fetchPf +// CHECK: cir.func {{.*}} @_Z14fp_binop_fetchPf // CHECK: cir.atomic.fetch(add, // CHECK: cir.atomic.fetch(sub, @@ -100,7 +100,7 @@ int fetch_binop(int *i) { return __atomic_fetch_nand(i, 1, memory_order_seq_cst); } -// CHECK: cir.func dso_local @_Z11fetch_binopPi +// CHECK: cir.func {{.*}} @_Z11fetch_binopPi // CHECK: cir.atomic.fetch(add, {{.*}}) fetch_first // CHECK: cir.atomic.fetch(sub, {{.*}}) fetch_first // CHECK: cir.atomic.fetch(and, {{.*}}) fetch_first @@ -129,7 +129,7 @@ void min_max_fetch(int *i) { __atomic_min_fetch(i, 1, memory_order_seq_cst); } -// CHECK: cir.func dso_local @_Z13min_max_fetchPi +// CHECK: cir.func {{.*}} @_Z13min_max_fetchPi // CHECK: = cir.atomic.fetch(max, {{.*}}) fetch_first // CHECK: = cir.atomic.fetch(min, {{.*}}) fetch_first // CHECK: = cir.atomic.fetch(max, {{.*}}) : !s32i @@ -151,7 +151,7 @@ int fi1(_Atomic(int) *i) { return __c11_atomic_load(i, memory_order_seq_cst); } -// CHECK: cir.func dso_local @_Z3fi1PU7_Atomici +// CHECK: cir.func {{.*}} @_Z3fi1PU7_Atomici // CHECK: cir.load{{.*}} atomic(seq_cst) // LLVM-LABEL: @_Z3fi1PU7_Atomici diff --git a/clang/test/CIR/CodeGen/attribute-annotate-multiple.cpp b/clang/test/CIR/CodeGen/attribute-annotate-multiple.cpp index 9876ad2dd3f1..b45ba0ce6d4a 100644 --- a/clang/test/CIR/CodeGen/attribute-annotate-multiple.cpp +++ b/clang/test/CIR/CodeGen/attribute-annotate-multiple.cpp @@ -27,9 +27,9 @@ void bar() __attribute__((annotate("withargfunc", "os", 22))) { // BEFORE: cir.global external @tile = #cir.int<7> : !s32i // BEFORE-SAME: #cir.annotation] -// BEFORE: cir.func dso_local @_Z3fooi(%arg0: !s32i) [#cir.annotation, +// BEFORE: cir.func {{.*}} @_Z3fooi(%arg0: !s32i) [#cir.annotation, // BEFORE-SAME: #cir.annotation] -// BEFORE: cir.func dso_local @_Z3barv() [#cir.annotation] +// BEFORE: cir.func {{.*}} @_Z3barv() [#cir.annotation] // AFTER: module {{.*}}attribute-annotate-multiple.cpp" attributes diff --git a/clang/test/CIR/CodeGen/basic.c b/clang/test/CIR/CodeGen/basic.c index 076df0ce7844..55755b0e33ca 100644 --- a/clang/test/CIR/CodeGen/basic.c +++ b/clang/test/CIR/CodeGen/basic.c @@ -11,7 +11,7 @@ int foo(int i) { } // CIR: module @"{{.*}}basic.c" attributes {{{.*}}cir.lang = #cir.lang -// CIR-NEXT: cir.func dso_local @foo(%arg0: !s32i loc({{.*}})) -> !s32i +// CIR-NEXT: cir.func {{.*}} @foo(%arg0: !s32i loc({{.*}})) -> !s32i // CIR-NEXT: %0 = cir.alloca !s32i, !cir.ptr, ["i", init] {alignment = 4 : i64} // CIR-NEXT: %1 = cir.alloca !s32i, !cir.ptr, ["__retval"] {alignment = 4 : i64} // CIR-NEXT: cir.store{{.*}} %arg0, %0 : !s32i, !cir.ptr @@ -23,7 +23,7 @@ int foo(int i) { int f2(void) { return 3; } -// CIR: cir.func dso_local @f2() -> !s32i +// CIR: cir.func {{.*}} @f2() -> !s32i // CIR-NEXT: %0 = cir.alloca !s32i, !cir.ptr, ["__retval"] {alignment = 4 : i64} // CIR-NEXT: %1 = cir.const #cir.int<3> : !s32i // CIR-NEXT: cir.store{{.*}} %1, %0 : !s32i, !cir.ptr @@ -43,7 +43,7 @@ int f3(void) { return i; } -// CIR: cir.func dso_local @f3() -> !s32i +// CIR: cir.func {{.*}} @f3() -> !s32i // CIR-NEXT: %0 = cir.alloca !s32i, !cir.ptr, ["__retval"] {alignment = 4 : i64} // CIR-NEXT: %1 = cir.alloca !s32i, !cir.ptr, ["i", init] {alignment = 4 : i64} // CIR-NEXT: %2 = cir.const #cir.int<3> : !s32i diff --git a/clang/test/CIR/CodeGen/basic.cpp b/clang/test/CIR/CodeGen/basic.cpp index 89ed36ea62e6..b577cc35e469 100644 --- a/clang/test/CIR/CodeGen/basic.cpp +++ b/clang/test/CIR/CodeGen/basic.cpp @@ -6,7 +6,7 @@ int *p0() { return p; } -// CHECK: cir.func dso_local @_Z2p0v() -> !cir.ptr +// CHECK: cir.func {{.*}} @_Z2p0v() -> !cir.ptr // CHECK: %1 = cir.alloca !cir.ptr, !cir.ptr>, ["p", init] // CHECK: %2 = cir.const #cir.ptr : !cir.ptr // CHECK: cir.store{{.*}} %2, %1 : !cir.ptr, !cir.ptr> @@ -17,7 +17,7 @@ int *p1() { return p; } -// CHECK: cir.func dso_local @_Z2p1v() -> !cir.ptr +// CHECK: cir.func {{.*}} @_Z2p1v() -> !cir.ptr // CHECK: %1 = cir.alloca !cir.ptr, !cir.ptr>, ["p"] // CHECK: %2 = cir.const #cir.ptr : !cir.ptr // CHECK: cir.store{{.*}} %2, %1 : !cir.ptr, !cir.ptr> @@ -33,7 +33,7 @@ int *p2() { return p; } -// CHECK: cir.func dso_local @_Z2p2v() -> !cir.ptr +// CHECK: cir.func {{.*}} @_Z2p2v() -> !cir.ptr // CHECK-NEXT: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["__retval"] {alignment = 8 : i64} // CHECK-NEXT: %1 = cir.alloca !cir.ptr, !cir.ptr>, ["p", init] {alignment = 8 : i64} // CHECK-NEXT: %2 = cir.const #cir.ptr : !cir.ptr @@ -57,13 +57,13 @@ int *p2() { void b0() { bool x = true, y = false; } -// CHECK: cir.func dso_local @_Z2b0v() +// CHECK: cir.func {{.*}} @_Z2b0v() // CHECK: %2 = cir.const #true // CHECK: %3 = cir.const #false void b1(int a) { bool b = a; } -// CHECK: cir.func dso_local @_Z2b1i(%arg0: !s32i loc({{.*}})) +// CHECK: cir.func {{.*}} @_Z2b1i(%arg0: !s32i loc({{.*}})) // CHECK: %2 = cir.load{{.*}} %0 : !cir.ptr, !s32i // CHECK: %3 = cir.cast int_to_bool %2 : !s32i -> !cir.bool // CHECK: cir.store{{.*}} %3, %1 : !cir.bool, !cir.ptr @@ -77,7 +77,7 @@ void if0(int a) { } } -// CHECK: cir.func dso_local @_Z3if0i(%arg0: !s32i loc({{.*}})) +// CHECK: cir.func {{.*}} @_Z3if0i(%arg0: !s32i loc({{.*}})) // CHECK: cir.scope { // CHECK: %3 = cir.load{{.*}} %0 : !cir.ptr, !s32i // CHECK: %4 = cir.cast int_to_bool %3 : !s32i -> !cir.bool @@ -105,7 +105,7 @@ void if1(int a, bool b, bool c) { } } -// CHECK: cir.func dso_local @_Z3if1ibb(%arg0: !s32i loc({{.*}}), %arg1: !cir.bool loc({{.*}}), %arg2: !cir.bool loc({{.*}})) +// CHECK: cir.func {{.*}} @_Z3if1ibb(%arg0: !s32i loc({{.*}}), %arg1: !cir.bool loc({{.*}}), %arg2: !cir.bool loc({{.*}})) // CHECK: cir.scope { // CHECK: %5 = cir.load{{.*}} %0 : !cir.ptr, !s32i // CHECK: %6 = cir.cast int_to_bool %5 : !s32i -> !cir.bool @@ -144,7 +144,7 @@ struct regs { }; // Check it's not mangled. -// CHECK: cir.func dso_local @use_regs() +// CHECK: cir.func {{.*}} @use_regs() void use_regs() { regs r; } } @@ -154,7 +154,7 @@ void x() { const bool b1 = false; } -// CHECK: cir.func dso_local @_Z1xv() +// CHECK: cir.func {{.*}} @_Z1xv() // CHECK: %0 = cir.alloca !cir.bool, !cir.ptr, ["b0", init, const] {alignment = 1 : i64} // CHECK: %1 = cir.alloca !cir.bool, !cir.ptr, ["b1", init, const] {alignment = 1 : i64} // CHECK: %2 = cir.const #true @@ -169,7 +169,7 @@ size_type max_size() { return size_type(~0) / sizeof(_Tp); } -// CHECK: cir.func dso_local @_Z8max_sizev() +// CHECK: cir.func {{.*}} @_Z8max_sizev() // CHECK: %0 = cir.alloca !u64i, !cir.ptr, ["__retval"] {alignment = 8 : i64} // CHECK: %1 = cir.const #cir.int<0> : !s32i // CHECK: %2 = cir.unary(not, %1) : !s32i, !s32i diff --git a/clang/test/CIR/CodeGen/binassign.cpp b/clang/test/CIR/CodeGen/binassign.cpp index 17f4f7cb19a6..f62119a2cca7 100644 --- a/clang/test/CIR/CodeGen/binassign.cpp +++ b/clang/test/CIR/CodeGen/binassign.cpp @@ -60,7 +60,7 @@ void exec() { if ((r = getty()) < 0) {} } -// CHECK: cir.func dso_local @_Z4execv() +// CHECK: cir.func {{.*}} @_Z4execv() // CHECK: %0 = cir.alloca !u32i, !cir.ptr, ["r"] {alignment = 4 : i64} // CHECK: cir.scope { // CHECK: %1 = cir.call @_Z5gettyv() : () -> !u32i diff --git a/clang/test/CIR/CodeGen/bitfield-union.c b/clang/test/CIR/CodeGen/bitfield-union.c index 40239dd59458..51d9175878a7 100644 --- a/clang/test/CIR/CodeGen/bitfield-union.c +++ b/clang/test/CIR/CodeGen/bitfield-union.c @@ -39,7 +39,7 @@ void f() { // CIR: #bfi_y = #cir.bitfield_info // CIR: #bfi_z = #cir.bitfield_info -// CIR: cir.func no_proto dso_local @f +// CIR: cir.func {{.*}} @f // CIR: [[ALLOC:%.*]] = cir.alloca !rec_demo, !cir.ptr, ["d"] {alignment = 4 : i64} // CIR: [[ONE:%.*]] = cir.const #cir.int<1> : !s32i // CIR: [[X:%.*]] = cir.get_member [[ALLOC]][0] {name = "x"} : !cir.ptr -> !cir.ptr diff --git a/clang/test/CIR/CodeGen/bitfields.cpp b/clang/test/CIR/CodeGen/bitfields.cpp index da29da301fc9..59ec477c331a 100644 --- a/clang/test/CIR/CodeGen/bitfields.cpp +++ b/clang/test/CIR/CodeGen/bitfields.cpp @@ -33,7 +33,7 @@ typedef struct { // CHECK-DAG: #bfi_a1 = #cir.bitfield_info // CHECK-DAG: !rec_anon2E0 = !cir.record -// CHECK: cir.func dso_local @_Z11store_field +// CHECK: cir.func {{.*}} @_Z11store_field // CHECK: [[TMP0:%.*]] = cir.alloca !rec_S, !cir.ptr // CHECK: [[TMP1:%.*]] = cir.const #cir.int<3> : !s32i // CHECK: [[TMP2:%.*]] = cir.get_member [[TMP0]][0] {name = "a"} : !cir.ptr -> !cir.ptr @@ -43,7 +43,7 @@ void store_field() { s.a = 3; } -// CHECK: cir.func dso_local @_Z10load_field +// CHECK: cir.func {{.*}} @_Z10load_field // CHECK: [[TMP0:%.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["s", init, const] // CHECK: [[TMP1:%.*]] = cir.load [[TMP0]] : !cir.ptr>, !cir.ptr // CHECK: [[TMP2:%.*]] = cir.get_member [[TMP1]][0] {name = "d"} : !cir.ptr -> !cir.ptr @@ -52,14 +52,14 @@ int load_field(S& s) { return s.d; } -// CHECK: cir.func dso_local @_Z17load_non_bitfield +// CHECK: cir.func {{.*}} @_Z17load_non_bitfield // CHECK: cir.get_member {{%.}}[2] {name = "f"} : !cir.ptr -> !cir.ptr unsigned load_non_bitfield(S& s) { return s.f; } // just create a usage of T type -// CHECK: cir.func dso_local @_Z17load_one_bitfield +// CHECK: cir.func {{.*}} @_Z17load_one_bitfield int load_one_bitfield(T& t) { return t.a; } diff --git a/clang/test/CIR/CodeGen/bitint.c b/clang/test/CIR/CodeGen/bitint.c index 5add80dd3749..2f5d36c03ea5 100644 --- a/clang/test/CIR/CodeGen/bitint.c +++ b/clang/test/CIR/CodeGen/bitint.c @@ -7,7 +7,7 @@ void VLATest(_BitInt(3) A, _BitInt(42) B, _BitInt(17) C) { int AR3[C]; } -// CHECK: cir.func dso_local @VLATest +// CHECK: cir.func {{.*}} @VLATest // CHECK: %[[#A:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.int // CHECK-NEXT: %[[#A_PROMOTED:]] = cir.cast integral %[[#A]] : !cir.int -> !u64i // CHECK-NEXT: %[[#SP:]] = cir.stack_save : !cir.ptr diff --git a/clang/test/CIR/CodeGen/bitint.cpp b/clang/test/CIR/CodeGen/bitint.cpp index 1ebcae908c04..1837333ec62d 100644 --- a/clang/test/CIR/CodeGen/bitint.cpp +++ b/clang/test/CIR/CodeGen/bitint.cpp @@ -11,21 +11,21 @@ i10 test_signed(i10 arg) { return arg; } -// CHECK: cir.func dso_local @_Z11test_signedDB10_(%arg0: !cir.int loc({{.*}}) -> !cir.int +// CHECK: cir.func {{.*}} @_Z11test_signedDB10_(%arg0: !cir.int loc({{.*}}) -> !cir.int // CHECK: } u10 test_unsigned(u10 arg) { return arg; } -// CHECK: cir.func dso_local @_Z13test_unsignedDU10_(%arg0: !cir.int loc({{.*}}) -> !cir.int +// CHECK: cir.func {{.*}} @_Z13test_unsignedDU10_(%arg0: !cir.int loc({{.*}}) -> !cir.int // CHECK: } i10 test_init() { return 42; } -// CHECK: cir.func dso_local @_Z9test_initv() -> !cir.int +// CHECK: cir.func {{.*}} @_Z9test_initv() -> !cir.int // CHECK: %[[#LITERAL:]] = cir.const #cir.int<42> : !s32i // CHECK-NEXT: %{{.+}} = cir.cast integral %[[#LITERAL]] : !s32i -> !cir.int // CHECK: } @@ -34,7 +34,7 @@ void test_init_for_mem() { i10 x = 42; } -// CHECK: cir.func dso_local @_Z17test_init_for_memv() +// CHECK: cir.func {{.*}} @_Z17test_init_for_memv() // CHECK: %[[#LITERAL:]] = cir.const #cir.int<42> : !s32i // CHECK-NEXT: %[[#INIT:]] = cir.cast integral %[[#LITERAL]] : !s32i -> !cir.int // CHECK-NEXT: cir.store{{.*}} %[[#INIT]], %{{.+}} : !cir.int, !cir.ptr> @@ -44,7 +44,7 @@ i10 test_arith(i10 lhs, i10 rhs) { return lhs + rhs; } -// CHECK: cir.func dso_local @_Z10test_arithDB10_S_(%arg0: !cir.int loc({{.+}}), %arg1: !cir.int loc({{.+}})) -> !cir.int +// CHECK: cir.func {{.*}} @_Z10test_arithDB10_S_(%arg0: !cir.int loc({{.+}}), %arg1: !cir.int loc({{.+}})) -> !cir.int // CHECK: %[[#LHS:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.int // CHECK-NEXT: %[[#RHS:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.int // CHECK-NEXT: %{{.+}} = cir.binop(add, %[[#LHS]], %[[#RHS]]) nsw : !cir.int @@ -55,7 +55,7 @@ void Size1ExtIntParam(unsigned _BitInt(1) A) { B[2] = A; } -// CHECK: cir.func dso_local @_Z16Size1ExtIntParamDU1_ +// CHECK: cir.func {{.*}} @_Z16Size1ExtIntParamDU1_ // CHECK: %[[#A:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.int // CHECK-NEXT: %[[#IDX:]] = cir.const #cir.int<2> : !s32i // CHECK-NEXT: %[[#ELEM:]] = cir.get_element %1[%[[#IDX]]] : (!cir.ptr x 5>>, !s32i) -> !cir.ptr> @@ -74,7 +74,7 @@ void OffsetOfTest(void) { int C = __builtin_offsetof(struct S,C); } -// CHECK: cir.func dso_local @_Z12OffsetOfTestv() +// CHECK: cir.func {{.*}} @_Z12OffsetOfTestv() // CHECK: %{{.+}} = cir.const #cir.int<0> : !u64i // CHECK: %{{.+}} = cir.const #cir.int<4> : !u64i // CHECK: %{{.+}} = cir.const #cir.int<8> : !u64i @@ -82,4 +82,4 @@ void OffsetOfTest(void) { _BitInt(2) ParamPassing(_BitInt(15) a, _BitInt(31) b) {} -// CHECK: cir.func dso_local @_Z12ParamPassingDB15_DB31_(%arg0: !cir.int loc({{.+}}), %arg1: !cir.int loc({{.+}})) -> !cir.int +// CHECK: cir.func {{.*}} @_Z12ParamPassingDB15_DB31_(%arg0: !cir.int loc({{.+}}), %arg1: !cir.int loc({{.+}})) -> !cir.int diff --git a/clang/test/CIR/CodeGen/bool.c b/clang/test/CIR/CodeGen/bool.c index 4b3d9abadbbf..ce293801574d 100644 --- a/clang/test/CIR/CodeGen/bool.c +++ b/clang/test/CIR/CodeGen/bool.c @@ -7,7 +7,7 @@ typedef struct { bool x; } S; -// CHECK: cir.func dso_local @init_bool +// CHECK: cir.func {{.*}} @init_bool // CHECK: [[ALLOC:%.*]] = cir.alloca !rec_S, !cir.ptr // CHECK: [[ZERO:%.*]] = cir.const #cir.zero : !rec_S // CHECK: cir.store{{.*}} [[ZERO]], [[ALLOC]] : !rec_S, !cir.ptr @@ -15,7 +15,7 @@ void init_bool(void) { S s = {0}; } -// CHECK: cir.func dso_local @store_bool +// CHECK: cir.func {{.*}} @store_bool // CHECK: [[TMP0:%.*]] = cir.alloca !cir.ptr, !cir.ptr> // CHECK: cir.store{{.*}} %arg0, [[TMP0]] : !cir.ptr, !cir.ptr> // CHECK: [[TMP1:%.*]] = cir.const #cir.int<0> : !s32i @@ -27,7 +27,7 @@ void store_bool(S *s) { s->x = false; } -// CHECK: cir.func dso_local @load_bool +// CHECK: cir.func {{.*}} @load_bool // CHECK: [[TMP0:%.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["s", init] {alignment = 8 : i64} // CHECK: [[TMP1:%.*]] = cir.alloca !cir.bool, !cir.ptr, ["x", init] {alignment = 1 : i64} // CHECK: cir.store{{.*}} %arg0, [[TMP0]] : !cir.ptr, !cir.ptr> diff --git a/clang/test/CIR/CodeGen/bswap.cpp b/clang/test/CIR/CodeGen/bswap.cpp index 3473b64ac722..1525ba4aa9ef 100644 --- a/clang/test/CIR/CodeGen/bswap.cpp +++ b/clang/test/CIR/CodeGen/bswap.cpp @@ -9,7 +9,7 @@ u16 bswap_u16(u16 x) { return __builtin_bswap16(x); } -// CHECK: cir.func dso_local @_Z9bswap_u16t +// CHECK: cir.func {{.*}} @_Z9bswap_u16t // CHECK: %{{.+}} = cir.byte_swap %{{.+}} : !u16i // CHECK: } @@ -17,7 +17,7 @@ u32 bswap_u32(u32 x) { return __builtin_bswap32(x); } -// CHECK: cir.func dso_local @_Z9bswap_u32j +// CHECK: cir.func {{.*}} @_Z9bswap_u32j // CHECK: %{{.+}} = cir.byte_swap %{{.+}} : !u32i // CHECK: } @@ -25,6 +25,6 @@ u64 bswap_u64(u64 x) { return __builtin_bswap64(x); } -// CHECK: cir.func dso_local @_Z9bswap_u64y +// CHECK: cir.func {{.*}} @_Z9bswap_u64y // CHECK: %{{.+}} = cir.byte_swap %{{.+}} : !u64i // CHECK: } diff --git a/clang/test/CIR/CodeGen/build-deferred.cpp b/clang/test/CIR/CodeGen/build-deferred.cpp index 89dd52947e6f..cfd969cadc00 100644 --- a/clang/test/CIR/CodeGen/build-deferred.cpp +++ b/clang/test/CIR/CodeGen/build-deferred.cpp @@ -18,10 +18,9 @@ void test() { String s3{"abcdefghijklmnop"}; } -// CHECK-NOT: cir.func linkonce_odr @_ZN6StringC2Ev -// CHECK-NOT: cir.func linkonce_odr @_ZN6StringC2Ei -// CHECK-NOT: cir.func linkonce_odr @_ZN6StringC2EPKc -// CHECK-NOT: cir.func linkonce_odr @_ZN6StringC1EPKc +// CHECK-NOT: cir.func {{.*}} @_ZN6StringC2Ev +// CHECK-NOT: cir.func {{.*}} @_ZN6StringC2Ei +// CHECK-NOT: cir.func {{.*}} @_ZN6StringC2EPKc -// CHECK: cir.func dso_local @_Z4testv() +// CHECK: cir.func {{.*}} @_Z4testv() // CHECK: cir.call @_ZN6StringC1Ev(%0) : (!cir.ptr) -> () diff --git a/clang/test/CIR/CodeGen/builtin-alloca.c b/clang/test/CIR/CodeGen/builtin-alloca.c index ee4b05976bda..ab5ccbb3701b 100644 --- a/clang/test/CIR/CodeGen/builtin-alloca.c +++ b/clang/test/CIR/CodeGen/builtin-alloca.c @@ -9,7 +9,7 @@ void my_alloca(size_t n) { int *c1 = alloca(n); } -// CIR: cir.func dso_local @my_alloca([[ALLOCA_SIZE:%.*]]: !u64i +// CIR: cir.func {{.*}} @my_alloca([[ALLOCA_SIZE:%.*]]: !u64i // CIR: cir.store [[ALLOCA_SIZE]], [[LOCAL_VAR_ALLOCA_SIZE:%.*]] : !u64i, !cir.ptr // CIR: [[TMP_ALLOCA_SIZE:%.*]] = cir.load{{.*}} [[LOCAL_VAR_ALLOCA_SIZE]] : !cir.ptr, !u64i // CIR: [[ALLOCA_RES:%.*]] = cir.alloca !u8i, !cir.ptr, [[TMP_ALLOCA_SIZE]] : !u64i, ["bi_alloca"] {alignment = 16 : i64} @@ -28,7 +28,7 @@ void my___builtin_alloca(size_t n) int *c1 = (int *)__builtin_alloca(n); } -// CIR: cir.func dso_local @my___builtin_alloca([[ALLOCA_SIZE:%.*]]: !u64i +// CIR: cir.func {{.*}} @my___builtin_alloca([[ALLOCA_SIZE:%.*]]: !u64i // CIR: cir.store [[ALLOCA_SIZE]], [[LOCAL_VAR_ALLOCA_SIZE:%.*]] : !u64i, !cir.ptr // CIR: [[TMP_ALLOCA_SIZE:%.*]] = cir.load{{.*}} [[LOCAL_VAR_ALLOCA_SIZE]] : !cir.ptr, !u64i // CIR: [[ALLOCA_RES:%.*]] = cir.alloca !u8i, !cir.ptr, [[TMP_ALLOCA_SIZE]] : !u64i, ["bi_alloca"] {alignment = 16 : i64} @@ -47,7 +47,7 @@ void my__builtin_alloca_uninitialized(size_t n) int *c1 = (int *)__builtin_alloca_uninitialized(n); } -// CIR: cir.func dso_local @my__builtin_alloca_uninitialized([[ALLOCA_SIZE:%.*]]: !u64i +// CIR: cir.func {{.*}} @my__builtin_alloca_uninitialized([[ALLOCA_SIZE:%.*]]: !u64i // CIR: cir.store [[ALLOCA_SIZE]], [[LOCAL_VAR_ALLOCA_SIZE:%.*]] : !u64i, !cir.ptr // CIR: [[TMP_ALLOCA_SIZE:%.*]] = cir.load{{.*}} [[LOCAL_VAR_ALLOCA_SIZE]] : !cir.ptr, !u64i // CIR: [[ALLOCA_RES:%.*]] = cir.alloca !u8i, !cir.ptr, [[TMP_ALLOCA_SIZE]] : !u64i, ["bi_alloca"] {alignment = 16 : i64} diff --git a/clang/test/CIR/CodeGen/builtin-assume.cpp b/clang/test/CIR/CodeGen/builtin-assume.cpp index 9ac03c716234..87a7ac07020f 100644 --- a/clang/test/CIR/CodeGen/builtin-assume.cpp +++ b/clang/test/CIR/CodeGen/builtin-assume.cpp @@ -8,7 +8,7 @@ int test_assume(int x) { return x; } -// CIR: cir.func dso_local @_Z11test_assumei +// CIR: cir.func {{.*}} @_Z11test_assumei // CIR: %[[#x:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s32i // CIR-NEXT: %[[#zero:]] = cir.const #cir.int<0> : !s32i // CIR-NEXT: %[[#cond:]] = cir.cmp(gt, %[[#x]], %[[#zero]]) : !s32i, !cir.bool @@ -24,7 +24,7 @@ int test_assume_attr(int x) { return x; } -// CIR: cir.func dso_local @_Z16test_assume_attri +// CIR: cir.func {{.*}} @_Z16test_assume_attri // CIR: %[[#x:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s32i // CIR-NEXT: %[[#zero:]] = cir.const #cir.int<0> : !s32i // CIR-NEXT: %[[#cond:]] = cir.cmp(gt, %[[#x]], %[[#zero]]) : !s32i, !cir.bool @@ -40,7 +40,7 @@ int test_assume_aligned(int *ptr) { return *aligned; } -// CIR: cir.func dso_local @_Z19test_assume_alignedPi +// CIR: cir.func {{.*}} @_Z19test_assume_alignedPi // CIR: %[[#ptr:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr // CIR-NEXT: %[[#aligned:]] = cir.assume.aligned %[[#ptr]] : !cir.ptr[alignment 8] // CIR-NEXT: cir.store{{.*}} %[[#aligned]], %[[#aligned_slot:]] : !cir.ptr, !cir.ptr> @@ -58,7 +58,7 @@ int test_assume_aligned_offset(int *ptr) { return *aligned; } -// CIR: cir.func dso_local @_Z26test_assume_aligned_offsetPi +// CIR: cir.func {{.*}} @_Z26test_assume_aligned_offsetPi // CIR: %[[#ptr:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr // CIR-NEXT: %[[#offset:]] = cir.const #cir.int<4> : !s32i // CIR-NEXT: %[[#offset2:]] = cir.cast integral %[[#offset]] : !s32i -> !u64i @@ -78,7 +78,7 @@ int test_separate_storage(int *p1, int *p2) { return *p1 + *p2; } -// CIR: cir.func dso_local @_Z21test_separate_storagePiS_ +// CIR: cir.func {{.*}} @_Z21test_separate_storagePiS_ // CIR: %[[#p1:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr // CIR-NEXT: %[[#p1_voidptr:]] = cir.cast bitcast %[[#p1]] : !cir.ptr -> !cir.ptr // CIR-NEXT: %[[#p2:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr diff --git a/clang/test/CIR/CodeGen/builtin-bcopy.cpp b/clang/test/CIR/CodeGen/builtin-bcopy.cpp index 5160a91ae659..0ac8d626c870 100644 --- a/clang/test/CIR/CodeGen/builtin-bcopy.cpp +++ b/clang/test/CIR/CodeGen/builtin-bcopy.cpp @@ -4,7 +4,7 @@ // RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s void foo(void) { - // CIR-LABEL: cir.func dso_local @_Z3foov() + // CIR-LABEL: cir.func {{.*}} @_Z3foov() // CIR: %[[V0:.*]] = cir.alloca !cir.array, !cir.ptr>, ["f4"] {alignment = 16 : i64} // CIR: %[[V1:.*]] = cir.alloca !cir.array, !cir.ptr>, ["f8"] {alignment = 16 : i64} // CIR: %[[V2:.*]] = cir.cast array_to_ptrdecay %[[V0]] : !cir.ptr> -> !cir.ptr @@ -32,7 +32,7 @@ void foo(void) { } void test_conditional_bcopy(void) { - // CIR-LABEL: cir.func dso_local @_Z22test_conditional_bcopyv() + // CIR-LABEL: cir.func {{.*}} @_Z22test_conditional_bcopyv() // CIR: cir.libc.memmove {{.*}} bytes from {{.*}} to {{.*}} : !cir.ptr, !u64i // CIR: cir.libc.memmove {{.*}} bytes from {{.*}} to {{.*}} : !cir.ptr, !u64i @@ -49,7 +49,7 @@ void test_conditional_bcopy(void) { } void another_conditional_bcopy(char *dst, char *src, int sz, int len) { - // CIR-LABEL: cir.func dso_local @_Z25another_conditional_bcopyPcS_ii + // CIR-LABEL: cir.func {{.*}} @_Z25another_conditional_bcopyPcS_ii // CIR: cir.libc.memmove {{.*}} bytes from {{.*}} to {{.*}} : !cir.ptr, !u64i // CIR: cir.libc.memmove {{.*}} bytes from {{.*}} to {{.*}} : !cir.ptr, !u64i diff --git a/clang/test/CIR/CodeGen/builtin-bit-cast.cpp b/clang/test/CIR/CodeGen/builtin-bit-cast.cpp index 1551e7e121e9..a1a3f85ffadd 100644 --- a/clang/test/CIR/CodeGen/builtin-bit-cast.cpp +++ b/clang/test/CIR/CodeGen/builtin-bit-cast.cpp @@ -7,7 +7,7 @@ float test_scalar(int &oper) { return __builtin_bit_cast(float, oper); } -// CIR-LABEL: cir.func dso_local @_Z11test_scalarRi +// CIR-LABEL: cir.func {{.*}} @_Z11test_scalarRi // CIR: %[[#SRC_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr // CIR-NEXT: %[[#DST_PTR:]] = cir.cast bitcast %[[#SRC_PTR]] : !cir.ptr -> !cir.ptr // CIR-NEXT: %{{.+}} = cir.load{{.*}} %[[#DST_PTR]] : !cir.ptr, !cir.float @@ -27,7 +27,7 @@ unsigned long test_aggregate_to_scalar(two_ints &ti) { return __builtin_bit_cast(unsigned long, ti); } -// CIR-LABEL: cir.func dso_local @_Z24test_aggregate_to_scalarR8two_ints +// CIR-LABEL: cir.func {{.*}} @_Z24test_aggregate_to_scalarR8two_ints // CIR: %[[#SRC_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr // CIR-NEXT: %[[#DST_PTR:]] = cir.cast bitcast %[[#SRC_PTR]] : !cir.ptr -> !cir.ptr // CIR-NEXT: %{{.+}} = cir.load{{.*}} %[[#DST_PTR]] : !cir.ptr, !u64i @@ -47,7 +47,7 @@ two_floats test_aggregate_record(two_ints& ti) { return __builtin_bit_cast(two_floats, ti); } -// CIR-LABEL: cir.func dso_local @_Z21test_aggregate_recordR8two_ints +// CIR-LABEL: cir.func {{.*}} @_Z21test_aggregate_recordR8two_ints // CIR: %[[#SRC_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr // CIR-NEXT: %[[#SRC_VOID_PTR:]] = cir.cast bitcast %[[#SRC_PTR]] : !cir.ptr -> !cir.ptr // CIR-NEXT: %[[#DST_VOID_PTR:]] = cir.cast bitcast %{{.+}} : !cir.ptr -> !cir.ptr @@ -66,7 +66,7 @@ two_floats test_aggregate_array(int (&ary)[2]) { return __builtin_bit_cast(two_floats, ary); } -// CIR-LABEL: cir.func dso_local @_Z20test_aggregate_arrayRA2_i +// CIR-LABEL: cir.func {{.*}} @_Z20test_aggregate_arrayRA2_i // CIR: %[[#SRC_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>>, !cir.ptr> // CIR-NEXT: %[[#SRC_VOID_PTR:]] = cir.cast bitcast %[[#SRC_PTR]] : !cir.ptr> -> !cir.ptr // CIR-NEXT: %[[#DST_VOID_PTR:]] = cir.cast bitcast %{{.+}} : !cir.ptr -> !cir.ptr @@ -85,7 +85,7 @@ two_ints test_scalar_to_aggregate(unsigned long ul) { return __builtin_bit_cast(two_ints, ul); } -// CIR-LABEL: cir.func dso_local @_Z24test_scalar_to_aggregatem +// CIR-LABEL: cir.func {{.*}} @_Z24test_scalar_to_aggregatem // CIR: %[[#SRC_VOID_PTR:]] = cir.cast bitcast %{{.+}} : !cir.ptr -> !cir.ptr // CIR-NEXT: %[[#DST_VOID_PTR:]] = cir.cast bitcast %{{.+}} : !cir.ptr -> !cir.ptr // CIR-NEXT: %[[#SIZE:]] = cir.const #cir.int<8> : !u64i @@ -102,7 +102,7 @@ unsigned long test_array(int (&ary)[2]) { return __builtin_bit_cast(unsigned long, ary); } -// CIR-LABEL: cir.func dso_local @_Z10test_arrayRA2_i +// CIR-LABEL: cir.func {{.*}} @_Z10test_arrayRA2_i // CIR: %[[#SRC_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>>, !cir.ptr> // CIR-NEXT: %[[#DST_PTR:]] = cir.cast bitcast %[[#SRC_PTR]] : !cir.ptr> -> !cir.ptr // CIR-NEXT: %{{.+}} = cir.load{{.*}} %[[#DST_PTR]] : !cir.ptr, !u64i @@ -117,7 +117,7 @@ two_ints test_rvalue_aggregate() { return __builtin_bit_cast(two_ints, 42ul); } -// CIR-LABEL: cir.func dso_local @_Z21test_rvalue_aggregatev() +// CIR-LABEL: cir.func {{.*}} @_Z21test_rvalue_aggregatev() // CIR: cir.scope { // CIR-NEXT: %[[#TMP_SLOT:]] = cir.alloca !u64i, !cir.ptr // CIR-NEXT: %[[#A:]] = cir.const #cir.int<42> : !u64i diff --git a/clang/test/CIR/CodeGen/builtin-constant-evaluated.cpp b/clang/test/CIR/CodeGen/builtin-constant-evaluated.cpp index 9d4d97994d67..3c00a93c4b3c 100644 --- a/clang/test/CIR/CodeGen/builtin-constant-evaluated.cpp +++ b/clang/test/CIR/CodeGen/builtin-constant-evaluated.cpp @@ -3,7 +3,7 @@ auto func() -> int { return __builtin_strcmp("", ""); - // CIR: cir.func dso_local @_Z4funcv() + // CIR: cir.func {{.*}} @_Z4funcv() // CIR-NEXT: %[[RET_VAL:.*]] = cir.alloca !s32i, !cir.ptr, ["__retval"] {alignment = 4 : i64} // CIR-NEXT: %[[VAL:.*]] = cir.const #cir.int<0> : !s32i // CIR-NEXT: cir.store %[[VAL]], %[[RET_VAL]] : !s32i, !cir.ptr @@ -14,7 +14,7 @@ auto func() -> int { auto func2() -> int { return __builtin_choose_expr(true, 1, 2); - // CIR: cir.func dso_local @_Z5func2v() + // CIR: cir.func {{.*}} @_Z5func2v() // CIR-NEXT: %[[RET_VAL:.*]] = cir.alloca !s32i, !cir.ptr, ["__retval"] // CIR-NEXT: %[[VAL:.*]] = cir.const #cir.int<1> : !s32i // CIR-NEXT: cir.store %[[VAL]], %[[RET_VAL]] : !s32i, !cir.ptr @@ -25,7 +25,7 @@ auto func2() -> int { auto func3() -> int { return __builtin_choose_expr(false, 1, 2); - // CIR: cir.func dso_local @_Z5func3v() + // CIR: cir.func {{.*}} @_Z5func3v() // CIR-NEXT: %[[RET_VAL:.*]] = cir.alloca !s32i, !cir.ptr, ["__retval"] // CIR-NEXT: %[[VAL:.*]] = cir.const #cir.int<2> : !s32i // CIR-NEXT: cir.store %[[VAL]], %[[RET_VAL]] : !s32i, !cir.ptr diff --git a/clang/test/CIR/CodeGen/builtin-constant-p.c b/clang/test/CIR/CodeGen/builtin-constant-p.c index 6abcbeea505e..b18f9cb1cc83 100644 --- a/clang/test/CIR/CodeGen/builtin-constant-p.c +++ b/clang/test/CIR/CodeGen/builtin-constant-p.c @@ -6,7 +6,7 @@ int foo() { return __builtin_constant_p(a); } -// CIR: cir.func no_proto dso_local @foo() -> !s32i extra(#fn_attr) +// CIR: cir.func {{.*}} @foo() -> !s32i extra(#fn_attr) // CIR: [[TMP0:%.*]] = cir.alloca !s32i, !cir.ptr, ["__retval"] {alignment = 4 : i64} // CIR: [[TMP1:%.*]] = cir.get_global @a : !cir.ptr // CIR: [[TMP2:%.*]] = cir.load{{.*}} [[TMP1]] : !cir.ptr, !s32i diff --git a/clang/test/CIR/CodeGen/builtin-floating-point.c b/clang/test/CIR/CodeGen/builtin-floating-point.c index e2c7fddde940..fc02c6611e1e 100644 --- a/clang/test/CIR/CodeGen/builtin-floating-point.c +++ b/clang/test/CIR/CodeGen/builtin-floating-point.c @@ -7,7 +7,7 @@ long my_lroundf(float f) { return __builtin_lroundf(f); - // CHECK: cir.func dso_local @my_lroundf + // CHECK: cir.func {{.*}} @my_lroundf // CHECK: %{{.+}} = cir.lround %{{.+}} : !cir.float -> !s64i // LLVM: define dso_local i64 @my_lroundf @@ -17,7 +17,7 @@ long my_lroundf(float f) { long my_lround(double f) { return __builtin_lround(f); - // CHECK: cir.func dso_local @my_lround + // CHECK: cir.func {{.*}} @my_lround // CHECK: %{{.+}} = cir.lround %{{.+}} : !cir.double -> !s64i // LLVM: define dso_local i64 @my_lround @@ -27,7 +27,7 @@ long my_lround(double f) { long my_lroundl(long double f) { return __builtin_lroundl(f); - // CHECK: cir.func dso_local @my_lroundl + // CHECK: cir.func {{.*}} @my_lroundl // CHECK: %{{.+}} = cir.lround %{{.+}} : !cir.long_double -> !s64i // AARCH64: %{{.+}} = cir.lround %{{.+}} : !cir.long_double -> !s64i @@ -42,7 +42,7 @@ long lroundl(long double); long call_lroundf(float f) { return lroundf(f); - // CHECK: cir.func dso_local @call_lroundf + // CHECK: cir.func {{.*}} @call_lroundf // CHECK: %{{.+}} = cir.lround %{{.+}} : !cir.float -> !s64i // LLVM: define dso_local i64 @call_lroundf @@ -52,7 +52,7 @@ long call_lroundf(float f) { long call_lround(double f) { return lround(f); - // CHECK: cir.func dso_local @call_lround + // CHECK: cir.func {{.*}} @call_lround // CHECK: %{{.+}} = cir.lround %{{.+}} : !cir.double -> !s64i // LLVM: define dso_local i64 @call_lround @@ -62,7 +62,7 @@ long call_lround(double f) { long call_lroundl(long double f) { return lroundl(f); - // CHECK: cir.func dso_local @call_lroundl + // CHECK: cir.func {{.*}} @call_lroundl // CHECK: %{{.+}} = cir.lround %{{.+}} : !cir.long_double -> !s64i // AARCH64: %{{.+}} = cir.lround %{{.+}} : !cir.long_double -> !s64i @@ -75,7 +75,7 @@ long call_lroundl(long double f) { long long my_llroundf(float f) { return __builtin_llroundf(f); - // CHECK: cir.func dso_local @my_llroundf + // CHECK: cir.func {{.*}} @my_llroundf // CHECK: %{{.+}} = cir.llround %{{.+}} : !cir.float -> !s64i // LLVM: define dso_local i64 @my_llroundf @@ -85,7 +85,7 @@ long long my_llroundf(float f) { long long my_llround(double f) { return __builtin_llround(f); - // CHECK: cir.func dso_local @my_llround + // CHECK: cir.func {{.*}} @my_llround // CHECK: %{{.+}} = cir.llround %{{.+}} : !cir.double -> !s64i // LLVM: define dso_local i64 @my_llround @@ -95,7 +95,7 @@ long long my_llround(double f) { long long my_llroundl(long double f) { return __builtin_llroundl(f); - // CHECK: cir.func dso_local @my_llroundl + // CHECK: cir.func {{.*}} @my_llroundl // CHECK: %{{.+}} = cir.llround %{{.+}} : !cir.long_double -> !s64i // AARCH64: %{{.+}} = cir.llround %{{.+}} : !cir.long_double -> !s64i @@ -110,7 +110,7 @@ long long llroundl(long double); long long call_llroundf(float f) { return llroundf(f); - // CHECK: cir.func dso_local @call_llroundf + // CHECK: cir.func {{.*}} @call_llroundf // CHECK: %{{.+}} = cir.llround %{{.+}} : !cir.float -> !s64i // LLVM: define dso_local i64 @call_llroundf @@ -120,7 +120,7 @@ long long call_llroundf(float f) { long long call_llround(double f) { return llround(f); - // CHECK: cir.func dso_local @call_llround + // CHECK: cir.func {{.*}} @call_llround // CHECK: %{{.+}} = cir.llround %{{.+}} : !cir.double -> !s64i // LLVM: define dso_local i64 @call_llround @@ -130,7 +130,7 @@ long long call_llround(double f) { long long call_llroundl(long double f) { return llroundl(f); - // CHECK: cir.func dso_local @call_llroundl + // CHECK: cir.func {{.*}} @call_llroundl // CHECK: %{{.+}} = cir.llround %{{.+}} : !cir.long_double -> !s64i // AARCH64: %{{.+}} = cir.llround %{{.+}} : !cir.long_double -> !s64i @@ -143,7 +143,7 @@ long long call_llroundl(long double f) { long my_lrintf(float f) { return __builtin_lrintf(f); - // CHECK: cir.func dso_local @my_lrintf + // CHECK: cir.func {{.*}} @my_lrintf // CHECK: %{{.+}} = cir.lrint %{{.+}} : !cir.float -> !s64i // LLVM: define dso_local i64 @my_lrintf @@ -153,7 +153,7 @@ long my_lrintf(float f) { long my_lrint(double f) { return __builtin_lrint(f); - // CHECK: cir.func dso_local @my_lrint + // CHECK: cir.func {{.*}} @my_lrint // CHECK: %{{.+}} = cir.lrint %{{.+}} : !cir.double -> !s64i // LLVM: define dso_local i64 @my_lrint @@ -163,7 +163,7 @@ long my_lrint(double f) { long my_lrintl(long double f) { return __builtin_lrintl(f); - // CHECK: cir.func dso_local @my_lrintl + // CHECK: cir.func {{.*}} @my_lrintl // CHECK: %{{.+}} = cir.lrint %{{.+}} : !cir.long_double -> !s64i // AARCH64: %{{.+}} = cir.lrint %{{.+}} : !cir.long_double -> !s64i @@ -178,7 +178,7 @@ long lrintl(long double); long call_lrintf(float f) { return lrintf(f); - // CHECK: cir.func dso_local @call_lrintf + // CHECK: cir.func {{.*}} @call_lrintf // CHECK: %{{.+}} = cir.lrint %{{.+}} : !cir.float -> !s64i // LLVM: define dso_local i64 @call_lrintf @@ -188,7 +188,7 @@ long call_lrintf(float f) { long call_lrint(double f) { return lrint(f); - // CHECK: cir.func dso_local @call_lrint + // CHECK: cir.func {{.*}} @call_lrint // CHECK: %{{.+}} = cir.lrint %{{.+}} : !cir.double -> !s64i // LLVM: define dso_local i64 @call_lrint @@ -198,7 +198,7 @@ long call_lrint(double f) { long call_lrintl(long double f) { return lrintl(f); - // CHECK: cir.func dso_local @call_lrintl + // CHECK: cir.func {{.*}} @call_lrintl // CHECK: %{{.+}} = cir.lrint %{{.+}} : !cir.long_double -> !s64i // AARCH64: %{{.+}} = cir.lrint %{{.+}} : !cir.long_double -> !s64i @@ -211,7 +211,7 @@ long call_lrintl(long double f) { long long my_llrintf(float f) { return __builtin_llrintf(f); - // CHECK: cir.func dso_local @my_llrintf + // CHECK: cir.func {{.*}} @my_llrintf // CHECK: %{{.+}} = cir.llrint %{{.+}} : !cir.float -> !s64i // LLVM: define dso_local i64 @my_llrintf @@ -221,7 +221,7 @@ long long my_llrintf(float f) { long long my_llrint(double f) { return __builtin_llrint(f); - // CHECK: cir.func dso_local @my_llrint + // CHECK: cir.func {{.*}} @my_llrint // CHECK: %{{.+}} = cir.llrint %{{.+}} : !cir.double -> !s64i // LLVM: define dso_local i64 @my_llrint @@ -231,7 +231,7 @@ long long my_llrint(double f) { long long my_llrintl(long double f) { return __builtin_llrintl(f); - // CHECK: cir.func dso_local @my_llrintl + // CHECK: cir.func {{.*}} @my_llrintl // CHECK: %{{.+}} = cir.llrint %{{.+}} : !cir.long_double -> !s64i // AARCH64: %{{.+}} = cir.llrint %{{.+}} : !cir.long_double -> !s64i @@ -246,7 +246,7 @@ long long llrintl(long double); long long call_llrintf(float f) { return llrintf(f); - // CHECK: cir.func dso_local @call_llrintf + // CHECK: cir.func {{.*}} @call_llrintf // CHECK: %{{.+}} = cir.llrint %{{.+}} : !cir.float -> !s64i // LLVM: define dso_local i64 @call_llrintf @@ -256,7 +256,7 @@ long long call_llrintf(float f) { long long call_llrint(double f) { return llrint(f); - // CHECK: cir.func dso_local @call_llrint + // CHECK: cir.func {{.*}} @call_llrint // CHECK: %{{.+}} = cir.llrint %{{.+}} : !cir.double -> !s64i // LLVM: define dso_local i64 @call_llrint @@ -266,7 +266,7 @@ long long call_llrint(double f) { long long call_llrintl(long double f) { return llrintl(f); - // CHECK: cir.func dso_local @call_llrintl + // CHECK: cir.func {{.*}} @call_llrintl // CHECK: %{{.+}} = cir.llrint %{{.+}} : !cir.long_double -> !s64i // AARCH64: %{{.+}} = cir.llrint %{{.+}} : !cir.long_double -> !s64i @@ -279,7 +279,7 @@ long long call_llrintl(long double f) { float my_ceilf(float f) { return __builtin_ceilf(f); - // CHECK: cir.func dso_local @my_ceilf + // CHECK: cir.func {{.*}} @my_ceilf // CHECK: {{.+}} = cir.ceil {{.+}} : !cir.float // LLVM: define dso_local float @my_ceilf(float %0) @@ -289,7 +289,7 @@ float my_ceilf(float f) { double my_ceil(double f) { return __builtin_ceil(f); - // CHECK: cir.func dso_local @my_ceil + // CHECK: cir.func {{.*}} @my_ceil // CHECK: {{.+}} = cir.ceil {{.+}} : !cir.double // LLVM: define dso_local double @my_ceil(double %0) @@ -299,7 +299,7 @@ double my_ceil(double f) { long double my_ceill(long double f) { return __builtin_ceill(f); - // CHECK: cir.func dso_local @my_ceill + // CHECK: cir.func {{.*}} @my_ceill // CHECK: {{.+}} = cir.ceil {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.ceil {{.+}} : !cir.long_double @@ -314,7 +314,7 @@ long double ceill(long double); float call_ceilf(float f) { return ceilf(f); - // CHECK: cir.func dso_local @call_ceilf + // CHECK: cir.func {{.*}} @call_ceilf // CHECK: {{.+}} = cir.ceil {{.+}} : !cir.float // LLVM: define dso_local float @call_ceilf(float %0) @@ -324,7 +324,7 @@ float call_ceilf(float f) { double call_ceil(double f) { return ceil(f); - // CHECK: cir.func dso_local @call_ceil + // CHECK: cir.func {{.*}} @call_ceil // CHECK: {{.+}} = cir.ceil {{.+}} : !cir.double // LLVM: define dso_local double @call_ceil(double %0) @@ -334,7 +334,7 @@ double call_ceil(double f) { long double call_ceill(long double f) { return ceill(f); - // CHECK: cir.func dso_local @call_ceill + // CHECK: cir.func {{.*}} @call_ceill // CHECK: {{.+}} = cir.ceil {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.ceil {{.+}} : !cir.long_double @@ -347,7 +347,7 @@ long double call_ceill(long double f) { float my_cosf(float f) { return __builtin_cosf(f); - // CHECK: cir.func dso_local @my_cosf + // CHECK: cir.func {{.*}} @my_cosf // CHECK: {{.+}} = cir.cos {{.+}} : !cir.float // LLVM: define dso_local float @my_cosf(float %0) @@ -357,7 +357,7 @@ float my_cosf(float f) { double my_cos(double f) { return __builtin_cos(f); - // CHECK: cir.func dso_local @my_cos + // CHECK: cir.func {{.*}} @my_cos // CHECK: {{.+}} = cir.cos {{.+}} : !cir.double // LLVM: define dso_local double @my_cos(double %0) @@ -367,7 +367,7 @@ double my_cos(double f) { long double my_cosl(long double f) { return __builtin_cosl(f); - // CHECK: cir.func dso_local @my_cosl + // CHECK: cir.func {{.*}} @my_cosl // CHECK: {{.+}} = cir.cos {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.cos {{.+}} : !cir.long_double @@ -382,7 +382,7 @@ long double cosl(long double); float call_cosf(float f) { return cosf(f); - // CHECK: cir.func dso_local @call_cosf + // CHECK: cir.func {{.*}} @call_cosf // CHECK: {{.+}} = cir.cos {{.+}} : !cir.float // LLVM: define dso_local float @call_cosf(float %0) @@ -392,7 +392,7 @@ float call_cosf(float f) { double call_cos(double f) { return cos(f); - // CHECK: cir.func dso_local @call_cos + // CHECK: cir.func {{.*}} @call_cos // CHECK: {{.+}} = cir.cos {{.+}} : !cir.double // LLVM: define dso_local double @call_cos(double %0) @@ -402,7 +402,7 @@ double call_cos(double f) { long double call_cosl(long double f) { return cosl(f); - // CHECK: cir.func dso_local @call_cosl + // CHECK: cir.func {{.*}} @call_cosl // CHECK: {{.+}} = cir.cos {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.cos {{.+}} : !cir.long_double @@ -415,7 +415,7 @@ long double call_cosl(long double f) { float my_expf(float f) { return __builtin_expf(f); - // CHECK: cir.func dso_local @my_expf + // CHECK: cir.func {{.*}} @my_expf // CHECK: {{.+}} = cir.exp {{.+}} : !cir.float // LLVM: define dso_local float @my_expf(float %0) @@ -425,7 +425,7 @@ float my_expf(float f) { double my_exp(double f) { return __builtin_exp(f); - // CHECK: cir.func dso_local @my_exp + // CHECK: cir.func {{.*}} @my_exp // CHECK: {{.+}} = cir.exp {{.+}} : !cir.double // LLVM: define dso_local double @my_exp(double %0) @@ -435,7 +435,7 @@ double my_exp(double f) { long double my_expl(long double f) { return __builtin_expl(f); - // CHECK: cir.func dso_local @my_expl + // CHECK: cir.func {{.*}} @my_expl // CHECK: {{.+}} = cir.exp {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.exp {{.+}} : !cir.long_double @@ -450,7 +450,7 @@ long double expl(long double); float call_expf(float f) { return expf(f); - // CHECK: cir.func dso_local @call_expf + // CHECK: cir.func {{.*}} @call_expf // CHECK: {{.+}} = cir.exp {{.+}} : !cir.float // LLVM: define dso_local float @call_expf(float %0) @@ -460,7 +460,7 @@ float call_expf(float f) { double call_exp(double f) { return exp(f); - // CHECK: cir.func dso_local @call_exp + // CHECK: cir.func {{.*}} @call_exp // CHECK: {{.+}} = cir.exp {{.+}} : !cir.double // LLVM: define dso_local double @call_exp(double %0) @@ -470,7 +470,7 @@ double call_exp(double f) { long double call_expl(long double f) { return expl(f); - // CHECK: cir.func dso_local @call_expl + // CHECK: cir.func {{.*}} @call_expl // CHECK: {{.+}} = cir.exp {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.exp {{.+}} : !cir.long_double @@ -483,7 +483,7 @@ long double call_expl(long double f) { float my_exp2f(float f) { return __builtin_exp2f(f); - // CHECK: cir.func dso_local @my_exp2f + // CHECK: cir.func {{.*}} @my_exp2f // CHECK: {{.+}} = cir.exp2 {{.+}} : !cir.float // LLVM: define dso_local float @my_exp2f(float %0) @@ -493,7 +493,7 @@ float my_exp2f(float f) { double my_exp2(double f) { return __builtin_exp2(f); - // CHECK: cir.func dso_local @my_exp2 + // CHECK: cir.func {{.*}} @my_exp2 // CHECK: {{.+}} = cir.exp2 {{.+}} : !cir.double // LLVM: define dso_local double @my_exp2(double %0) @@ -503,7 +503,7 @@ double my_exp2(double f) { long double my_exp2l(long double f) { return __builtin_exp2l(f); - // CHECK: cir.func dso_local @my_exp2l + // CHECK: cir.func {{.*}} @my_exp2l // CHECK: {{.+}} = cir.exp2 {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.exp2 {{.+}} : !cir.long_double @@ -518,7 +518,7 @@ long double exp2l(long double); float call_exp2f(float f) { return exp2f(f); - // CHECK: cir.func dso_local @call_exp2f + // CHECK: cir.func {{.*}} @call_exp2f // CHECK: {{.+}} = cir.exp2 {{.+}} : !cir.float // LLVM: define dso_local float @call_exp2f(float %0) @@ -528,7 +528,7 @@ float call_exp2f(float f) { double call_exp2(double f) { return exp2(f); - // CHECK: cir.func dso_local @call_exp2 + // CHECK: cir.func {{.*}} @call_exp2 // CHECK: {{.+}} = cir.exp2 {{.+}} : !cir.double // LLVM: define dso_local double @call_exp2(double %0) @@ -538,7 +538,7 @@ double call_exp2(double f) { long double call_exp2l(long double f) { return exp2l(f); - // CHECK: cir.func dso_local @call_exp2l + // CHECK: cir.func {{.*}} @call_exp2l // CHECK: {{.+}} = cir.exp2 {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.exp2 {{.+}} : !cir.long_double @@ -551,7 +551,7 @@ long double call_exp2l(long double f) { float my_floorf(float f) { return __builtin_floorf(f); - // CHECK: cir.func dso_local @my_floorf + // CHECK: cir.func {{.*}} @my_floorf // CHECK: {{.+}} = cir.floor {{.+}} : !cir.float // LLVM: define dso_local float @my_floorf(float %0) @@ -561,7 +561,7 @@ float my_floorf(float f) { double my_floor(double f) { return __builtin_floor(f); - // CHECK: cir.func dso_local @my_floor + // CHECK: cir.func {{.*}} @my_floor // CHECK: {{.+}} = cir.floor {{.+}} : !cir.double // LLVM: define dso_local double @my_floor(double %0) @@ -571,7 +571,7 @@ double my_floor(double f) { long double my_floorl(long double f) { return __builtin_floorl(f); - // CHECK: cir.func dso_local @my_floorl + // CHECK: cir.func {{.*}} @my_floorl // CHECK: {{.+}} = cir.floor {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.floor {{.+}} : !cir.long_double @@ -586,7 +586,7 @@ long double floorl(long double); float call_floorf(float f) { return floorf(f); - // CHECK: cir.func dso_local @call_floorf + // CHECK: cir.func {{.*}} @call_floorf // CHECK: {{.+}} = cir.floor {{.+}} : !cir.float // LLVM: define dso_local float @call_floorf(float %0) @@ -596,7 +596,7 @@ float call_floorf(float f) { double call_floor(double f) { return floor(f); - // CHECK: cir.func dso_local @call_floor + // CHECK: cir.func {{.*}} @call_floor // CHECK: {{.+}} = cir.floor {{.+}} : !cir.double // LLVM: define dso_local double @call_floor(double %0) @@ -606,7 +606,7 @@ double call_floor(double f) { long double call_floorl(long double f) { return floorl(f); - // CHECK: cir.func dso_local @call_floorl + // CHECK: cir.func {{.*}} @call_floorl // CHECK: {{.+}} = cir.floor {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.floor {{.+}} : !cir.long_double @@ -619,7 +619,7 @@ long double call_floorl(long double f) { float my_logf(float f) { return __builtin_logf(f); - // CHECK: cir.func dso_local @my_logf + // CHECK: cir.func {{.*}} @my_logf // CHECK: {{.+}} = cir.log {{.+}} : !cir.float // LLVM: define dso_local float @my_logf(float %0) @@ -629,7 +629,7 @@ float my_logf(float f) { double my_log(double f) { return __builtin_log(f); - // CHECK: cir.func dso_local @my_log + // CHECK: cir.func {{.*}} @my_log // CHECK: {{.+}} = cir.log {{.+}} : !cir.double // LLVM: define dso_local double @my_log(double %0) @@ -639,7 +639,7 @@ double my_log(double f) { long double my_logl(long double f) { return __builtin_logl(f); - // CHECK: cir.func dso_local @my_logl + // CHECK: cir.func {{.*}} @my_logl // CHECK: {{.+}} = cir.log {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.log {{.+}} : !cir.long_double @@ -654,7 +654,7 @@ long double logl(long double); float call_logf(float f) { return logf(f); - // CHECK: cir.func dso_local @call_logf + // CHECK: cir.func {{.*}} @call_logf // CHECK: {{.+}} = cir.log {{.+}} : !cir.float // LLVM: define dso_local float @call_logf(float %0) @@ -664,7 +664,7 @@ float call_logf(float f) { double call_log(double f) { return log(f); - // CHECK: cir.func dso_local @call_log + // CHECK: cir.func {{.*}} @call_log // CHECK: {{.+}} = cir.log {{.+}} : !cir.double // LLVM: define dso_local double @call_log(double %0) @@ -674,7 +674,7 @@ double call_log(double f) { long double call_logl(long double f) { return logl(f); - // CHECK: cir.func dso_local @call_logl + // CHECK: cir.func {{.*}} @call_logl // CHECK: {{.+}} = cir.log {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.log {{.+}} : !cir.long_double @@ -687,7 +687,7 @@ long double call_logl(long double f) { float my_log10f(float f) { return __builtin_log10f(f); - // CHECK: cir.func dso_local @my_log10f + // CHECK: cir.func {{.*}} @my_log10f // CHECK: {{.+}} = cir.log10 {{.+}} : !cir.float // LLVM: define dso_local float @my_log10f(float %0) @@ -697,7 +697,7 @@ float my_log10f(float f) { double my_log10(double f) { return __builtin_log10(f); - // CHECK: cir.func dso_local @my_log10 + // CHECK: cir.func {{.*}} @my_log10 // CHECK: {{.+}} = cir.log10 {{.+}} : !cir.double // LLVM: define dso_local double @my_log10(double %0) @@ -707,7 +707,7 @@ double my_log10(double f) { long double my_log10l(long double f) { return __builtin_log10l(f); - // CHECK: cir.func dso_local @my_log10l + // CHECK: cir.func {{.*}} @my_log10l // CHECK: {{.+}} = cir.log10 {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.log10 {{.+}} : !cir.long_double @@ -722,7 +722,7 @@ long double log10l(long double); float call_log10f(float f) { return log10f(f); - // CHECK: cir.func dso_local @call_log10f + // CHECK: cir.func {{.*}} @call_log10f // CHECK: {{.+}} = cir.log10 {{.+}} : !cir.float // LLVM: define dso_local float @call_log10f(float %0) @@ -732,7 +732,7 @@ float call_log10f(float f) { double call_log10(double f) { return log10(f); - // CHECK: cir.func dso_local @call_log10 + // CHECK: cir.func {{.*}} @call_log10 // CHECK: {{.+}} = cir.log10 {{.+}} : !cir.double // LLVM: define dso_local double @call_log10(double %0) @@ -742,7 +742,7 @@ double call_log10(double f) { long double call_log10l(long double f) { return log10l(f); - // CHECK: cir.func dso_local @call_log10l + // CHECK: cir.func {{.*}} @call_log10l // CHECK: {{.+}} = cir.log10 {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.log10 {{.+}} : !cir.long_double @@ -755,7 +755,7 @@ long double call_log10l(long double f) { float my_log2f(float f) { return __builtin_log2f(f); - // CHECK: cir.func dso_local @my_log2f + // CHECK: cir.func {{.*}} @my_log2f // CHECK: {{.+}} = cir.log2 {{.+}} : !cir.float // LLVM: define dso_local float @my_log2f(float %0) @@ -765,7 +765,7 @@ float my_log2f(float f) { double my_log2(double f) { return __builtin_log2(f); - // CHECK: cir.func dso_local @my_log2 + // CHECK: cir.func {{.*}} @my_log2 // CHECK: {{.+}} = cir.log2 {{.+}} : !cir.double // LLVM: define dso_local double @my_log2(double %0) @@ -775,7 +775,7 @@ double my_log2(double f) { long double my_log2l(long double f) { return __builtin_log2l(f); - // CHECK: cir.func dso_local @my_log2l + // CHECK: cir.func {{.*}} @my_log2l // CHECK: {{.+}} = cir.log2 {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.log2 {{.+}} : !cir.long_double @@ -790,7 +790,7 @@ long double log2l(long double); float call_log2f(float f) { return log2f(f); - // CHECK: cir.func dso_local @call_log2f + // CHECK: cir.func {{.*}} @call_log2f // CHECK: {{.+}} = cir.log2 {{.+}} : !cir.float // LLVM: define dso_local float @call_log2f(float %0) @@ -800,7 +800,7 @@ float call_log2f(float f) { double call_log2(double f) { return log2(f); - // CHECK: cir.func dso_local @call_log2 + // CHECK: cir.func {{.*}} @call_log2 // CHECK: {{.+}} = cir.log2 {{.+}} : !cir.double // LLVM: define dso_local double @call_log2(double %0) @@ -810,7 +810,7 @@ double call_log2(double f) { long double call_log2l(long double f) { return log2l(f); - // CHECK: cir.func dso_local @call_log2l + // CHECK: cir.func {{.*}} @call_log2l // CHECK: {{.+}} = cir.log2 {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.log2 {{.+}} : !cir.long_double @@ -823,7 +823,7 @@ long double call_log2l(long double f) { float my_nearbyintf(float f) { return __builtin_nearbyintf(f); - // CHECK: cir.func dso_local @my_nearbyintf + // CHECK: cir.func {{.*}} @my_nearbyintf // CHECK: {{.+}} = cir.nearbyint {{.+}} : !cir.float // LLVM: define dso_local float @my_nearbyintf(float %0) @@ -833,7 +833,7 @@ float my_nearbyintf(float f) { double my_nearbyint(double f) { return __builtin_nearbyint(f); - // CHECK: cir.func dso_local @my_nearbyint + // CHECK: cir.func {{.*}} @my_nearbyint // CHECK: {{.+}} = cir.nearbyint {{.+}} : !cir.double // LLVM: define dso_local double @my_nearbyint(double %0) @@ -843,7 +843,7 @@ double my_nearbyint(double f) { long double my_nearbyintl(long double f) { return __builtin_nearbyintl(f); - // CHECK: cir.func dso_local @my_nearbyintl + // CHECK: cir.func {{.*}} @my_nearbyintl // CHECK: {{.+}} = cir.nearbyint {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.nearbyint {{.+}} : !cir.long_double @@ -858,7 +858,7 @@ long double nearbyintl(long double); float call_nearbyintf(float f) { return nearbyintf(f); - // CHECK: cir.func dso_local @call_nearbyintf + // CHECK: cir.func {{.*}} @call_nearbyintf // CHECK: {{.+}} = cir.nearbyint {{.+}} : !cir.float // LLVM: define dso_local float @call_nearbyintf(float %0) @@ -868,7 +868,7 @@ float call_nearbyintf(float f) { double call_nearbyint(double f) { return nearbyint(f); - // CHECK: cir.func dso_local @call_nearbyint + // CHECK: cir.func {{.*}} @call_nearbyint // CHECK: {{.+}} = cir.nearbyint {{.+}} : !cir.double // LLVM: define dso_local double @call_nearbyint(double %0) @@ -878,7 +878,7 @@ double call_nearbyint(double f) { long double call_nearbyintl(long double f) { return nearbyintl(f); - // CHECK: cir.func dso_local @call_nearbyintl + // CHECK: cir.func {{.*}} @call_nearbyintl // CHECK: {{.+}} = cir.nearbyint {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.nearbyint {{.+}} : !cir.long_double @@ -891,7 +891,7 @@ long double call_nearbyintl(long double f) { float my_rintf(float f) { return __builtin_rintf(f); - // CHECK: cir.func dso_local @my_rintf + // CHECK: cir.func {{.*}} @my_rintf // CHECK: {{.+}} = cir.rint {{.+}} : !cir.float // LLVM: define dso_local float @my_rintf(float %0) @@ -901,7 +901,7 @@ float my_rintf(float f) { double my_rint(double f) { return __builtin_rint(f); - // CHECK: cir.func dso_local @my_rint + // CHECK: cir.func {{.*}} @my_rint // CHECK: {{.+}} = cir.rint {{.+}} : !cir.double // LLVM: define dso_local double @my_rint(double %0) @@ -911,7 +911,7 @@ double my_rint(double f) { long double my_rintl(long double f) { return __builtin_rintl(f); - // CHECK: cir.func dso_local @my_rintl + // CHECK: cir.func {{.*}} @my_rintl // CHECK: {{.+}} = cir.rint {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.rint {{.+}} : !cir.long_double @@ -926,7 +926,7 @@ long double rintl(long double); float call_rintf(float f) { return rintf(f); - // CHECK: cir.func dso_local @call_rintf + // CHECK: cir.func {{.*}} @call_rintf // CHECK: {{.+}} = cir.rint {{.+}} : !cir.float // LLVM: define dso_local float @call_rintf(float %0) @@ -936,7 +936,7 @@ float call_rintf(float f) { double call_rint(double f) { return rint(f); - // CHECK: cir.func dso_local @call_rint + // CHECK: cir.func {{.*}} @call_rint // CHECK: {{.+}} = cir.rint {{.+}} : !cir.double // LLVM: define dso_local double @call_rint(double %0) @@ -946,7 +946,7 @@ double call_rint(double f) { long double call_rintl(long double f) { return rintl(f); - // CHECK: cir.func dso_local @call_rintl + // CHECK: cir.func {{.*}} @call_rintl // CHECK: {{.+}} = cir.rint {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.rint {{.+}} : !cir.long_double @@ -959,7 +959,7 @@ long double call_rintl(long double f) { float my_roundf(float f) { return __builtin_roundf(f); - // CHECK: cir.func dso_local @my_roundf + // CHECK: cir.func {{.*}} @my_roundf // CHECK: {{.+}} = cir.round {{.+}} : !cir.float // LLVM: define dso_local float @my_roundf(float %0) @@ -969,7 +969,7 @@ float my_roundf(float f) { double my_round(double f) { return __builtin_round(f); - // CHECK: cir.func dso_local @my_round + // CHECK: cir.func {{.*}} @my_round // CHECK: {{.+}} = cir.round {{.+}} : !cir.double // LLVM: define dso_local double @my_round(double %0) @@ -979,7 +979,7 @@ double my_round(double f) { long double my_roundl(long double f) { return __builtin_roundl(f); - // CHECK: cir.func dso_local @my_roundl + // CHECK: cir.func {{.*}} @my_roundl // CHECK: {{.+}} = cir.round {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.round {{.+}} : !cir.long_double @@ -994,7 +994,7 @@ long double roundl(long double); float call_roundf(float f) { return roundf(f); - // CHECK: cir.func dso_local @call_roundf + // CHECK: cir.func {{.*}} @call_roundf // CHECK: {{.+}} = cir.round {{.+}} : !cir.float // LLVM: define dso_local float @call_roundf(float %0) @@ -1004,7 +1004,7 @@ float call_roundf(float f) { double call_round(double f) { return round(f); - // CHECK: cir.func dso_local @call_round + // CHECK: cir.func {{.*}} @call_round // CHECK: {{.+}} = cir.round {{.+}} : !cir.double // LLVM: define dso_local double @call_round(double %0) @@ -1014,7 +1014,7 @@ double call_round(double f) { long double call_roundl(long double f) { return roundl(f); - // CHECK: cir.func dso_local @call_roundl + // CHECK: cir.func {{.*}} @call_roundl // CHECK: {{.+}} = cir.round {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.round {{.+}} : !cir.long_double @@ -1027,7 +1027,7 @@ long double call_roundl(long double f) { float my_sinf(float f) { return __builtin_sinf(f); - // CHECK: cir.func dso_local @my_sinf + // CHECK: cir.func {{.*}} @my_sinf // CHECK: {{.+}} = cir.sin {{.+}} : !cir.float // LLVM: define dso_local float @my_sinf(float %0) @@ -1037,7 +1037,7 @@ float my_sinf(float f) { double my_sin(double f) { return __builtin_sin(f); - // CHECK: cir.func dso_local @my_sin + // CHECK: cir.func {{.*}} @my_sin // CHECK: {{.+}} = cir.sin {{.+}} : !cir.double // LLVM: define dso_local double @my_sin(double %0) @@ -1047,7 +1047,7 @@ double my_sin(double f) { long double my_sinl(long double f) { return __builtin_sinl(f); - // CHECK: cir.func dso_local @my_sinl + // CHECK: cir.func {{.*}} @my_sinl // CHECK: {{.+}} = cir.sin {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.sin {{.+}} : !cir.long_double @@ -1062,7 +1062,7 @@ long double sinl(long double); float call_sinf(float f) { return sinf(f); - // CHECK: cir.func dso_local @call_sinf + // CHECK: cir.func {{.*}} @call_sinf // CHECK: {{.+}} = cir.sin {{.+}} : !cir.float // LLVM: define dso_local float @call_sinf(float %0) @@ -1072,7 +1072,7 @@ float call_sinf(float f) { double call_sin(double f) { return sin(f); - // CHECK: cir.func dso_local @call_sin + // CHECK: cir.func {{.*}} @call_sin // CHECK: {{.+}} = cir.sin {{.+}} : !cir.double // LLVM: define dso_local double @call_sin(double %0) @@ -1082,7 +1082,7 @@ double call_sin(double f) { long double call_sinl(long double f) { return sinl(f); - // CHECK: cir.func dso_local @call_sinl + // CHECK: cir.func {{.*}} @call_sinl // CHECK: {{.+}} = cir.sin {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.sin {{.+}} : !cir.long_double @@ -1095,7 +1095,7 @@ long double call_sinl(long double f) { float my_sqrtf(float f) { return __builtin_sqrtf(f); - // CHECK: cir.func dso_local @my_sqrtf + // CHECK: cir.func {{.*}} @my_sqrtf // CHECK: {{.+}} = cir.sqrt {{.+}} : !cir.float // LLVM: define dso_local float @my_sqrtf(float %0) @@ -1105,7 +1105,7 @@ float my_sqrtf(float f) { double my_sqrt(double f) { return __builtin_sqrt(f); - // CHECK: cir.func dso_local @my_sqrt + // CHECK: cir.func {{.*}} @my_sqrt // CHECK: {{.+}} = cir.sqrt {{.+}} : !cir.double // LLVM: define dso_local double @my_sqrt(double %0) @@ -1115,7 +1115,7 @@ double my_sqrt(double f) { long double my_sqrtl(long double f) { return __builtin_sqrtl(f); - // CHECK: cir.func dso_local @my_sqrtl + // CHECK: cir.func {{.*}} @my_sqrtl // CHECK: {{.+}} = cir.sqrt {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.sqrt {{.+}} : !cir.long_double @@ -1130,7 +1130,7 @@ long double sqrtl(long double); float call_sqrtf(float f) { return sqrtf(f); - // CHECK: cir.func dso_local @call_sqrtf + // CHECK: cir.func {{.*}} @call_sqrtf // CHECK: {{.+}} = cir.sqrt {{.+}} : !cir.float // LLVM: define dso_local float @call_sqrtf(float %0) @@ -1140,7 +1140,7 @@ float call_sqrtf(float f) { double call_sqrt(double f) { return sqrt(f); - // CHECK: cir.func dso_local @call_sqrt + // CHECK: cir.func {{.*}} @call_sqrt // CHECK: {{.+}} = cir.sqrt {{.+}} : !cir.double // LLVM: define dso_local double @call_sqrt(double %0) @@ -1150,7 +1150,7 @@ double call_sqrt(double f) { long double call_sqrtl(long double f) { return sqrtl(f); - // CHECK: cir.func dso_local @call_sqrtl + // CHECK: cir.func {{.*}} @call_sqrtl // CHECK: {{.+}} = cir.sqrt {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.sqrt {{.+}} : !cir.long_double @@ -1163,7 +1163,7 @@ long double call_sqrtl(long double f) { float my_tanf(float f) { return __builtin_tanf(f); - // CHECK: cir.func dso_local @my_tanf + // CHECK: cir.func {{.*}} @my_tanf // CHECK: {{.+}} = cir.tan {{.+}} : !cir.float // LLVM: define dso_local float @my_tanf(float %0) @@ -1173,7 +1173,7 @@ float my_tanf(float f) { double my_tan(double f) { return __builtin_tan(f); - // CHECK: cir.func dso_local @my_tan + // CHECK: cir.func {{.*}} @my_tan // CHECK: {{.+}} = cir.tan {{.+}} : !cir.double // LLVM: define dso_local double @my_tan(double %0) @@ -1183,7 +1183,7 @@ double my_tan(double f) { long double my_tanl(long double f) { return __builtin_tanl(f); - // CHECK: cir.func dso_local @my_tanl + // CHECK: cir.func {{.*}} @my_tanl // CHECK: {{.+}} = cir.tan {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.tan {{.+}} : !cir.long_double @@ -1198,7 +1198,7 @@ long double tanl(long double); float call_tanf(float f) { return tanf(f); - // CHECK: cir.func dso_local @call_tanf + // CHECK: cir.func {{.*}} @call_tanf // CHECK: {{.+}} = cir.tan {{.+}} : !cir.float // LLVM: define dso_local float @call_tanf(float %0) @@ -1208,7 +1208,7 @@ float call_tanf(float f) { double call_tan(double f) { return tan(f); - // CHECK: cir.func dso_local @call_tan + // CHECK: cir.func {{.*}} @call_tan // CHECK: {{.+}} = cir.tan {{.+}} : !cir.double // LLVM: define dso_local double @call_tan(double %0) @@ -1218,7 +1218,7 @@ double call_tan(double f) { long double call_tanl(long double f) { return tanl(f); - // CHECK: cir.func dso_local @call_tanl + // CHECK: cir.func {{.*}} @call_tanl // CHECK: {{.+}} = cir.tan {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.tan {{.+}} : !cir.long_double @@ -1231,7 +1231,7 @@ long double call_tanl(long double f) { float my_truncf(float f) { return __builtin_truncf(f); - // CHECK: cir.func dso_local @my_truncf + // CHECK: cir.func {{.*}} @my_truncf // CHECK: {{.+}} = cir.trunc {{.+}} : !cir.float // LLVM: define dso_local float @my_truncf(float %0) @@ -1241,7 +1241,7 @@ float my_truncf(float f) { double my_trunc(double f) { return __builtin_trunc(f); - // CHECK: cir.func dso_local @my_trunc + // CHECK: cir.func {{.*}} @my_trunc // CHECK: {{.+}} = cir.trunc {{.+}} : !cir.double // LLVM: define dso_local double @my_trunc(double %0) @@ -1251,7 +1251,7 @@ double my_trunc(double f) { long double my_truncl(long double f) { return __builtin_truncl(f); - // CHECK: cir.func dso_local @my_truncl + // CHECK: cir.func {{.*}} @my_truncl // CHECK: {{.+}} = cir.trunc {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.trunc {{.+}} : !cir.long_double @@ -1266,7 +1266,7 @@ long double truncl(long double); float call_truncf(float f) { return truncf(f); - // CHECK: cir.func dso_local @call_truncf + // CHECK: cir.func {{.*}} @call_truncf // CHECK: {{.+}} = cir.trunc {{.+}} : !cir.float // LLVM: define dso_local float @call_truncf(float %0) @@ -1276,7 +1276,7 @@ float call_truncf(float f) { double call_trunc(double f) { return trunc(f); - // CHECK: cir.func dso_local @call_trunc + // CHECK: cir.func {{.*}} @call_trunc // CHECK: {{.+}} = cir.trunc {{.+}} : !cir.double // LLVM: define dso_local double @call_trunc(double %0) @@ -1286,7 +1286,7 @@ double call_trunc(double f) { long double call_truncl(long double f) { return truncl(f); - // CHECK: cir.func dso_local @call_truncl + // CHECK: cir.func {{.*}} @call_truncl // CHECK: {{.+}} = cir.trunc {{.+}} : !cir.long_double // AARCH64: {{.+}} = cir.trunc {{.+}} : !cir.long_double @@ -1299,7 +1299,7 @@ long double call_truncl(long double f) { float my_copysignf(float x, float y) { return __builtin_copysignf(x, y); - // CHECK: cir.func dso_local @my_copysignf + // CHECK: cir.func {{.*}} @my_copysignf // CHECK: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.float // LLVM: define dso_local float @my_copysignf @@ -1309,7 +1309,7 @@ float my_copysignf(float x, float y) { double my_copysign(double x, double y) { return __builtin_copysign(x, y); - // CHECK: cir.func dso_local @my_copysign + // CHECK: cir.func {{.*}} @my_copysign // CHECK: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.double // LLVM: define dso_local double @my_copysign @@ -1319,7 +1319,7 @@ double my_copysign(double x, double y) { long double my_copysignl(long double x, long double y) { return __builtin_copysignl(x, y); - // CHECK: cir.func dso_local @my_copysignl + // CHECK: cir.func {{.*}} @my_copysignl // CHECK: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.long_double // AARCH64: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.long_double @@ -1334,7 +1334,7 @@ long double copysignl(long double, long double); float call_copysignf(float x, float y) { return copysignf(x, y); - // CHECK: cir.func dso_local @call_copysignf + // CHECK: cir.func {{.*}} @call_copysignf // CHECK: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.float // LLVM: define dso_local float @call_copysignf @@ -1344,7 +1344,7 @@ float call_copysignf(float x, float y) { double call_copysign(double x, double y) { return copysign(x, y); - // CHECK: cir.func dso_local @call_copysign + // CHECK: cir.func {{.*}} @call_copysign // CHECK: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.double // LLVM: define dso_local double @call_copysign @@ -1354,7 +1354,7 @@ double call_copysign(double x, double y) { long double call_copysignl(long double x, long double y) { return copysignl(x, y); - // CHECK: cir.func dso_local @call_copysignl + // CHECK: cir.func {{.*}} @call_copysignl // CHECK: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.long_double // AARCH64: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.long_double @@ -1367,7 +1367,7 @@ long double call_copysignl(long double x, long double y) { float my_fmaxf(float x, float y) { return __builtin_fmaxf(x, y); - // CHECK: cir.func dso_local @my_fmaxf + // CHECK: cir.func {{.*}} @my_fmaxf // CHECK: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.float // LLVM: define dso_local float @my_fmaxf @@ -1377,7 +1377,7 @@ float my_fmaxf(float x, float y) { double my_fmax(double x, double y) { return __builtin_fmax(x, y); - // CHECK: cir.func dso_local @my_fmax + // CHECK: cir.func {{.*}} @my_fmax // CHECK: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.double // LLVM: define dso_local double @my_fmax @@ -1387,7 +1387,7 @@ double my_fmax(double x, double y) { long double my_fmaxl(long double x, long double y) { return __builtin_fmaxl(x, y); - // CHECK: cir.func dso_local @my_fmaxl + // CHECK: cir.func {{.*}} @my_fmaxl // CHECK: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.long_double // AARCH64: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.long_double @@ -1402,7 +1402,7 @@ long double fmaxl(long double, long double); float call_fmaxf(float x, float y) { return fmaxf(x, y); - // CHECK: cir.func dso_local @call_fmaxf + // CHECK: cir.func {{.*}} @call_fmaxf // CHECK: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.float // LLVM: define dso_local float @call_fmaxf @@ -1412,7 +1412,7 @@ float call_fmaxf(float x, float y) { double call_fmax(double x, double y) { return fmax(x, y); - // CHECK: cir.func dso_local @call_fmax + // CHECK: cir.func {{.*}} @call_fmax // CHECK: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.double // LLVM: define dso_local double @call_fmax @@ -1422,7 +1422,7 @@ double call_fmax(double x, double y) { long double call_fmaxl(long double x, long double y) { return fmaxl(x, y); - // CHECK: cir.func dso_local @call_fmaxl + // CHECK: cir.func {{.*}} @call_fmaxl // CHECK: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.long_double // AARCH64: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.long_double @@ -1435,7 +1435,7 @@ long double call_fmaxl(long double x, long double y) { float my_fminf(float x, float y) { return __builtin_fminf(x, y); - // CHECK: cir.func dso_local @my_fminf + // CHECK: cir.func {{.*}} @my_fminf // CHECK: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.float // LLVM: define dso_local float @my_fminf @@ -1445,7 +1445,7 @@ float my_fminf(float x, float y) { double my_fmin(double x, double y) { return __builtin_fmin(x, y); - // CHECK: cir.func dso_local @my_fmin + // CHECK: cir.func {{.*}} @my_fmin // CHECK: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.double // LLVM: define dso_local double @my_fmin @@ -1455,7 +1455,7 @@ double my_fmin(double x, double y) { long double my_fminl(long double x, long double y) { return __builtin_fminl(x, y); - // CHECK: cir.func dso_local @my_fminl + // CHECK: cir.func {{.*}} @my_fminl // CHECK: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.long_double // AARCH64: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.long_double @@ -1470,7 +1470,7 @@ long double fminl(long double, long double); float call_fminf(float x, float y) { return fminf(x, y); - // CHECK: cir.func dso_local @call_fminf + // CHECK: cir.func {{.*}} @call_fminf // CHECK: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.float // LLVM: define dso_local float @call_fminf @@ -1480,7 +1480,7 @@ float call_fminf(float x, float y) { double call_fmin(double x, double y) { return fmin(x, y); - // CHECK: cir.func dso_local @call_fmin + // CHECK: cir.func {{.*}} @call_fmin // CHECK: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.double // LLVM: define dso_local double @call_fmin @@ -1490,7 +1490,7 @@ double call_fmin(double x, double y) { long double call_fminl(long double x, long double y) { return fminl(x, y); - // CHECK: cir.func dso_local @call_fminl + // CHECK: cir.func {{.*}} @call_fminl // CHECK: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.long_double // AARCH64: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.long_double @@ -1503,7 +1503,7 @@ long double call_fminl(long double x, long double y) { float my_fmodf(float x, float y) { return __builtin_fmodf(x, y); - // CHECK: cir.func dso_local @my_fmodf + // CHECK: cir.func {{.*}} @my_fmodf // CHECK: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.float // LLVM: define dso_local float @my_fmodf @@ -1513,7 +1513,7 @@ float my_fmodf(float x, float y) { double my_fmod(double x, double y) { return __builtin_fmod(x, y); - // CHECK: cir.func dso_local @my_fmod + // CHECK: cir.func {{.*}} @my_fmod // CHECK: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.double // LLVM: define dso_local double @my_fmod @@ -1523,7 +1523,7 @@ double my_fmod(double x, double y) { long double my_fmodl(long double x, long double y) { return __builtin_fmodl(x, y); - // CHECK: cir.func dso_local @my_fmodl + // CHECK: cir.func {{.*}} @my_fmodl // CHECK: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.long_double // AARCH64: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.long_double @@ -1538,7 +1538,7 @@ long double fmodl(long double, long double); float call_fmodf(float x, float y) { return fmodf(x, y); - // CHECK: cir.func dso_local @call_fmodf + // CHECK: cir.func {{.*}} @call_fmodf // CHECK: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.float // LLVM: define dso_local float @call_fmodf @@ -1548,7 +1548,7 @@ float call_fmodf(float x, float y) { double call_fmod(double x, double y) { return fmod(x, y); - // CHECK: cir.func dso_local @call_fmod + // CHECK: cir.func {{.*}} @call_fmod // CHECK: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.double // LLVM: define dso_local double @call_fmod @@ -1558,7 +1558,7 @@ double call_fmod(double x, double y) { long double call_fmodl(long double x, long double y) { return fmodl(x, y); - // CHECK: cir.func dso_local @call_fmodl + // CHECK: cir.func {{.*}} @call_fmodl // CHECK: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.long_double // AARCH64: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.long_double @@ -1571,7 +1571,7 @@ long double call_fmodl(long double x, long double y) { float my_powf(float x, float y) { return __builtin_powf(x, y); - // CHECK: cir.func dso_local @my_powf + // CHECK: cir.func {{.*}} @my_powf // CHECK: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.float // LLVM: define dso_local float @my_powf @@ -1581,7 +1581,7 @@ float my_powf(float x, float y) { double my_pow(double x, double y) { return __builtin_pow(x, y); - // CHECK: cir.func dso_local @my_pow + // CHECK: cir.func {{.*}} @my_pow // CHECK: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.double // LLVM: define dso_local double @my_pow @@ -1591,7 +1591,7 @@ double my_pow(double x, double y) { long double my_powl(long double x, long double y) { return __builtin_powl(x, y); - // CHECK: cir.func dso_local @my_powl + // CHECK: cir.func {{.*}} @my_powl // CHECK: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.long_double // AARCH64: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.long_double @@ -1606,7 +1606,7 @@ long double powl(long double, long double); float call_powf(float x, float y) { return powf(x, y); - // CHECK: cir.func dso_local @call_powf + // CHECK: cir.func {{.*}} @call_powf // CHECK: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.float // LLVM: define dso_local float @call_powf @@ -1616,7 +1616,7 @@ float call_powf(float x, float y) { double call_pow(double x, double y) { return pow(x, y); - // CHECK: cir.func dso_local @call_pow + // CHECK: cir.func {{.*}} @call_pow // CHECK: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.double // LLVM: define dso_local double @call_pow @@ -1626,7 +1626,7 @@ double call_pow(double x, double y) { long double call_powl(long double x, long double y) { return powl(x, y); - // CHECK: cir.func dso_local @call_powl + // CHECK: cir.func {{.*}} @call_powl // CHECK: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.long_double // AARCH64: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.long_double diff --git a/clang/test/CIR/CodeGen/builtin-isfpclass.c b/clang/test/CIR/CodeGen/builtin-isfpclass.c index d1e295203dfd..f5486bac5445 100644 --- a/clang/test/CIR/CodeGen/builtin-isfpclass.c +++ b/clang/test/CIR/CodeGen/builtin-isfpclass.c @@ -3,7 +3,7 @@ int finite(double); -// CHECK: cir.func {{.*}}@test_is_finite +// CHECK: cir.func{{.*}} @test_is_finite void test_is_finite(__fp16 *H, float F, double D, long double LD) { volatile int res; res = __builtin_isinf(*H); @@ -42,14 +42,14 @@ _Bool check_isfpclass_finite(float x) { return __builtin_isfpclass(x, 504 /*Finite*/); } -// CHECK: cir.func {{.*}}@check_isfpclass_finite +// CHECK: cir.func{{.*}} @check_isfpclass_finite // CHECK: cir.is_fp_class %{{.*}}, 504 : (!cir.float) _Bool check_isfpclass_nan_f32(float x) { return __builtin_isfpclass(x, 3 /*NaN*/); } -// CHECK: cir.func {{.*}}@check_isfpclass_nan_f32 +// CHECK: cir.func{{.*}} @check_isfpclass_nan_f32 // CHECK: cir.is_fp_class %{{.*}}, 3 : (!cir.float) @@ -57,7 +57,7 @@ _Bool check_isfpclass_snan_f64(double x) { return __builtin_isfpclass(x, 1 /*SNaN*/); } -// CHECK: cir.func {{.*}}@check_isfpclass_snan_f64 +// CHECK: cir.func{{.*}} @check_isfpclass_snan_f64 // CHECK: cir.is_fp_class %{{.*}}, 1 : (!cir.double) @@ -65,7 +65,7 @@ _Bool check_isfpclass_zero_f16(_Float16 x) { return __builtin_isfpclass(x, 96 /*Zero*/); } -// CHECK: cir.func {{.*}}@check_isfpclass_zero_f16 +// CHECK: cir.func{{.*}} @check_isfpclass_zero_f16 // CHECK: cir.is_fp_class %{{.*}}, 96 : (!cir.f16) // Update when we support FP pragma in functions and can convert BoolType in prvalue to i1. diff --git a/clang/test/CIR/CodeGen/builtin-ms-alloca.c b/clang/test/CIR/CodeGen/builtin-ms-alloca.c index c281ef298743..000c1de1c5d9 100644 --- a/clang/test/CIR/CodeGen/builtin-ms-alloca.c +++ b/clang/test/CIR/CodeGen/builtin-ms-alloca.c @@ -8,7 +8,7 @@ void my_win_alloca(size_t n) int *c1 = (int *)_alloca(n); } -// CIR: cir.func dso_local @my_win_alloca([[ALLOCA_SIZE:%.*]]: !u64i +// CIR: cir.func {{.*}} @my_win_alloca([[ALLOCA_SIZE:%.*]]: !u64i // CIR: cir.store [[ALLOCA_SIZE]], [[LOCAL_VAR_ALLOCA_SIZE:%.*]] : !u64i, !cir.ptr // CIR: [[TMP_ALLOCA_SIZE:%.*]] = cir.load{{.*}} [[LOCAL_VAR_ALLOCA_SIZE]] : !cir.ptr, !u64i // CIR: [[ALLOCA_RES:%.*]] = cir.alloca !u8i, !cir.ptr, [[TMP_ALLOCA_SIZE]] : !u64i, ["bi_alloca"] {alignment = 16 : i64} diff --git a/clang/test/CIR/CodeGen/builtin-prefetch.c b/clang/test/CIR/CodeGen/builtin-prefetch.c index 343d9a808ad6..952dbe988731 100644 --- a/clang/test/CIR/CodeGen/builtin-prefetch.c +++ b/clang/test/CIR/CodeGen/builtin-prefetch.c @@ -5,7 +5,7 @@ void foo(void *a) { __builtin_prefetch(a, 1, 1); } -// CIR: cir.func dso_local @foo(%arg0: !cir.ptr loc({{.*}})) +// CIR: cir.func {{.*}} @foo(%arg0: !cir.ptr loc({{.*}})) // CIR: [[PTR_ALLOC:%.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["a", init] {alignment = 8 : i64} // CIR: cir.store %arg0, [[PTR_ALLOC]] : !cir.ptr, !cir.ptr> // CIR: [[PTR:%.*]] = cir.load{{.*}} [[PTR_ALLOC]] : !cir.ptr>, !cir.ptr diff --git a/clang/test/CIR/CodeGen/builtins-memory.c b/clang/test/CIR/CodeGen/builtins-memory.c index 0a21835ea844..b60c614a487d 100644 --- a/clang/test/CIR/CodeGen/builtins-memory.c +++ b/clang/test/CIR/CodeGen/builtins-memory.c @@ -9,7 +9,7 @@ typedef __SIZE_TYPE__ size_t; void test_memcpy_chk(void *dest, const void *src, size_t n) { - // CIR-LABEL: cir.func dso_local @test_memcpy_chk + // CIR-LABEL: cir.func {{.*}} @test_memcpy_chk // CIR: %[[#DEST:]] = cir.alloca {{.*}} ["dest", init] // CIR: %[[#SRC:]] = cir.alloca {{.*}} ["src", init] // CIR: %[[#N:]] = cir.alloca {{.*}} ["n", init] @@ -62,7 +62,7 @@ void test_memcpy_chk(void *dest, const void *src, size_t n) { } void test_memmove_chk(void *dest, const void *src, size_t n) { - // CIR-LABEL: cir.func dso_local @test_memmove_chk + // CIR-LABEL: cir.func {{.*}} @test_memmove_chk // CIR: %[[#DEST:]] = cir.alloca {{.*}} ["dest", init] // CIR: %[[#SRC:]] = cir.alloca {{.*}} ["src", init] // CIR: %[[#N:]] = cir.alloca {{.*}} ["n", init] @@ -127,7 +127,7 @@ void test_memmove_chk(void *dest, const void *src, size_t n) { void test_memset_chk(void *dest, int ch, size_t n) { - // CIR-LABEL: cir.func dso_local @test_memset_chk + // CIR-LABEL: cir.func {{.*}} @test_memset_chk // CIR: %[[#DEST:]] = cir.alloca {{.*}} ["dest", init] // CIR: %[[#CH:]] = cir.alloca {{.*}} ["ch", init] // CIR: %[[#N:]] = cir.alloca {{.*}} ["n", init] diff --git a/clang/test/CIR/CodeGen/builtins-overflow.cpp b/clang/test/CIR/CodeGen/builtins-overflow.cpp index 8cd227d58686..9a9999ad1fbd 100644 --- a/clang/test/CIR/CodeGen/builtins-overflow.cpp +++ b/clang/test/CIR/CodeGen/builtins-overflow.cpp @@ -5,7 +5,7 @@ bool test_add_overflow_uint_uint_uint(unsigned x, unsigned y, unsigned *res) { return __builtin_add_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z32test_add_overflow_uint_uint_uintjjPj +// CIR: cir.func {{.*}} @_Z32test_add_overflow_uint_uint_uintjjPj // CIR: %[[#LHS:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u32i // CIR-NEXT: %[[#RHS:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u32i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -17,7 +17,7 @@ bool test_add_overflow_int_int_int(int x, int y, int *res) { return __builtin_add_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z29test_add_overflow_int_int_intiiPi +// CIR: cir.func {{.*}} @_Z29test_add_overflow_int_int_intiiPi // CIR: %[[#LHS:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s32i // CIR-NEXT: %[[#RHS:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s32i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -29,7 +29,7 @@ bool test_add_overflow_xint31_xint31_xint31(_BitInt(31) x, _BitInt(31) y, _BitIn return __builtin_add_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z38test_add_overflow_xint31_xint31_xint31DB31_S_PS_ +// CIR: cir.func {{.*}} @_Z38test_add_overflow_xint31_xint31_xint31DB31_S_PS_ // CIR: %[[#LHS:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.int // CIR-NEXT: %[[#RHS:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.int // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>>, !cir.ptr> @@ -41,7 +41,7 @@ bool test_sub_overflow_uint_uint_uint(unsigned x, unsigned y, unsigned *res) { return __builtin_sub_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z32test_sub_overflow_uint_uint_uintjjPj +// CIR: cir.func {{.*}} @_Z32test_sub_overflow_uint_uint_uintjjPj // CIR: %[[#LHS:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u32i // CIR-NEXT: %[[#RHS:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u32i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -53,7 +53,7 @@ bool test_sub_overflow_int_int_int(int x, int y, int *res) { return __builtin_sub_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z29test_sub_overflow_int_int_intiiPi +// CIR: cir.func {{.*}} @_Z29test_sub_overflow_int_int_intiiPi // CIR: %[[#LHS:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s32i // CIR-NEXT: %[[#RHS:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s32i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -65,7 +65,7 @@ bool test_sub_overflow_xint31_xint31_xint31(_BitInt(31) x, _BitInt(31) y, _BitIn return __builtin_sub_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z38test_sub_overflow_xint31_xint31_xint31DB31_S_PS_ +// CIR: cir.func {{.*}} @_Z38test_sub_overflow_xint31_xint31_xint31DB31_S_PS_ // CIR: %[[#LHS:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.int // CIR-NEXT: %[[#RHS:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.int // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>>, !cir.ptr> @@ -77,7 +77,7 @@ bool test_mul_overflow_uint_uint_uint(unsigned x, unsigned y, unsigned *res) { return __builtin_mul_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z32test_mul_overflow_uint_uint_uintjjPj +// CIR: cir.func {{.*}} @_Z32test_mul_overflow_uint_uint_uintjjPj // CIR: %[[#LHS:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u32i // CIR-NEXT: %[[#RHS:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u32i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -89,7 +89,7 @@ bool test_mul_overflow_int_int_int(int x, int y, int *res) { return __builtin_mul_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z29test_mul_overflow_int_int_intiiPi +// CIR: cir.func {{.*}} @_Z29test_mul_overflow_int_int_intiiPi // CIR: %[[#LHS:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s32i // CIR-NEXT: %[[#RHS:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s32i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -101,7 +101,7 @@ bool test_mul_overflow_xint31_xint31_xint31(_BitInt(31) x, _BitInt(31) y, _BitIn return __builtin_mul_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z38test_mul_overflow_xint31_xint31_xint31DB31_S_PS_ +// CIR: cir.func {{.*}} @_Z38test_mul_overflow_xint31_xint31_xint31DB31_S_PS_ // CIR: %[[#LHS:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.int // CIR-NEXT: %[[#RHS:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.int // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>>, !cir.ptr> @@ -113,7 +113,7 @@ bool test_mul_overflow_ulong_ulong_long(unsigned long x, unsigned long y, unsign return __builtin_mul_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z34test_mul_overflow_ulong_ulong_longmmPm +// CIR: cir.func {{.*}} @_Z34test_mul_overflow_ulong_ulong_longmmPm // CIR: %[[#LHS:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u64i // CIR-NEXT: %[[#RHS:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u64i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -125,7 +125,7 @@ bool test_add_overflow_uint_int_int(unsigned x, int y, int *res) { return __builtin_add_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z30test_add_overflow_uint_int_intjiPi +// CIR: cir.func {{.*}} @_Z30test_add_overflow_uint_int_intjiPi // CIR: %[[#X:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u32i // CIR-NEXT: %[[#Y:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s32i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -139,7 +139,7 @@ bool test_add_overflow_volatile(int x, int y, volatile int *res) { return __builtin_add_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z26test_add_overflow_volatileiiPVi +// CIR: cir.func {{.*}} @_Z26test_add_overflow_volatileiiPVi // CIR: %[[#X:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s32i // CIR-NEXT: %[[#Y:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s32i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -151,7 +151,7 @@ bool test_uadd_overflow(unsigned x, unsigned y, unsigned *res) { return __builtin_uadd_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z18test_uadd_overflowjjPj +// CIR: cir.func {{.*}} @_Z18test_uadd_overflowjjPj // CIR: %[[#X:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u32i // CIR-NEXT: %[[#Y:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u32i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -163,7 +163,7 @@ bool test_uaddl_overflow(unsigned long x, unsigned long y, unsigned long *res) { return __builtin_uaddl_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z19test_uaddl_overflowmmPm +// CIR: cir.func {{.*}} @_Z19test_uaddl_overflowmmPm // CIR: %[[#X:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u64i // CIR-NEXT: %[[#Y:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u64i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -175,7 +175,7 @@ bool test_uaddll_overflow(unsigned long long x, unsigned long long y, unsigned l return __builtin_uaddll_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z20test_uaddll_overflowyyPy +// CIR: cir.func {{.*}} @_Z20test_uaddll_overflowyyPy // CIR: %[[#X:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u64i // CIR-NEXT: %[[#Y:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u64i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -187,7 +187,7 @@ bool test_usub_overflow(unsigned x, unsigned y, unsigned *res) { return __builtin_usub_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z18test_usub_overflowjjPj +// CIR: cir.func {{.*}} @_Z18test_usub_overflowjjPj // CIR: %[[#X:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u32i // CIR-NEXT: %[[#Y:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u32i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -199,7 +199,7 @@ bool test_usubl_overflow(unsigned long x, unsigned long y, unsigned long *res) { return __builtin_usubl_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z19test_usubl_overflowmmPm +// CIR: cir.func {{.*}} @_Z19test_usubl_overflowmmPm // CIR: %[[#X:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u64i // CIR-NEXT: %[[#Y:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u64i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -211,7 +211,7 @@ bool test_usubll_overflow(unsigned long long x, unsigned long long y, unsigned l return __builtin_usubll_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z20test_usubll_overflowyyPy +// CIR: cir.func {{.*}} @_Z20test_usubll_overflowyyPy // CIR: %[[#X:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u64i // CIR-NEXT: %[[#Y:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u64i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -223,7 +223,7 @@ bool test_umul_overflow(unsigned x, unsigned y, unsigned *res) { return __builtin_umul_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z18test_umul_overflowjjPj +// CIR: cir.func {{.*}} @_Z18test_umul_overflowjjPj // CIR: %[[#X:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u32i // CIR-NEXT: %[[#Y:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u32i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -235,7 +235,7 @@ bool test_umull_overflow(unsigned long x, unsigned long y, unsigned long *res) { return __builtin_umull_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z19test_umull_overflowmmPm +// CIR: cir.func {{.*}} @_Z19test_umull_overflowmmPm // CIR: %[[#X:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u64i // CIR-NEXT: %[[#Y:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u64i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -247,7 +247,7 @@ bool test_umulll_overflow(unsigned long long x, unsigned long long y, unsigned l return __builtin_umulll_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z20test_umulll_overflowyyPy +// CIR: cir.func {{.*}} @_Z20test_umulll_overflowyyPy // CIR: %[[#X:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u64i // CIR-NEXT: %[[#Y:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !u64i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -259,7 +259,7 @@ bool test_sadd_overflow(int x, int y, int *res) { return __builtin_sadd_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z18test_sadd_overflowiiPi +// CIR: cir.func {{.*}} @_Z18test_sadd_overflowiiPi // CIR: %[[#X:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s32i // CIR-NEXT: %[[#Y:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s32i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -271,7 +271,7 @@ bool test_saddl_overflow(long x, long y, long *res) { return __builtin_saddl_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z19test_saddl_overflowllPl +// CIR: cir.func {{.*}} @_Z19test_saddl_overflowllPl // CIR: %[[#X:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s64i // CIR-NEXT: %[[#Y:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s64i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -283,7 +283,7 @@ bool test_saddll_overflow(long long x, long long y, long long *res) { return __builtin_saddll_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z20test_saddll_overflowxxPx +// CIR: cir.func {{.*}} @_Z20test_saddll_overflowxxPx // CIR: %[[#X:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s64i // CIR-NEXT: %[[#Y:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s64i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -295,7 +295,7 @@ bool test_ssub_overflow(int x, int y, int *res) { return __builtin_ssub_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z18test_ssub_overflowiiPi +// CIR: cir.func {{.*}} @_Z18test_ssub_overflowiiPi // CIR: %[[#X:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s32i // CIR-NEXT: %[[#Y:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s32i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -307,7 +307,7 @@ bool test_ssubl_overflow(long x, long y, long *res) { return __builtin_ssubl_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z19test_ssubl_overflowllPl +// CIR: cir.func {{.*}} @_Z19test_ssubl_overflowllPl // CIR: %[[#X:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s64i // CIR-NEXT: %[[#Y:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s64i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -319,7 +319,7 @@ bool test_ssubll_overflow(long long x, long long y, long long *res) { return __builtin_ssubll_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z20test_ssubll_overflowxxPx +// CIR: cir.func {{.*}} @_Z20test_ssubll_overflowxxPx // CIR: %[[#X:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s64i // CIR-NEXT: %[[#Y:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s64i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -331,7 +331,7 @@ bool test_smul_overflow(int x, int y, int *res) { return __builtin_smul_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z18test_smul_overflowiiPi +// CIR: cir.func {{.*}} @_Z18test_smul_overflowiiPi // CIR: %[[#X:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s32i // CIR-NEXT: %[[#Y:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s32i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -343,7 +343,7 @@ bool test_smull_overflow(long x, long y, long *res) { return __builtin_smull_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z19test_smull_overflowllPl +// CIR: cir.func {{.*}} @_Z19test_smull_overflowllPl // CIR: %[[#X:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s64i // CIR-NEXT: %[[#Y:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s64i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr @@ -355,7 +355,7 @@ bool test_smulll_overflow(long long x, long long y, long long *res) { return __builtin_smulll_overflow(x, y, res); } -// CIR: cir.func dso_local @_Z20test_smulll_overflowxxPx +// CIR: cir.func {{.*}} @_Z20test_smulll_overflowxxPx // CIR: %[[#X:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s64i // CIR-NEXT: %[[#Y:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s64i // CIR-NEXT: %[[#RES_PTR:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr diff --git a/clang/test/CIR/CodeGen/c89-implicit-int.c b/clang/test/CIR/CodeGen/c89-implicit-int.c index 4e2392c44a80..9882d2cf4c05 100644 --- a/clang/test/CIR/CodeGen/c89-implicit-int.c +++ b/clang/test/CIR/CodeGen/c89-implicit-int.c @@ -5,6 +5,6 @@ test = 0; // CHECK: cir.global external @test = #cir.int<0> : !s32i func (void) { -// CHECK: cir.func dso_local @func() -> !s32i +// CHECK: cir.func {{.*}} @func() -> !s32i return 0; } diff --git a/clang/test/CIR/CodeGen/call-extra-attrs.cpp b/clang/test/CIR/CodeGen/call-extra-attrs.cpp index 3ec0c06fd741..a9b21d144f3f 100644 --- a/clang/test/CIR/CodeGen/call-extra-attrs.cpp +++ b/clang/test/CIR/CodeGen/call-extra-attrs.cpp @@ -21,10 +21,10 @@ int s2(int a, int b) { // CIR: #fn_attr = #cir, nothrow = #cir.nothrow, optnone = #cir.optnone})> // CIR: #fn_attr1 = #cir -// CIR: cir.func dso_local @_Z2s0ii(%{{.*}}, %{{.*}}) -> {{.*}} extra(#fn_attr) -// CIR: cir.func dso_local @_Z2s1ii(%{{.*}}, %{{.*}}) -> {{.*}} extra(#fn_attr) +// CIR: cir.func {{.*}} @_Z2s0ii(%{{.*}}, %{{.*}}) -> {{.*}} extra(#fn_attr) +// CIR: cir.func {{.*}} @_Z2s1ii(%{{.*}}, %{{.*}}) -> {{.*}} extra(#fn_attr) // CIR: cir.call @_Z2s0ii(%{{.*}}, %{{.*}}) : ({{.*}}, {{.*}}) -> {{.*}} extra(#fn_attr1) -// CIR: cir.func dso_local @_Z2s2ii(%{{.*}}, %{{.*}}) -> {{.*}} extra(#fn_attr) +// CIR: cir.func {{.*}} @_Z2s2ii(%{{.*}}, %{{.*}}) -> {{.*}} extra(#fn_attr) // CHECK-NOT: cir.call @_Z2s1ii(%{{.*}}, %{{.*}}) : ({{.*}}, {{.*}}) -> {{.*}} extra(#fn_attr{{.*}}) // LLVM: define dso_local i32 @_Z2s0ii(i32 %0, i32 %1) #[[#ATTR1:]] diff --git a/clang/test/CIR/CodeGen/call-via-class-member-funcptr.cpp b/clang/test/CIR/CodeGen/call-via-class-member-funcptr.cpp index d28ff510ac7b..38333fa96e8c 100644 --- a/clang/test/CIR/CodeGen/call-via-class-member-funcptr.cpp +++ b/clang/test/CIR/CodeGen/call-via-class-member-funcptr.cpp @@ -20,9 +20,9 @@ void fn1() { f f1; } // CIR: !rec_f = !cir.record // CIR: cir.global external @h = #cir.int<0> -// CIR: cir.func private @_ZN1a1bEi(!s32i) -> !cir.ptr +// CIR: cir.func {{.*}} @_ZN1a1bEi(!s32i) -> !cir.ptr -// CIR: cir.func dso_local @_ZN1f1bEv(%arg0: !cir.ptr loc{{.*}}) -> !cir.ptr +// CIR: cir.func {{.*}} @_ZN1f1bEv(%arg0: !cir.ptr loc{{.*}}) -> !cir.ptr // CIR: [[H_PTR:%.*]] = cir.get_global @h : !cir.ptr loc(#loc18) // CIR: [[H_VAL:%.*]] = cir.load{{.*}} [[H_PTR]] : !cir.ptr, !s32i // CIR: [[RET1_VAL:%.*]] = cir.call @_ZN1a1bEi([[H_VAL]]) : (!s32i) -> !cir.ptr @@ -31,7 +31,7 @@ void fn1() { f f1; } // %7 = cir.load %1 : !cir.ptr>, !cir.ptr // CIR: cir.return [[RET1_VAL2]] : !cir.ptr -// CIR: cir.func dso_local @_Z3fn1v() +// CIR: cir.func {{.*}} @_Z3fn1v() // CIR: [[CLS_F:%.*]] = cir.alloca !rec_f, !cir.ptr, ["f1"] {alignment = 1 : i64} // CIR: cir.return diff --git a/clang/test/CIR/CodeGen/call.c b/clang/test/CIR/CodeGen/call.c index 12c471d56347..37a33a109b09 100644 --- a/clang/test/CIR/CodeGen/call.c +++ b/clang/test/CIR/CodeGen/call.c @@ -15,10 +15,10 @@ void d(void) { } // CHECK: module {{.*}} { -// CHECK: cir.func dso_local @a() +// CHECK: cir.func {{.*}} @a() // CHECK: cir.return // CHECK: } -// CHECK: cir.func dso_local @b(%arg0: !s32i {{.*}}, %arg1: !s32i {{.*}}) -> !s32i +// CHECK: cir.func {{.*}} @b(%arg0: !s32i {{.*}}, %arg1: !s32i {{.*}}) -> !s32i // CHECK: %0 = cir.alloca !s32i, !cir.ptr, ["a", init] // CHECK: %1 = cir.alloca !s32i, !cir.ptr, ["b", init] // CHECK: %2 = cir.alloca !s32i, !cir.ptr, ["__retval"] @@ -31,7 +31,7 @@ void d(void) { // CHECK: %6 = cir.load{{.*}} %2 : !cir.ptr, !s32i // CHECK: cir.return %6 // CHECK: } -// CHECK: cir.func dso_local @c(%arg0: !cir.double {{.*}}, %arg1: !cir.double {{.*}}) -> !cir.double +// CHECK: cir.func {{.*}} @c(%arg0: !cir.double {{.*}}, %arg1: !cir.double {{.*}}) -> !cir.double // CHECK: %0 = cir.alloca !cir.double, !cir.ptr, ["a", init] // CHECK: %1 = cir.alloca !cir.double, !cir.ptr, ["b", init] // CHECK: %2 = cir.alloca !cir.double, !cir.ptr, ["__retval"] @@ -44,7 +44,7 @@ void d(void) { // CHECK: %6 = cir.load{{.*}} %2 : !cir.ptr, !cir.double // CHECK: cir.return %6 : !cir.double // CHECK: } -// CHECK: cir.func dso_local @d() +// CHECK: cir.func {{.*}} @d() // CHECK: call @a() : () -> () // CHECK: %0 = cir.const #cir.int<0> : !s32i // CHECK: %1 = cir.const #cir.int<1> : !s32i @@ -53,10 +53,10 @@ void d(void) { // CHECK: } // // CXX: module {{.*}} { -// CXX-NEXT: cir.func dso_local @_Z1av() +// CXX-NEXT: cir.func {{.*}} @_Z1av() // CXX-NEXT: cir.return // CXX-NEXT: } -// CXX-NEXT: cir.func dso_local @_Z1bii(%arg0: !s32i {{.*}}, %arg1: !s32i {{.*}}) -> !s32i +// CXX-NEXT: cir.func {{.*}} @_Z1bii(%arg0: !s32i {{.*}}, %arg1: !s32i {{.*}}) -> !s32i // CXX-NEXT: %0 = cir.alloca !s32i, !cir.ptr, ["a", init] // CXX-NEXT: %1 = cir.alloca !s32i, !cir.ptr, ["b", init] // CXX-NEXT: %2 = cir.alloca !s32i, !cir.ptr, ["__retval"] @@ -69,7 +69,7 @@ void d(void) { // CXX-NEXT: %6 = cir.load{{.*}} %2 : !cir.ptr, !s32i // CXX-NEXT: cir.return %6 // CXX-NEXT: } -// CXX-NEXT: cir.func dso_local @_Z1cdd(%arg0: !cir.double {{.*}}, %arg1: !cir.double {{.*}}) -> !cir.double +// CXX-NEXT: cir.func {{.*}} @_Z1cdd(%arg0: !cir.double {{.*}}, %arg1: !cir.double {{.*}}) -> !cir.double // CXX-NEXT: %0 = cir.alloca !cir.double, !cir.ptr, ["a", init] // CXX-NEXT: %1 = cir.alloca !cir.double, !cir.ptr, ["b", init] // CXX-NEXT: %2 = cir.alloca !cir.double, !cir.ptr, ["__retval"] @@ -82,7 +82,7 @@ void d(void) { // CXX-NEXT: %6 = cir.load{{.*}} %2 : !cir.ptr, !cir.double // CXX-NEXT: cir.return %6 : !cir.double // CXX-NEXT: } -// CXX-NEXT: cir.func dso_local @_Z1dv() +// CXX-NEXT: cir.func {{.*}} @_Z1dv() // CXX-NEXT: call @_Z1av() : () -> () // CXX-NEXT: %0 = cir.const #cir.int<0> : !s32i // CXX-NEXT: %1 = cir.const #cir.int<1> : !s32i diff --git a/clang/test/CIR/CodeGen/call.cpp b/clang/test/CIR/CodeGen/call.cpp index 06a6e6d6fe3f..b8464f71106f 100644 --- a/clang/test/CIR/CodeGen/call.cpp +++ b/clang/test/CIR/CodeGen/call.cpp @@ -6,7 +6,7 @@ int f() { return p() - 22; } -// CHECK: cir.func dso_local @_Z1fv() -> !s32i +// CHECK: cir.func {{.*}} @_Z1fv() -> !s32i // CHECK: %0 = cir.alloca !s32i, !cir.ptr, ["__retval"] {alignment = 4 : i64} // CHECK: %1 = cir.call @_Z1pv() : () -> !cir.ptr // CHECK: %2 = cir.load{{.*}} %1 : !cir.ptr, !s32i diff --git a/clang/test/CIR/CodeGen/cast.c b/clang/test/CIR/CodeGen/cast.c index 22ab9a9f0a57..9839998f7db7 100644 --- a/clang/test/CIR/CodeGen/cast.c +++ b/clang/test/CIR/CodeGen/cast.c @@ -8,7 +8,7 @@ int cstyle_cast_lvalue(A a) { return ((A)(a)).x; } -// CHECK: cir.func dso_local @cstyle_cast_lvalue(%arg0: !rec_A loc({{.*}})) +// CHECK: cir.func {{.*}} @cstyle_cast_lvalue(%arg0: !rec_A loc({{.*}})) // CHECK: [[ALLOC_A:%.*]] = cir.alloca !rec_A, !cir.ptr, ["a", init] {alignment = 4 : i64} // CHECK: [[ALLOC_RET:%.*]] = cir.alloca !s32i, !cir.ptr, ["__retval"] {alignment = 4 : i64} // CHECK: [[REF_TMP:%.*]] = cir.alloca !rec_A, !cir.ptr, ["ref.tmp0"] {alignment = 4 : i64} diff --git a/clang/test/CIR/CodeGen/cast.cpp b/clang/test/CIR/CodeGen/cast.cpp index 4f96674489b9..ca8bcf77ae39 100644 --- a/clang/test/CIR/CodeGen/cast.cpp +++ b/clang/test/CIR/CodeGen/cast.cpp @@ -5,7 +5,7 @@ unsigned char cxxstaticcast_0(unsigned int x) { return static_cast(x); } -// CHECK: cir.func dso_local @_Z15cxxstaticcast_0j +// CHECK: cir.func {{.*}} @_Z15cxxstaticcast_0j // CHECK: %0 = cir.alloca !u32i, !cir.ptr, ["x", init] {alignment = 4 : i64} // CHECK: %1 = cir.alloca !u8i, !cir.ptr, ["__retval"] {alignment = 1 : i64} // CHECK: cir.store{{.*}} %arg0, %0 : !u32i, !cir.ptr @@ -18,7 +18,7 @@ unsigned char cxxstaticcast_0(unsigned int x) { int cStyleCasts_0(unsigned x1, int x2, float x3, short x4, double x5) { -// CHECK: cir.func dso_local @_{{.*}}cStyleCasts_0{{.*}} +// CHECK: cir.func {{.*}} @_{{.*}}cStyleCasts_0{{.*}} char a = (char)x1; // truncate // CHECK: %{{[0-9]+}} = cir.cast integral %{{[0-9]+}} : !u32i -> !s8i @@ -91,7 +91,7 @@ bool cptr(void *d) { return x; } -// CHECK: cir.func dso_local @_Z4cptrPv(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @_Z4cptrPv(%arg0: !cir.ptr // CHECK: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["d", init] {alignment = 8 : i64} // CHECK: %3 = cir.load{{.*}} %0 : !cir.ptr>, !cir.ptr @@ -102,7 +102,7 @@ void call_cptr(void *d) { } } -// CHECK: cir.func dso_local @_Z9call_cptrPv(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @_Z9call_cptrPv(%arg0: !cir.ptr // CHECK: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["d", init] {alignment = 8 : i64} // CHECK: cir.scope { @@ -115,7 +115,7 @@ void lvalue_cast(int x) { *(int *)&x = 42; } -// CHECK: cir.func dso_local @_Z11lvalue_cast +// CHECK: cir.func {{.*}} @_Z11lvalue_cast // CHECK: %1 = cir.const #cir.int<42> : !s32i // CHECK: cir.store{{.*}} %1, %0 : !s32i, !cir.ptr @@ -126,7 +126,7 @@ void null_cast(long ptr) { ((A *)0)->x = 0; } -// CHECK: cir.func dso_local @_Z9null_castl +// CHECK: cir.func {{.*}} @_Z9null_castl // CHECK: %[[ADDR:[0-9]+]] = cir.const #cir.ptr : !cir.ptr // CHECK: cir.store{{.*}} %{{[0-9]+}}, %[[ADDR]] : !s32i, !cir.ptr // CHECK: %[[BASE:[0-9]+]] = cir.const #cir.ptr : !cir.ptr @@ -137,7 +137,7 @@ void int_cast(long ptr) { ((A *)ptr)->x = 0; } -// CHECK: cir.func dso_local @_Z8int_castl +// CHECK: cir.func {{.*}} @_Z8int_castl // CHECK: %[[BASE:[0-9]+]] = cir.cast int_to_ptr %{{[0-9]+}} : !u64i -> !cir.ptr // CHECK: %[[FIELD:[0-9]+]] = cir.get_member %[[BASE]][0] {name = "x"} : !cir.ptr -> !cir.ptr // CHECK: cir.store{{.*}} %{{[0-9]+}}, %[[FIELD]] : !s32i, !cir.ptr diff --git a/clang/test/CIR/CodeGen/comma.cpp b/clang/test/CIR/CodeGen/comma.cpp index e10be4ac0228..d0a997616ae0 100644 --- a/clang/test/CIR/CodeGen/comma.cpp +++ b/clang/test/CIR/CodeGen/comma.cpp @@ -7,7 +7,7 @@ int c0() { return b + 1, a; } -// CHECK: cir.func dso_local @_Z2c0v() -> !s32i +// CHECK: cir.func {{.*}} @_Z2c0v() -> !s32i // CHECK: %[[#RET:]] = cir.alloca !s32i, !cir.ptr, ["__retval"] // CHECK: %[[#A:]] = cir.alloca !s32i, !cir.ptr, ["a", init] // CHECK: %[[#B:]] = cir.alloca !s32i, !cir.ptr, ["b", init] @@ -23,7 +23,7 @@ void c1() { int &x = (foo1(), foo2()); } -// CHECK: cir.func dso_local @_Z2c1v() +// CHECK: cir.func {{.*}} @_Z2c1v() // CHECK: %0 = cir.alloca !cir.ptr, !cir.ptr> // CHECK: %1 = cir.call @_Z4foo1v() : () -> !cir.ptr // CHECK: %2 = cir.call @_Z4foo2v() : () -> !cir.ptr diff --git a/clang/test/CIR/CodeGen/compound-literal.c b/clang/test/CIR/CodeGen/compound-literal.c index aa57a0262d94..11f202d890a6 100644 --- a/clang/test/CIR/CodeGen/compound-literal.c +++ b/clang/test/CIR/CodeGen/compound-literal.c @@ -34,7 +34,7 @@ int foo() { .i; } -// CIR: cir.func no_proto dso_local @foo() -> !s32i +// CIR: cir.func {{.*}} @foo() -> !s32i // CIR: [[RET_MEM:%.*]] = cir.alloca !s32i, !cir.ptr, ["__retval"] {alignment = 4 : i64} // CIR: [[COMPLITERAL_MEM:%.*]] = cir.alloca !rec_anon2E0, !cir.ptr, [".compoundliteral"] {alignment = 4 : i64} // CIR: [[FIELD:%.*]] = cir.get_member [[COMPLITERAL_MEM]][0] {name = "i"} : !cir.ptr -> !cir.ptr @@ -50,7 +50,7 @@ struct G g(int x, int y, int z) { return (struct G) { x, y, z }; } -// CIR: cir.func dso_local @g +// CIR: cir.func {{.*}} @g // CIR: %[[RETVAL:.*]] = cir.alloca !rec_G, !cir.ptr, ["__retval"] {alignment = 2 : i64} // CIR: %[[X:.*]] = cir.get_member %[[RETVAL]][0] {name = "x"} // CIR: cir.store{{.*}} {{.*}}, %[[X]] : !s16i diff --git a/clang/test/CIR/CodeGen/concept-specialization.cpp b/clang/test/CIR/CodeGen/concept-specialization.cpp index c8a598d88524..cd2e61cff4c1 100644 --- a/clang/test/CIR/CodeGen/concept-specialization.cpp +++ b/clang/test/CIR/CodeGen/concept-specialization.cpp @@ -9,32 +9,32 @@ concept Signed = Integral && __is_signed(T); // Test ConceptSpecializationExpr as a boolean value bool test_concept_bool() { - // CHECK-LABEL: cir.func {{.*}}@{{.*}}test_concept_boolv + // CHECK-LABEL: cir.func{{.*}} @{{.*}}test_concept_boolv // CHECK: %{{.*}} = cir.const #true return Integral; } bool test_concept_false() { - // CHECK-LABEL: cir.func {{.*}}@{{.*}}test_concept_falsev + // CHECK-LABEL: cir.func{{.*}} @{{.*}}test_concept_falsev // CHECK: %{{.*}} = cir.const #false return Integral; } bool test_concept_compound() { - // CHECK-LABEL: cir.func {{.*}}@{{.*}}test_concept_compoundv + // CHECK-LABEL: cir.func{{.*}} @{{.*}}test_concept_compoundv // CHECK: %{{.*}} = cir.const #true return Signed; } bool test_concept_unsigned() { - // CHECK-LABEL: cir.func {{.*}}@{{.*}}test_concept_unsignedv + // CHECK-LABEL: cir.func{{.*}} @{{.*}}test_concept_unsignedv // CHECK: %{{.*}} = cir.const #false return Signed; } // Test in conditional int test_concept_in_if() { - // CHECK-LABEL: cir.func {{.*}}@{{.*}}test_concept_in_ifv + // CHECK-LABEL: cir.func{{.*}} @{{.*}}test_concept_in_ifv if (Integral) { // CHECK: %{{.*}} = cir.const #true // CHECK: cir.if %{{.*}} { @@ -47,7 +47,7 @@ int test_concept_in_if() { constexpr bool is_int_integral = Integral; int use_constexpr() { - // CHECK-LABEL: cir.func {{.*}}@{{.*}}use_constexprv + // CHECK-LABEL: cir.func{{.*}} @{{.*}}use_constexprv if (is_int_integral) { // This should be optimized to a constant true return 42; diff --git a/clang/test/CIR/CodeGen/cond.cpp b/clang/test/CIR/CodeGen/cond.cpp index 48b5d71acab0..093d5d3f0d53 100644 --- a/clang/test/CIR/CodeGen/cond.cpp +++ b/clang/test/CIR/CodeGen/cond.cpp @@ -10,7 +10,7 @@ min(const unsigned long& __a, const unsigned long& __b) { return __less()(__b, __a) ? __b : __a; } -// CHECK: cir.func dso_local @_Z3minRKmS0_(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @_Z3minRKmS0_(%arg0: !cir.ptr // CHECK: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["__a", init, const] {alignment = 8 : i64} // CHECK: %1 = cir.alloca !cir.ptr, !cir.ptr>, ["__b", init, const] {alignment = 8 : i64} // CHECK: %2 = cir.alloca !cir.ptr, !cir.ptr>, ["__retval"] {alignment = 8 : i64} diff --git a/clang/test/CIR/CodeGen/const-array.c b/clang/test/CIR/CodeGen/const-array.c index 419c1e5781ca..30ce6da1175c 100644 --- a/clang/test/CIR/CodeGen/const-array.c +++ b/clang/test/CIR/CodeGen/const-array.c @@ -5,7 +5,7 @@ void bar() { } // CHECK: cir.global "private" constant internal dso_local @bar.arr = #cir.const_array<[#cir.int<1> : !s32i]> : !cir.array {alignment = 4 : i64} -// CHECK: cir.func no_proto dso_local @bar() +// CHECK: cir.func {{.*}} @bar() // CHECK: {{.*}} = cir.get_global @bar.arr : !cir.ptr> void foo() { diff --git a/clang/test/CIR/CodeGen/copy-constructor.cpp b/clang/test/CIR/CodeGen/copy-constructor.cpp index 1e012832d9c3..25c1834305f7 100644 --- a/clang/test/CIR/CodeGen/copy-constructor.cpp +++ b/clang/test/CIR/CodeGen/copy-constructor.cpp @@ -8,7 +8,7 @@ struct HasScalarArrayMember { HasScalarArrayMember(const HasScalarArrayMember &); }; -// CIR-LABEL: cir.func dso_local @_ZN20HasScalarArrayMemberC2ERKS_( +// CIR-LABEL: cir.func {{.*}} @_ZN20HasScalarArrayMemberC2ERKS_( // CIR-NEXT: %[[#THIS:]] = cir.alloca !cir.ptr // CIR-NEXT: %[[#OTHER:]] = cir.alloca !cir.ptr // CIR-NEXT: cir.store %arg0, %[[#THIS]] @@ -46,7 +46,7 @@ struct ManyMembers { int *p; }; -// CIR-LABEL: cir.func linkonce_odr @_ZN11ManyMembersC2ERKS_( +// CIR-LABEL: cir.func {{.*}} @_ZN11ManyMembersC2ERKS_( // CIR: %[[#THIS_LOAD:]] = cir.load{{.*}} %[[#]] // CIR-NEXT: %[[#THIS_I:]] = cir.get_member %[[#THIS_LOAD]][0] {name = "i"} // CIR-NEXT: %[[#OTHER_LOAD:]] = cir.load{{.*}} %[[#OTHER:]] @@ -80,13 +80,13 @@ struct ManyMembers { // CIR-NEXT: cir.return // CIR-NEXT: } -// CIR-LABEL: cir.func dso_local @_Z9forceCopyR11ManyMembers( +// CIR-LABEL: cir.func {{.*}} @_Z9forceCopyR11ManyMembers( // CIR: cir.copy void forceCopy(ManyMembers &m) { ManyMembers copy(m); } -// CIR-LABEL: cir.func dso_local @_Z6doCopyR11ManyMembers( +// CIR-LABEL: cir.func {{.*}} @_Z6doCopyR11ManyMembers( // CIR: cir.copy ManyMembers doCopy(ManyMembers &src) { return src; diff --git a/clang/test/CIR/CodeGen/ctor-alias.cpp b/clang/test/CIR/CodeGen/ctor-alias.cpp index 154f37da7a16..d6bb98a9b721 100644 --- a/clang/test/CIR/CodeGen/ctor-alias.cpp +++ b/clang/test/CIR/CodeGen/ctor-alias.cpp @@ -8,7 +8,7 @@ void t() { DummyString s4 = "yolo"; } -// CHECK: cir.func linkonce_odr @_ZN11DummyStringC2EPKc +// CHECK: cir.func {{.*}} @_ZN11DummyStringC2EPKc // CHECK-NEXT: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK-NEXT: %1 = cir.alloca !cir.ptr, !cir.ptr>, ["s", init] {alignment = 8 : i64} // CHECK-NEXT: cir.store %arg0, %0 : !cir.ptr, !cir.ptr> @@ -18,7 +18,7 @@ void t() { // CHECK-NOT: cir.fun @_ZN11DummyStringC1EPKc -// CHECK: cir.func dso_local @_Z1tv +// CHECK: cir.func {{.*}} @_Z1tv // CHECK-NEXT: %0 = cir.alloca !rec_DummyString, !cir.ptr, ["s4", init] {alignment = 1 : i64} // CHECK-NEXT: %1 = cir.get_global @".str" : !cir.ptr> // CHECK-NEXT: %2 = cir.cast array_to_ptrdecay %1 : !cir.ptr> -> !cir.ptr @@ -31,7 +31,7 @@ struct B { B::B() { } -// CHECK: cir.func dso_local @_ZN1BC2Ev(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @_ZN1BC2Ev(%arg0: !cir.ptr // CHECK: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK: cir.store %arg0, %0 : !cir.ptr, !cir.ptr> // CHECK: %1 = cir.load %0 : !cir.ptr>, !cir.ptr diff --git a/clang/test/CIR/CodeGen/ctor-member-lvalue-to-rvalue.cpp b/clang/test/CIR/CodeGen/ctor-member-lvalue-to-rvalue.cpp index c4e8cdbcad4e..cefe22f7b037 100644 --- a/clang/test/CIR/CodeGen/ctor-member-lvalue-to-rvalue.cpp +++ b/clang/test/CIR/CodeGen/ctor-member-lvalue-to-rvalue.cpp @@ -5,7 +5,7 @@ struct String { long size; String(const String &s) : size{s.size} {} -// CHECK: cir.func linkonce_odr @_ZN6StringC2ERKS_ +// CHECK: cir.func {{.*}} @_ZN6StringC2ERKS_ // CHECK: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK: %1 = cir.alloca !cir.ptr, !cir.ptr>, ["s", init, const] {alignment = 8 : i64} // CHECK: cir.store{{.*}} %arg0, %0 @@ -26,7 +26,7 @@ void foo() { String s; String s1{s}; } -// CHECK: cir.func dso_local @_Z3foov() {{.*}} { +// CHECK: cir.func {{.*}} @_Z3foov() {{.*}} { // CHECK: %0 = cir.alloca !rec_String, !cir.ptr, ["s", init] {alignment = 8 : i64} // CHECK: %1 = cir.alloca !rec_String, !cir.ptr, ["s1", init] {alignment = 8 : i64} // CHECK: cir.call @_ZN6StringC2Ev(%0) : (!cir.ptr) -> () diff --git a/clang/test/CIR/CodeGen/ctor.cpp b/clang/test/CIR/CodeGen/ctor.cpp index 08c7903ca2c0..53e454d085ec 100644 --- a/clang/test/CIR/CodeGen/ctor.cpp +++ b/clang/test/CIR/CodeGen/ctor.cpp @@ -13,20 +13,20 @@ void baz() { // CHECK: !rec_Struk = !cir.record -// CHECK: cir.func linkonce_odr @_ZN5StrukC2Ev(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @_ZN5StrukC2Ev(%arg0: !cir.ptr // CHECK-NEXT: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK-NEXT: cir.store %arg0, %0 : !cir.ptr, !cir.ptr> // CHECK-NEXT: %1 = cir.load %0 : !cir.ptr>, !cir.ptr // CHECK-NEXT: cir.return -// CHECK: cir.func linkonce_odr @_ZN5StrukC1Ev(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @_ZN5StrukC1Ev(%arg0: !cir.ptr // CHECK-NEXT: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK-NEXT: cir.store %arg0, %0 : !cir.ptr, !cir.ptr> // CHECK-NEXT: %1 = cir.load %0 : !cir.ptr>, !cir.ptr // CHECK-NEXT: cir.call @_ZN5StrukC2Ev(%1) : (!cir.ptr) -> () // CHECK-NEXT: cir.return -// CHECK: cir.func dso_local @_Z3bazv() +// CHECK: cir.func {{.*}} @_Z3bazv() // CHECK-NEXT: %0 = cir.alloca !rec_Struk, !cir.ptr, ["s", init] {alignment = 4 : i64} // CHECK-NEXT: cir.call @_ZN5StrukC1Ev(%0) : (!cir.ptr) -> () // CHECK-NEXT: cir.return diff --git a/clang/test/CIR/CodeGen/cxx-default-arg.cpp b/clang/test/CIR/CodeGen/cxx-default-arg.cpp index 24d6d9c640f5..167b8fffd787 100644 --- a/clang/test/CIR/CodeGen/cxx-default-arg.cpp +++ b/clang/test/CIR/CodeGen/cxx-default-arg.cpp @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir // RUN: FileCheck --input-file=%t.cir %s -// CHECK: cir.func private @_ZN12MyIntPointerC1EPi +// CHECK: cir.func {{.*}} @_ZN12MyIntPointerC1EPi struct MyIntPointer { MyIntPointer(int *p = nullptr); diff --git a/clang/test/CIR/CodeGen/default-methods.cpp b/clang/test/CIR/CodeGen/default-methods.cpp index 20cdfa6440b8..b2cec52a456d 100644 --- a/clang/test/CIR/CodeGen/default-methods.cpp +++ b/clang/test/CIR/CodeGen/default-methods.cpp @@ -13,7 +13,7 @@ struct S { // CIR-LABEL: cir.func linkonce_odr @_ZN1S1TaSERKS0_({{.*}} { // CIR-LABEL: cir.func linkonce_odr @_ZN1SaSERKS_( // CIR: cir.call @_ZN1S1TaSERKS0_( -// CIR-LABEL: cir.func dso_local @_Z1fR1SS0_( +// CIR-LABEL: cir.func {{.*}} @_Z1fR1SS0_( // CIR: cir.call @_ZN1SaSERKS_( // LLVM-LABEL: define linkonce_odr ptr @_ZN1S1TaSERKS0_( diff --git a/clang/test/CIR/CodeGen/defined-pure-virtual-func.cpp b/clang/test/CIR/CodeGen/defined-pure-virtual-func.cpp index 966cc1ce0a33..5a57845c2e9a 100644 --- a/clang/test/CIR/CodeGen/defined-pure-virtual-func.cpp +++ b/clang/test/CIR/CodeGen/defined-pure-virtual-func.cpp @@ -26,7 +26,7 @@ void C::pure() {} // CHECK-SAME: #cir.global_view<@__cxa_pure_virtual> : !cir.ptr]> // The base object destructor should be emitted as normal. -// CHECK-LABEL: cir.func dso_local @_ZN1CD2Ev(%arg0: !cir.ptr loc({{[^)]+}})) {{.*}} { +// CHECK-LABEL: cir.func {{.*}} @_ZN1CD2Ev(%arg0: !cir.ptr loc({{[^)]+}})) {{.*}} { // CHECK-NEXT: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK-NEXT: cir.store %arg0, %0 : !cir.ptr, !cir.ptr> // CHECK-NEXT: %1 = cir.load %0 : !cir.ptr>, !cir.ptr @@ -34,7 +34,7 @@ void C::pure() {} // CHECK-NEXT: } // The complete object destructor should trap. -// CHECK-LABEL: cir.func dso_local @_ZN1CD1Ev(%arg0: !cir.ptr loc({{[^)]+}})) {{.*}} { +// CHECK-LABEL: cir.func {{.*}} @_ZN1CD1Ev(%arg0: !cir.ptr loc({{[^)]+}})) {{.*}} { // CHECK-NEXT: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK-NEXT: cir.store %arg0, %0 : !cir.ptr, !cir.ptr> // CHECK-NEXT: %1 = cir.load %0 : !cir.ptr>, !cir.ptr @@ -42,7 +42,7 @@ void C::pure() {} // CHECK-NEXT: } // The deleting destructor should trap. -// CHECK-LABEL: cir.func dso_local @_ZN1CD0Ev(%arg0: !cir.ptr loc({{[^)]+}})) {{.*}} { +// CHECK-LABEL: cir.func {{.*}} @_ZN1CD0Ev(%arg0: !cir.ptr loc({{[^)]+}})) {{.*}} { // CHECK-NEXT: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK-NEXT: cir.store %arg0, %0 : !cir.ptr, !cir.ptr> // CHECK-NEXT: %1 = cir.load %0 : !cir.ptr>, !cir.ptr @@ -50,7 +50,7 @@ void C::pure() {} // CHECK-NEXT: } // C::pure should be emitted as normal. -// CHECK-LABEL: cir.func dso_local @_ZN1C4pureEv(%arg0: !cir.ptr loc({{[^)]+}})) {{.*}} { +// CHECK-LABEL: cir.func {{.*}} @_ZN1C4pureEv(%arg0: !cir.ptr loc({{[^)]+}})) {{.*}} { // CHECK-NEXT: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK-NEXT: cir.store %arg0, %0 : !cir.ptr, !cir.ptr> // CHECK-NEXT: %1 = cir.load %0 : !cir.ptr>, !cir.ptr diff --git a/clang/test/CIR/CodeGen/delegating-ctor.cpp b/clang/test/CIR/CodeGen/delegating-ctor.cpp index 70fdabaaae75..65184debe0f3 100644 --- a/clang/test/CIR/CodeGen/delegating-ctor.cpp +++ b/clang/test/CIR/CodeGen/delegating-ctor.cpp @@ -10,7 +10,7 @@ struct Delegating { // arguments. Delegating::Delegating() : Delegating(0) {} -// CHECK-LABEL: cir.func dso_local @_ZN10DelegatingC2Ev(%arg0: !cir.ptr {{.*}}) {{.*}} { +// CHECK-LABEL: cir.func {{.*}} @_ZN10DelegatingC2Ev(%arg0: !cir.ptr {{.*}}) {{.*}} { // CHECK-NEXT: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK-NEXT: cir.store{{.*}} %arg0, %0 : !cir.ptr, !cir.ptr> // CHECK-NEXT: %1 = cir.load %0 : !cir.ptr>, !cir.ptr @@ -30,7 +30,7 @@ struct DelegatingWithZeroing { // call to it in a lowering pass. DelegatingWithZeroing::DelegatingWithZeroing(int) : DelegatingWithZeroing() {} -// CHECK-LABEL: cir.func dso_local @_ZN21DelegatingWithZeroingC2Ei(%arg0: !cir.ptr {{.*}}, %arg1: !s32i {{.*}}) {{.*}} { +// CHECK-LABEL: cir.func {{.*}} @_ZN21DelegatingWithZeroingC2Ei(%arg0: !cir.ptr {{.*}}, %arg1: !s32i {{.*}}) {{.*}} { // CHECK-NEXT: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK-NEXT: %1 = cir.alloca !s32i, !cir.ptr, ["", init] {alignment = 4 : i64} // CHECK-NEXT: cir.store{{.*}} %arg0, %0 : !cir.ptr, !cir.ptr> diff --git a/clang/test/CIR/CodeGen/delete.cpp b/clang/test/CIR/CodeGen/delete.cpp index 11afa5fe7cdb..36d81e836fd9 100644 --- a/clang/test/CIR/CodeGen/delete.cpp +++ b/clang/test/CIR/CodeGen/delete.cpp @@ -8,7 +8,7 @@ namespace test1 { void a(A *x) { delete x; } - // CHECK: cir.func dso_local @_ZN5test11aEPNS_1AE + // CHECK: cir.func {{.*}} @_ZN5test11aEPNS_1AE // CHECK: %[[CONST:.*]] = cir.const #cir.int<4> : !u64i // CHECK: cir.call @_ZN5test11AdlEPvm({{.*}}, %[[CONST]]) @@ -35,7 +35,7 @@ namespace test3 { }; // Calling delete with a virtual destructor. -// CHECK-LABEL: cir.func dso_local @_ZN5test37destroyEPNS_1XE +// CHECK-LABEL: cir.func {{.*}} @_ZN5test37destroyEPNS_1XE // CHECK: %[[ARG_VAR:.*]] = cir.alloca !cir.ptr // CHECK: %[[ARG:.*]] = cir.load{{.*}} %[[ARG_VAR]] : !cir.ptr>, !cir.ptr // CHECK: %[[VPTR_PTR:.*]] = cir.vtable.get_vptr %[[ARG]] : !cir.ptr -> !cir.ptr diff --git a/clang/test/CIR/CodeGen/derived-to-base.cpp b/clang/test/CIR/CodeGen/derived-to-base.cpp index ab96c7f754eb..d7b43e5b14d5 100644 --- a/clang/test/CIR/CodeGen/derived-to-base.cpp +++ b/clang/test/CIR/CodeGen/derived-to-base.cpp @@ -81,7 +81,7 @@ void C3::Layer::Initialize() { // CHECK-DAG: !rec_A2Ebase = !cir.record nonnull [0] -> !cir.ptr @@ -94,7 +94,7 @@ enumy C3::Initialize() { return C2::Initialize(); } -// CHECK: cir.func dso_local @_ZN2C310InitializeEv(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @_ZN2C310InitializeEv(%arg0: !cir.ptr // CHECK: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK: cir.store %arg0, %0 : !cir.ptr, !cir.ptr> @@ -108,7 +108,7 @@ void vcall(C1 &c1) { c1.SetStuff(e, b); } -// CHECK: cir.func dso_local @_Z5vcallR2C1(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @_Z5vcallR2C1(%arg0: !cir.ptr // CHECK: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["c1", init, const] {alignment = 8 : i64} // CHECK: %1 = cir.alloca !rec_buffy, !cir.ptr, ["b"] {alignment = 8 : i64} // CHECK: %2 = cir.alloca !s32i, !cir.ptr, ["e"] {alignment = 4 : i64} @@ -138,7 +138,7 @@ class B : public A { void foo () { static_cast(*this).foo();} }; -// CHECK: cir.func linkonce_odr @_ZN1B3fooEv(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @_ZN1B3fooEv(%arg0: !cir.ptr // CHECK: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK: cir.store %arg0, %0 : !cir.ptr, !cir.ptr> // CHECK: %1 = cir.load{{.*}} deref %0 : !cir.ptr>, !cir.ptr @@ -165,7 +165,7 @@ struct C : public A { C(int& x) : ref(x) {} }; -// CHECK: cir.func dso_local @_Z8test_refv() +// CHECK: cir.func {{.*}} @_Z8test_refv() // CHECK: cir.get_member %2[1] {name = "ref"} int test_ref() { int x = 42; diff --git a/clang/test/CIR/CodeGen/dtors-scopes.cpp b/clang/test/CIR/CodeGen/dtors-scopes.cpp index 9ce961f7262e..21b27d89aadc 100644 --- a/clang/test/CIR/CodeGen/dtors-scopes.cpp +++ b/clang/test/CIR/CodeGen/dtors-scopes.cpp @@ -15,21 +15,21 @@ void dtor1() { printf("Done\n"); } -// CHECK: cir.func dso_local @_Z5dtor1v() +// CHECK: cir.func {{.*}} @_Z5dtor1v() // CHECK: cir.scope { // CHECK: %4 = cir.alloca !rec_C, !cir.ptr, ["c", init] {alignment = 1 : i64} // CHECK: cir.call @_ZN1CC2Ev(%4) : (!cir.ptr) -> () // CHECK: cir.call @_ZN1CD2Ev(%4) : (!cir.ptr) -> () // CHECK: } -// DTOR_BODY: cir.func linkonce_odr @_ZN1CD2Ev{{.*}}{ +// DTOR_BODY: cir.func {{.*}} @_ZN1CD2Ev{{.*}}{ // DTOR_BODY: %2 = cir.get_global @printf // DTOR_BODY: %3 = cir.get_global @".str.2" // DTOR_BODY: %4 = cir.cast array_to_ptrdecay %3 // DTOR_BODY: %5 = cir.call @printf(%4) // DTOR_BODY: cir.return -// DTOR_BODY: cir.func linkonce_odr @_ZN1CD1Ev(%arg0: !cir.ptr +// DTOR_BODY: cir.func {{.*}} @_ZN1CD1Ev(%arg0: !cir.ptr // DTOR_BODY: cir.call @_ZN1CD2Ev // DTOR_BODY: cir.return diff --git a/clang/test/CIR/CodeGen/dtors.cpp b/clang/test/CIR/CodeGen/dtors.cpp index be738961378d..7c0947dc2b28 100644 --- a/clang/test/CIR/CodeGen/dtors.cpp +++ b/clang/test/CIR/CodeGen/dtors.cpp @@ -41,7 +41,7 @@ class B : public A // Class B // CHECK: ![[ClassB:rec_.*]] = !cir.record -// CHECK: cir.func dso_local @_Z4bluev() +// CHECK: cir.func {{.*}} @_Z4bluev() // CHECK: %0 = cir.alloca !rec_PSEvent, !cir.ptr, ["p", init] {alignment = 8 : i64} // CHECK: %1 = cir.const #cir.int<1> : !s32i // CHECK: %2 = cir.get_global @".str" : !cir.ptr> @@ -59,7 +59,7 @@ struct X { bool foo(const X &) { return false; } bool bar() { return foo(1) || foo(2); } -// CHECK: cir.func dso_local @_Z3barv() +// CHECK: cir.func {{.*}} @_Z3barv() // CHECK: %[[V0:.*]] = cir.alloca !cir.bool, !cir.ptr, ["__retval"] {alignment = 1 : i64} // CHECK: cir.scope { // CHECK: %[[V2:.*]] = cir.alloca !rec_X, !cir.ptr, ["ref.tmp0"] {alignment = 4 : i64} @@ -93,7 +93,7 @@ bool bar() { return foo(1) || foo(2); } bool bar2() { return foo(1) && foo(2); } -// CHECK: cir.func dso_local @_Z4bar2v() +// CHECK: cir.func {{.*}} @_Z4bar2v() // CHECK: cir.alloca !rec_X, !cir.ptr // CHECK: {{.*}} = cir.ternary({{.*}}, true { // CHECK: cir.alloca !rec_X, !cir.ptr @@ -110,30 +110,30 @@ void pseudo_dtor() { I x = 10; x.I::~I(); } -// CHECK: cir.func dso_local @_Z11pseudo_dtorv() +// CHECK: cir.func {{.*}} @_Z11pseudo_dtorv() // CHECK: %[[INT:.*]] = cir.alloca !s32i, !cir.ptr // CHECK: %[[TEN:.*]] = cir.const #cir.int<10> : !s32i // CHECK: cir.store{{.*}} %[[TEN]], %[[INT]] : !s32i, !cir.ptr // CHECK: cir.return // @B::~B() #1 definition call into base @A::~A() -// CHECK: cir.func linkonce_odr @_ZN1BD2Ev{{.*}}{ +// CHECK: cir.func {{.*}} @_ZN1BD2Ev{{.*}}{ // CHECK: cir.call @_ZN1AD2Ev( // void foo() -// CHECK: cir.func dso_local @_Z3foov() +// CHECK: cir.func {{.*}} @_Z3foov() // CHECK: cir.scope { // CHECK: cir.call @_ZN1BC2Ev(%0) : (!cir.ptr) -> () // CHECK: cir.call @_ZN1BD2Ev(%0) : (!cir.ptr) -> () // operator delete(void*) declaration -// CHECK: cir.func private @_ZdlPvm(!cir.ptr, !u64i) +// CHECK: cir.func {{.*}} @_ZdlPvm(!cir.ptr, !u64i) // B dtor => @B::~B() #2 // Calls dtor #1 // Calls operator delete // -// CHECK: cir.func linkonce_odr @_ZN1BD0Ev(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @_ZN1BD0Ev(%arg0: !cir.ptr // CHECK: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK: cir.store %arg0, %0 : !cir.ptr, !cir.ptr> // CHECK: %1 = cir.load{{.*}} %0 : !cir.ptr>, !cir.ptr @@ -173,8 +173,8 @@ class G : F { int j; void m() { G l(j); } -// CHECK: cir.func private @_ZN1G1kE2A2(!cir.ptr, !rec_A2) -> !s64i -// CHECK: cir.func linkonce_odr @_ZN1G1iEv(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @_ZN1G1kE2A2(!cir.ptr, !rec_A2) -> !s64i +// CHECK: cir.func {{.*}} @_ZN1G1iEv(%arg0: !cir.ptr // CHECK: %[[V0:.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK: %[[V1:.*]] = cir.alloca !s64i, !cir.ptr, ["__retval"] {alignment = 8 : i64} // CHECK: cir.store %arg0, %[[V0]] : !cir.ptr, !cir.ptr> diff --git a/clang/test/CIR/CodeGen/dynamic-cast-relative-layout.cpp b/clang/test/CIR/CodeGen/dynamic-cast-relative-layout.cpp index d40dfdd2f741..be5c5bf54911 100644 --- a/clang/test/CIR/CodeGen/dynamic-cast-relative-layout.cpp +++ b/clang/test/CIR/CodeGen/dynamic-cast-relative-layout.cpp @@ -11,11 +11,11 @@ void *ptr_cast_to_complete(Base *ptr) { return dynamic_cast(ptr); } -// BEFORE: cir.func dso_local @_Z20ptr_cast_to_completeP4Base +// BEFORE: cir.func {{.*}} @_Z20ptr_cast_to_completeP4Base // BEFORE: %{{.+}} = cir.dyn_cast ptr relative_layout %{{.+}} : !cir.ptr -> !cir.ptr // BEFORE: } -// AFTER: cir.func dso_local @_Z20ptr_cast_to_completeP4Base +// AFTER: cir.func {{.*}} @_Z20ptr_cast_to_completeP4Base // AFTER: %[[#SRC:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr // AFTER-NEXT: %[[#SRC_IS_NOT_NULL:]] = cir.cast ptr_to_bool %[[#SRC]] : !cir.ptr -> !cir.bool // AFTER-NEXT: %{{.+}} = cir.ternary(%[[#SRC_IS_NOT_NULL]], true { diff --git a/clang/test/CIR/CodeGen/dynamic-cast.cpp b/clang/test/CIR/CodeGen/dynamic-cast.cpp index 05a0d21413ef..dd2e7eacd7dd 100644 --- a/clang/test/CIR/CodeGen/dynamic-cast.cpp +++ b/clang/test/CIR/CodeGen/dynamic-cast.cpp @@ -17,11 +17,11 @@ Derived *ptr_cast(Base *b) { return dynamic_cast(b); } -// BEFORE: cir.func dso_local @_Z8ptr_castP4Base +// BEFORE: cir.func {{.*}} @_Z8ptr_castP4Base // BEFORE: %{{.+}} = cir.dyn_cast ptr %{{.+}} : !cir.ptr -> !cir.ptr #dyn_cast_info__ZTI4Base__ZTI7Derived // BEFORE: } -// AFTER: cir.func dso_local @_Z8ptr_castP4Base +// AFTER: cir.func {{.*}} @_Z8ptr_castP4Base // AFTER: %[[#SRC:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr // AFTER-NEXT: %[[#SRC_IS_NOT_NULL:]] = cir.cast ptr_to_bool %[[#SRC]] : !cir.ptr -> !cir.bool // AFTER-NEXT: %{{.+}} = cir.ternary(%[[#SRC_IS_NOT_NULL]], true { @@ -42,11 +42,11 @@ Derived &ref_cast(Base &b) { return dynamic_cast(b); } -// BEFORE: cir.func dso_local @_Z8ref_castR4Base +// BEFORE: cir.func {{.*}} @_Z8ref_castR4Base // BEFORE: %{{.+}} = cir.dyn_cast ref %{{.+}} : !cir.ptr -> !cir.ptr #dyn_cast_info__ZTI4Base__ZTI7Derived // BEFORE: } -// AFTER: cir.func dso_local @_Z8ref_castR4Base +// AFTER: cir.func {{.*}} @_Z8ref_castR4Base // AFTER: %[[#SRC_VOID_PTR:]] = cir.cast bitcast %{{.+}} : !cir.ptr -> !cir.ptr // AFTER-NEXT: %[[#SRC_RTTI:]] = cir.const #cir.global_view<@_ZTI4Base> : !cir.ptr // AFTER-NEXT: %[[#DEST_RTTI:]] = cir.const #cir.global_view<@_ZTI7Derived> : !cir.ptr @@ -65,11 +65,11 @@ void *ptr_cast_to_complete(Base *ptr) { return dynamic_cast(ptr); } -// BEFORE: cir.func dso_local @_Z20ptr_cast_to_completeP4Base +// BEFORE: cir.func {{.*}} @_Z20ptr_cast_to_completeP4Base // BEFORE: %{{.+}} = cir.dyn_cast ptr %{{.+}} : !cir.ptr -> !cir.ptr // BEFORE: } -// AFTER: cir.func dso_local @_Z20ptr_cast_to_completeP4Base +// AFTER: cir.func {{.*}} @_Z20ptr_cast_to_completeP4Base // AFTER: %[[#SRC:]] = cir.load{{.*}} %{{.+}} : !cir.ptr>, !cir.ptr // AFTER-NEXT: %[[#SRC_IS_NOT_NULL:]] = cir.cast ptr_to_bool %[[#SRC]] : !cir.ptr -> !cir.bool // AFTER-NEXT: %{{.+}} = cir.ternary(%[[#SRC_IS_NOT_NULL]], true { diff --git a/clang/test/CIR/CodeGen/dynamic-cast.mlir b/clang/test/CIR/CodeGen/dynamic-cast.mlir new file mode 100644 index 000000000000..83193bc1a4bd --- /dev/null +++ b/clang/test/CIR/CodeGen/dynamic-cast.mlir @@ -0,0 +1,123 @@ +!rec_Base = !cir.record +!s64i = !cir.int +!s8i = !cir.int +!u8i = !cir.int +!void = !cir.void +#loc5 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":16:19) +#loc6 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":16:25) +#loc12 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":41:19) +#loc13 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":41:25) +#loc21 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":64:28) +#loc22 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":64:34) +!rec_Derived = !cir.record +#loc30 = loc(fused[#loc5, #loc6]) +#loc33 = loc(fused[#loc12, #loc13]) +#loc37 = loc(fused[#loc21, #loc22]) +!rec_anon_struct = !cir.record, !cir.ptr, !cir.ptr}> +module @"/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp" attributes {cir.lang = #cir.lang, cir.sob = #cir.signed_overflow_behavior, cir.triple = "x86_64-unknown-linux-gnu", cir.type_size_info = #cir.type_size_info, dlti.dl_spec = #dlti.dl_spec = dense<32> : vector<4xi64>, !llvm.ptr<271> = dense<32> : vector<4xi64>, !llvm.ptr<272> = dense<64> : vector<4xi64>, i64 = dense<64> : vector<2xi64>, i128 = dense<128> : vector<2xi64>, f80 = dense<128> : vector<2xi64>, !llvm.ptr = dense<64> : vector<4xi64>, i1 = dense<8> : vector<2xi64>, i8 = dense<8> : vector<2xi64>, i16 = dense<16> : vector<2xi64>, i32 = dense<32> : vector<2xi64>, f16 = dense<16> : vector<2xi64>, f64 = dense<64> : vector<2xi64>, f128 = dense<128> : vector<2xi64>, "dlti.endianness" = "little", "dlti.mangling_mode" = "e", "dlti.legal_int_widths" = array, "dlti.stack_alignment" = 128 : i64>} { + cir.global "private" constant external @_ZTI4Base : !cir.ptr loc(#loc28) + cir.global "private" external @_ZTVN10__cxxabiv120__si_class_type_infoE : !cir.ptr> loc(#loc28) + cir.global linkonce_odr comdat @_ZTS7Derived = #cir.const_array<"7Derived" : !cir.array> : !cir.array {alignment = 1 : i64} loc(#loc28) + cir.global constant external @_ZTI7Derived = #cir.typeinfo<{#cir.global_view<@_ZTVN10__cxxabiv120__si_class_type_infoE, [2 : i32]> : !cir.ptr, #cir.global_view<@_ZTS7Derived> : !cir.ptr, #cir.global_view<@_ZTI4Base> : !cir.ptr}> : !rec_anon_struct {alignment = 8 : i64} loc(#loc28) + cir.func private @__dynamic_cast(!cir.ptr, !cir.ptr, !cir.ptr, !s64i) -> !cir.ptr loc(#loc) + cir.func private @__cxa_bad_cast() loc(#loc) + cir.func dso_local @_Z8ptr_castP4Base(%arg0: !cir.ptr loc(fused[#loc5, #loc6])) -> !cir.ptr {inline = #cir.inline, nothrow = #cir.nothrow, optnone = #cir.optnone} { + %0 = cir.alloca !cir.ptr, !cir.ptr>, ["b", init] {alignment = 8 : i64} loc(#loc30) + %1 = cir.alloca !cir.ptr, !cir.ptr>, ["__retval"] {alignment = 8 : i64} loc(#loc4) + cir.store %arg0, %0 : !cir.ptr, !cir.ptr> loc(#loc7) + %2 = cir.load align(8) %0 : !cir.ptr>, !cir.ptr loc(#loc8) + %3 = cir.cast ptr_to_bool %2 : !cir.ptr -> !cir.bool loc(#loc8) + %4 = cir.ternary(%3, true { + %6 = cir.cast bitcast %2 : !cir.ptr -> !cir.ptr loc(#loc8) + %7 = cir.const #cir.global_view<@_ZTI4Base> : !cir.ptr loc(#loc28) + %8 = cir.const #cir.global_view<@_ZTI7Derived> : !cir.ptr loc(#loc28) + %9 = cir.const #cir.int<0> : !s64i loc(#loc28) + %10 = cir.call @__dynamic_cast(%6, %7, %8, %9) : (!cir.ptr, !cir.ptr, !cir.ptr, !s64i) -> !cir.ptr loc(#loc28) + %11 = cir.cast bitcast %10 : !cir.ptr -> !cir.ptr loc(#loc28) + cir.yield %11 : !cir.ptr loc(#loc28) + }, false { + %6 = cir.const #cir.ptr : !cir.ptr loc(#loc28) + cir.yield %6 : !cir.ptr loc(#loc28) + }) : (!cir.bool) -> !cir.ptr loc(#loc28) + cir.store %4, %1 : !cir.ptr, !cir.ptr> loc(#loc31) + %5 = cir.load %1 : !cir.ptr>, !cir.ptr loc(#loc31) + cir.return %5 : !cir.ptr loc(#loc31) + } loc(#loc29) + cir.func dso_local @_Z8ref_castR4Base(%arg0: !cir.ptr loc(fused[#loc12, #loc13])) -> !cir.ptr {inline = #cir.inline, nothrow = #cir.nothrow, optnone = #cir.optnone} { + %0 = cir.alloca !cir.ptr, !cir.ptr>, ["b", init, const] {alignment = 8 : i64} loc(#loc33) + %1 = cir.alloca !cir.ptr, !cir.ptr>, ["__retval"] {alignment = 8 : i64} loc(#loc11) + cir.store %arg0, %0 : !cir.ptr, !cir.ptr> loc(#loc14) + %2 = cir.load %0 : !cir.ptr>, !cir.ptr loc(#loc15) + %3 = cir.cast bitcast %2 : !cir.ptr -> !cir.ptr loc(#loc15) + %4 = cir.const #cir.global_view<@_ZTI4Base> : !cir.ptr loc(#loc34) + %5 = cir.const #cir.global_view<@_ZTI7Derived> : !cir.ptr loc(#loc34) + %6 = cir.const #cir.int<0> : !s64i loc(#loc34) + %7 = cir.call @__dynamic_cast(%3, %4, %5, %6) : (!cir.ptr, !cir.ptr, !cir.ptr, !s64i) -> !cir.ptr loc(#loc34) + %8 = cir.cast ptr_to_bool %7 : !cir.ptr -> !cir.bool loc(#loc34) + %9 = cir.unary(not, %8) : !cir.bool, !cir.bool loc(#loc34) + cir.if %9 { + cir.call @__cxa_bad_cast() : () -> () loc(#loc34) + cir.unreachable loc(#loc34) + } loc(#loc34) + %10 = cir.cast bitcast %7 : !cir.ptr -> !cir.ptr loc(#loc34) + cir.store align(8) %10, %1 : !cir.ptr, !cir.ptr> loc(#loc35) + %11 = cir.load %1 : !cir.ptr>, !cir.ptr loc(#loc35) + cir.return %11 : !cir.ptr loc(#loc35) + } loc(#loc32) + cir.func dso_local @_Z20ptr_cast_to_completeP4Base(%arg0: !cir.ptr loc(fused[#loc21, #loc22])) -> !cir.ptr {inline = #cir.inline, nothrow = #cir.nothrow, optnone = #cir.optnone} { + %0 = cir.alloca !cir.ptr, !cir.ptr>, ["ptr", init] {alignment = 8 : i64} loc(#loc37) + %1 = cir.alloca !cir.ptr, !cir.ptr>, ["__retval"] {alignment = 8 : i64} loc(#loc20) + cir.store %arg0, %0 : !cir.ptr, !cir.ptr> loc(#loc23) + %2 = cir.load align(8) %0 : !cir.ptr>, !cir.ptr loc(#loc24) + %3 = cir.cast ptr_to_bool %2 : !cir.ptr -> !cir.bool loc(#loc24) + %4 = cir.ternary(%3, true { + %6 = cir.vtable.get_vptr %2 : !cir.ptr -> !cir.ptr loc(#loc38) + %7 = cir.load %6 : !cir.ptr, !cir.vptr loc(#loc38) + %8 = cir.cast bitcast %7 : !cir.vptr -> !cir.ptr loc(#loc38) + %9 = cir.const #cir.int<-2> : !s64i loc(#loc38) + %10 = cir.ptr_stride %8, %9 : (!cir.ptr, !s64i) -> !cir.ptr loc(#loc38) + %11 = cir.load align(8) %10 : !cir.ptr, !s64i loc(#loc38) + %12 = cir.cast bitcast %2 : !cir.ptr -> !cir.ptr loc(#loc24) + %13 = cir.ptr_stride %12, %11 : (!cir.ptr, !s64i) -> !cir.ptr loc(#loc38) + %14 = cir.cast bitcast %13 : !cir.ptr -> !cir.ptr loc(#loc38) + cir.yield %14 : !cir.ptr loc(#loc38) + }, false { + %6 = cir.const #cir.ptr : !cir.ptr loc(#loc38) + cir.yield %6 : !cir.ptr loc(#loc38) + }) : (!cir.bool) -> !cir.ptr loc(#loc38) + cir.store %4, %1 : !cir.ptr, !cir.ptr> loc(#loc39) + %5 = cir.load %1 : !cir.ptr>, !cir.ptr loc(#loc39) + cir.return %5 : !cir.ptr loc(#loc39) + } loc(#loc36) +} loc(#loc) +#loc = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":0:0) +#loc1 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":17:10) +#loc2 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":17:35) +#loc3 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":16:1) +#loc4 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":18:1) +#loc7 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":16:28) +#loc8 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":17:34) +#loc9 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":17:3) +#loc10 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":41:1) +#loc11 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":43:1) +#loc14 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":41:28) +#loc15 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":42:34) +#loc16 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":42:10) +#loc17 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":42:35) +#loc18 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":42:3) +#loc19 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":64:1) +#loc20 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":66:1) +#loc23 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":64:39) +#loc24 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":65:31) +#loc25 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":65:10) +#loc26 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":65:34) +#loc27 = loc("/Users/henrichlauko/src/clangir/clang/test/CIR/CodeGen/dynamic-cast.cpp":65:3) +#loc28 = loc(fused[#loc1, #loc2]) +#loc29 = loc(fused[#loc3, #loc4]) +#loc31 = loc(fused[#loc9, #loc2]) +#loc32 = loc(fused[#loc10, #loc11]) +#loc34 = loc(fused[#loc16, #loc17]) +#loc35 = loc(fused[#loc18, #loc17]) +#loc36 = loc(fused[#loc19, #loc20]) +#loc38 = loc(fused[#loc25, #loc26]) +#loc39 = loc(fused[#loc27, #loc26]) diff --git a/clang/test/CIR/CodeGen/evaluate-expr.c b/clang/test/CIR/CodeGen/evaluate-expr.c index deb8fac16bd5..e40dd863ee43 100644 --- a/clang/test/CIR/CodeGen/evaluate-expr.c +++ b/clang/test/CIR/CodeGen/evaluate-expr.c @@ -8,7 +8,7 @@ void foo() { if ((g == 1) || (g == 1)) return; } -// CHECK: cir.func no_proto dso_local @foo() +// CHECK: cir.func {{.*}} @foo() // CHECK: cir.scope { // CHECK: [[ZERO:%.*]] = cir.const #cir.int<0> : !s32i // CHECK: [[FALSE:%.*]] = cir.cast int_to_bool [[ZERO:%.*]] : !s32i -> !cir.bool @@ -23,7 +23,7 @@ static const S s = {0}; void bar() { int a = s.x; } -// CHECK: cir.func no_proto dso_local @bar() +// CHECK: cir.func {{.*}} @bar() // CHECK: [[ALLOC:%.*]] = cir.alloca !s32i, !cir.ptr, ["a", init] {alignment = 4 : i64} // CHECK: {{%.*}} = cir.get_global @s : !cir.ptr // CHECK: [[CONST:%.*]] = cir.const #cir.int<0> : !s32i diff --git a/clang/test/CIR/CodeGen/expressions.cpp b/clang/test/CIR/CodeGen/expressions.cpp index 7324c1357f8a..eafdb2289e20 100644 --- a/clang/test/CIR/CodeGen/expressions.cpp +++ b/clang/test/CIR/CodeGen/expressions.cpp @@ -2,7 +2,7 @@ // RUN: FileCheck --input-file=%t.cir %s void test(int a) { -// CHECK: cir.func dso_local @{{.+}}test +// CHECK: cir.func {{.*}} @{{.+}}test // Should generate LValue parenthesis expression. (a) = 1; diff --git a/clang/test/CIR/CodeGen/fixedpoint-literal.c b/clang/test/CIR/CodeGen/fixedpoint-literal.c index 952c541e3c29..3f914bc9adfd 100644 --- a/clang/test/CIR/CodeGen/fixedpoint-literal.c +++ b/clang/test/CIR/CodeGen/fixedpoint-literal.c @@ -3,7 +3,7 @@ // Test basic fixed-point literals void test_short_fract() { - // CHECK: cir.func {{.*}}@test_short_fract + // CHECK: cir.func{{.*}} @test_short_fract short _Fract sf = 0.5hr; // CHECK: %{{.*}} = cir.const #cir.int<64> : !s8i @@ -12,7 +12,7 @@ void test_short_fract() { } void test_fract() { - // CHECK: cir.func {{.*}}@test_fract + // CHECK: cir.func{{.*}} @test_fract _Fract f = 0.5r; // CHECK: %{{.*}} = cir.const #cir.int<16384> : !s16i @@ -21,19 +21,19 @@ void test_fract() { } void test_long_fract() { - // CHECK: cir.func {{.*}}@test_long_fract + // CHECK: cir.func{{.*}} @test_long_fract long _Fract lf = 0.5lr; // CHECK: %{{.*}} = cir.const #cir.int<1073741824> : !s32i } void test_accum() { - // CHECK: cir.func {{.*}}@test_accum + // CHECK: cir.func{{.*}} @test_accum short _Accum sa = 0.5hk; // CHECK: %{{.*}} = cir.const #cir.int<64> : !s16i } void test_negative() { - // CHECK: cir.func {{.*}}@test_negative + // CHECK: cir.func{{.*}} @test_negative short _Fract sf = -0.5hr; // CHECK: %{{.*}} = cir.const #cir.int<64> : !s8i // CHECK: %{{.*}} = cir.unary(minus, %{{.*}}) : !s8i, !s8i diff --git a/clang/test/CIR/CodeGen/fullexpr.cpp b/clang/test/CIR/CodeGen/fullexpr.cpp index 8346369c5add..128ad6a54aae 100644 --- a/clang/test/CIR/CodeGen/fullexpr.cpp +++ b/clang/test/CIR/CodeGen/fullexpr.cpp @@ -13,7 +13,7 @@ int go1() { return x; } -// CHECK: cir.func dso_local @_Z3go1v() -> !s32i +// CHECK: cir.func {{.*}} @_Z3go1v() -> !s32i // CHECK: %[[#XAddr:]] = cir.alloca !s32i, !cir.ptr, ["x", init] {alignment = 4 : i64} // CHECK: %[[#RVal:]] = cir.scope { // CHECK-NEXT: %[[#TmpAddr:]] = cir.alloca !s32i, !cir.ptr, ["ref.tmp0", init] {alignment = 4 : i64} @@ -24,7 +24,7 @@ int go1() { // CHECK-NEXT: } // CHECK-NEXT: cir.store{{.*}} %[[#RVal]], %[[#XAddr]] : !s32i, !cir.ptr -// FLAT: cir.func dso_local @_Z3go1v() -> !s32i +// FLAT: cir.func {{.*}} @_Z3go1v() -> !s32i // FLAT: %[[#TmpAddr:]] = cir.alloca !s32i, !cir.ptr, ["ref.tmp0", init] {alignment = 4 : i64} // FLAT: %[[#XAddr:]] = cir.alloca !s32i, !cir.ptr, ["x", init] {alignment = 4 : i64} // FLAT: cir.br ^[[before_body:.*]]{{ loc.*}} diff --git a/clang/test/CIR/CodeGen/fun-ptr.c b/clang/test/CIR/CodeGen/fun-ptr.c index d7f28525e846..0718eeb33e61 100644 --- a/clang/test/CIR/CodeGen/fun-ptr.c +++ b/clang/test/CIR/CodeGen/fun-ptr.c @@ -24,7 +24,7 @@ int extract_a(Data* d) { return d->a; } -// CIR: cir.func dso_local {{@.*foo.*}}(%arg0: !cir.ptr +// CIR: cir.func {{.*}} {{@.*foo.*}}(%arg0: !cir.ptr // CIR: [[TMP0:%.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["d", init] // CIR: [[TMP1:%.*]] = cir.alloca !s32i, !cir.ptr, ["__retval"] // CIR: [[TMP2:%.*]] = cir.alloca !cir.ptr) -> !s32i>>, !cir.ptr) -> !s32i>>>, ["f", init] @@ -56,7 +56,7 @@ int foo(Data* d) { } // CIR: cir.func private {{@.*test.*}}() -> !cir.ptr> -// CIR: cir.func dso_local {{@.*bar.*}}() +// CIR: cir.func {{.*}} {{@.*bar.*}}() // CIR: [[RET:%.*]] = cir.call {{@.*test.*}}() : () -> !cir.ptr> // CIR: cir.call [[RET]]() : (!cir.ptr>) -> () // CIR: cir.return diff --git a/clang/test/CIR/CodeGen/func_dsolocal_pie.c b/clang/test/CIR/CodeGen/func_dsolocal_pie.c index f3e524ce2fdb..35ba7e533894 100644 --- a/clang/test/CIR/CodeGen/func_dsolocal_pie.c +++ b/clang/test/CIR/CodeGen/func_dsolocal_pie.c @@ -12,12 +12,12 @@ int main() { return 0; } -// CIR: cir.func dso_local @foo(%arg0: !s32i +// CIR: cir.func {{.*}} @foo(%arg0: !s32i // CIR-NEXT: [[TMP0:%.*]] = cir.alloca !s32i, !cir.ptr, ["i", init] {alignment = 4 : i64} // CIR-NEXT: cir.store %arg0, [[TMP0]] : !s32i, !cir.ptr // CIR-NEXT: cir.return -// CIR: cir.func no_proto dso_local @main() -> !s32i +// CIR: cir.func {{.*}}dso_local{{.*}} @main() -> !s32i // CIR: [[TMP1:%.*]] = cir.const #cir.int<2> : !s32i // CIR: cir.call @foo([[TMP1]]) : (!s32i) -> () diff --git a/clang/test/CIR/CodeGen/function-attrs.cpp b/clang/test/CIR/CodeGen/function-attrs.cpp index e969113f4e96..0114f34ff86e 100644 --- a/clang/test/CIR/CodeGen/function-attrs.cpp +++ b/clang/test/CIR/CodeGen/function-attrs.cpp @@ -29,9 +29,9 @@ int s3(int a, int b) { // CIR: #fn_attr2 = #cir, nothrow = #cir.nothrow})> // CIR: cir.func linkonce_odr @_Z2s0ii(%arg0:{{.*}}, %arg1:{{.*}} -> {{.*}} extra(#fn_attr) -// CIR: cir.func dso_local @_Z2s1ii(%arg0:{{.*}}, %arg1:{{.*}} -> {{.*}} extra(#fn_attr1) -// CIR: cir.func dso_local @_Z2s2ii(%arg0:{{.*}}, %arg1:{{.*}} -> {{.*}} extra(#fn_attr2) -// CIR: cir.func dso_local @_Z2s3ii(%arg0:{{.*}}, %arg1:{{.*}} -> {{.*}} { +// CIR: cir.func {{.*}} @_Z2s1ii(%arg0:{{.*}}, %arg1:{{.*}} -> {{.*}} extra(#fn_attr1) +// CIR: cir.func {{.*}} @_Z2s2ii(%arg0:{{.*}}, %arg1:{{.*}} -> {{.*}} extra(#fn_attr2) +// CIR: cir.func {{.*}} @_Z2s3ii(%arg0:{{.*}}, %arg1:{{.*}} -> {{.*}} { // LLVM: define dso_local i32 @_Z2s1ii(i32 %0, i32 %1) {{.*}} #[[#ATTR1:]] // LLVM: define dso_local i32 @_Z2s2ii(i32 %0, i32 %1) {{.*}} #[[#ATTR2:]] diff --git a/clang/test/CIR/CodeGen/function-to-pointer-decay.c b/clang/test/CIR/CodeGen/function-to-pointer-decay.c index 781d1fba705f..5b691c3395ff 100644 --- a/clang/test/CIR/CodeGen/function-to-pointer-decay.c +++ b/clang/test/CIR/CodeGen/function-to-pointer-decay.c @@ -6,7 +6,7 @@ void test_call_lvalue_cast() { (*(void (*)(int))f)(42); } -// CHECK: cir.func {{.*}}@test_call_lvalue_cast() +// CHECK: cir.func{{.*}} @test_call_lvalue_cast() // CHECK: [[F:%.+]] = cir.get_global @f // CHECK: [[CASTED:%.+]] = cir.cast bitcast [[F]] // CHECK: [[CONST:%.+]] = cir.const #cir.int<42> diff --git a/clang/test/CIR/CodeGen/global-ctor-dtor.cpp b/clang/test/CIR/CodeGen/global-ctor-dtor.cpp index 3aa57f23934f..dc8a55e3422e 100644 --- a/clang/test/CIR/CodeGen/global-ctor-dtor.cpp +++ b/clang/test/CIR/CodeGen/global-ctor-dtor.cpp @@ -11,28 +11,28 @@ void foo(void) { bar(); } -// BEFORE: cir.func dso_local @_Z3foov() global_ctor +// BEFORE: cir.func {{.*}} @_Z3foov() global_ctor void foo2(void) __attribute__((constructor(777))); void foo2(void) { bar(); } -// BEFORE: cir.func dso_local @_Z4foo2v() global_ctor(777) +// BEFORE: cir.func {{.*}} @_Z4foo2v() global_ctor(777) void foo3(void) __attribute__((destructor)); void foo3(void) { bar(); } -// BEFORE: cir.func dso_local @_Z4foo3v() global_dtor +// BEFORE: cir.func {{.*}} @_Z4foo3v() global_dtor void foo4(void) __attribute__((destructor(789))); void foo4(void) { bar(); } -// BEFORE: cir.func dso_local @_Z4foo4v() global_dtor(789) +// BEFORE: cir.func {{.*}} @_Z4foo4v() global_dtor(789) // AFTER: module @{{.*}} attributes {cir.global_ctors = [#cir.global_ctor<"_Z3foov", 65535>, #cir.global_ctor<"_Z4foo2v", 777>], cir.global_dtors = [#cir.global_dtor<"_Z4foo3v", 65535>, #cir.global_dtor<"_Z4foo4v", 789>] // LLVM: @llvm.global_ctors = appending constant [2 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @_Z3foov, ptr null }, { i32, ptr, ptr } { i32 777, ptr @_Z4foo2v, ptr null }] diff --git a/clang/test/CIR/CodeGen/globals.cpp b/clang/test/CIR/CodeGen/globals.cpp index c52101cef60d..4a9912136e47 100644 --- a/clang/test/CIR/CodeGen/globals.cpp +++ b/clang/test/CIR/CodeGen/globals.cpp @@ -61,13 +61,13 @@ int use_func() { return func(); } // CHECK-NEXT: cir.global external @s2 = #cir.global_view<@".str"> : !cir.ptr -// CHECK: cir.func dso_local @_Z10use_globalv() +// CHECK: cir.func {{.*}} @_Z10use_globalv() // CHECK-NEXT: %0 = cir.alloca !s32i, !cir.ptr, ["li", init] {alignment = 4 : i64} // CHECK-NEXT: %1 = cir.get_global @a : !cir.ptr // CHECK-NEXT: %2 = cir.load{{.*}} %1 : !cir.ptr, !s32i // CHECK-NEXT: cir.store{{.*}} %2, %0 : !s32i, !cir.ptr -// CHECK: cir.func dso_local @_Z17use_global_stringv() +// CHECK: cir.func {{.*}} @_Z17use_global_stringv() // CHECK-NEXT: %0 = cir.alloca !u8i, !cir.ptr, ["c", init] {alignment = 1 : i64} // CHECK-NEXT: %1 = cir.get_global @s2 : !cir.ptr> // CHECK-NEXT: %2 = cir.load{{.*}} %1 : !cir.ptr>, !cir.ptr @@ -78,14 +78,14 @@ int use_func() { return func(); } // CHECK-NEXT: cir.store{{.*}} %6, %0 : !u8i, !cir.ptr // CHECK-NEXT: cir.return -// CHECK: cir.func linkonce_odr @_Z4funcIiET_v() -> !s32i +// CHECK: cir.func {{.*}} @_Z4funcIiET_v() -> !s32i // CHECK-NEXT: %0 = cir.alloca !s32i, !cir.ptr, ["__retval"] {alignment = 4 : i64} // CHECK-NEXT: %1 = cir.const #cir.int<0> : !s32i // CHECK-NEXT: cir.store{{.*}} %1, %0 : !s32i, !cir.ptr // CHECK-NEXT: %2 = cir.load{{.*}} %0 : !cir.ptr, !s32i // CHECK-NEXT: cir.return %2 : !s32i // CHECK-NEXT: } -// CHECK-NEXT: cir.func dso_local @_Z8use_funcv() -> !s32i +// CHECK-NEXT: cir.func {{.*}} @_Z8use_funcv() -> !s32i // CHECK-NEXT: %0 = cir.alloca !s32i, !cir.ptr, ["__retval"] {alignment = 4 : i64} // CHECK-NEXT: %1 = cir.call @_Z4funcIiET_v() : () -> !s32i // CHECK-NEXT: cir.store{{.*}} %1, %0 : !s32i, !cir.ptr @@ -106,7 +106,7 @@ long long ll[] = {999999999, 0, 0, 0}; // CHECK: cir.global external @ll = #cir.const_array<[#cir.int<999999999> : !s64i, #cir.int<0> : !s64i, #cir.int<0> : !s64i, #cir.int<0> : !s64i]> : !cir.array void get_globals() { - // CHECK: cir.func dso_local @_Z11get_globalsv() + // CHECK: cir.func {{.*}} @_Z11get_globalsv() char *s = string; // CHECK: %[[RES:[0-9]+]] = cir.get_global @string : !cir.ptr> // CHECK: %{{[0-9]+}} = cir.cast array_to_ptrdecay %[[RES]] : !cir.ptr> -> !cir.ptr @@ -128,7 +128,7 @@ void get_globals() { extern int externVar; int testExternVar(void) { return externVar; } // CHECK: cir.global "private" external @externVar : !s32i -// CHECK: cir.func dso_local @{{.+}}testExternVar +// CHECK: cir.func {{.*}} @{{.+}}testExternVar // CHECK: cir.get_global @externVar : !cir.ptr // Should constant initialize global with constant address. diff --git a/clang/test/CIR/CodeGen/gnu-extension.c b/clang/test/CIR/CodeGen/gnu-extension.c index df5c8c5e695b..e066dd24e9bb 100644 --- a/clang/test/CIR/CodeGen/gnu-extension.c +++ b/clang/test/CIR/CodeGen/gnu-extension.c @@ -3,7 +3,7 @@ int foo(void) { return __extension__ 0b101010; } -//CHECK: cir.func dso_local @foo() +//CHECK: cir.func {{.*}} @foo() //CHECK-NEXT: [[ADDR:%.*]] = cir.alloca !s32i, !cir.ptr, ["__retval"] {alignment = 4 : i64} //CHECK-NEXT: [[VAL:%.*]] = cir.const #cir.int<42> : !s32i //CHECK-NEXT: cir.store [[VAL]], [[ADDR]] : !s32i, !cir.ptr @@ -14,6 +14,6 @@ void bar(void) { __extension__ bar; } -//CHECK: cir.func dso_local @bar() +//CHECK: cir.func {{.*}} @bar() //CHECK: {{.*}} = cir.get_global @bar : !cir.ptr> //CHECK: cir.return diff --git a/clang/test/CIR/CodeGen/goto.cpp b/clang/test/CIR/CodeGen/goto.cpp index 6418c553ad7c..f574121e332f 100644 --- a/clang/test/CIR/CodeGen/goto.cpp +++ b/clang/test/CIR/CodeGen/goto.cpp @@ -12,7 +12,7 @@ void g0(int a) { b = b + 2; } -// CHECK: cir.func dso_local @_Z2g0i +// CHECK: cir.func {{.*}} @_Z2g0i // CHECK-NEXT %0 = cir.alloca !s32i, !cir.ptr, ["a", init] {alignment = 4 : i64} // CHECK-NEXT %1 = cir.alloca !s32i, !cir.ptr, ["b", init] {alignment = 4 : i64} // CHECK-NEXT cir.store %arg0, %0 : !s32i, !cir.ptr @@ -40,7 +40,7 @@ void g1(int a) { } // Make sure alloca for "y" shows up in the entry block -// CHECK: cir.func dso_local @_Z2g1i(%arg0: !s32i +// CHECK: cir.func {{.*}} @_Z2g1i(%arg0: !s32i // CHECK-NEXT: %0 = cir.alloca !s32i, !cir.ptr, ["a", init] {alignment = 4 : i64} // CHECK-NEXT: %1 = cir.alloca !s32i, !cir.ptr, ["x", init] {alignment = 4 : i64} // CHECK-NEXT: %2 = cir.alloca !s32i, !cir.ptr, ["y", init] {alignment = 4 : i64} @@ -58,7 +58,7 @@ int g2() { // Make sure (1) we don't get dangling unused cleanup blocks // (2) generated returns consider the function type -// CHECK: cir.func dso_local @_Z2g2v() -> !s32i +// CHECK: cir.func {{.*}} @_Z2g2v() -> !s32i // CHECK: cir.br ^bb2 // CHECK-NEXT: ^bb1: // no predecessors @@ -73,7 +73,7 @@ void g3() { goto label; } -// CHECK: cir.func dso_local @_Z2g3v +// CHECK: cir.func {{.*}} @_Z2g3v // CHECK: cir.br ^bb1 // CHECK: ^bb1: // CHECK: cir.br ^bb1 @@ -85,7 +85,7 @@ int shouldNotGenBranchRet(int x) { err: return -1; } -// NOFLAT: cir.func dso_local @_Z21shouldNotGenBranchReti +// NOFLAT: cir.func {{.*}} @_Z21shouldNotGenBranchReti // NOFLAT: cir.if %8 { // NOFLAT: cir.goto "err" // NOFLAT: } @@ -102,7 +102,7 @@ int shouldGenBranch(int x) { err: return -1; } -// NOFLAT: cir.func dso_local @_Z15shouldGenBranchi +// NOFLAT: cir.func {{.*}} @_Z15shouldGenBranchi // NOFLAT: cir.if %9 { // NOFLAT: cir.goto "err" // NOFLAT: } @@ -119,7 +119,7 @@ void severalLabelsInARow(int a) { end2: b = b + 2; } -// NOFLAT: cir.func dso_local @_Z19severalLabelsInARowi +// NOFLAT: cir.func {{.*}} @_Z19severalLabelsInARowi // NOFLAT: ^bb[[#BLK1:]]: // NOFLAT: cir.label "end1" // NOFLAT: cir.br ^bb[[#BLK2:]] @@ -133,7 +133,7 @@ void severalGotosInARow(int a) { end: b = b + 2; } -// NOFLAT: cir.func dso_local @_Z18severalGotosInARowi +// NOFLAT: cir.func {{.*}} @_Z18severalGotosInARowi // NOFLAT: cir.goto "end" // NOFLAT: ^bb[[#BLK1:]]: // NOFLAT: cir.goto "end" @@ -145,7 +145,7 @@ void labelWithoutMatch() { end: return; } -// NOFLAT: cir.func dso_local @_Z17labelWithoutMatchv() +// NOFLAT: cir.func {{.*}} @_Z17labelWithoutMatchv() // NOFLAT: cir.label "end" // NOFLAT: cir.return // NOFLAT: } @@ -165,7 +165,7 @@ int jumpIntoLoop(int* ar) { return 0; } -// CHECK: cir.func dso_local @_Z12jumpIntoLoopPi +// CHECK: cir.func {{.*}} @_Z12jumpIntoLoopPi // CHECK: cir.brcond {{.*}} ^bb[[#BLK2:]], ^bb[[#BLK3:]] // CHECK: ^bb[[#BLK2]]: // CHECK: cir.br ^bb[[#BODY:]] @@ -208,7 +208,7 @@ int jumpFromLoop(int* ar) { return 0; } -// CHECK: cir.func dso_local @_Z12jumpFromLoopPi +// CHECK: cir.func {{.*}} @_Z12jumpFromLoopPi // CHECK: cir.brcond {{.*}} ^bb[[#LABELERR:]], ^bb[[#BLK4:]] // CHECK: ^bb[[#LABELERR]]: // CHECK: cir.br ^bb[[#RETURN1:]] @@ -255,7 +255,7 @@ void flatLoopWithNoTerminatorInFront(int* ptr) { ; } -// CHECK: cir.func dso_local @_Z31flatLoopWithNoTerminatorInFrontPi +// CHECK: cir.func {{.*}} @_Z31flatLoopWithNoTerminatorInFrontPi // CHECK: cir.brcond {{.*}} ^bb[[#BLK2:]], ^bb[[#BLK3:]] // CHECK: ^bb[[#BLK2]]: // CHECK: cir.br ^bb[[#LABEL_LOOP:]] @@ -303,7 +303,7 @@ void foo() { } } -// NOFLAT: cir.func dso_local @_Z3foov() +// NOFLAT: cir.func {{.*}} @_Z3foov() // NOFLAT: cir.scope { // NOFLAT: %0 = cir.alloca !rec_S, !cir.ptr, ["agg.tmp0"] // NOFLAT: cir.br ^bb1 @@ -322,7 +322,7 @@ extern "C" void multiple_non_case(int v) { } } -// NOFLAT: cir.func dso_local @multiple_non_case +// NOFLAT: cir.func {{.*}} @multiple_non_case // NOFLAT: cir.switch // NOFLAT: cir.case(default, []) { // NOFLAT: cir.call @action1() @@ -345,7 +345,7 @@ extern "C" void case_follow_label(int v) { } } -// NOFLAT: cir.func dso_local @case_follow_label +// NOFLAT: cir.func {{.*}} @case_follow_label // NOFLAT: cir.switch // NOFLAT: cir.case(equal, [#cir.int<1> : !s32i]) { // NOFLAT: cir.label "label" @@ -369,7 +369,7 @@ extern "C" void default_follow_label(int v) { } } -// NOFLAT: cir.func dso_local @default_follow_label +// NOFLAT: cir.func {{.*}} @default_follow_label // NOFLAT: cir.switch // NOFLAT: cir.case(anyof, [#cir.int<1> : !s32i, #cir.int<2> : !s32i]) { // NOFLAT: cir.call @action1() diff --git a/clang/test/CIR/CodeGen/hello.c b/clang/test/CIR/CodeGen/hello.c index 84d30b32811a..251e333f86ec 100644 --- a/clang/test/CIR/CodeGen/hello.c +++ b/clang/test/CIR/CodeGen/hello.c @@ -9,7 +9,7 @@ int main (void) { // CHECK: cir.func private @printf(!cir.ptr, ...) -> !s32i // CHECK: cir.global "private" constant cir_private dso_local @".str" = #cir.const_array<"Hello, world!\0A\00" : !cir.array> : !cir.array {alignment = 1 : i64} -// CHECK: cir.func dso_local @main() -> !s32i +// CHECK: cir.func {{.*}} @main() -> !s32i // CHECK: %0 = cir.alloca !s32i, !cir.ptr, ["__retval"] {alignment = 4 : i64} // CHECK: %1 = cir.get_global @printf : !cir.ptr, ...) -> !s32i>> // CHECK: %2 = cir.get_global @".str" : !cir.ptr> diff --git a/clang/test/CIR/CodeGen/hot-attr.cpp b/clang/test/CIR/CodeGen/hot-attr.cpp index c7ae59d72ba7..639021cf99cf 100644 --- a/clang/test/CIR/CodeGen/hot-attr.cpp +++ b/clang/test/CIR/CodeGen/hot-attr.cpp @@ -9,7 +9,7 @@ __attribute__((hot)) int s0(int a, int b) { } // CIR: #[[ATTR0:.+]] = #cir !s32i extra(#[[ATTR0]]) // LLVM: define dso_local i32 @_Z2s0ii({{.*}} #[[#ATTR1:]] { diff --git a/clang/test/CIR/CodeGen/if-constexpr.cpp b/clang/test/CIR/CodeGen/if-constexpr.cpp index dd13591be17f..5c54f0be893f 100644 --- a/clang/test/CIR/CodeGen/if-constexpr.cpp +++ b/clang/test/CIR/CodeGen/if-constexpr.cpp @@ -39,7 +39,7 @@ void if0() { } } -// CHECK: cir.func dso_local @_Z3if0v() {{.*}} +// CHECK: cir.func {{.*}} @_Z3if0v() {{.*}} // CHECK: cir.store{{.*}} %1, %0 : !s32i, !cir.ptr loc({{.*}}) // CHECK-NEXT: cir.scope { // CHECK-NEXT: %2 = cir.alloca !s32i, !cir.ptr, ["x", init] {{.*}} diff --git a/clang/test/CIR/CodeGen/implicit-return.cpp b/clang/test/CIR/CodeGen/implicit-return.cpp index d53568d522de..18eb6bad9f99 100644 --- a/clang/test/CIR/CodeGen/implicit-return.cpp +++ b/clang/test/CIR/CodeGen/implicit-return.cpp @@ -5,22 +5,22 @@ void ret_void() {} -// CHECK-O0: cir.func dso_local @_Z8ret_voidv() +// CHECK-O0: cir.func {{.*}} @_Z8ret_voidv() // CHECK-O0-NEXT: cir.return // CHECK-O0-NEXT: } -// CHECK-O2: cir.func dso_local @_Z8ret_voidv() +// CHECK-O2: cir.func {{.*}} @_Z8ret_voidv() // CHECK-O2-NEXT: cir.return // CHECK-O2-NEXT: } int ret_non_void() {} -// CHECK-O0: cir.func dso_local @_Z12ret_non_voidv() -> !s32i +// CHECK-O0: cir.func {{.*}} @_Z12ret_non_voidv() -> !s32i // CHECK-O0-NEXT: %0 = cir.alloca !s32i, !cir.ptr, ["__retval"] // CHECK-O0-NEXT: cir.trap // CHECK-O0-NEXT: } -// CHECK-O2: cir.func dso_local @_Z12ret_non_voidv() -> !s32i +// CHECK-O2: cir.func {{.*}} @_Z12ret_non_voidv() -> !s32i // CHECK-O2-NEXT: %0 = cir.alloca !s32i, !cir.ptr, ["__retval"] // CHECK-O2-NEXT: cir.unreachable // CHECK-O2-NEXT: } diff --git a/clang/test/CIR/CodeGen/inc-bool.cpp b/clang/test/CIR/CodeGen/inc-bool.cpp index 17557d338ce0..5b451bc7ff6e 100644 --- a/clang/test/CIR/CodeGen/inc-bool.cpp +++ b/clang/test/CIR/CodeGen/inc-bool.cpp @@ -5,7 +5,7 @@ void foo(bool x) { x++; } -// CHECK: cir.func dso_local @_Z3foob(%arg0: !cir.bool loc({{.*}})) +// CHECK: cir.func {{.*}} @_Z3foob(%arg0: !cir.bool loc({{.*}})) // CHECK: [[ALLOC_X:%.*]] = cir.alloca !cir.bool, !cir.ptr, ["x", init] {alignment = 1 : i64} // CHECK: cir.store{{.*}} %arg0, [[ALLOC_X]] : !cir.bool, !cir.ptr // CHECK: {{.*}} = cir.load{{.*}} [[ALLOC_X]] : !cir.ptr, !cir.bool diff --git a/clang/test/CIR/CodeGen/inc-dec.cpp b/clang/test/CIR/CodeGen/inc-dec.cpp index c8aa62198c81..40bebc69162e 100644 --- a/clang/test/CIR/CodeGen/inc-dec.cpp +++ b/clang/test/CIR/CodeGen/inc-dec.cpp @@ -6,7 +6,7 @@ unsigned id0() { return ++a; } -// CHECK: cir.func dso_local @_Z3id0v() -> !u32i +// CHECK: cir.func {{.*}} @_Z3id0v() -> !u32i // CHECK: %[[#RET:]] = cir.alloca !u32i, !cir.ptr, ["__retval"] // CHECK: %[[#A:]] = cir.alloca !u32i, !cir.ptr, ["a", init] // CHECK: %[[#BEFORE_A:]] = cir.load{{.*}} %[[#A]] @@ -20,7 +20,7 @@ unsigned id1() { return --a; } -// CHECK: cir.func dso_local @_Z3id1v() -> !u32i +// CHECK: cir.func {{.*}} @_Z3id1v() -> !u32i // CHECK: %[[#RET:]] = cir.alloca !u32i, !cir.ptr, ["__retval"] // CHECK: %[[#A:]] = cir.alloca !u32i, !cir.ptr, ["a", init] // CHECK: %[[#BEFORE_A:]] = cir.load{{.*}} %[[#A]] @@ -33,7 +33,7 @@ unsigned id2() { return a++; } -// CHECK: cir.func dso_local @_Z3id2v() -> !u32i +// CHECK: cir.func {{.*}} @_Z3id2v() -> !u32i // CHECK: %[[#RET:]] = cir.alloca !u32i, !cir.ptr, ["__retval"] // CHECK: %[[#A:]] = cir.alloca !u32i, !cir.ptr, ["a", init] // CHECK: %[[#BEFORE_A:]] = cir.load{{.*}} %[[#A]] @@ -46,7 +46,7 @@ unsigned id3() { return a--; } -// CHECK: cir.func dso_local @_Z3id3v() -> !u32i +// CHECK: cir.func {{.*}} @_Z3id3v() -> !u32i // CHECK: %[[#RET:]] = cir.alloca !u32i, !cir.ptr, ["__retval"] // CHECK: %[[#A:]] = cir.alloca !u32i, !cir.ptr, ["a", init] // CHECK: %[[#BEFORE_A:]] = cir.load{{.*}} %[[#A]] diff --git a/clang/test/CIR/CodeGen/initlist-ptr-ptr.cpp b/clang/test/CIR/CodeGen/initlist-ptr-ptr.cpp index c439d8a3ce33..87241c5e27dc 100644 --- a/clang/test/CIR/CodeGen/initlist-ptr-ptr.cpp +++ b/clang/test/CIR/CodeGen/initlist-ptr-ptr.cpp @@ -16,7 +16,7 @@ void test() { } // namespace std // CIR: [[INITLIST_TYPE:!.*]] = !cir.record" {!cir.ptr>, !cir.ptr>}> -// CIR: cir.func linkonce_odr @_ZSt1fIPKcEvSt16initializer_listIT_E(%arg0: [[INITLIST_TYPE]] +// CIR: cir.func {{.*}} @_ZSt1fIPKcEvSt16initializer_listIT_E(%arg0: [[INITLIST_TYPE]] // CIR: [[LOCAL:%.*]] = cir.alloca [[INITLIST_TYPE]], !cir.ptr<[[INITLIST_TYPE]]>, // CIR: cir.store{{.*}} %arg0, [[LOCAL]] : [[INITLIST_TYPE]], !cir.ptr<[[INITLIST_TYPE]]> // CIR: cir.return @@ -24,7 +24,7 @@ void test() { // CIR: cir.global "private" constant cir_private dso_local [[STR_XY:@.*]] = #cir.const_array<"xy\00" : !cir.array> : !cir.array // CIR: cir.global "private" constant cir_private dso_local [[STR_UV:@.*]] = #cir.const_array<"uv\00" : !cir.array> : !cir.array -// CIR: cir.func dso_local @_ZSt4testv() +// CIR: cir.func {{.*}} @_ZSt4testv() // CIR: cir.scope { // CIR: [[INITLIST_LOCAL:%.*]] = cir.alloca [[INITLIST_TYPE]], !cir.ptr<[[INITLIST_TYPE]]>, // CIR: [[LOCAL_ELEM_ARRAY:%.*]] = cir.alloca !cir.array x 2>, !cir.ptr x 2>>, diff --git a/clang/test/CIR/CodeGen/initlist-ptr-unsigned.cpp b/clang/test/CIR/CodeGen/initlist-ptr-unsigned.cpp index 7d4c509ad152..6c94eb8a93e4 100644 --- a/clang/test/CIR/CodeGen/initlist-ptr-unsigned.cpp +++ b/clang/test/CIR/CodeGen/initlist-ptr-unsigned.cpp @@ -17,12 +17,12 @@ void test() { // CIR: [[INITLIST_TYPE:!.*]] = !cir.record" {!cir.ptr, !u64i}> -// CIR: cir.func linkonce_odr @_ZSt1fIiEvSt16initializer_listIT_E(%arg0: [[INITLIST_TYPE]] +// CIR: cir.func {{.*}} @_ZSt1fIiEvSt16initializer_listIT_E(%arg0: [[INITLIST_TYPE]] // CIR: [[REG0:%.*]] = cir.alloca [[INITLIST_TYPE]], !cir.ptr<[[INITLIST_TYPE]]>, // CIR: cir.store{{.*}} %arg0, [[REG0]] : [[INITLIST_TYPE]], !cir.ptr<[[INITLIST_TYPE]]> // CIR: cir.return -// CIR: cir.func dso_local @_ZSt4testv() +// CIR: cir.func {{.*}} @_ZSt4testv() // CIR: cir.scope { // CIR: [[LIST_PTR:%.*]] = cir.alloca [[INITLIST_TYPE]], !cir.ptr<[[INITLIST_TYPE]]>, // CIR: [[ARRAY:%.*]] = cir.alloca !cir.array, !cir.ptr>, diff --git a/clang/test/CIR/CodeGen/kr-func-promote.c b/clang/test/CIR/CodeGen/kr-func-promote.c index f34e11ce3e9e..45d92b34bd83 100644 --- a/clang/test/CIR/CodeGen/kr-func-promote.c +++ b/clang/test/CIR/CodeGen/kr-func-promote.c @@ -1,12 +1,12 @@ // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o - | FileCheck %s -// CHECK: cir.func {{.*}}@foo(%arg0: !s32i +// CHECK: cir.func{{.*}} @foo(%arg0: !s32i // CHECK: %0 = cir.alloca !s16i, !cir.ptr, ["x", init] // CHECK: %1 = cir.cast integral %arg0 : !s32i -> !s16i // CHECK: cir.store %1, %0 : !s16i, !cir.ptr void foo(x) short x; {} -// CHECK: cir.func no_proto dso_local @bar(%arg0: !cir.double +// CHECK: cir.func {{.*}} @bar(%arg0: !cir.double // CHECK: %0 = cir.alloca !cir.float, !cir.ptr, ["f", init] // CHECK: %1 = cir.cast floating %arg0 : !cir.double -> !cir.float // CHECK: cir.store %1, %0 : !cir.float, !cir.ptr diff --git a/clang/test/CIR/CodeGen/label-values.c b/clang/test/CIR/CodeGen/label-values.c index 7e5f4ed1483b..bf9bc0b603d9 100644 --- a/clang/test/CIR/CodeGen/label-values.c +++ b/clang/test/CIR/CodeGen/label-values.c @@ -11,7 +11,7 @@ void A(void) { A: return; } -// CIR: cir.func dso_local @A +// CIR: cir.func {{.*}} @A // CIR: [[PTR:%.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["ptr", init] {alignment = 8 : i64} // CIR: [[BLOCK:%.*]] = cir.blockaddress <@A, "A"> -> !cir.ptr // CIR: cir.store align(8) [[BLOCK]], [[PTR]] : !cir.ptr, !cir.ptr> @@ -53,7 +53,7 @@ void B(void) { goto *ptr; } -// CIR: cir.func dso_local @B() +// CIR: cir.func {{.*}} @B() // CIR: [[PTR:%.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["ptr", init] {alignment = 8 : i64} // CIR: cir.br ^bb1 // CIR: ^bb1: // 2 preds: ^bb0, ^bb2 @@ -98,7 +98,7 @@ void C(int x) { return; } -// CIR: cir.func dso_local @C +// CIR: cir.func {{.*}} @C // CIR: [[BLOCK1:%.*]] = cir.blockaddress <@C, "A"> -> !cir.ptr // CIR: [[BLOCK2:%.*]] = cir.blockaddress <@C, "B"> -> !cir.ptr // CIR: [[COND:%.*]] = cir.select if [[CMP:%.*]] then [[BLOCK1]] else [[BLOCK2]] : (!cir.bool, !cir.ptr, !cir.ptr) -> !cir.ptr @@ -158,7 +158,7 @@ void D(void) { return; } -// CIR: cir.func dso_local @D +// CIR: cir.func {{.*}} @D // CIR: %[[PTR:.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["ptr", init] // CIR: %[[PTR2:.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["ptr2", init] // CIR: %[[PTR3:.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["ptr3", init] @@ -224,7 +224,7 @@ void E(void) { return; } -//CIR: cir.func dso_local @E() +//CIR: cir.func {{.*}} @E() //CIR: ^bb1({{.*}}: !cir.ptr {{.*}}): // no predecessors //CIR: cir.indirectbr {{.*}} poison : , [ //CIR-NEXT: ^bb5, diff --git a/clang/test/CIR/CodeGen/lambda.cpp b/clang/test/CIR/CodeGen/lambda.cpp index aca3692a8412..134e6bcb6e7a 100644 --- a/clang/test/CIR/CodeGen/lambda.cpp +++ b/clang/test/CIR/CodeGen/lambda.cpp @@ -17,7 +17,7 @@ void fn() { // CHECK: cir.func lambda internal private dso_local @_ZZ2fnvENK3$_0clEv{{.*}}) extra -// CHECK: cir.func dso_local @_Z2fnv() +// CHECK: cir.func {{.*}} @_Z2fnv() // CHECK-NEXT: %0 = cir.alloca !rec_anon2E0, !cir.ptr, ["a"] // CHECK: cir.call @_ZZ2fnvENK3$_0clEv diff --git a/clang/test/CIR/CodeGen/libcall.cpp b/clang/test/CIR/CodeGen/libcall.cpp index d32fe59d584c..8c54ca8d9644 100644 --- a/clang/test/CIR/CodeGen/libcall.cpp +++ b/clang/test/CIR/CodeGen/libcall.cpp @@ -39,15 +39,15 @@ void t(const char* fmt, ...) { consume_message(message); } -// CHECK: cir.func dso_local @_Z15consume_messagePKc(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @_Z15consume_messagePKc(%arg0: !cir.ptr // CHECK: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["m", init] {alignment = 8 : i64} // CHECK: %3 = cir.load{{.*}} %0 : !cir.ptr>, !cir.ptr // CHECK: %4 = cir.objsize max %3 : !cir.ptr -> !u64i // CHECK: %5 = cir.call @_ZL6strlenPKcU17pass_object_size0(%3, %4) : (!cir.ptr, !u64i) -> !u64i -// CHECK: cir.func private @__vsnprintf_chk -// CHECK: cir.func internal private dso_local @_ZL9vsnprintfPcU17pass_object_size1iPKcP13__va_list_tag +// CHECK: cir.func {{.*}} @__vsnprintf_chk +// CHECK: cir.func {{.*}} @_ZL9vsnprintfPcU17pass_object_size1iPKcP13__va_list_tag // Implicit size parameter in arg %1 // diff --git a/clang/test/CIR/CodeGen/linkage.c b/clang/test/CIR/CodeGen/linkage.c index 7f59a44b5731..e5796e1080eb 100644 --- a/clang/test/CIR/CodeGen/linkage.c +++ b/clang/test/CIR/CodeGen/linkage.c @@ -14,8 +14,8 @@ int foo(void) { return bar(5); } -// CIR: cir.func internal private dso_local @bar( -// CIR: cir.func dso_local @foo( +// CIR: cir.func internal private {{.*}} @bar( +// CIR: cir.func {{.*}} @foo( // LLVM: define internal i32 @bar( // LLVM: define dso_local i32 @foo( @@ -29,5 +29,5 @@ int get_var(void) { // Should generate available_externally linkage when optimizing. inline int availableExternallyMethod(void) { return 0; } void callAvailableExternallyMethod(void) { availableExternallyMethod(); } -// CIR-O0-NOT: cir.func available_externally @availableExternallyMethod -// CIR-O1: cir.func available_externally @availableExternallyMethod +// CIR-O0-NOT: cir.func available_externally{{.*}} @availableExternallyMethod +// CIR-O1: cir.func available_externally{{.*}} @availableExternallyMethod diff --git a/clang/test/CIR/CodeGen/loop-scope.cpp b/clang/test/CIR/CodeGen/loop-scope.cpp index cd2cc76426c1..f0516b965b89 100644 --- a/clang/test/CIR/CodeGen/loop-scope.cpp +++ b/clang/test/CIR/CodeGen/loop-scope.cpp @@ -9,7 +9,7 @@ void l0(void) { } } -// CPPSCOPE: cir.func dso_local @_Z2l0v() +// CPPSCOPE: cir.func {{.*}} @_Z2l0v() // CPPSCOPE-NEXT: cir.scope { // CPPSCOPE-NEXT: %0 = cir.alloca !s32i, !cir.ptr, ["i", init] {alignment = 4 : i64} // CPPSCOPE-NEXT: %1 = cir.const #cir.int<0> : !s32i @@ -20,7 +20,7 @@ void l0(void) { // CPPSCOPE-NEXT: cir.scope { // CPPSCOPE-NEXT: %2 = cir.alloca !s32i, !cir.ptr, ["j", init] {alignment = 4 : i64} -// CSCOPE: cir.func dso_local @l0() +// CSCOPE: cir.func {{.*}} @l0() // CSCOPE-NEXT: cir.scope { // CSCOPE-NEXT: %0 = cir.alloca !s32i, !cir.ptr, ["i", init] {alignment = 4 : i64} // CSCOPE-NEXT: %1 = cir.const #cir.int<0> : !s32i diff --git a/clang/test/CIR/CodeGen/loop.cpp b/clang/test/CIR/CodeGen/loop.cpp index 5d2243ffa47e..b333eb515a6d 100644 --- a/clang/test/CIR/CodeGen/loop.cpp +++ b/clang/test/CIR/CodeGen/loop.cpp @@ -6,7 +6,7 @@ void l0() { } } -// CHECK: cir.func dso_local @_Z2l0v +// CHECK: cir.func {{.*}} @_Z2l0v // CHECK: cir.for : cond { // CHECK: %[[#TRUE:]] = cir.const #true // CHECK: cir.condition(%[[#TRUE]]) @@ -18,7 +18,7 @@ void l1() { } } -// CHECK: cir.func dso_local @_Z2l1v +// CHECK: cir.func {{.*}} @_Z2l1v // CHECK: cir.for : cond { // CHECK-NEXT: %4 = cir.load{{.*}} %2 : !cir.ptr, !s32i // CHECK-NEXT: %5 = cir.const #cir.int<10> : !s32i @@ -53,7 +53,7 @@ void l2(bool cond) { } } -// CHECK: cir.func dso_local @_Z2l2b +// CHECK: cir.func {{.*}} @_Z2l2b // CHECK: cir.scope { // CHECK-NEXT: cir.while { // CHECK-NEXT: %3 = cir.load{{.*}} %0 : !cir.ptr, !cir.bool @@ -111,7 +111,7 @@ void l3(bool cond) { } while (1); } -// CHECK: cir.func dso_local @_Z2l3b +// CHECK: cir.func {{.*}} @_Z2l3b // CHECK: cir.scope { // CHECK-NEXT: cir.do { // CHECK-NEXT: cir.scope { @@ -166,7 +166,7 @@ void l4() { } } -// CHECK: cir.func dso_local @_Z2l4v +// CHECK: cir.func {{.*}} @_Z2l4v // CHECK: cir.while { // CHECK-NEXT: %[[#TRUE:]] = cir.const #true // CHECK-NEXT: cir.condition(%[[#TRUE]]) @@ -190,7 +190,7 @@ void l5() { } while (0); } -// CHECK: cir.func dso_local @_Z2l5v() +// CHECK: cir.func {{.*}} @_Z2l5v() // CHECK-NEXT: cir.scope { // CHECK-NEXT: cir.do { // CHECK-NEXT: cir.yield @@ -209,7 +209,7 @@ void l6() { } } -// CHECK: cir.func dso_local @_Z2l6v() +// CHECK: cir.func {{.*}} @_Z2l6v() // CHECK-NEXT: cir.scope { // CHECK-NEXT: cir.while { // CHECK-NEXT: %[[#TRUE:]] = cir.const #true @@ -231,7 +231,7 @@ void unreachable_after_break() { } } -// CHECK-NEXT: cir.func dso_local @_Z23unreachable_after_breakv() +// CHECK-NEXT: cir.func {{.*}} @_Z23unreachable_after_breakv() // CHECK-NEXT: cir.scope { // CHECK-NEXT: cir.for : cond { // CHECK-NEXT: %0 = cir.const #true @@ -260,7 +260,7 @@ void unreachable_after_continue() { } } -// CHECK-NEXT: cir.func dso_local @_Z26unreachable_after_continuev() +// CHECK-NEXT: cir.func {{.*}} @_Z26unreachable_after_continuev() // CHECK-NEXT: cir.scope { // CHECK-NEXT: cir.for : cond { // CHECK-NEXT: %0 = cir.const #true diff --git a/clang/test/CIR/CodeGen/lvalue-refs.cpp b/clang/test/CIR/CodeGen/lvalue-refs.cpp index 82799987aaca..7225a09fa219 100644 --- a/clang/test/CIR/CodeGen/lvalue-refs.cpp +++ b/clang/test/CIR/CodeGen/lvalue-refs.cpp @@ -6,7 +6,7 @@ struct String { void split(String &S) {} -// CHECK: cir.func dso_local @_Z5splitR6String(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @_Z5splitR6String(%arg0: !cir.ptr // CHECK: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["S", init, const] void foo() { @@ -14,6 +14,6 @@ void foo() { split(s); } -// CHECK: cir.func dso_local @_Z3foov() +// CHECK: cir.func {{.*}} @_Z3foov() // CHECK: %0 = cir.alloca !rec_String, !cir.ptr, ["s"] // CHECK: cir.call @_Z5splitR6String(%0) : (!cir.ptr) -> () diff --git a/clang/test/CIR/CodeGen/materialize-temporary.cpp b/clang/test/CIR/CodeGen/materialize-temporary.cpp index 6d7ee0eb844d..5aac04c32a7e 100644 --- a/clang/test/CIR/CodeGen/materialize-temporary.cpp +++ b/clang/test/CIR/CodeGen/materialize-temporary.cpp @@ -5,7 +5,7 @@ int get_value() { return 42; } void test_const_ref_binding() { - // CHECK-LABEL: cir.func {{.*}}@{{.*}}test_const_ref_bindingv + // CHECK-LABEL: cir.func{{.*}} @{{.*}}test_const_ref_bindingv const int &x = 5; // CHECK: %{{.*}} = cir.alloca !s32i, !cir.ptr, ["ref.tmp0", init] // CHECK: %{{.*}} = cir.alloca !cir.ptr, !cir.ptr>, ["x", init, const] @@ -16,7 +16,7 @@ void test_const_ref_binding() { } void test_const_ref_expr() { - // CHECK-LABEL: cir.func {{.*}}@{{.*}}test_const_ref_exprv + // CHECK-LABEL: cir.func{{.*}} @{{.*}}test_const_ref_exprv const int &y = get_value(); // CHECK: %{{.*}} = cir.alloca !s32i, !cir.ptr, ["ref.tmp0", init] // CHECK: %{{.*}} = cir.alloca !cir.ptr, !cir.ptr>, ["y", init, const] @@ -26,7 +26,7 @@ void test_const_ref_expr() { } void test_const_ref_arithmetic() { - // CHECK-LABEL: cir.func {{.*}}@{{.*}}test_const_ref_arithmeticv + // CHECK-LABEL: cir.func{{.*}} @{{.*}}test_const_ref_arithmeticv int a = 10; const int &z = a + 5; // CHECK: %{{.*}} = cir.alloca !s32i, !cir.ptr, ["ref.tmp0", init] @@ -46,7 +46,7 @@ struct S { S make_s() { return S(100); } void test_const_ref_struct() { - // CHECK-LABEL: cir.func {{.*}}@{{.*}}test_const_ref_structv + // CHECK-LABEL: cir.func{{.*}} @{{.*}}test_const_ref_structv const S &s = make_s(); // Temporary S object should be materialized // CHECK: %{{.*}} = cir.alloca {{.*}}, !cir.ptr<{{.*}}rec_S{{.*}}>, ["ref.tmp0"] diff --git a/clang/test/CIR/CodeGen/move.cpp b/clang/test/CIR/CodeGen/move.cpp index 1a0d455c4308..074a3fa54f00 100644 --- a/clang/test/CIR/CodeGen/move.cpp +++ b/clang/test/CIR/CodeGen/move.cpp @@ -28,7 +28,7 @@ void t() { // FIXME: we should explicitly model std::move here since it will // be useful at least for the lifetime checker. -// CHECK: cir.func dso_local @_Z1tv() +// CHECK: cir.func {{.*}} @_Z1tv() // CHECK: %[[#Addr:]] = cir.alloca ![[StdString]], {{.*}} ["ref.tmp0"] // CHECK: %[[#RValStr:]] = cir.call @_Z6getstrv() : () -> ![[StdString]] // CHECK: cir.store{{.*}} %[[#RValStr]], %[[#Addr]] diff --git a/clang/test/CIR/CodeGen/multi-vtable.cpp b/clang/test/CIR/CodeGen/multi-vtable.cpp index 494bbf828c0a..c55ed096be83 100644 --- a/clang/test/CIR/CodeGen/multi-vtable.cpp +++ b/clang/test/CIR/CodeGen/multi-vtable.cpp @@ -38,7 +38,7 @@ int main() { // CIR-DAG: !rec_Mother = !cir.record // CIR-DAG: !rec_Child = !cir.record -// CIR: cir.func linkonce_odr @_ZN6MotherC2Ev(%arg0: !cir.ptr +// CIR: cir.func {{.*}} @_ZN6MotherC2Ev(%arg0: !cir.ptr // CIR: %{{[0-9]+}} = cir.vtable.address_point(@_ZTV6Mother, address_point = ) : !cir.vptr // CIR: %{{[0-9]+}} = cir.vtable.get_vptr %{{[0-9]+}} : !cir.ptr -> !cir.ptr // CIR: cir.store{{.*}} %2, %{{[0-9]+}} : !cir.vptr, !cir.ptr @@ -51,7 +51,7 @@ int main() { // LLVM-DAG: ret void // LLVM-DAG: } -// CIR: cir.func linkonce_odr @_ZN5ChildC2Ev(%arg0: !cir.ptr +// CIR: cir.func {{.*}} @_ZN5ChildC2Ev(%arg0: !cir.ptr // CIR: %{{[0-9]+}} = cir.vtable.address_point(@_ZTV5Child, address_point = ) : !cir.vptr // CIR: %{{[0-9]+}} = cir.vtable.get_vptr %1 : !cir.ptr -> !cir.ptr // CIR: cir.store{{.*}} %{{[0-9]+}}, %{{[0-9]+}} : !cir.vptr, !cir.ptr @@ -74,7 +74,7 @@ int main() { // LLVM-DAG: ret void // } -// CIR: cir.func dso_local @main() -> !s32i extra(#fn_attr) { +// CIR: cir.func {{.*}} @main() -> !s32i extra(#fn_attr) { // CIR: %{{[0-9]+}} = cir.vtable.get_virtual_fn_addr %{{[0-9]+}}[0] : !cir.vptr -> !cir.ptr)>>> diff --git a/clang/test/CIR/CodeGen/new-null.cpp b/clang/test/CIR/CodeGen/new-null.cpp index 133640155f5a..285d56a28860 100644 --- a/clang/test/CIR/CodeGen/new-null.cpp +++ b/clang/test/CIR/CodeGen/new-null.cpp @@ -45,7 +45,7 @@ namespace test15 { new (p) A(); } - // CIR-LABEL: cir.func dso_local @_ZN6test156test0bEPv( + // CIR-LABEL: cir.func {{.*}} @_ZN6test156test0bEPv( // CIR-SAME: %[[VAL_0:.*]]: !cir.ptr // CIR: %[[VAL_1:.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["p", init] {alignment = 8 : i64} // CIR: cir.store %[[VAL_0]], %[[VAL_1]] : !cir.ptr, !cir.ptr> @@ -82,7 +82,7 @@ namespace test15 { extern "C" void test_basic() { __builtin_operator_delete(__builtin_operator_new(4)); - // CIR-LABEL: cir.func dso_local @test_basic + // CIR-LABEL: cir.func {{.*}} @test_basic // CIR: [[P:%.*]] = cir.call @_Znwm({{%.*}}) : (!u64i) -> !cir.ptr // CIR: cir.call @_ZdlPv([[P]]) : (!cir.ptr) -> () // CIR: cir.return @@ -96,7 +96,7 @@ extern "C" void test_basic() { extern "C" void test_aligned_alloc() { __builtin_operator_delete(__builtin_operator_new(4, std::align_val_t(4)), std::align_val_t(4)); - // CIR-LABEL: cir.func dso_local @test_aligned_alloc + // CIR-LABEL: cir.func {{.*}} @test_aligned_alloc // CIR: [[P:%.*]] = cir.call @_ZnwmSt11align_val_t({{%.*}}, {{%.*}}) : (!u64i, !u64i) -> !cir.ptr // CIR: cir.call @_ZdlPvSt11align_val_t([[P]], {{%.*}}) : (!cir.ptr, !u64i) -> () // CIR: cir.return @@ -110,7 +110,7 @@ extern "C" void test_aligned_alloc() { extern "C" void test_sized_delete() { __builtin_operator_delete(__builtin_operator_new(4), 4); - // CIR-LABEL: cir.func dso_local @test_sized_delete + // CIR-LABEL: cir.func {{.*}} @test_sized_delete // CIR: [[P:%.*]] = cir.call @_Znwm({{%.*}}) : (!u64i) -> !cir.ptr // CIR: cir.call @_ZdlPvm([[P]], {{%.*}}) : (!cir.ptr, !u64i) -> () // CIR: cir.return diff --git a/clang/test/CIR/CodeGen/new.cpp b/clang/test/CIR/CodeGen/new.cpp index 6fa1809b5f7e..cb403c063ba2 100644 --- a/clang/test/CIR/CodeGen/new.cpp +++ b/clang/test/CIR/CodeGen/new.cpp @@ -11,7 +11,7 @@ void m(int a, int b) { std::shared_ptr l = std::make_shared(a, b); } -// CHECK: cir.func linkonce_odr @_ZSt11make_sharedI1SJRiS1_EESt10shared_ptrIT_EDpOT0_( +// CHECK: cir.func {{.*}} @_ZSt11make_sharedI1SJRiS1_EESt10shared_ptrIT_EDpOT0_( // CHECK: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["args", init, const] {alignment = 8 : i64} // CHECK: %1 = cir.alloca !cir.ptr, !cir.ptr>, ["args", init, const] {alignment = 8 : i64} // CHECK: %2 = cir.alloca !rec_std3A3Ashared_ptr3CS3E, !cir.ptr, ["__retval"] {alignment = 1 : i64} @@ -36,7 +36,7 @@ class B { } }; -// CHECK: cir.func linkonce_odr @_ZN1B9constructEPS_(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @_ZN1B9constructEPS_(%arg0: !cir.ptr // CHECK: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK: %1 = cir.alloca !cir.ptr, !cir.ptr>, ["__p", init] {alignment = 8 : i64} // CHECK: cir.store{{.*}} %arg0, %0 : !cir.ptr, !cir.ptr> @@ -65,7 +65,7 @@ void t_new_constant_size() { // In this test, NUM_ELEMENTS isn't used because no cookie is needed and there // are no constructor calls needed. -// CHECK: cir.func dso_local @_Z19t_new_constant_sizev() +// CHECK: cir.func {{.*}} @_Z19t_new_constant_sizev() // CHECK: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["p", init] {alignment = 8 : i64} // CHECK: %[[NUM_ELEMENTS:.*]] = cir.const #cir.int<16> : !u64i // CHECK: %[[ALLOCATION_SIZE:.*]] = cir.const #cir.int<128> : !u64i @@ -81,7 +81,7 @@ void t_new_multidim_constant_size() { // As above, NUM_ELEMENTS isn't used. -// CHECK: cir.func dso_local @_Z28t_new_multidim_constant_sizev() +// CHECK: cir.func {{.*}} @_Z28t_new_multidim_constant_sizev() // CHECK: %0 = cir.alloca !cir.ptr x 3>>, !cir.ptr x 3>>>, ["p", init] {alignment = 8 : i64} // CHECK: %[[NUM_ELEMENTS:.*]] = cir.const #cir.int<24> : !u64i // CHECK: %[[ALLOCATION_SIZE:.*]] = cir.const #cir.int<192> : !u64i @@ -100,7 +100,7 @@ void t_constant_size_nontrivial() { auto p = new C[3]; } -// CHECK: cir.func dso_local @_Z26t_constant_size_nontrivialv() +// CHECK: cir.func {{.*}} @_Z26t_constant_size_nontrivialv() // CHECK: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["p", init] {alignment = 8 : i64} // CHECK: %[[NUM_ELEMENTS:.*]] = cir.const #cir.int<3> : !u64i // CHECK: %[[SIZE_WITHOUT_COOKIE:.*]] = cir.const #cir.int<3> : !u64i @@ -129,7 +129,7 @@ void t_constant_size_nontrivial2() { // In this test SIZE_WITHOUT_COOKIE isn't used, but it would be if there were // an initializer. -// CHECK: cir.func dso_local @_Z27t_constant_size_nontrivial2v() +// CHECK: cir.func {{.*}} @_Z27t_constant_size_nontrivial2v() // CHECK: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["p", init] {alignment = 8 : i64} // CHECK: %[[NUM_ELEMENTS:.*]] = cir.const #cir.int<3> : !u64i // CHECK: %[[SIZE_WITHOUT_COOKIE:.*]] = cir.const #cir.int<12> : !u64i @@ -152,7 +152,7 @@ void t_constant_size_memset_init() { // In this test, NUM_ELEMENTS isn't used because no cookie is needed and there // are no constructor calls needed. -// CHECK: cir.func dso_local @_Z27t_constant_size_memset_initv() +// CHECK: cir.func {{.*}} @_Z27t_constant_size_memset_initv() // CHECK: %[[NUM_ELEMENTS:.*]] = cir.const #cir.int<16> : !u64i // CHECK: %[[ALLOCATION_SIZE:.*]] = cir.const #cir.int<64> : !u64i // CHECK: %[[ALLOC_PTR:.*]] = cir.call @_Znam(%[[ALLOCATION_SIZE]]) : (!u64i) -> !cir.ptr @@ -166,7 +166,7 @@ void t_constant_size_partial_init() { auto p = new int[16] { 1, 2, 3 }; } -// CHECK: cir.func dso_local @_Z28t_constant_size_partial_initv() +// CHECK: cir.func {{.*}} @_Z28t_constant_size_partial_initv() // CHECK: %[[NUM_ELEMENTS:.*]] = cir.const #cir.int<16> : !u64i // CHECK: %[[ALLOCATION_SIZE:.*]] = cir.const #cir.int<64> : !u64i // CHECK: %[[ALLOC_PTR:.*]] = cir.call @_Znam(%[[ALLOCATION_SIZE]]) : (!u64i) -> !cir.ptr @@ -194,7 +194,7 @@ void t_new_var_size(size_t n) { auto p = new char[n]; } -// CHECK: cir.func dso_local @_Z14t_new_var_sizem +// CHECK: cir.func {{.*}} @_Z14t_new_var_sizem // CHECK: %[[N:.*]] = cir.load{{.*}} %[[ARG_ALLOCA:.*]] // CHECK: %[[PTR:.*]] = cir.call @_Znam(%[[N]]) : (!u64i) @@ -202,7 +202,7 @@ void t_new_var_size2(int n) { auto p = new char[n]; } -// CHECK: cir.func dso_local @_Z15t_new_var_size2i +// CHECK: cir.func {{.*}} @_Z15t_new_var_size2i // CHECK: %[[N:.*]] = cir.load{{.*}} %[[ARG_ALLOCA:.*]] // CHECK: %[[N_SIZE_T:.*]] = cir.cast integral %[[N]] : !s32i -> !u64i // CHECK: %[[PTR:.*]] = cir.call @_Znam(%[[N_SIZE_T]]) : (!u64i) @@ -211,7 +211,7 @@ void t_new_var_size3(size_t n) { auto p = new double[n]; } -// CHECK: cir.func dso_local @_Z15t_new_var_size3m +// CHECK: cir.func {{.*}} @_Z15t_new_var_size3m // CHECK: %[[N:.*]] = cir.load{{.*}} %[[ARG_ALLOCA:.*]] // CHECK: %[[ELEMENT_SIZE:.*]] = cir.const #cir.int<8> : !u64i // CHECK: %[[RESULT:.*]], %[[OVERFLOW:.*]] = cir.binop.overflow(mul, %[[N]], %[[ELEMENT_SIZE]]) : !u64i, (!u64i, !cir.bool) @@ -223,7 +223,7 @@ void t_new_var_size4(int n) { auto p = new double[n]; } -// CHECK: cir.func dso_local @_Z15t_new_var_size4i +// CHECK: cir.func {{.*}} @_Z15t_new_var_size4i // CHECK: %[[N:.*]] = cir.load{{.*}} %[[ARG_ALLOCA:.*]] // CHECK: %[[N_SIZE_T:.*]] = cir.cast integral %[[N]] : !s32i -> !u64i // CHECK: %[[ELEMENT_SIZE:.*]] = cir.const #cir.int<8> : !u64i @@ -238,7 +238,7 @@ void t_new_var_size5(int n) { // NUM_ELEMENTS isn't used in this case because there is no cookie. -// CHECK: cir.func dso_local @_Z15t_new_var_size5i +// CHECK: cir.func {{.*}} @_Z15t_new_var_size5i // CHECK: %[[N:.*]] = cir.load{{.*}} %[[ARG_ALLOCA:.*]] // CHECK: %[[N_SIZE_T:.*]] = cir.cast integral %[[N]] : !s32i -> !u64i // CHECK: %[[ELEMENT_SIZE:.*]] = cir.const #cir.int<48> : !u64i @@ -253,7 +253,7 @@ void t_new_var_size6(int n) { auto p = new double[n] { 1, 2, 3 }; } -// CHECK: cir.func dso_local @_Z15t_new_var_size6i +// CHECK: cir.func {{.*}} @_Z15t_new_var_size6i // CHECK: %[[N:.*]] = cir.load{{.*}} %[[ARG_ALLOCA:.*]] // CHECK: %[[N_SIZE_T:.*]] = cir.cast integral %[[N]] : !s32i -> !u64i // CHECK: %[[MIN_SIZE:.*]] = cir.const #cir.int<3> : !u64i @@ -269,7 +269,7 @@ void t_new_var_size7(__int128 n) { auto p = new double[n]; } -// CHECK: cir.func dso_local @_Z15t_new_var_size7n +// CHECK: cir.func {{.*}} @_Z15t_new_var_size7n // CHECK: %[[N:.*]] = cir.load{{.*}} %[[ARG_ALLOCA:.*]] // CHECK: %[[N_SIZE_T:.*]] = cir.cast integral %[[N]] : !s128i -> !u64i // CHECK: %[[ELEMENT_SIZE:.*]] = cir.const #cir.int<8> : !u64i @@ -282,7 +282,7 @@ void t_new_var_size_nontrivial(size_t n) { auto p = new D[n]; } -// CHECK: cir.func dso_local @_Z25t_new_var_size_nontrivialm +// CHECK: cir.func {{.*}} @_Z25t_new_var_size_nontrivialm // CHECK: %[[N:.*]] = cir.load{{.*}} %[[ARG_ALLOCA:.*]] // CHECK: %[[ELEMENT_SIZE:.*]] = cir.const #cir.int<4> : !u64i // CHECK: %[[SIZE_WITHOUT_COOKIE:.*]], %[[OVERFLOW:.*]] = cir.binop.overflow(mul, %[[N]], %[[ELEMENT_SIZE]]) : !u64i, (!u64i, !cir.bool) @@ -297,7 +297,7 @@ void t_multidim_init() { auto *p = new int[2][3] { {1, 2, 3}, {4, 5, 6}}; } -// CHECK: cir.func dso_local @_Z15t_multidim_initv() +// CHECK: cir.func {{.*}} @_Z15t_multidim_initv() // CHECK: %[[NUM_ELEMENTS:.*]] = cir.const #cir.int<6> : !u64i // CHECK: %[[ALLOCATION_SIZE:.*]] = cir.const #cir.int<24> : !u64i // CHECK: %[[NEW_PTR:.*]] = cir.call @_Znam(%2) : (!u64i) -> !cir.ptr diff --git a/clang/test/CIR/CodeGen/no-proto-fun-ptr.c b/clang/test/CIR/CodeGen/no-proto-fun-ptr.c index 72504a599451..51f1ecd2b03f 100644 --- a/clang/test/CIR/CodeGen/no-proto-fun-ptr.c +++ b/clang/test/CIR/CodeGen/no-proto-fun-ptr.c @@ -6,7 +6,7 @@ void check_noproto_ptr() { void (*fun)(void) = empty; } -// CHECK: cir.func no_proto dso_local @check_noproto_ptr() +// CHECK: cir.func no_proto{{.*}} @check_noproto_ptr() // CHECK: [[ALLOC:%.*]] = cir.alloca !cir.ptr>, !cir.ptr>>, ["fun", init] {alignment = 8 : i64} // CHECK: [[GGO:%.*]] = cir.get_global @empty : !cir.ptr> // CHECK: cir.store{{.*}} [[GGO]], [[ALLOC]] : !cir.ptr>, !cir.ptr>> @@ -19,7 +19,7 @@ void buz() { (*func)(); } -// CHECK: cir.func no_proto dso_local @buz() +// CHECK: cir.func {{.*}} @buz() // CHECK: [[FNPTR_ALLOC:%.*]] = cir.alloca !cir.ptr>, !cir.ptr>>, ["func"] {alignment = 8 : i64} // CHECK: [[FNPTR:%.*]] = cir.load deref{{.*}} [[FNPTR_ALLOC]] : !cir.ptr>>, !cir.ptr> // CHECK: [[CAST:%.*]] = cir.cast bitcast %1 : !cir.ptr> -> !cir.ptr> diff --git a/clang/test/CIR/CodeGen/no-proto-is-void.cpp b/clang/test/CIR/CodeGen/no-proto-is-void.cpp index ca917b7f9088..fcb73e304a11 100644 --- a/clang/test/CIR/CodeGen/no-proto-is-void.cpp +++ b/clang/test/CIR/CodeGen/no-proto-is-void.cpp @@ -5,7 +5,7 @@ // Both CXX and C2X don't support no-prototype functions. They default to void. int noProto(); -// CHECK: cir.func dso_local @{{.*}}noProto{{.*}}() -> !s32i +// CHECK: cir.func {{.*}} @{{.*}}noProto{{.*}}() -> !s32i int test(int x) { return noProto(); // CHECK {{.+}} = cir.call @{{.*}}noProto{{.*}}() : () -> !s32i diff --git a/clang/test/CIR/CodeGen/no-prototype.c b/clang/test/CIR/CodeGen/no-prototype.c index 728c4b80b95a..d37b6fbefa7c 100644 --- a/clang/test/CIR/CodeGen/no-prototype.c +++ b/clang/test/CIR/CodeGen/no-prototype.c @@ -7,9 +7,9 @@ // No-proto definition followed by a correct call. int noProto0(x) int x; { return x; } -// CHECK: cir.func no_proto dso_local @noProto0(%arg0: !s32i {{.+}}) -> !s32i +// CHECK: cir.func no_proto {{.*}} @noProto0(%arg0: !s32i {{.+}}) -> !s32i int test0(int x) { - // CHECK: cir.func dso_local @test0 + // CHECK: cir.func {{.*}} @test0 return noProto0(x); // We know the definition. Should be a direct call. // CHECK: %{{.+}} = cir.call @noProto0(%{{.+}}) } @@ -21,9 +21,9 @@ int test0(int x) { // definition is not marked as no-proto. int noProto1(); int noProto1(int x) { return x; } -// CHECK: cir.func dso_local @noProto1(%arg0: !s32i {{.+}}) -> !s32i +// CHECK: cir.func {{.*}} @noProto1(%arg0: !s32i {{.+}}) -> !s32i int test1(int x) { - // CHECK: cir.func dso_local @test1 + // CHECK: cir.func {{.*}} @test1 return noProto1(x); // CHECK: %{{.+}} = cir.call @noProto1(%{{[0-9]+}}) : (!s32i) -> !s32i } @@ -39,7 +39,7 @@ int test2(int x) { // CHECK: {{.*}} = cir.call [[GGO]](%{{[0-9]+}}) : (!cir.ptr !s32i>>, !s32i) -> !s32i } int noProto2(int x) { return x; } -// CHECK: cir.func no_proto dso_local @noProto2(%arg0: !s32i {{.+}}) -> !s32i +// CHECK: cir.func no_proto {{.*}} @noProto2(%arg0: !s32i {{.+}}) -> !s32i // No-proto declaration without definition (any call here is "correct"). // @@ -48,7 +48,7 @@ int noProto2(int x) { return x; } int noProto3(); // cir.func private no_proto @noProto3(...) -> !s32i int test3(int x) { -// CHECK: cir.func dso_local @test3 +// CHECK: cir.func {{.*}} @test3 return noProto3(x); // CHECK: [[GGO:%.*]] = cir.get_global @noProto3 : !cir.ptr !s32i>> // CHECK: [[CAST:%.*]] = cir.cast bitcast [[GGO]] : !cir.ptr !s32i>> -> !cir.ptr !s32i>> @@ -64,7 +64,7 @@ int test3(int x) { // No-proto definition followed by an incorrect call due to extra args. int noProto4() { return 0; } -// cir.func private no_proto @noProto4() -> !s32i +// cir.func private no_proto {{.*}} @noProto4() -> !s32i int test4(int x) { return noProto4(x); // Even if we know the definition, this should compile. // CHECK: [[GGO:%.*]] = cir.get_global @noProto4 : !cir.ptr !s32i>> @@ -81,4 +81,4 @@ int test5(int x) { // CHECK: {{%.*}} = cir.call [[CAST]]() : (!cir.ptr !s32i>>) -> !s32i } int noProto5(int x) { return x; } -// CHECK: cir.func no_proto dso_local @noProto5(%arg0: !s32i {{.+}}) -> !s32i +// CHECK: cir.func no_proto {{.*}} @noProto5(%arg0: !s32i {{.+}}) -> !s32i diff --git a/clang/test/CIR/CodeGen/nrvo.cpp b/clang/test/CIR/CodeGen/nrvo.cpp index 1821c2953465..982151b79666 100644 --- a/clang/test/CIR/CodeGen/nrvo.cpp +++ b/clang/test/CIR/CodeGen/nrvo.cpp @@ -11,7 +11,7 @@ std::vector test_nrvo() { // CHECK: ![[VEC:.*]] = !cir.record" {!cir.ptr>, !cir.ptr>, !cir.ptr>}> -// CHECK: cir.func dso_local @_Z9test_nrvov() -> ![[VEC]] +// CHECK: cir.func {{.*}} @_Z9test_nrvov() -> ![[VEC]] // CHECK: %0 = cir.alloca ![[VEC]], !cir.ptr, ["__retval", init] {alignment = 8 : i64} // CHECK: %1 = cir.alloca !cir.bool, !cir.ptr, ["nrvo"] {alignment = 1 : i64} // CHECK: %2 = cir.const #false diff --git a/clang/test/CIR/CodeGen/nullptr-init.cpp b/clang/test/CIR/CodeGen/nullptr-init.cpp index b4de1ee9b917..abb1290fdf45 100644 --- a/clang/test/CIR/CodeGen/nullptr-init.cpp +++ b/clang/test/CIR/CodeGen/nullptr-init.cpp @@ -9,7 +9,7 @@ void t1() { int *p3 = (int*)0; } -// CIR: cir.func dso_local @_Z2t1v() +// CIR: cir.func {{.*}} @_Z2t1v() // CIR-NEXT: %[[P1:.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["p1", init] {alignment = 8 : i64} // CIR-NEXT: %[[P2:.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["p2", init] {alignment = 8 : i64} // CIR-NEXT: %[[P3:.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["p3", init] {alignment = 8 : i64} @@ -45,7 +45,7 @@ int t2() { // casting it to the required type, but a redundant constant seems less // intrusive than a redundant bitcast. -// CIR: cir.func dso_local @_Z2t2v() +// CIR: cir.func {{.*}} @_Z2t2v() // CIR-NEXT: %[[RETVAL_ADDR:.*]] = cir.alloca !s32i, !cir.ptr, ["__retval"] {alignment = 4 : i64} // CIR-NEXT: %[[X:.*]] = cir.alloca !s32i, !cir.ptr, ["x", init] {alignment = 4 : i64} // CIR-NEXT: %[[P:.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["p", init] {alignment = 8 : i64} diff --git a/clang/test/CIR/CodeGen/offsetof.c b/clang/test/CIR/CodeGen/offsetof.c index a549b0fcbc3a..19dfab8d3a1a 100644 --- a/clang/test/CIR/CodeGen/offsetof.c +++ b/clang/test/CIR/CodeGen/offsetof.c @@ -12,7 +12,7 @@ void foo() { offsetof(A, b); } -// CHECK: cir.func no_proto dso_local @foo() +// CHECK: cir.func {{.*}} @foo() // CHECK: {{.*}} = cir.const #cir.int<0> : !u64i // CHECK: {{.*}} = cir.const #cir.int<4> : !u64i // CHECK: cir.return diff --git a/clang/test/CIR/CodeGen/ofstream.cpp b/clang/test/CIR/CodeGen/ofstream.cpp index 491334770157..582574a62182 100644 --- a/clang/test/CIR/CodeGen/ofstream.cpp +++ b/clang/test/CIR/CodeGen/ofstream.cpp @@ -25,7 +25,7 @@ void foo(const char *path) { fout2 << path; } -// CIR: cir.func dso_local @_Z3fooPKc +// CIR: cir.func {{.*}} @_Z3fooPKc // CIR: %[[V1:.*]] = cir.alloca !rec_std3A3Abasic_ofstream3Cchar3E, !cir.ptr, ["fout1", init] {alignment = 1 : i64} // CIR: %[[V2:.*]] = cir.alloca !rec_std3A3Abasic_ofstream3Cchar3E, !cir.ptr, ["fout2", init] {alignment = 1 : i64} // CIR: cir.try synthetic cleanup { diff --git a/clang/test/CIR/CodeGen/opaque.c b/clang/test/CIR/CodeGen/opaque.c index 04bff63d5c62..f3b8aab76d5d 100644 --- a/clang/test/CIR/CodeGen/opaque.c +++ b/clang/test/CIR/CodeGen/opaque.c @@ -5,7 +5,7 @@ int foo(int x, short y) { return x ?: y; } -// CHECK: cir.func dso_local @foo +// CHECK: cir.func {{.*}} @foo // CHECK: %[[Load:.*]] = cir.load // CHECK: %[[Bool:.*]] = cir.cast int_to_bool %[[Load]] : !s32i -> !cir.bool loc(#loc8) // CHECK: = cir.ternary(%[[Bool]], true { diff --git a/clang/test/CIR/CodeGen/optnone.cpp b/clang/test/CIR/CodeGen/optnone.cpp index 0dcf6497f4d1..64b4cd3b166b 100644 --- a/clang/test/CIR/CodeGen/optnone.cpp +++ b/clang/test/CIR/CodeGen/optnone.cpp @@ -18,7 +18,7 @@ int s0(int a, int b) { } // CIR-O0: #fn_attr = #cir, nothrow = #cir.nothrow, optnone = #cir.optnone})> -// CIR-O0: cir.func dso_local @_Z2s0ii(%arg0:{{.*}}, %arg1:{{.*}} -> {{.*}} extra(#fn_attr) +// CIR-O0: cir.func {{.*}} @_Z2s0ii(%arg0:{{.*}}, %arg1:{{.*}} -> {{.*}} extra(#fn_attr) // CIR-O2-NOT: #fn_attr ={{.*}} optnone diff --git a/clang/test/CIR/CodeGen/paren-list-init.cpp b/clang/test/CIR/CodeGen/paren-list-init.cpp index ed10c74a44a4..aa5bc1ca2f24 100644 --- a/clang/test/CIR/CodeGen/paren-list-init.cpp +++ b/clang/test/CIR/CodeGen/paren-list-init.cpp @@ -23,7 +23,7 @@ template void make1() { Vec v; S1((Vec&&) v); -// CIR: cir.func linkonce_odr @_Z5make1ILi0EEvv() +// CIR: cir.func {{.*}} @_Z5make1ILi0EEvv() // CIR: %[[VEC:.*]] = cir.alloca ![[VecType]], !cir.ptr // CIR: cir.call @_ZN3VecC1Ev(%[[VEC]]) : (!cir.ptr) // CIR: cir.scope { @@ -35,7 +35,7 @@ void make1() { // CIR: cir.call @_ZN3VecD1Ev(%[[VEC]]) : (!cir.ptr) -> () // CIR: cir.return -// CIR_EH: cir.func linkonce_odr @_Z5make1ILi0EEvv() +// CIR_EH: cir.func {{.*}} @_Z5make1ILi0EEvv() // CIR_EH: %[[VEC:.*]] = cir.alloca ![[VecType]], !cir.ptr, ["v", init] // Construct v diff --git a/clang/test/CIR/CodeGen/pass-object-size.c b/clang/test/CIR/CodeGen/pass-object-size.c index 57dc198d0680..f10d0981565a 100644 --- a/clang/test/CIR/CodeGen/pass-object-size.c +++ b/clang/test/CIR/CodeGen/pass-object-size.c @@ -12,7 +12,7 @@ void c() { e(d); } -// CIR: cir.func no_proto dso_local @c() +// CIR: cir.func {{.*}} @c() // CIR: [[TMP0:%.*]] = cir.alloca !s32i, !cir.ptr, %{{[0-9]+}} : !u64i, ["vla"] {alignment = 16 : i64} // CIR: [[TMP1:%.*]] = cir.cast bitcast [[TMP0]] : !cir.ptr -> !cir.ptr // CIR-NEXT: [[TMP2:%.*]] = cir.objsize max [[TMP1]] : !cir.ptr -> !u64i diff --git a/clang/test/CIR/CodeGen/pointer-to-data-member.cpp b/clang/test/CIR/CodeGen/pointer-to-data-member.cpp index b753ccfb4160..88325722092c 100644 --- a/clang/test/CIR/CodeGen/pointer-to-data-member.cpp +++ b/clang/test/CIR/CodeGen/pointer-to-data-member.cpp @@ -17,46 +17,46 @@ int Point::*pt_member = &Point::x; auto test1() -> int Point::* { return &Point::y; } -// CHECK: cir.func dso_local @_Z5test1v() -> !cir.data_member +// CHECK: cir.func {{.*}} @_Z5test1v() -> !cir.data_member // CHECK: %{{.+}} = cir.const #cir.data_member<1> : !cir.data_member // CHECK: } int test2(const Point &pt, int Point::*member) { return pt.*member; } -// CHECK: cir.func dso_local @_Z5test2RK5PointMS_i +// CHECK: cir.func {{.*}} @_Z5test2RK5PointMS_i // CHECK: %{{.+}} = cir.get_runtime_member %{{.+}}[%{{.+}} : !cir.data_member] : !cir.ptr -> !cir.ptr // CHECK: } int test3(const Point *pt, int Point::*member) { return pt->*member; } -// CHECK: cir.func dso_local @_Z5test3PK5PointMS_i +// CHECK: cir.func {{.*}} @_Z5test3PK5PointMS_i // CHECK: %{{.+}} = cir.get_runtime_member %{{.+}}[%{{.+}} : !cir.data_member] : !cir.ptr -> !cir.ptr // CHECK: } auto test4(int Incomplete::*member) -> int Incomplete::* { return member; } -// CHECK: cir.func dso_local @_Z5test4M10Incompletei(%arg0: !cir.data_member loc({{.+}})) -> !cir.data_member +// CHECK: cir.func {{.*}} @_Z5test4M10Incompletei(%arg0: !cir.data_member loc({{.+}})) -> !cir.data_member int test5(Incomplete *ic, int Incomplete::*member) { return ic->*member; } -// CHECK: cir.func dso_local @_Z5test5P10IncompleteMS_i +// CHECK: cir.func {{.*}} @_Z5test5P10IncompleteMS_i // CHECK: %{{.+}} = cir.get_runtime_member %{{.+}}[%{{.+}} : !cir.data_member] : !cir.ptr -> !cir.ptr // CHECK: } auto test_null() -> int Point::* { return nullptr; } -// CHECK: cir.func dso_local @_Z9test_nullv +// CHECK: cir.func {{.*}} @_Z9test_nullv // CHECK: %{{.+}} = cir.const #cir.data_member : !cir.data_member // CHECK: } auto test_null_incomplete() -> int Incomplete::* { return nullptr; } -// CHECK: cir.func dso_local @_Z20test_null_incompletev +// CHECK: cir.func {{.*}} @_Z20test_null_incompletev // CHECK: %{{.+}} = cir.const #cir.data_member : !cir.data_member // CHECK: } diff --git a/clang/test/CIR/CodeGen/pointer-to-member-func.cpp b/clang/test/CIR/CodeGen/pointer-to-member-func.cpp index 3515f91f2875..02a773e738d0 100644 --- a/clang/test/CIR/CodeGen/pointer-to-member-func.cpp +++ b/clang/test/CIR/CodeGen/pointer-to-member-func.cpp @@ -13,7 +13,7 @@ auto make_non_virtual() -> void (Foo::*)(int) { return &Foo::m1; } -// CHECK-LABEL: cir.func dso_local @_Z16make_non_virtualv() -> !cir.method in !rec_Foo> +// CHECK-LABEL: cir.func {{.*}} @_Z16make_non_virtualv() -> !cir.method in !rec_Foo> // CHECK: %{{.+}} = cir.const #cir.method<@_ZN3Foo2m1Ei> : !cir.method in !rec_Foo> // CHECK: } @@ -25,7 +25,7 @@ auto make_virtual() -> void (Foo::*)(int) { return &Foo::m3; } -// CHECK-LABEL: cir.func dso_local @_Z12make_virtualv() -> !cir.method in !rec_Foo> +// CHECK-LABEL: cir.func {{.*}} @_Z12make_virtualv() -> !cir.method in !rec_Foo> // CHECK: %{{.+}} = cir.const #cir.method : !cir.method in !rec_Foo> // CHECK: } @@ -37,7 +37,7 @@ auto make_null() -> void (Foo::*)(int) { return nullptr; } -// CHECK-LABEL: cir.func dso_local @_Z9make_nullv() -> !cir.method in !rec_Foo> +// CHECK-LABEL: cir.func {{.*}} @_Z9make_nullv() -> !cir.method in !rec_Foo> // CHECK: %{{.+}} = cir.const #cir.method : !cir.method in !rec_Foo> // CHECK: } @@ -49,7 +49,7 @@ void call(Foo *obj, void (Foo::*func)(int), int arg) { (obj->*func)(arg); } -// CHECK-LABEL: cir.func dso_local @_Z4callP3FooMS_FviEi +// CHECK-LABEL: cir.func {{.*}} @_Z4callP3FooMS_FviEi // CHECK: %[[CALLEE:.+]], %[[THIS:.+]] = cir.get_method %{{.+}}, %{{.+}} : (!cir.method in !rec_Foo>, !cir.ptr) -> (!cir.ptr, !s32i)>>, !cir.ptr) // CHECK-NEXT: %[[#ARG:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !s32i // CHECK-NEXT: cir.call %[[CALLEE]](%[[THIS]], %[[#ARG]]) : (!cir.ptr, !s32i)>>, !cir.ptr, !s32i) -> () diff --git a/clang/test/CIR/CodeGen/pred-info-builtins.c b/clang/test/CIR/CodeGen/pred-info-builtins.c index 024f7e0ac83d..f130c209446c 100644 --- a/clang/test/CIR/CodeGen/pred-info-builtins.c +++ b/clang/test/CIR/CodeGen/pred-info-builtins.c @@ -7,11 +7,11 @@ void expect(int x) { if (__builtin_expect(x, 0)) bar(); } -// CIR-O0: cir.func dso_local @expect +// CIR-O0: cir.func {{.*}} @expect // CIR-O0: cir.if {{%.*}} { // CIR-O0: cir.call @bar() : () -> () -// CIR-O2: cir.func dso_local @expect +// CIR-O2: cir.func {{.*}} @expect // CIR-O2: [[EXPECT:%.*]] = cir.expect({{.*}}, {{.*}}) : !s64i // CIR-O2: [[EXPECT_BOOL:%.*]] = cir.cast int_to_bool [[EXPECT]] : !s64i -> !cir.bool // CIR-O2: cir.if [[EXPECT_BOOL]] @@ -21,11 +21,11 @@ void expect_with_probability(int x) { if (__builtin_expect_with_probability(x, 1, 0.8)) bar(); } -// CIR-O0: cir.func dso_local @expect_with_probability +// CIR-O0: cir.func {{.*}} @expect_with_probability // CIR-O0: cir.if {{%.*}} { // CIR-O0: cir.call @bar() : () -> () -// CIR-O2: cir.func dso_local @expect_with_probability +// CIR-O2: cir.func {{.*}} @expect_with_probability // CIR-O2: [[EXPECT:%.*]] = cir.expect({{.*}}, {{.*}}, 8.000000e-01) : !s64i // CIR-O2: [[EXPECT_BOOL:%.*]] = cir.cast int_to_bool [[EXPECT]] : !s64i -> !cir.bool // CIR-O2: cir.if [[EXPECT_BOOL]] @@ -34,7 +34,7 @@ void expect_with_probability(int x) { void unpredictable(int x) { if (__builtin_unpredictable(x > 1)) bar(); -// CIR-O0: cir.func dso_local @unpredictable +// CIR-O0: cir.func {{.*}} @unpredictable // CIR-O0: cir.if {{%.*}} { // CIR-O0: cir.call @bar() : () -> () } diff --git a/clang/test/CIR/CodeGen/predefined.cpp b/clang/test/CIR/CodeGen/predefined.cpp index 48b7f29b08f5..eaed978df46b 100644 --- a/clang/test/CIR/CodeGen/predefined.cpp +++ b/clang/test/CIR/CodeGen/predefined.cpp @@ -9,7 +9,7 @@ void m() { __assert2("yo.cpp", 79, __PRETTY_FUNCTION__, "doom"); } -// CHECK: cir.func dso_local @_Z1mv() +// CHECK: cir.func {{.*}} @_Z1mv() // CHECK: %0 = cir.get_global @".str" : !cir.ptr> // CHECK: %1 = cir.cast array_to_ptrdecay %0 : !cir.ptr> -> !cir.ptr // CHECK: %2 = cir.const #cir.int<79> : !s32i diff --git a/clang/test/CIR/CodeGen/ptrdiff.cpp b/clang/test/CIR/CodeGen/ptrdiff.cpp index ba54b7a3b11b..54a440c9949b 100644 --- a/clang/test/CIR/CodeGen/ptrdiff.cpp +++ b/clang/test/CIR/CodeGen/ptrdiff.cpp @@ -6,7 +6,7 @@ size_type size(unsigned long *_start, unsigned long *_finish) { return static_cast(_finish - _start); } -// CHECK: cir.func dso_local @_Z4sizePmS_(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @_Z4sizePmS_(%arg0: !cir.ptr // CHECK: %3 = cir.load{{.*}} %1 : !cir.ptr>, !cir.ptr // CHECK: %4 = cir.load{{.*}} %0 : !cir.ptr>, !cir.ptr // CHECK: %5 = cir.ptr_diff %3, %4 : !cir.ptr -> !s64i @@ -16,7 +16,7 @@ long add(char *a, char *b) { return a - b + 1; } -// CHECK: cir.func dso_local @_Z3addPcS_(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @_Z3addPcS_(%arg0: !cir.ptr // %5 = cir.ptr_diff %3, %4 : !cir.ptr -> !s64i // %6 = cir.const #cir.int<1> : !s32i // %7 = cir.cast integral %6 : !s32i -> !s64i diff --git a/clang/test/CIR/CodeGen/rangefor.cpp b/clang/test/CIR/CodeGen/rangefor.cpp index fb74daa186f7..1ff8c7978f89 100644 --- a/clang/test/CIR/CodeGen/rangefor.cpp +++ b/clang/test/CIR/CodeGen/rangefor.cpp @@ -25,7 +25,7 @@ void init(unsigned numImages) { // CHECK-DAG: ![[VEC:.*]] = !cir.record" {!cir.ptr, !cir.ptr, !cir.ptr}> // CHECK-DAG: ![[VEC_IT:.*]] = !cir.record" {!cir.ptr}> -// CHECK: cir.func dso_local @_Z4initj(%arg0: !u32i +// CHECK: cir.func {{.*}} @_Z4initj(%arg0: !u32i // CHECK: %0 = cir.alloca !u32i, !cir.ptr, ["numImages", init] {alignment = 4 : i64} // CHECK: %1 = cir.alloca ![[VEC]], !cir.ptr, ["images", init] {alignment = 8 : i64} // CHECK: cir.store{{.*}} %arg0, %0 : !u32i, !cir.ptr diff --git a/clang/test/CIR/CodeGen/requires-expr.cpp b/clang/test/CIR/CodeGen/requires-expr.cpp index bb5cf10a7b17..ff39fae0af4a 100644 --- a/clang/test/CIR/CodeGen/requires-expr.cpp +++ b/clang/test/CIR/CodeGen/requires-expr.cpp @@ -3,7 +3,7 @@ // Test RequiresExpr as a boolean expression bool test_requires_simple() { - // CHECK-LABEL: cir.func {{.*}}@{{.*}}test_requires_simplev + // CHECK-LABEL: cir.func{{.*}} @{{.*}}test_requires_simplev // CHECK: %{{.*}} = cir.const #true return requires { 1 + 1; }; } @@ -14,7 +14,7 @@ bool test_requires_param() { } bool use_requires_param() { - // CHECK-LABEL: cir.func {{.*}}@{{.*}}use_requires_paramv + // CHECK-LABEL: cir.func{{.*}} @{{.*}}use_requires_paramv // Instantiation with int should succeed return test_requires_param(); // CHECK: cir.call @{{.*}}test_requires_paramIiEbv @@ -22,7 +22,7 @@ bool use_requires_param() { // Test requires expression with multiple requirements bool test_requires_multiple() { - // CHECK-LABEL: cir.func {{.*}}@{{.*}}test_requires_multiplev + // CHECK-LABEL: cir.func{{.*}} @{{.*}}test_requires_multiplev // CHECK: %{{.*}} = cir.const #true return requires { 1 + 1; @@ -32,7 +32,7 @@ bool test_requires_multiple() { // Test requires expression in if statement int test_requires_in_if() { - // CHECK-LABEL: cir.func {{.*}}@{{.*}}test_requires_in_ifv + // CHECK-LABEL: cir.func{{.*}} @{{.*}}test_requires_in_ifv if (requires { 1 + 1; }) { // CHECK: %{{.*}} = cir.const #true // CHECK: cir.if %{{.*}} { @@ -48,7 +48,7 @@ bool test_requires_fail() { } bool use_requires_fail() { - // CHECK-LABEL: cir.func {{.*}}@{{.*}}use_requires_failv + // CHECK-LABEL: cir.func{{.*}} @{{.*}}use_requires_failv // Should return false for int (no member named nonexistent_member) return test_requires_fail(); // CHECK: cir.call @{{.*}}test_requires_failIiEbv @@ -56,7 +56,7 @@ bool use_requires_fail() { // Test nested requires bool test_nested_requires() { - // CHECK-LABEL: cir.func {{.*}}@{{.*}}test_nested_requiresv + // CHECK-LABEL: cir.func{{.*}} @{{.*}}test_nested_requiresv // CHECK: %{{.*}} = cir.const #true return requires { requires true; @@ -67,7 +67,7 @@ bool test_nested_requires() { constexpr bool can_add_int = requires(int a, int b) { a + b; }; int use_constexpr_requires() { - // CHECK-LABEL: cir.func {{.*}}@{{.*}}use_constexpr_requiresv + // CHECK-LABEL: cir.func{{.*}} @{{.*}}use_constexpr_requiresv if (can_add_int) { return 42; } diff --git a/clang/test/CIR/CodeGen/return.cpp b/clang/test/CIR/CodeGen/return.cpp index e77dd5e1ac04..c59a5f30c7ab 100644 --- a/clang/test/CIR/CodeGen/return.cpp +++ b/clang/test/CIR/CodeGen/return.cpp @@ -4,7 +4,7 @@ int &ret0(int &x) { return x; } -// CHECK: cir.func dso_local @_Z4ret0Ri +// CHECK: cir.func {{.*}} @_Z4ret0Ri // CHECK: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["x", init, const] {alignment = 8 : i64} // CHECK: %1 = cir.alloca !cir.ptr, !cir.ptr>, ["__retval"] {alignment = 8 : i64} // CHECK: cir.store{{.*}} %arg0, %0 : !cir.ptr, !cir.ptr> @@ -18,7 +18,7 @@ int unreachable_after_return() { return 1; } -// CHECK: cir.func dso_local @_Z24unreachable_after_returnv +// CHECK: cir.func {{.*}} @_Z24unreachable_after_returnv // CHECK-NEXT: %0 = cir.alloca !s32i, !cir.ptr, ["__retval"] {alignment = 4 : i64} // CHECK-NEXT: %1 = cir.const #cir.int<0> : !s32i // CHECK-NEXT: cir.store{{.*}} %1, %0 : !s32i, !cir.ptr diff --git a/clang/test/CIR/CodeGen/same-mangled-name.cpp b/clang/test/CIR/CodeGen/same-mangled-name.cpp index f79d5bb4c321..58660c813345 100644 --- a/clang/test/CIR/CodeGen/same-mangled-name.cpp +++ b/clang/test/CIR/CodeGen/same-mangled-name.cpp @@ -5,11 +5,11 @@ // definition" error: https://github.com/llvm/clangir/issues/991. namespace N { struct S { - // CHECK: cir.func linkonce_odr @_ZN1N1S3fooEv({{.*}} { + // CHECK: cir.func {{.*}} @_ZN1N1S3fooEv({{.*}} { void foo() {} }; -// CHECK: cir.func dso_local @_ZN1N1fEv() {{.*}} { +// CHECK: cir.func {{.*}} @_ZN1N1fEv() {{.*}} { // CHECK: cir.call @_ZN1N1S3fooEv( void f() { S().foo(); } } // namespace N diff --git a/clang/test/CIR/CodeGen/sizeof-pack.cpp b/clang/test/CIR/CodeGen/sizeof-pack.cpp index 4242e9666f64..e44ac96f0557 100644 --- a/clang/test/CIR/CodeGen/sizeof-pack.cpp +++ b/clang/test/CIR/CodeGen/sizeof-pack.cpp @@ -7,7 +7,7 @@ int get_num_types(Types...) { return sizeof...(Types); } -// CHECK-LABEL: cir.func {{.*}}@{{.*}}get_num_typesIJifdEEiDpT_ +// CHECK-LABEL: cir.func{{.*}} @{{.*}}get_num_typesIJifdEEiDpT_ // CHECK: %{{.*}} = cir.const #cir.int<3> : !u64i // CHECK: %{{.*}} = cir.cast integral %{{.*}} : !u64i -> !s32i @@ -19,7 +19,7 @@ int get_num_empty(Types...) { return sizeof...(Types); } -// CHECK-LABEL: cir.func {{.*}}@{{.*}}get_num_emptyIJEEiDpT_ +// CHECK-LABEL: cir.func{{.*}} @{{.*}}get_num_emptyIJEEiDpT_ // CHECK: %{{.*}} = cir.const #cir.int<0> : !u64i template int get_num_empty(); @@ -30,7 +30,7 @@ int count_values() { return sizeof...(Vals); } -// CHECK-LABEL: cir.func {{.*}}@{{.*}}count_valuesIJLi1ELi2ELi3ELi4ELi5EEEiv +// CHECK-LABEL: cir.func{{.*}} @{{.*}}count_valuesIJLi1ELi2ELi3ELi4ELi5EEEiv // CHECK: %{{.*}} = cir.const #cir.int<5> : !u64i template int count_values<1, 2, 3, 4, 5>(); diff --git a/clang/test/CIR/CodeGen/skip-functions-from-system-headers.cpp b/clang/test/CIR/CodeGen/skip-functions-from-system-headers.cpp index 94c65654a410..f9511a69fb91 100644 --- a/clang/test/CIR/CodeGen/skip-functions-from-system-headers.cpp +++ b/clang/test/CIR/CodeGen/skip-functions-from-system-headers.cpp @@ -9,10 +9,9 @@ void test() { String s3{"abcdefghijklmnop"}; } -// CHECK-NOT: cir.func linkonce_odr @_ZN6StringC2Ev -// CHECK-NOT: cir.func linkonce_odr @_ZN6StringC2Ei -// CHECK-NOT: cir.func linkonce_odr @_ZN6StringC2EPKc -// CHECK-NOT: cir.func linkonce_odr @_ZN6StringC1EPKc +// CHECK-NOT: cir.func {{.*}} @_ZN6StringC2Ev +// CHECK-NOT: cir.func {{.*}} @_ZN6StringC2Ei +// CHECK-NOT: cir.func {{.*}} @_ZN6StringC2EPKc -// CHECK: cir.func dso_local @_Z4testv() +// CHECK: cir.func {{.*}} @_Z4testv() // CHECK: cir.call @_ZN6StringC1Ev(%0) : (!cir.ptr) -> () diff --git a/clang/test/CIR/CodeGen/source-loc-expr.cpp b/clang/test/CIR/CodeGen/source-loc-expr.cpp index 7232259c514a..f90e05ccbdc2 100644 --- a/clang/test/CIR/CodeGen/source-loc-expr.cpp +++ b/clang/test/CIR/CodeGen/source-loc-expr.cpp @@ -15,7 +15,7 @@ int global_line = __builtin_LINE(); #line 15 "clang/test/CIR/CodeGen/source-loc-expr.cpp" // Test __builtin_LINE int test_builtin_LINE() { - // CIR-LABEL: cir.func {{.*}}@{{.*}}test_builtin_LINE + // CIR-LABEL: cir.func{{.*}} @{{.*}}test_builtin_LINE // CIR: %{{.*}} = cir.const #cir.int<25> : !u32i // LLVM-LABEL: @{{.*}}test_builtin_LINE @@ -28,7 +28,7 @@ int test_builtin_LINE() { // Test __builtin_FILE const char* test_builtin_FILE() { - // CIR-LABEL: cir.func {{.*}}@{{.*}}test_builtin_FILE + // CIR-LABEL: cir.func{{.*}} @{{.*}}test_builtin_FILE // CIR: %{{.*}} = cir.const #cir.global_view<@".str{{.*}}"> : !cir.ptr // LLVM-LABEL: @{{.*}}test_builtin_FILE @@ -41,7 +41,7 @@ const char* test_builtin_FILE() { // Test __builtin_FUNCTION const char* test_builtin_FUNCTION() { - // CIR-LABEL: cir.func {{.*}}@{{.*}}test_builtin_FUNCTION + // CIR-LABEL: cir.func{{.*}} @{{.*}}test_builtin_FUNCTION // CIR: %{{.*}} = cir.const #cir.global_view<@".str{{.*}}"> : !cir.ptr // LLVM-LABEL: @{{.*}}test_builtin_FUNCTION @@ -54,7 +54,7 @@ const char* test_builtin_FUNCTION() { // Test __builtin_COLUMN int test_builtin_COLUMN() { - // CIR-LABEL: cir.func {{.*}}@{{.*}}test_builtin_COLUMN + // CIR-LABEL: cir.func{{.*}} @{{.*}}test_builtin_COLUMN // The column number is the position of '__builtin_COLUMN' // CIR: %{{.*}} = cir.const #cir.int<10> : !u32i @@ -72,7 +72,7 @@ int get_line(int l = __builtin_LINE()) { } void test_default_arg() { - // CIR-LABEL: cir.func {{.*}}@{{.*}}test_default_arg + // CIR-LABEL: cir.func{{.*}} @{{.*}}test_default_arg // The LINE should be from the call site, not the default argument definition #line 111 int x = get_line(); @@ -89,7 +89,7 @@ void test_default_arg() { #line 200 "lambda-test.cpp" // Test in lambda (this tests that source location correctly captures context) void test_in_lambda() { - // CIR-LABEL: cir.func {{.*}}@{{.*}}test_in_lambda + // CIR-LABEL: cir.func{{.*}} @{{.*}}test_in_lambda auto lambda = []() { return __builtin_LINE(); }; @@ -105,7 +105,7 @@ void test_in_lambda() { #line 214 "combined-test.cpp" // Test multiple builtins in one expression void test_combined() { - // CIR-LABEL: cir.func {{.*}}@{{.*}}test_combined + // CIR-LABEL: cir.func{{.*}} @{{.*}}test_combined const char* file = __builtin_FILE(); int line = __builtin_LINE(); const char* func = __builtin_FUNCTION(); diff --git a/clang/test/CIR/CodeGen/sourcelocation.cpp b/clang/test/CIR/CodeGen/sourcelocation.cpp index f133b6fe00f6..77da8e700192 100644 --- a/clang/test/CIR/CodeGen/sourcelocation.cpp +++ b/clang/test/CIR/CodeGen/sourcelocation.cpp @@ -19,7 +19,7 @@ int s0(int a, int b) { // CIR: #loc21 = loc(fused[#loc3, #loc4]) // CIR: #loc22 = loc(fused[#loc5, #loc6]) // CIR: module @"{{.*}}sourcelocation.cpp" attributes {{{.*}}cir.lang = #cir.lang, {{.*}}cir.sob = #cir.signed_overflow_behavior -// CIR: cir.func dso_local @_Z2s0ii(%arg0: !s32i loc(fused[#loc3, #loc4]), %arg1: !s32i loc(fused[#loc5, #loc6])) -> !s32i +// CIR: cir.func {{.*}} @_Z2s0ii(%arg0: !s32i loc(fused[#loc3, #loc4]), %arg1: !s32i loc(fused[#loc5, #loc6])) -> !s32i // CIR: %0 = cir.alloca !s32i, !cir.ptr, ["a", init] {alignment = 4 : i64} loc(#loc21) // CIR: %1 = cir.alloca !s32i, !cir.ptr, ["b", init] {alignment = 4 : i64} loc(#loc22) // CIR: %2 = cir.alloca !s32i, !cir.ptr, ["__retval"] {alignment = 4 : i64} loc(#loc2) diff --git a/clang/test/CIR/CodeGen/special-virtual-func.cpp b/clang/test/CIR/CodeGen/special-virtual-func.cpp index 83e2a27b82f0..8917d25dffb1 100644 --- a/clang/test/CIR/CodeGen/special-virtual-func.cpp +++ b/clang/test/CIR/CodeGen/special-virtual-func.cpp @@ -12,5 +12,5 @@ class A { A::A() = default; // CHECK: @_ZTV1A = #cir.vtable<{#cir.const_array<[#cir.ptr : !cir.ptr, #cir.global_view<@_ZTI1A> : !cir.ptr, #cir.global_view<@__cxa_pure_virtual> : !cir.ptr, #cir.global_view<@__cxa_deleted_virtual> : !cir.ptr]> -// CHECK: cir.func private @__cxa_pure_virtual() -// CHECK: cir.func private @__cxa_deleted_virtual() +// CHECK: cir.func {{.*}} @__cxa_pure_virtual() +// CHECK: cir.func {{.*}} @__cxa_deleted_virtual() diff --git a/clang/test/CIR/CodeGen/static.cpp b/clang/test/CIR/CodeGen/static.cpp index 60adc39c703e..92e962dc07ae 100644 --- a/clang/test/CIR/CodeGen/static.cpp +++ b/clang/test/CIR/CodeGen/static.cpp @@ -17,8 +17,8 @@ static Init __ioinit(true); static Init __ioinit2(false); // BEFORE: module {{.*}} { -// BEFORE-NEXT: cir.func private @_ZN4InitC1Eb(!cir.ptr, !cir.bool) -// BEFORE-NEXT: cir.func private @_ZN4InitD1Ev(!cir.ptr) special_member<#cir.cxx_dtor> +// BEFORE-NEXT: cir.func {{.*}} @_ZN4InitC1Eb(!cir.ptr, !cir.bool) +// BEFORE-NEXT: cir.func {{.*}} @_ZN4InitD1Ev(!cir.ptr) special_member<#cir.cxx_dtor> // BEFORE-NEXT: cir.global "private" internal dso_local @_ZL8__ioinit = ctor : !rec_Init { // BEFORE-NEXT: %0 = cir.get_global @_ZL8__ioinit : !cir.ptr // BEFORE-NEXT: %1 = cir.const #true @@ -40,9 +40,9 @@ static Init __ioinit2(false); // AFTER: module {{.*}} attributes {{.*}}cir.global_ctors = [#cir.global_ctor<"__cxx_global_var_init", 65535>, #cir.global_ctor<"__cxx_global_var_init.1", 65535>] // AFTER-NEXT: cir.global "private" external @__dso_handle : i8 -// AFTER-NEXT: cir.func private @__cxa_atexit(!cir.ptr)>>, !cir.ptr, !cir.ptr) -// AFTER-NEXT: cir.func private @_ZN4InitC1Eb(!cir.ptr, !cir.bool) -// AFTER-NEXT: cir.func private @_ZN4InitD1Ev(!cir.ptr) special_member<#cir.cxx_dtor> +// AFTER-NEXT: cir.func {{.*}} @__cxa_atexit(!cir.ptr)>>, !cir.ptr, !cir.ptr) +// AFTER-NEXT: cir.func {{.*}} @_ZN4InitC1Eb(!cir.ptr, !cir.bool) +// AFTER-NEXT: cir.func {{.*}} @_ZN4InitD1Ev(!cir.ptr) special_member<#cir.cxx_dtor> // AFTER-NEXT: cir.global "private" internal dso_local @_ZL8__ioinit = #cir.zero : !rec_Init {alignment = 1 : i64, ast = #cir.var.decl.ast} // AFTER-NEXT: cir.func internal private @__cxx_global_var_init() // AFTER-NEXT: %0 = cir.get_global @_ZL8__ioinit : !cir.ptr @@ -67,7 +67,7 @@ static Init __ioinit2(false); // AFTER-NEXT: %6 = cir.get_global @__dso_handle : !cir.ptr // AFTER-NEXT: cir.call @__cxa_atexit(%4, %5, %6) : (!cir.ptr)>>, !cir.ptr, !cir.ptr) -> () // AFTER-NEXT: cir.return -// AFTER: cir.func private @_GLOBAL__sub_I_static.cpp() +// AFTER: cir.func {{.*}} @_GLOBAL__sub_I_static.cpp() // AFTER-NEXT: cir.call @__cxx_global_var_init() : () -> () // AFTER-NEXT: cir.call @__cxx_global_var_init.1() : () -> () // AFTER-NEXT: cir.return diff --git a/clang/test/CIR/CodeGen/std-find.cpp b/clang/test/CIR/CodeGen/std-find.cpp index 5e7b504b7fe6..6e754185f118 100644 --- a/clang/test/CIR/CodeGen/std-find.cpp +++ b/clang/test/CIR/CodeGen/std-find.cpp @@ -7,7 +7,7 @@ int test_find(unsigned char n = 3) { - // CHECK: cir.func dso_local @_Z9test_findh(%arg0: !u8i + // CHECK: cir.func {{.*}} @_Z9test_findh(%arg0: !u8i unsigned num_found = 0; std::array v = {1, 2, 3, 4, 5, 6, 7, 8, 9}; // CHECK: %[[array_addr:.*]] = cir.alloca ![[array]], !cir.ptr, ["v", init] diff --git a/clang/test/CIR/CodeGen/store.c b/clang/test/CIR/CodeGen/store.c index 615a285cdf65..47f2e201087f 100644 --- a/clang/test/CIR/CodeGen/store.c +++ b/clang/test/CIR/CodeGen/store.c @@ -6,7 +6,7 @@ void foo(void) { a = 1; } -// CHECK: cir.func dso_local @foo() +// CHECK: cir.func {{.*}} @foo() // CHECK-NEXT: %0 = cir.alloca !s32i, !cir.ptr, ["a", init] {alignment = 4 : i64} // CHECK-NEXT: %1 = cir.const #cir.int<0> : !s32i // CHECK-NEXT: cir.store{{.*}} %1, %0 : !s32i, !cir.ptr diff --git a/clang/test/CIR/CodeGen/struct.c b/clang/test/CIR/CodeGen/struct.c index b01076e122e0..274c1246a36e 100644 --- a/clang/test/CIR/CodeGen/struct.c +++ b/clang/test/CIR/CodeGen/struct.c @@ -28,14 +28,14 @@ void baz(void) { // CHECK-DAG: !rec_SLocal = !cir.record // CHECK-DAG: !rec_SLocal2E0 = !cir.record // CHECK-DAG: module {{.*}} { - // CHECK: cir.func dso_local @baz() + // CHECK: cir.func {{.*}} @baz() // CHECK-NEXT: %0 = cir.alloca !rec_Bar, !cir.ptr, ["b"] {alignment = 4 : i64} // CHECK-NEXT: %1 = cir.alloca !rec_Foo, !cir.ptr, ["f"] {alignment = 4 : i64} // CHECK-NEXT: cir.return // CHECK-NEXT: } void shouldConstInitStructs(void) { -// CHECK: cir.func dso_local @shouldConstInitStructs +// CHECK: cir.func {{.*}} @shouldConstInitStructs struct Foo f = {1, 2, {3, 4}}; // CHECK: %[[#V0:]] = cir.alloca !rec_Foo, !cir.ptr, ["f"] {alignment = 4 : i64} // CHECK: %[[#V1:]] = cir.cast bitcast %[[#V0]] : !cir.ptr -> !cir.ptr @@ -76,7 +76,7 @@ struct S3 { // CHECK-DAG: cir.global external @s3 = #cir.const_array<[#cir.const_record<{#cir.int<1> : !s32i}> : !rec_S3, #cir.const_record<{#cir.int<2> : !s32i}> : !rec_S3, #cir.const_record<{#cir.int<3> : !s32i}> : !rec_S3]> : !cir.array void shouldCopyStructAsCallArg(struct S1 s) { -// CHECK-DAG: cir.func dso_local @shouldCopyStructAsCallArg +// CHECK-DAG: cir.func {{.*}} @shouldCopyStructAsCallArg shouldCopyStructAsCallArg(s); // CHECK-DAG: %[[#LV:]] = cir.load{{.*}} %{{.+}} : !cir.ptr, !rec_S1 // CHECK-DAG: cir.call @shouldCopyStructAsCallArg(%[[#LV]]) : (!rec_S1) -> () @@ -86,12 +86,12 @@ struct Bar shouldGenerateAndAccessStructArrays(void) { struct Bar s[1] = {{3, 4}}; return s[0]; } -// CHECK-DAG: cir.func dso_local @shouldGenerateAndAccessStructArrays +// CHECK-DAG: cir.func {{.*}} @shouldGenerateAndAccessStructArrays // CHECK-DAG: %[[#STRIDE:]] = cir.const #cir.int<0> : !s32i // CHECK-DAG: %[[#ELT:]] = cir.get_element %{{.+}}[%[[#STRIDE]]] : (!cir.ptr>, !s32i) -> !cir.ptr // CHECK-DAG: cir.copy %[[#ELT]] to %{{.+}} : !cir.ptr -// CHECK-DAG: cir.func dso_local @local_decl +// CHECK-DAG: cir.func {{.*}} @local_decl // CHECK-DAG: {{%.}} = cir.alloca !rec_Local, !cir.ptr, ["a"] void local_decl(void) { struct Local { @@ -100,7 +100,7 @@ void local_decl(void) { struct Local a; } -// CHECK-DAG: cir.func dso_local @useRecursiveType +// CHECK-DAG: cir.func {{.*}} @useRecursiveType // CHECK-DAG: cir.get_member {{%.}}[0] {name = "next"} : !cir.ptr -> !cir.ptr> void useRecursiveType(NodeStru* a) { a->next = 0; diff --git a/clang/test/CIR/CodeGen/struct.cpp b/clang/test/CIR/CodeGen/struct.cpp index 03e24b0323de..deb4d174c6fb 100644 --- a/clang/test/CIR/CodeGen/struct.cpp +++ b/clang/test/CIR/CodeGen/struct.cpp @@ -34,14 +34,14 @@ void yoyo(incomplete *i) {} // CHECK-DAG: !rec_Adv = !cir.record // CHECK-DAG: !rec_Entry = !cir.record, !cir.ptr) -> !u32i>>}> -// CHECK: cir.func linkonce_odr @_ZN3Bar6methodEv(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @_ZN3Bar6methodEv(%arg0: !cir.ptr // CHECK-NEXT: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK-NEXT: cir.store{{.*}} %arg0, %0 : !cir.ptr, !cir.ptr> // CHECK-NEXT: %1 = cir.load{{.*}} %0 : !cir.ptr>, !cir.ptr // CHECK-NEXT: cir.return // CHECK-NEXT: } -// CHECK: cir.func linkonce_odr @_ZN3Bar7method2Ei(%arg0: !cir.ptr {{.*}}, %arg1: !s32i +// CHECK: cir.func {{.*}} @_ZN3Bar7method2Ei(%arg0: !cir.ptr {{.*}}, %arg1: !s32i // CHECK-NEXT: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK-NEXT: %1 = cir.alloca !s32i, !cir.ptr, ["a", init] {alignment = 4 : i64} // CHECK-NEXT: cir.store{{.*}} %arg0, %0 : !cir.ptr, !cir.ptr> @@ -50,7 +50,7 @@ void yoyo(incomplete *i) {} // CHECK-NEXT: cir.return // CHECK-NEXT: } -// CHECK: cir.func linkonce_odr @_ZN3Bar7method3Ei(%arg0: !cir.ptr {{.*}}, %arg1: !s32i +// CHECK: cir.func {{.*}} @_ZN3Bar7method3Ei(%arg0: !cir.ptr {{.*}}, %arg1: !s32i // CHECK-NEXT: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK-NEXT: %1 = cir.alloca !s32i, !cir.ptr, ["a", init] {alignment = 4 : i64} // CHECK-NEXT: %2 = cir.alloca !s32i, !cir.ptr, ["__retval"] {alignment = 4 : i64} @@ -63,7 +63,7 @@ void yoyo(incomplete *i) {} // CHECK-NEXT: cir.return %5 // CHECK-NEXT: } -// CHECK: cir.func dso_local @_Z3bazv() +// CHECK: cir.func {{.*}} @_Z3bazv() // CHECK-NEXT: %0 = cir.alloca !rec_Bar, !cir.ptr, ["b"] {alignment = 4 : i64} // CHECK-NEXT: %1 = cir.alloca !s32i, !cir.ptr, ["result", init] {alignment = 4 : i64} // CHECK-NEXT: %2 = cir.alloca !rec_Foo, !cir.ptr, ["f"] {alignment = 4 : i64} @@ -94,7 +94,7 @@ class Adv { void m() { Adv C; } -// CHECK: cir.func linkonce_odr @_ZN3AdvC2Ev(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @_ZN3AdvC2Ev(%arg0: !cir.ptr // CHECK: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK: cir.store{{.*}} %arg0, %0 : !cir.ptr, !cir.ptr> // CHECK: %1 = cir.load{{.*}} %0 : !cir.ptr>, !cir.ptr @@ -148,7 +148,7 @@ struct S { void h() { S s; } -// CHECK: cir.func dso_local @_Z1hv() +// CHECK: cir.func {{.*}} @_Z1hv() // CHECK: %0 = cir.alloca !rec_S, !cir.ptr, ["s", init] {alignment = 1 : i64} // CHECK: %1 = cir.alloca !rec_A, !cir.ptr, ["agg.tmp0"] {alignment = 4 : i64} // CHECK: %2 = cir.call @_Z11get_defaultv() : () -> !rec_A @@ -170,7 +170,7 @@ struct Entry { void ppp() { Entry x; } -// CHECK: cir.func linkonce_odr @_ZN5EntryC2Ev(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @_ZN5EntryC2Ev(%arg0: !cir.ptr // CHECK: cir.get_member %1[0] {name = "procAddr"} : !cir.ptr -> !cir.ptr, !cir.ptr) -> !u32i>>> diff --git a/clang/test/CIR/CodeGen/switch-gnurange.cpp b/clang/test/CIR/CodeGen/switch-gnurange.cpp index d453361e873a..72f89488ef6c 100644 --- a/clang/test/CIR/CodeGen/switch-gnurange.cpp +++ b/clang/test/CIR/CodeGen/switch-gnurange.cpp @@ -19,7 +19,7 @@ int sw1(enum letter c) { } } -// CIR: cir.func dso_local @_Z3sw16letter +// CIR: cir.func {{.*}} @_Z3sw16letter // CIR: cir.scope { // CIR: cir.switch // CIR-NEXT: cir.case(range, [#cir.int<0> : !s32i, #cir.int<2> : !s32i]) { @@ -73,7 +73,7 @@ int sw2(enum letter c) { } } -// CIR: cir.func dso_local @_Z3sw26letter +// CIR: cir.func {{.*}} @_Z3sw26letter // CIR: cir.scope { // CIR: cir.switch // CIR-NEXT: cir.case(range, [#cir.int<0> : !s32i, #cir.int<2> : !s32i]) { @@ -117,7 +117,7 @@ void sw3(enum letter c) { } } -// CIR: cir.func dso_local @_Z3sw36letter +// CIR: cir.func {{.*}} @_Z3sw36letter // CIR: cir.scope { // CIR: cir.switch // CIR-NEXT: cir.case(range, [#cir.int<0> : !s32i, #cir.int<2> : !s32i]) { @@ -177,7 +177,7 @@ void sw4(int x) { } } -// CIR: cir.func dso_local @_Z3sw4i +// CIR: cir.func {{.*}} @_Z3sw4i // CIR: cir.scope { // CIR: cir.switch // CIR-NEXT: cir.case(range, [#cir.int<66> : !s32i, #cir.int<233> : !s32i]) { @@ -218,7 +218,7 @@ void sw5(int x) { } } -// CIR: cir.func dso_local @_Z3sw5i +// CIR: cir.func {{.*}} @_Z3sw5i // CIR: cir.scope { // CIR: cir.switch // CIR-NEXT: cir.case(range, [#cir.int<100> : !s32i, #cir.int<-100> : !s32i]) { @@ -249,7 +249,7 @@ void sw6(int x) { } } -// CIR: cir.func dso_local @_Z3sw6i +// CIR: cir.func {{.*}} @_Z3sw6i // CIR: cir.scope { // CIR: cir.switch // CIR-NEXT: cir.case(range, [#cir.int<-2147483648> : !s32i, #cir.int<2147483647> : !s32i]) { @@ -291,7 +291,7 @@ void sw7(int x) { } } -// CIR: cir.func dso_local @_Z3sw7i +// CIR: cir.func {{.*}} @_Z3sw7i // CIR: cir.scope { // CIR: cir.switch // CIR-NEXT: cir.case(equal, [#cir.int<0> : !s32i]) { diff --git a/clang/test/CIR/CodeGen/switch.cpp b/clang/test/CIR/CodeGen/switch.cpp index 46f2f19ff78f..7cb3516937b0 100644 --- a/clang/test/CIR/CodeGen/switch.cpp +++ b/clang/test/CIR/CodeGen/switch.cpp @@ -15,7 +15,7 @@ void sw1(int a) { } } } -// CHECK: cir.func dso_local @_Z3sw1i +// CHECK: cir.func {{.*}} @_Z3sw1i // CHECK: cir.switch (%3 : !s32i) { // CHECK-NEXT: cir.case(equal, [#cir.int<0> : !s32i]) { // CHECK: cir.break @@ -36,7 +36,7 @@ void sw2(int a) { } } -// CHECK: cir.func dso_local @_Z3sw2i +// CHECK: cir.func {{.*}} @_Z3sw2i // CHECK: cir.scope { // CHECK-NEXT: %1 = cir.alloca !s32i, !cir.ptr, ["yolo", init] // CHECK-NEXT: %2 = cir.alloca !s32i, !cir.ptr, ["fomo", init] @@ -52,7 +52,7 @@ void sw3(int a) { } } -// CHECK: cir.func dso_local @_Z3sw3i +// CHECK: cir.func {{.*}} @_Z3sw3i // CHECK: cir.scope { // CHECK-NEXT: %1 = cir.load{{.*}} %0 : !cir.ptr, !s32i // CHECK-NEXT: cir.switch (%1 : !s32i) { @@ -73,7 +73,7 @@ int sw4(int a) { return 0; } -// CHECK: cir.func dso_local @_Z3sw4i +// CHECK: cir.func {{.*}} @_Z3sw4i // CHECK: cir.switch (%4 : !s32i) { // CHECK-NEXT: cir.case(equal, [#cir.int<42> : !s32i]) { // CHECK-NEXT: cir.scope { @@ -99,7 +99,7 @@ void sw5(int a) { } } -// CHECK: cir.func dso_local @_Z3sw5i +// CHECK: cir.func {{.*}} @_Z3sw5i // CHECK: cir.switch (%1 : !s32i) { // CHECK-NEXT: cir.case(equal, [#cir.int<1> : !s32i]) { // CHECK-NEXT: cir.yield @@ -120,7 +120,7 @@ void sw6(int a) { } } -// CHECK: cir.func dso_local @_Z3sw6i +// CHECK: cir.func {{.*}} @_Z3sw6i // CHECK: cir.switch (%1 : !s32i) { // CHECK-NEXT: cir.case(anyof, [#cir.int<0> : !s32i, #cir.int<1> : !s32i, #cir.int<2> : !s32i]) { // CHECK-NEXT: cir.break @@ -142,7 +142,7 @@ void sw7(int a) { } } -// CHECK: cir.func dso_local @_Z3sw7i +// CHECK: cir.func {{.*}} @_Z3sw7i // CHECK: cir.case(anyof, [#cir.int<0> : !s32i, #cir.int<1> : !s32i, #cir.int<2> : !s32i]) { // CHECK-NEXT: cir.yield // CHECK-NEXT: } @@ -161,7 +161,7 @@ void sw8(int a) { } } -//CHECK: cir.func dso_local @_Z3sw8i +//CHECK: cir.func {{.*}} @_Z3sw8i //CHECK: cir.case(equal, [#cir.int<3> : !s32i]) { //CHECK-NEXT: cir.break //CHECK-NEXT: } @@ -183,7 +183,7 @@ void sw9(int a) { } } -//CHECK: cir.func dso_local @_Z3sw9i +//CHECK: cir.func {{.*}} @_Z3sw9i //CHECK: cir.case(equal, [#cir.int<3> : !s32i]) { //CHECK-NEXT: cir.break //CHECK-NEXT: } @@ -206,7 +206,7 @@ void sw10(int a) { } } -//CHECK: cir.func dso_local @_Z4sw10i +//CHECK: cir.func {{.*}} @_Z4sw10i //CHECK: cir.case(equal, [#cir.int<3> : !s32i]) { //CHECK-NEXT: cir.break //CHECK-NEXT: } @@ -234,7 +234,7 @@ void sw11(int a) { } } -//CHECK: cir.func dso_local @_Z4sw11i +//CHECK: cir.func {{.*}} @_Z4sw11i //CHECK: cir.case(equal, [#cir.int<3> : !s32i]) { //CHECK-NEXT: cir.break //CHECK-NEXT: } @@ -257,7 +257,7 @@ void sw12(int a) { } } -// CHECK: cir.func dso_local @_Z4sw12i +// CHECK: cir.func {{.*}} @_Z4sw12i // CHECK: cir.scope { // CHECK: cir.switch // CHECK-NEXT: cir.case(equal, [#cir.int<3> : !s32i]) { @@ -276,7 +276,7 @@ void sw13(int a, int b) { } } -// CHECK: cir.func dso_local @_Z4sw13ii +// CHECK: cir.func {{.*}} @_Z4sw13ii // CHECK: cir.scope { // CHECK: cir.switch // CHECK-NEXT: cir.case(equal, [#cir.int<1> : !s32i]) { @@ -303,7 +303,7 @@ void fallthrough(int x) { } } -// CHECK: cir.func dso_local @_Z11fallthroughi +// CHECK: cir.func {{.*}} @_Z11fallthroughi // CHECK: cir.scope { // CHECK: cir.switch (%1 : !s32i) { // CHECK-NEXT: cir.case(equal, [#cir.int<1> : !s32i]) { @@ -332,7 +332,7 @@ int unreachable_after_break_1(int a) { return -1; } -// CHECK: cir.func dso_local @_Z25unreachable_after_break_1i +// CHECK: cir.func {{.*}} @_Z25unreachable_after_break_1i // CHECK: cir.case(equal, [#cir.int<42> : !s32i]) { // CHECK: cir.break // CHECK: ^bb1: // no predecessors diff --git a/clang/test/CIR/CodeGen/tbaa-enum.c b/clang/test/CIR/CodeGen/tbaa-enum.c index f55a381cebd8..f094cddc93c5 100644 --- a/clang/test/CIR/CodeGen/tbaa-enum.c +++ b/clang/test/CIR/CodeGen/tbaa-enum.c @@ -46,7 +46,7 @@ typedef enum : uint8_t { } Enum8; uint32_t g0(EnumAuto32 *E, uint32_t *val) { - // CIR-LABEL: cir.func dso_local @g0 + // CIR-LABEL: cir.func {{.*}} @g0 // CIR: %[[C5:.*]] = cir.const #cir.int<5> : !s32i // CIR: %[[U_C5:.*]] = cir.cast integral %[[C5]] : !s32i -> !u32i // CIR: %[[VAL_PTR:.*]] = cir.load deref{{.*}} %{{.*}} : !cir.ptr>, !cir.ptr @@ -69,7 +69,7 @@ uint32_t g0(EnumAuto32 *E, uint32_t *val) { } uint64_t g1(EnumAuto64 *E, uint64_t *val) { - // CIR-LABEL: cir.func dso_local @g1 + // CIR-LABEL: cir.func {{.*}} @g1 // CIR: %[[C5:.*]] = cir.const #cir.int<5> : !s32i // CIR: %[[U_C5:.*]] = cir.cast integral %[[C5]] : !s32i -> !u64i // CIR: %[[VAL_PTR:.*]] = cir.load deref{{.*}} %{{.*}} : !cir.ptr>, !cir.ptr @@ -91,7 +91,7 @@ uint64_t g1(EnumAuto64 *E, uint64_t *val) { } uint16_t g2(Enum16 *E, uint16_t *val) { - // CIR-LABEL: cir.func dso_local @g2 + // CIR-LABEL: cir.func {{.*}} @g2 // CIR: %[[C5:.*]] = cir.const #cir.int<5> : !s32i // CIR: %[[U_C5:.*]] = cir.cast integral %[[C5]] : !s32i -> !u16i // CIR: %[[VAL_PTR:.*]] = cir.load deref{{.*}} %{{.*}} : !cir.ptr>, !cir.ptr @@ -113,7 +113,7 @@ uint16_t g2(Enum16 *E, uint16_t *val) { } uint8_t g3(Enum8 *E, uint8_t *val) { - // CIR-LABEL: cir.func dso_local @g3 + // CIR-LABEL: cir.func {{.*}} @g3 // CIR: %[[C5:.*]] = cir.const #cir.int<5> : !s32i // CIR: %[[U_C5:.*]] = cir.cast integral %[[C5]] : !s32i -> !u8i // CIR: %[[VAL_PTR:.*]] = cir.load deref{{.*}} %{{.*}} : !cir.ptr>, !cir.ptr diff --git a/clang/test/CIR/CodeGen/tbaa-enum.cpp b/clang/test/CIR/CodeGen/tbaa-enum.cpp index 08f8201f434f..56e5ce6e49eb 100644 --- a/clang/test/CIR/CodeGen/tbaa-enum.cpp +++ b/clang/test/CIR/CodeGen/tbaa-enum.cpp @@ -50,7 +50,7 @@ typedef enum : uint8_t { } Enum8; uint32_t g0(EnumAuto32 *E, uint32_t *val) { - // CIR-LABEL: cir.func dso_local @_Z2g0 + // CIR-LABEL: cir.func {{.*}} @_Z2g0 // CIR: %[[C5:.*]] = cir.const #cir.int<5> : !s32i // CIR: %[[U_C5:.*]] = cir.cast integral %[[C5]] : !s32i -> !u32i // CIR: %[[VAL_PTR:.*]] = cir.load deref{{.*}} %{{.*}} : !cir.ptr>, !cir.ptr @@ -72,7 +72,7 @@ uint32_t g0(EnumAuto32 *E, uint32_t *val) { } uint64_t g1(EnumAuto64 *E, uint64_t *val) { - // CIR-LABEL: cir.func dso_local @_Z2g1 + // CIR-LABEL: cir.func {{.*}} @_Z2g1 // CIR: %[[C5:.*]] = cir.const #cir.int<5> : !s32i // CIR: %[[U_C5:.*]] = cir.cast integral %[[C5]] : !s32i -> !u64i // CIR: %[[VAL_PTR:.*]] = cir.load deref{{.*}} %{{.*}} : !cir.ptr>, !cir.ptr @@ -94,7 +94,7 @@ uint64_t g1(EnumAuto64 *E, uint64_t *val) { } uint16_t g2(Enum16 *E, uint16_t *val) { - // CIR-LABEL: cir.func dso_local @_Z2g2 + // CIR-LABEL: cir.func {{.*}} @_Z2g2 // CIR: %[[C5:.*]] = cir.const #cir.int<5> : !s32i // CIR: %[[U_C5:.*]] = cir.cast integral %[[C5]] : !s32i -> !u16i // CIR: %[[VAL_PTR:.*]] = cir.load deref{{.*}} %{{.*}} : !cir.ptr>, !cir.ptr @@ -116,7 +116,7 @@ uint16_t g2(Enum16 *E, uint16_t *val) { } uint8_t g3(Enum8 *E, uint8_t *val) { - // CIR-LABEL: cir.func dso_local @_Z2g3 + // CIR-LABEL: cir.func {{.*}} @_Z2g3 // CIR: %[[C5:.*]] = cir.const #cir.int<5> : !s32i // CIR: %[[U_C5:.*]] = cir.cast integral %[[C5]] : !s32i -> !u8i // CIR: %[[VAL_PTR:.*]] = cir.load deref{{.*}} %{{.*}} : !cir.ptr>, !cir.ptr diff --git a/clang/test/CIR/CodeGen/tbaa-scalar.c b/clang/test/CIR/CodeGen/tbaa-scalar.c index 21b733c0eed9..721e93b7e824 100644 --- a/clang/test/CIR/CodeGen/tbaa-scalar.c +++ b/clang/test/CIR/CodeGen/tbaa-scalar.c @@ -18,7 +18,7 @@ // CIR: #tbaa[[LONG_LONG:.*]] = #cir.tbaa_scalar void test_int_and_float(int *a, float *b) { - // CIR-LABEL: cir.func dso_local @test_int_and_float + // CIR-LABEL: cir.func {{.*}} @test_int_and_float // CIR: cir.scope // CIR: %[[TMP1:.*]] = cir.load deref{{.*}} %{{.*}} : !cir.ptr>, !cir.ptr // CIR: %[[TMP2:.*]] = cir.load{{.*}} %[[TMP1]] : !cir.ptr, !s32i tbaa(#tbaa[[INT]]) @@ -45,7 +45,7 @@ void test_int_and_float(int *a, float *b) { } void test_long_and_double(long *a, double *b) { - // CIR-LABEL: cir.func dso_local @test_long_and_double + // CIR-LABEL: cir.func {{.*}} @test_long_and_double // CIR: cir.scope // CIR: %[[TMP1:.*]] = cir.load deref{{.*}} %{{.*}} : !cir.ptr>, !cir.ptr // CIR: %[[TMP2:.*]] = cir.load{{.*}} %[[TMP1]] : !cir.ptr, !s64i tbaa(#tbaa[[LONG]]) @@ -71,7 +71,7 @@ void test_long_and_double(long *a, double *b) { } } void test_long_long_and_long_double(long long *a, long double *b) { - // CIR-LABEL: cir.func dso_local @test_long_long_and_long_double + // CIR-LABEL: cir.func {{.*}} @test_long_long_and_long_double // CIR: cir.scope // CIR: %[[TMP1:.*]] = cir.load deref{{.*}} %{{.*}} : !cir.ptr>, !cir.ptr // CIR: %[[TMP2:.*]] = cir.load{{.*}} %[[TMP1]] : !cir.ptr, !s64i tbaa(#tbaa[[LONG_LONG]]) @@ -98,7 +98,7 @@ void test_long_long_and_long_double(long long *a, long double *b) { } void test_char(char *a, char* b) { - // CIR-LABEL: cir.func dso_local @test_char + // CIR-LABEL: cir.func {{.*}} @test_char // CIR: cir.scope // CIR: %[[TMP1:.*]] = cir.load deref{{.*}} %{{.*}} : !cir.ptr>, !cir.ptr // CIR: %[[TMP2:.*]] = cir.load{{.*}} %[[TMP1]] : !cir.ptr, !s8i tbaa(#tbaa[[CHAR]]) diff --git a/clang/test/CIR/CodeGen/tbaa-struct.cpp b/clang/test/CIR/CodeGen/tbaa-struct.cpp index 065e3cab316c..68e918dc6625 100644 --- a/clang/test/CIR/CodeGen/tbaa-struct.cpp +++ b/clang/test/CIR/CodeGen/tbaa-struct.cpp @@ -82,7 +82,7 @@ typedef struct } StructS2; uint32_t g(uint32_t *s, StructA *A, uint64_t count) { - // CIR-LABEL: cir.func dso_local @_Z1g + // CIR-LABEL: cir.func {{.*}} @_Z1g // CIR: %[[INT_1:.*]] = cir.const #cir.int<1> : !s32i // CIR: %[[UINT_1:.*]] = cir.cast integral %[[INT_1]] : !s32i -> !u32i // CIR: cir.store{{.*}} %[[UINT_1]], %{{.*}} : !u32i, !cir.ptr tbaa(#tbaa[[INT]]) @@ -103,7 +103,7 @@ uint32_t g(uint32_t *s, StructA *A, uint64_t count) { } uint32_t g2(uint32_t *s, StructA *A, uint64_t count) { - // CIR-LABEL: cir.func dso_local @_Z2g2 + // CIR-LABEL: cir.func {{.*}} @_Z2g2 // CIR: %[[INT_1:.*]] = cir.const #cir.int<1> : !s32i // CIR: %[[UINT_1:.*]] = cir.cast integral %[[INT_1]] : !s32i -> !u32i // CIR: cir.store{{.*}} %[[UINT_1]], %{{.*}} : !u32i, !cir.ptr tbaa(#tbaa[[INT]]) @@ -123,7 +123,7 @@ uint32_t g2(uint32_t *s, StructA *A, uint64_t count) { } uint32_t g3(StructA *A, StructB *B, uint64_t count) { - // CIR-LABEL: cir.func dso_local @_Z2g3 + // CIR-LABEL: cir.func {{.*}} @_Z2g3 // CIR: %[[INT_1:.*]] = cir.const #cir.int<1> : !s32i // CIR: %[[UINT_1:.*]] = cir.cast integral %[[INT_1]] : !s32i -> !u32i // CIR: cir.store{{.*}} %[[UINT_1]], %{{.*}} : !u32i, !cir.ptr tbaa(#tbaa[[TAG_StructA_f32]]) @@ -143,7 +143,7 @@ uint32_t g3(StructA *A, StructB *B, uint64_t count) { } uint32_t g4(StructA *A, StructB *B, uint64_t count) { - // CIR-LABEL: cir.func dso_local @_Z2g4 + // CIR-LABEL: cir.func {{.*}} @_Z2g4 // CIR: %[[INT_1:.*]] = cir.const #cir.int<1> : !s32i // CIR: %[[UINT_1:.*]] = cir.cast integral %[[INT_1]] : !s32i -> !u32i // CIR: cir.store{{.*}} %[[UINT_1]], %{{.*}} : !u32i, !cir.ptr tbaa(#tbaa[[TAG_StructA_f32]]) @@ -163,7 +163,7 @@ uint32_t g4(StructA *A, StructB *B, uint64_t count) { } uint32_t g5(StructA *A, StructB *B, uint64_t count) { - // CIR-LABEL: cir.func dso_local @_Z2g5 + // CIR-LABEL: cir.func {{.*}} @_Z2g5 // CIR: %[[INT_1:.*]] = cir.const #cir.int<1> : !s32i // CIR: %[[UINT_1:.*]] = cir.cast integral %[[INT_1]] : !s32i -> !u32i // CIR: cir.store{{.*}} %[[UINT_1]], %{{.*}} : !u32i, !cir.ptr tbaa(#tbaa[[TAG_StructA_f32]]) @@ -183,7 +183,7 @@ uint32_t g5(StructA *A, StructB *B, uint64_t count) { } uint32_t g6(StructA *A, StructB *B, uint64_t count) { - // CIR-LABEL: cir.func dso_local @_Z2g6 + // CIR-LABEL: cir.func {{.*}} @_Z2g6 // CIR: %[[INT_1:.*]] = cir.const #cir.int<1> : !s32i // CIR: %[[UINT_1:.*]] = cir.cast integral %[[INT_1]] : !s32i -> !u32i // CIR: cir.store{{.*}} %[[UINT_1]], %{{.*}} : !u32i, !cir.ptr tbaa(#tbaa[[TAG_StructA_f32]]) @@ -203,7 +203,7 @@ uint32_t g6(StructA *A, StructB *B, uint64_t count) { } uint32_t g7(StructA *A, StructS *S, uint64_t count) { - // CIR-LABEL: cir.func dso_local @_Z2g7 + // CIR-LABEL: cir.func {{.*}} @_Z2g7 // CIR: %[[INT_1:.*]] = cir.const #cir.int<1> : !s32i // CIR: %[[UINT_1:.*]] = cir.cast integral %[[INT_1]] : !s32i -> !u32i // CIR: cir.store{{.*}} %[[UINT_1]], %{{.*}} : !u32i, !cir.ptr tbaa(#tbaa[[TAG_StructA_f32]]) @@ -223,7 +223,7 @@ uint32_t g7(StructA *A, StructS *S, uint64_t count) { } uint32_t g8(StructA *A, StructS *S, uint64_t count) { - // CIR-LABEL: cir.func dso_local @_Z2g8 + // CIR-LABEL: cir.func {{.*}} @_Z2g8 // CIR: %[[INT_1:.*]] = cir.const #cir.int<1> : !s32i // CIR: %[[UINT_1:.*]] = cir.cast integral %[[INT_1]] : !s32i -> !u32i // CIR: cir.store{{.*}} %[[UINT_1]], %{{.*}} : !u32i, !cir.ptr tbaa(#tbaa[[TAG_StructA_f32]]) @@ -243,7 +243,7 @@ uint32_t g8(StructA *A, StructS *S, uint64_t count) { } uint32_t g9(StructS *S, StructS2 *S2, uint64_t count) { - // CIR-LABEL: cir.func dso_local @_Z2g9 + // CIR-LABEL: cir.func {{.*}} @_Z2g9 // CIR: %[[INT_1:.*]] = cir.const #cir.int<1> : !s32i // CIR: %[[UINT_1:.*]] = cir.cast integral %[[INT_1]] : !s32i -> !u32i // CIR: cir.store{{.*}} %[[UINT_1]], %{{.*}} : !u32i, !cir.ptr tbaa(#tbaa[[TAG_StructS_f32]]) @@ -263,7 +263,7 @@ uint32_t g9(StructS *S, StructS2 *S2, uint64_t count) { } uint32_t g10(StructS *S, StructS2 *S2, uint64_t count) { - // CIR-LABEL: cir.func dso_local @_Z3g10 + // CIR-LABEL: cir.func {{.*}} @_Z3g10 // CIR: %[[INT_1:.*]] = cir.const #cir.int<1> : !s32i // CIR: %[[UINT_1:.*]] = cir.cast integral %[[INT_1]] : !s32i -> !u32i // CIR: cir.store{{.*}} %[[UINT_1]], %{{.*}} : !u32i, !cir.ptr tbaa(#tbaa[[TAG_StructS_f32]]) @@ -283,7 +283,7 @@ uint32_t g10(StructS *S, StructS2 *S2, uint64_t count) { } uint32_t g11(StructC *C, StructD *D, uint64_t count) { - // CIR-LABEL: cir.func dso_local @_Z3g11 + // CIR-LABEL: cir.func {{.*}} @_Z3g11 // CIR: %[[INT_1:.*]] = cir.const #cir.int<1> : !s32i // CIR: %[[UINT_1:.*]] = cir.cast integral %[[INT_1]] : !s32i -> !u32i // CIR: cir.store{{.*}} %[[UINT_1]], %{{.*}} : !u32i, !cir.ptr tbaa(#tbaa[[TAG_StructC_b_a_f32]]) @@ -303,7 +303,7 @@ uint32_t g11(StructC *C, StructD *D, uint64_t count) { } uint32_t g12(StructC *C, StructD *D, uint64_t count) { - // CIR-LABEL: cir.func dso_local @_Z3g12 + // CIR-LABEL: cir.func {{.*}} @_Z3g12 // CIR: %[[INT_1:.*]] = cir.const #cir.int<1> : !s32i // CIR: %[[UINT_1:.*]] = cir.cast integral %[[INT_1]] : !s32i -> !u32i // CIR: cir.store{{.*}} %[[UINT_1]], %{{.*}} : !u32i, !cir.ptr tbaa(#tbaa[[TAG_StructB_a_f32]]) @@ -333,7 +333,7 @@ struct six { char c; }; char g14(struct six *a, struct six *b) { - // CIR-LABEL: cir.func dso_local @_Z3g14 + // CIR-LABEL: cir.func {{.*}} @_Z3g14 // CIR: %[[TMP1:.*]] = cir.load{{.*}} %{{.*}} : !cir.ptr>, !cir.ptr // CIR: %[[TMP2:.*]] = cir.get_member %[[TMP1]][2] {name = "b"} : !cir.ptr -> !cir.ptr // CIR: %[[TMP3:.*]] = cir.load{{.*}} %[[TMP2]] : !cir.ptr, !s8i tbaa(#tbaa[[TAG_six_b]]) @@ -348,7 +348,7 @@ char g14(struct six *a, struct six *b) { // Types that differ only by name may alias. typedef StructS StructS3; uint32_t g15(StructS *S, StructS3 *S3, uint64_t count) { - // CIR-LABEL: cir.func dso_local @_Z3g15 + // CIR-LABEL: cir.func {{.*}} @_Z3g15 // CIR: %[[INT_1:.*]] = cir.const #cir.int<1> : !s32i // CIR: %[[UINT_1:.*]] = cir.cast integral %[[INT_1]] : !s32i -> !u32i // CIR: cir.store{{.*}} %[[UINT_1]], %{{.*}} : !u32i, !cir.ptr tbaa(#tbaa[[TAG_StructS_f32]]) diff --git a/clang/test/CIR/CodeGen/tbaa-union.c b/clang/test/CIR/CodeGen/tbaa-union.c index 2027168f42b2..79f6df87caf9 100644 --- a/clang/test/CIR/CodeGen/tbaa-union.c +++ b/clang/test/CIR/CodeGen/tbaa-union.c @@ -17,7 +17,7 @@ typedef struct { } S; void foo(S *s) { - // CIR-LABEL: cir.func dso_local @foo + // CIR-LABEL: cir.func {{.*}} @foo // CIR: %[[C1:.*]] = cir.const #cir.int<1> : !s32i loc(#loc6) // CIR: %{{.*}} = cir.load{{.*}} %{{.*}} : !cir.ptr>, !cir.ptr // CIR: cir.store{{.*}} %[[C1]], %{{.*}} : !s32i, !cir.ptr tbaa(#tbaa[[CHAR]]) diff --git a/clang/test/CIR/CodeGen/temporaries.cpp b/clang/test/CIR/CodeGen/temporaries.cpp index d104df4f7a24..64ab5634899f 100644 --- a/clang/test/CIR/CodeGen/temporaries.cpp +++ b/clang/test/CIR/CodeGen/temporaries.cpp @@ -17,7 +17,7 @@ void f() { // CIR: cir.func private @_ZN1EC1Ev(!cir.ptr) special_member<#cir.cxx_ctor> extra(#fn_attr) // CIR-NEXT: cir.func private @_ZN1EntEv(!cir.ptr) -> !rec_E // CIR-NEXT: cir.func private @_ZN1ED1Ev(!cir.ptr) special_member<#cir.cxx_dtor> extra(#fn_attr) -// CIR-NEXT: cir.func dso_local @_Z1fv() extra(#fn_attr1) { +// CIR-NEXT: cir.func {{.*}} @_Z1fv() extra(#fn_attr1) { // CIR-NEXT: cir.scope { // CIR-NEXT: %[[ONE:[0-9]+]] = cir.alloca !rec_E, !cir.ptr, ["agg.tmp.ensured"] {alignment = 1 : i64} // CIR-NEXT: %[[TWO:[0-9]+]] = cir.alloca !rec_E, !cir.ptr, ["ref.tmp0"] {alignment = 1 : i64} diff --git a/clang/test/CIR/CodeGen/temporary-materialization.cpp b/clang/test/CIR/CodeGen/temporary-materialization.cpp index ec65f958763b..4a8f3208ade4 100644 --- a/clang/test/CIR/CodeGen/temporary-materialization.cpp +++ b/clang/test/CIR/CodeGen/temporary-materialization.cpp @@ -8,7 +8,7 @@ int test() { return x; } -// CHECK: cir.func dso_local @_Z4testv() +// CHECK: cir.func {{.*}} @_Z4testv() // CHECK-NEXT: %{{.+}} = cir.alloca !s32i, !cir.ptr, ["__retval"] {alignment = 4 : i64} // CHECK-NEXT: %[[#TEMP_SLOT:]] = cir.alloca !s32i, !cir.ptr, ["ref.tmp0", init] {alignment = 4 : i64} // CHECK-NEXT: %[[#x:]] = cir.alloca !cir.ptr, !cir.ptr>, ["x", init, const] {alignment = 8 : i64} @@ -28,7 +28,7 @@ int test_scoped() { return x; } -// CHECK: cir.func dso_local @_Z11test_scopedv() +// CHECK: cir.func {{.*}} @_Z11test_scopedv() // CHECK-NEXT: %{{.+}} = cir.alloca !s32i, !cir.ptr, ["__retval"] {alignment = 4 : i64} // CHECK-NEXT: %{{.+}} = cir.alloca !s32i, !cir.ptr, ["x", init] {alignment = 4 : i64} // CHECK: cir.scope { diff --git a/clang/test/CIR/CodeGen/tempref.cpp b/clang/test/CIR/CodeGen/tempref.cpp index c3bba80ecbda..992063b7bad8 100644 --- a/clang/test/CIR/CodeGen/tempref.cpp +++ b/clang/test/CIR/CodeGen/tempref.cpp @@ -6,7 +6,7 @@ struct A { ~A(); }; A &&a = dynamic_cast(A{}); -// CHECK: cir.func private @_ZN1AD1Ev(!cir.ptr) special_member<#cir.cxx_dtor> extra(#fn_attr) +// CHECK: cir.func {{.*}} @_ZN1AD1Ev(!cir.ptr) special_member<#cir.cxx_dtor> // CHECK-NEXT: cir.global external @a = #cir.ptr : !cir.ptr {alignment = 8 : i64, ast = #cir.var.decl.ast} // CHECK-NEXT: cir.func internal private @__cxx_global_var_init() { // CHECK-NEXT: cir.scope { @@ -16,7 +16,7 @@ A &&a = dynamic_cast(A{}); // CHECK-NEXT: } // CHECK-NEXT: cir.return // CHECK-NEXT: } -// CHECK-NEXT: cir.func private @_GLOBAL__sub_I_tempref.cpp() { +// CHECK-NEXT: cir.func {{.*}} @_GLOBAL__sub_I_tempref.cpp() { // CHECK-NEXT: cir.call @__cxx_global_var_init() : () -> () // CHECK-NEXT: cir.return // CHECK-NEXT: } diff --git a/clang/test/CIR/CodeGen/ternary.cpp b/clang/test/CIR/CodeGen/ternary.cpp index 92c2996cdb4b..88db58d14f9e 100644 --- a/clang/test/CIR/CodeGen/ternary.cpp +++ b/clang/test/CIR/CodeGen/ternary.cpp @@ -5,7 +5,7 @@ int x(int y) { return y > 0 ? 3 : 5; } -// CHECK: cir.func dso_local @_Z1xi +// CHECK: cir.func {{.*}} @_Z1xi // CHECK: %0 = cir.alloca !s32i, !cir.ptr, ["y", init] {alignment = 4 : i64} // CHECK: %1 = cir.alloca !s32i, !cir.ptr, ["__retval"] {alignment = 4 : i64} // CHECK: cir.store %arg0, %0 : !s32i, !cir.ptr @@ -31,7 +31,7 @@ void m(APIType api) { ((api == API_A) ? (static_cast(0)) : oba("yo.cpp")); } -// CHECK: cir.func dso_local @_Z1m7APIType +// CHECK: cir.func {{.*}} @_Z1m7APIType // CHECK: %0 = cir.alloca !u32i, !cir.ptr, ["api", init] {alignment = 4 : i64} // CHECK: cir.store %arg0, %0 : !u32i, !cir.ptr // CHECK: %1 = cir.load{{.*}} %0 : !cir.ptr, !u32i @@ -57,7 +57,7 @@ int foo(int a, int b) { return 0; } -// CHECK: cir.func dso_local @_Z3fooii +// CHECK: cir.func {{.*}} @_Z3fooii // CHECK: [[A0:%.*]] = cir.load{{.*}} {{.*}} : !cir.ptr, !s32i // CHECK: [[B0:%.*]] = cir.load{{.*}} {{.*}} : !cir.ptr, !s32i // CHECK: [[CMP:%.*]] = cir.cmp(lt, [[A0]], [[B0]]) : !s32i, !cir.bool @@ -77,7 +77,7 @@ bool func(bool a, bool b) { return (maybe_has_side_effects(), a) ?: b; } -// CHECK: cir.func dso_local @_Z4funcbb([[ARG_A:%.*]]: !cir.bool {{.*}}, [[ARG_B:%.*]]: !cir.bool {{.*}} +// CHECK: cir.func {{.*}} @_Z4funcbb([[ARG_A:%.*]]: !cir.bool {{.*}}, [[ARG_B:%.*]]: !cir.bool {{.*}} // CHECK: [[ALLOC_A:%.*]] = cir.alloca !cir.bool, !cir.ptr, ["a", init] // CHECK: [[ALLOC_B:%.*]] = cir.alloca !cir.bool, !cir.ptr, ["b", init] // CHECK: [[ALLOC_RET:%.*]] = cir.alloca !cir.bool, !cir.ptr, ["__retval"] diff --git a/clang/test/CIR/CodeGen/three-way-comparison.cpp b/clang/test/CIR/CodeGen/three-way-comparison.cpp index 2ac317fc4675..1c9fabc250e3 100644 --- a/clang/test/CIR/CodeGen/three-way-comparison.cpp +++ b/clang/test/CIR/CodeGen/three-way-comparison.cpp @@ -14,21 +14,21 @@ auto three_way_strong(int x, int y) { return x <=> y; } -// BEFORE: cir.func dso_local @_Z16three_way_strongii +// BEFORE: cir.func {{.*}} @_Z16three_way_strongii // BEFORE: %{{.+}} = cir.cmp3way(%{{.+}} : !s32i, %{{.+}}, #cmp3way_info_strong_ltn1eq0gt1) : !s8i // BEFORE: } -// AFTER: cir.func dso_local @_Z16three_way_strongii +// AFTER: cir.func {{.*}} @_Z16three_way_strongii // AFTER: %{{.+}} = cir.cmp3way(%{{.+}} : !s32i, %{{.+}}, #cmp3way_info_strong_ltn1eq0gt1) : !s8i // AFTER: } // NONCANONICAL-BEFORE: #cmp3way_info_strong_lt1eq2gt3 = #cir.cmp3way_info -// NONCANONICAL-BEFORE: cir.func dso_local @_Z16three_way_strongii +// NONCANONICAL-BEFORE: cir.func {{.*}} @_Z16three_way_strongii // NONCANONICAL-BEFORE: %{{.+}} = cir.cmp3way(%{{.+}} : !s32i, %{{.+}}, #cmp3way_info_strong_lt1eq2gt3) : !s8i // NONCANONICAL-BEFORE: } // NONCANONICAL-AFTER: #cmp3way_info_strong_ltn1eq0gt1 = #cir.cmp3way_info -// NONCANONICAL-AFTER: cir.func dso_local @_Z16three_way_strongii +// NONCANONICAL-AFTER: cir.func {{.*}} @_Z16three_way_strongii // NONCANONICAL-AFTER: %[[#CMP3WAY_RESULT:]] = cir.cmp3way(%{{.+}} : !s32i, %{{.+}}, #cmp3way_info_strong_ltn1eq0gt1) : !s8i // NONCANONICAL-AFTER-NEXT: %[[#NEGONE:]] = cir.const #cir.int<-1> : !s8i // NONCANONICAL-AFTER-NEXT: %[[#ONE:]] = cir.const #cir.int<1> : !s8i @@ -48,11 +48,11 @@ auto three_way_weak(float x, float y) { return x <=> y; } -// BEFORE: cir.func dso_local @_Z14three_way_weakff +// BEFORE: cir.func {{.*}} @_Z14three_way_weakff // BEFORE: %{{.+}} = cir.cmp3way(%{{.+}} : !cir.float, %{{.+}}, #cmp3way_info_partial_ltn1eq0gt1unn127) : !s8i // BEFORE: } -// AFTER: cir.func dso_local @_Z14three_way_weakff +// AFTER: cir.func {{.*}} @_Z14three_way_weakff // AFTER: %[[#LHS:]] = cir.load{{.*}} %0 : !cir.ptr, !cir.float // AFTER-NEXT: %[[#RHS:]] = cir.load{{.*}} %1 : !cir.ptr, !cir.float // AFTER-NEXT: %[[#LT:]] = cir.const #cir.int<-1> : !s8i diff --git a/clang/test/CIR/CodeGen/throw.cpp b/clang/test/CIR/CodeGen/throw.cpp index ed42933bacbe..e98b739e450a 100644 --- a/clang/test/CIR/CodeGen/throw.cpp +++ b/clang/test/CIR/CodeGen/throw.cpp @@ -301,7 +301,7 @@ void statements() { 123 + 456; } -// CIR: cir.func dso_local @_Z10statementsv() +// CIR: cir.func {{.*}} @_Z10statementsv() // CIR-NEXT: %[[V0:.*]] = cir.alloc.exception 4 -> !cir.ptr // CIR-NEXT: %[[V1:.*]] = cir.const #cir.int<0> : !s32i // CIR-NEXT: cir.store align(16) %[[V1]], %[[V0]] : !s32i, !cir.ptr @@ -319,7 +319,7 @@ void statements() { void paren_expr() { (throw 0, 123 + 456); } -// CIR: cir.func dso_local @_Z10paren_exprv() +// CIR: cir.func {{.*}} @_Z10paren_exprv() // CIR-NEXT: %[[V0:.*]] = cir.alloc.exception 4 -> !cir.ptr // CIR-NEXT: %[[V1:.*]] = cir.const #cir.int<0> : !s32i // CIR-NEXT: cir.store align(16) %[[V1]], %[[V0]] : !s32i, !cir.ptr @@ -339,7 +339,7 @@ int ternary_throw1(bool condition, int x) { return condition ? throw x : x; } -// CIR: cir.func dso_local @_Z14ternary_throw1bi(%arg0: !cir.bool +// CIR: cir.func {{.*}} @_Z14ternary_throw1bi(%arg0: !cir.bool // CIR-NEXT: %[[V0:.*]] = cir.alloca !cir.bool, !cir.ptr, ["condition", init] {alignment = 1 : i64} // CIR-NEXT: %[[V1:.*]] = cir.alloca !s32i, !cir.ptr, ["x", init] {alignment = 4 : i64} // CIR-NEXT: %[[V2:.*]] = cir.alloca !s32i, !cir.ptr, ["__retval"] {alignment = 4 : i64} diff --git a/clang/test/CIR/CodeGen/tls.c b/clang/test/CIR/CodeGen/tls.c index 46f6b0c0806c..c33e7ad5f28f 100644 --- a/clang/test/CIR/CodeGen/tls.c +++ b/clang/test/CIR/CodeGen/tls.c @@ -6,7 +6,7 @@ extern __thread int b; int c(void) { return *&b; } // CIR: cir.global "private" external tls_dyn @b : !s32i -// CIR: cir.func dso_local @c() -> !s32i +// CIR: cir.func {{.*}} @c() -> !s32i // CIR: %[[TLS_ADDR:.*]] = cir.get_global thread_local @b : !cir.ptr __thread int a; diff --git a/clang/test/CIR/CodeGen/trap.cpp b/clang/test/CIR/CodeGen/trap.cpp index 83e9be7230d2..e1a66df2dc65 100644 --- a/clang/test/CIR/CodeGen/trap.cpp +++ b/clang/test/CIR/CodeGen/trap.cpp @@ -8,7 +8,7 @@ void basic() { __builtin_trap(); } -// CHECK: cir.func dso_local @_Z5basicv() +// CHECK: cir.func {{.*}} @_Z5basicv() // CHECK-NEXT: cir.call @_Z3foov() : () -> () // CHECK-NEXT: cir.trap // CHECK-NEXT: } @@ -19,7 +19,7 @@ void code_after_unreachable() { foo(); } -// CHECK: cir.func dso_local @_Z22code_after_unreachablev() +// CHECK: cir.func {{.*}} @_Z22code_after_unreachablev() // CHECK-NEXT: cir.call @_Z3foov() : () -> () // CHECK-NEXT: cir.trap // CHECK-NEXT: ^bb1: diff --git a/clang/test/CIR/CodeGen/try-catch-dtors.cpp b/clang/test/CIR/CodeGen/try-catch-dtors.cpp index 468e534a6118..44dc524d91a0 100644 --- a/clang/test/CIR/CodeGen/try-catch-dtors.cpp +++ b/clang/test/CIR/CodeGen/try-catch-dtors.cpp @@ -358,18 +358,18 @@ void d() { // CIR-NEXT: %[[V3:.*]] = cir.load{{.*}} %[[V2]] : !cir.ptr, !rec_C // CIR-NEXT: cir.try synthetic cleanup { // CIR-NEXT: cir.call exception @_ZN1CaSES_(%[[V0]], %[[V3]]) : (!cir.ptr, !rec_C) -> () cleanup { -// CIR-NEXT: cir.call @_ZN1CD1Ev(%[[V2]]) : (!cir.ptr) -> () extra(#fn_attr) -// CIR-NEXT: cir.call @_ZN1CD1Ev(%[[V1]]) : (!cir.ptr) -> () extra(#fn_attr) +// CIR-NEXT: cir.call @_ZN1CD1Ev(%[[V2]]) : (!cir.ptr) -> () +// CIR-NEXT: cir.call @_ZN1CD1Ev(%[[V1]]) : (!cir.ptr) -> () // CIR-NEXT: cir.yield // CIR-NEXT: } // CIR-NEXT: cir.yield // CIR-NEXT: } catch [#cir.unwind { // CIR-NEXT: cir.resume // CIR-NEXT: }] -// CIR-NEXT: cir.call @_ZN1CD1Ev(%[[V2]]) : (!cir.ptr) -> () extra(#fn_attr) +// CIR-NEXT: cir.call @_ZN1CD1Ev(%[[V2]]) : (!cir.ptr) -> () // CIR-NEXT: } -// CIR-NEXT: cir.call @_ZN1CD1Ev(%[[V1]]) : (!cir.ptr) -> () extra(#fn_attr) -// CIR-NEXT: cir.call @_ZN1CD1Ev(%[[V0]]) : (!cir.ptr) -> () extra(#fn_attr) +// CIR-NEXT: cir.call @_ZN1CD1Ev(%[[V1]]) : (!cir.ptr) -> () +// CIR-NEXT: cir.call @_ZN1CD1Ev(%[[V0]]) : (!cir.ptr) -> () // CIR-NEXT: cir.return template class a; @@ -427,7 +427,7 @@ class s : G { void fn3() { s(); } -// CIR: cir.func linkonce_odr @_ZN1lC2Iii1aIvEEET_T0_T1_ +// CIR: cir.func {{.*}} @_ZN1lC2Iii1aIvEEET_T0_T1_ // CIR: cir.scope // CIR: %[[V5:.*]] = cir.alloca !rec_a3Cint3E, !cir.ptr // CIR: %[[V6:.*]] = cir.alloca !rec_a3Cvoid3E, !cir.ptr diff --git a/clang/test/CIR/CodeGen/try-catch.cpp b/clang/test/CIR/CodeGen/try-catch.cpp index 58f800cb6ea0..8b1cdc66cab2 100644 --- a/clang/test/CIR/CodeGen/try-catch.cpp +++ b/clang/test/CIR/CodeGen/try-catch.cpp @@ -5,7 +5,7 @@ double division(int a, int b); -// CHECK: cir.func dso_local @_Z2tcv() +// CHECK: cir.func {{.*}} @_Z2tcv() unsigned long long tc() { int x = 50, y = 3; unsigned long long z; @@ -42,7 +42,7 @@ unsigned long long tc() { return z; } -// CHECK: cir.func dso_local @_Z3tc2v +// CHECK: cir.func {{.*}} @_Z3tc2v unsigned long long tc2() { int x = 50, y = 3; unsigned long long z; @@ -67,7 +67,7 @@ unsigned long long tc2() { return z; } -// CHECK: cir.func dso_local @_Z3tc3v +// CHECK: cir.func {{.*}} @_Z3tc3v unsigned long long tc3() { int x = 50, y = 3; unsigned long long z; @@ -84,7 +84,7 @@ unsigned long long tc3() { return z; } -// CHECK: cir.func dso_local @_Z3tc4v() +// CHECK: cir.func {{.*}} @_Z3tc4v() unsigned long long tc4() { int x = 50, y = 3; unsigned long long z; @@ -113,7 +113,7 @@ struct S { int a; }; -// CHECK: cir.func dso_local @_Z3tc5v() +// CHECK: cir.func {{.*}} @_Z3tc5v() void tc5() { try { S s; @@ -131,7 +131,7 @@ void tc5() { // CHECK: cir.yield // CHECK: }] -// CHECK: cir.func dso_local @_Z3tc6v() +// CHECK: cir.func {{.*}} @_Z3tc6v() void tc6() { int r = 1; try { @@ -152,7 +152,7 @@ void tc6() { // CHECK: } // CHECK: } -// CHECK: cir.func dso_local @_Z3tc7v() +// CHECK: cir.func {{.*}} @_Z3tc7v() void tc7() { int r = 1; try { @@ -191,7 +191,7 @@ void tc8() { // CHECK: } // CHECK: } -// FLAT: cir.func dso_local @_Z3tc8v() +// FLAT: cir.func {{.*}} @_Z3tc8v() // FLAT: %[[V0:.*]] = cir.alloca !rec_S2, !cir.ptr, ["s", init] {alignment = 4 : i64} // FLAT: cir.br ^bb[[#B1:]] // FLAT: ^bb[[#B1]]: diff --git a/clang/test/CIR/CodeGen/type-trait.cpp b/clang/test/CIR/CodeGen/type-trait.cpp index dc74e80d636e..d7d22874ed06 100644 --- a/clang/test/CIR/CodeGen/type-trait.cpp +++ b/clang/test/CIR/CodeGen/type-trait.cpp @@ -2,7 +2,7 @@ // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -O2 -fclangir -emit-llvm %s -o - | FileCheck %s --check-prefix=LLVM // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -O2 -emit-llvm %s -o - | FileCheck %s --check-prefix=LLVM -// CIR-LABEL: cir.func dso_local @_Z4testv() -> !cir.bool +// CIR-LABEL: cir.func {{.*}} @_Z4testv() -> !cir.bool // CIR: %[[RETVAL:.+]] = cir.alloca !cir.bool // CIR: %[[CONST_TRUE:.+]] = cir.const #true // CIR: cir.store %[[CONST_TRUE]], %[[RETVAL]] diff --git a/clang/test/CIR/CodeGen/typedef.c b/clang/test/CIR/CodeGen/typedef.c index 0d6c5cd31bd4..7ca2210b30a0 100644 --- a/clang/test/CIR/CodeGen/typedef.c +++ b/clang/test/CIR/CodeGen/typedef.c @@ -5,6 +5,6 @@ void local_typedef() { Struct s; } -//CHECK: cir.func no_proto dso_local @local_typedef() +//CHECK: cir.func {{.*}} @local_typedef() //CHECK: {{.*}} = cir.alloca !rec_Struct, !cir.ptr, ["s"] {alignment = 4 : i64} //CHECK: cir.return diff --git a/clang/test/CIR/CodeGen/types-IEEE-quad.c b/clang/test/CIR/CodeGen/types-IEEE-quad.c index c56b3e7ca6d2..f56d7080ae0b 100644 --- a/clang/test/CIR/CodeGen/types-IEEE-quad.c +++ b/clang/test/CIR/CodeGen/types-IEEE-quad.c @@ -9,7 +9,7 @@ long double t2(long double i2) { } // CIR: cir.global external @i = #cir.fp<0.000000e+00> : !cir.long_double {alignment = 16 : i64} loc({{.*}}) -// CIR-LABEL: cir.func dso_local @t2(%arg0: !cir.long_double loc({{.*}})) -> !cir.long_double +// CIR-LABEL: cir.func {{.*}} @t2(%arg0: !cir.long_double loc({{.*}})) -> !cir.long_double // CIR-NEXT: %[[#I2:]] = cir.alloca !cir.long_double, !cir.ptr>, ["i2", init] {alignment = 16 : i64} // CIR-NEXT: %[[#RETVAL:]] = cir.alloca !cir.long_double, !cir.ptr>, ["__retval"] {alignment = 16 : i64} // CIR-NEXT: cir.store %arg0, %[[#I2]] : !cir.long_double, !cir.ptr> diff --git a/clang/test/CIR/CodeGen/types.c b/clang/test/CIR/CodeGen/types.c index d409514a81d5..adeba2d6e84a 100644 --- a/clang/test/CIR/CodeGen/types.c +++ b/clang/test/CIR/CodeGen/types.c @@ -22,25 +22,25 @@ void t8(void) {} bool t9(bool b) { return b; } #endif -// CHECK: cir.func dso_local @t0(%arg0: !s32i loc({{.*}})) -> !s32i -// CHECK: cir.func dso_local @t1(%arg0: !u32i loc({{.*}})) -> !u32i -// CHECK: cir.func dso_local @t2(%arg0: !s8i loc({{.*}})) -> !s8i -// CHECK: cir.func dso_local @t3(%arg0: !u8i loc({{.*}})) -> !u8i -// CHECK: cir.func dso_local @t4(%arg0: !s16i loc({{.*}})) -> !s16i -// CHECK: cir.func dso_local @t5(%arg0: !u16i loc({{.*}})) -> !u16i -// CHECK: cir.func dso_local @t6(%arg0: !cir.float loc({{.*}})) -> !cir.float -// CHECK: cir.func dso_local @t7(%arg0: !cir.double loc({{.*}})) -> !cir.double -// CHECK: cir.func dso_local @t10(%arg0: !cir.long_double loc({{.*}})) -> !cir.long_double -// CHECK: cir.func dso_local @t8() - -// CHECK-CPP: cir.func dso_local @_Z2t0i(%arg0: !s32i loc({{.*}})) -> !s32i -// CHECK-CPP: cir.func dso_local @_Z2t1j(%arg0: !u32i loc({{.*}})) -> !u32i -// CHECK-CPP: cir.func dso_local @_Z2t2c(%arg0: !s8i loc({{.*}})) -> !s8i -// CHECK-CPP: cir.func dso_local @_Z2t3h(%arg0: !u8i loc({{.*}})) -> !u8i -// CHECK-CPP: cir.func dso_local @_Z2t4s(%arg0: !s16i loc({{.*}})) -> !s16i -// CHECK-CPP: cir.func dso_local @_Z2t5t(%arg0: !u16i loc({{.*}})) -> !u16i -// CHECK-CPP: cir.func dso_local @_Z2t6f(%arg0: !cir.float loc({{.*}})) -> !cir.float -// CHECK-CPP: cir.func dso_local @_Z2t7d(%arg0: !cir.double loc({{.*}})) -> !cir.double -// CHECK-CPP: cir.func dso_local @{{.+}}t10{{.+}}(%arg0: !cir.long_double loc({{.*}})) -> !cir.long_double -// CHECK-CPP: cir.func dso_local @_Z2t8v() -// CHECK-CPP: cir.func dso_local @_Z2t9b(%arg0: !cir.bool loc({{.*}})) -> !cir.bool +// CHECK: cir.func {{.*}} @t0(%arg0: !s32i loc({{.*}})) -> !s32i +// CHECK: cir.func {{.*}} @t1(%arg0: !u32i loc({{.*}})) -> !u32i +// CHECK: cir.func {{.*}} @t2(%arg0: !s8i loc({{.*}})) -> !s8i +// CHECK: cir.func {{.*}} @t3(%arg0: !u8i loc({{.*}})) -> !u8i +// CHECK: cir.func {{.*}} @t4(%arg0: !s16i loc({{.*}})) -> !s16i +// CHECK: cir.func {{.*}} @t5(%arg0: !u16i loc({{.*}})) -> !u16i +// CHECK: cir.func {{.*}} @t6(%arg0: !cir.float loc({{.*}})) -> !cir.float +// CHECK: cir.func {{.*}} @t7(%arg0: !cir.double loc({{.*}})) -> !cir.double +// CHECK: cir.func {{.*}} @t10(%arg0: !cir.long_double loc({{.*}})) -> !cir.long_double +// CHECK: cir.func {{.*}} @t8() + +// CHECK-CPP: cir.func {{.*}} @_Z2t0i(%arg0: !s32i loc({{.*}})) -> !s32i +// CHECK-CPP: cir.func {{.*}} @_Z2t1j(%arg0: !u32i loc({{.*}})) -> !u32i +// CHECK-CPP: cir.func {{.*}} @_Z2t2c(%arg0: !s8i loc({{.*}})) -> !s8i +// CHECK-CPP: cir.func {{.*}} @_Z2t3h(%arg0: !u8i loc({{.*}})) -> !u8i +// CHECK-CPP: cir.func {{.*}} @_Z2t4s(%arg0: !s16i loc({{.*}})) -> !s16i +// CHECK-CPP: cir.func {{.*}} @_Z2t5t(%arg0: !u16i loc({{.*}})) -> !u16i +// CHECK-CPP: cir.func {{.*}} @_Z2t6f(%arg0: !cir.float loc({{.*}})) -> !cir.float +// CHECK-CPP: cir.func {{.*}} @_Z2t7d(%arg0: !cir.double loc({{.*}})) -> !cir.double +// CHECK-CPP: cir.func {{.*}} @{{.+}}t10{{.+}}(%arg0: !cir.long_double loc({{.*}})) -> !cir.long_double +// CHECK-CPP: cir.func {{.*}} @_Z2t8v() +// CHECK-CPP: cir.func {{.*}} @_Z2t9b(%arg0: !cir.bool loc({{.*}})) -> !cir.bool diff --git a/clang/test/CIR/CodeGen/unary-deref.cpp b/clang/test/CIR/CodeGen/unary-deref.cpp index f2d809445814..39599c86b2e9 100644 --- a/clang/test/CIR/CodeGen/unary-deref.cpp +++ b/clang/test/CIR/CodeGen/unary-deref.cpp @@ -10,7 +10,7 @@ void foo() { (void)p.read(); } -// CHECK: cir.func linkonce_odr @_ZNK12MyIntPointer4readEv +// CHECK: cir.func {{.*}} @_ZNK12MyIntPointer4readEv // CHECK: %2 = cir.load{{.*}} %0 // CHECK: %3 = cir.get_member %2[0] {name = "ptr"} // CHECK: %4 = cir.load deref{{.*}} %3 : !cir.ptr> diff --git a/clang/test/CIR/CodeGen/unary.c b/clang/test/CIR/CodeGen/unary.c index 2fd0faad8530..9e3293c9e64f 100644 --- a/clang/test/CIR/CodeGen/unary.c +++ b/clang/test/CIR/CodeGen/unary.c @@ -2,7 +2,7 @@ // RUN: FileCheck --input-file=%t.cir %s int valueNegationInt(int i) { -// CHECK: cir.func dso_local @valueNegationInt( +// CHECK: cir.func {{.*}} @valueNegationInt( return !i; // CHECK: %[[#INT:]] = cir.load{{.*}} %{{[0-9]+}} : !cir.ptr, !s32i // CHECK: %[[#INT_TO_BOOL:]] = cir.cast int_to_bool %[[#INT]] : !s32i -> !cir.bool @@ -10,7 +10,7 @@ int valueNegationInt(int i) { } short valueNegationShort(short s) { -// CHECK: cir.func dso_local @valueNegationShort( +// CHECK: cir.func {{.*}} @valueNegationShort( return !s; // CHECK: %[[#SHORT:]] = cir.load{{.*}} %{{[0-9]+}} : !cir.ptr, !s16i // CHECK: %[[#SHORT_TO_BOOL:]] = cir.cast int_to_bool %[[#SHORT]] : !s16i -> !cir.bool @@ -18,7 +18,7 @@ short valueNegationShort(short s) { } long valueNegationLong(long l) { -// CHECK: cir.func dso_local @valueNegationLong( +// CHECK: cir.func {{.*}} @valueNegationLong( return !l; // CHECK: %[[#LONG:]] = cir.load{{.*}} %{{[0-9]+}} : !cir.ptr, !s64i // CHECK: %[[#LONG_TO_BOOL:]] = cir.cast int_to_bool %[[#LONG]] : !s64i -> !cir.bool @@ -26,7 +26,7 @@ long valueNegationLong(long l) { } float valueNegationFloat(float f) { -// CHECK: cir.func dso_local @valueNegationFloat( +// CHECK: cir.func {{.*}} @valueNegationFloat( return !f; // CHECK: %[[#FLOAT:]] = cir.load{{.*}} %{{[0-9]+}} : !cir.ptr, !cir.float // CHECK: %[[#FLOAT_TO_BOOL:]] = cir.cast float_to_bool %[[#FLOAT]] : !cir.float -> !cir.bool @@ -35,7 +35,7 @@ float valueNegationFloat(float f) { } double valueNegationDouble(double d) { -// CHECK: cir.func dso_local @valueNegationDouble( +// CHECK: cir.func {{.*}} @valueNegationDouble( return !d; // CHECK: %[[#DOUBLE:]] = cir.load{{.*}} %{{[0-9]+}} : !cir.ptr, !cir.double // CHECK: %[[#DOUBLE_TO_BOOL:]] = cir.cast float_to_bool %[[#DOUBLE]] : !cir.double -> !cir.bool diff --git a/clang/test/CIR/CodeGen/unary.cpp b/clang/test/CIR/CodeGen/unary.cpp index 1053a53dc96b..033a5d39c420 100644 --- a/clang/test/CIR/CodeGen/unary.cpp +++ b/clang/test/CIR/CodeGen/unary.cpp @@ -6,7 +6,7 @@ unsigned up0() { return +a; } -// CHECK: cir.func dso_local @_Z3up0v() -> !u32i +// CHECK: cir.func {{.*}} @_Z3up0v() -> !u32i // CHECK: %[[#RET:]] = cir.alloca !u32i, !cir.ptr, ["__retval"] // CHECK: %[[#A:]] = cir.alloca !u32i, !cir.ptr, ["a", init] // CHECK: %[[#INPUT:]] = cir.load{{.*}} %[[#A]] @@ -18,7 +18,7 @@ unsigned um0() { return -a; } -// CHECK: cir.func dso_local @_Z3um0v() -> !u32i +// CHECK: cir.func {{.*}} @_Z3um0v() -> !u32i // CHECK: %[[#RET:]] = cir.alloca !u32i, !cir.ptr, ["__retval"] // CHECK: %[[#A:]] = cir.alloca !u32i, !cir.ptr, ["a", init] // CHECK: %[[#INPUT:]] = cir.load{{.*}} %[[#A]] @@ -30,7 +30,7 @@ unsigned un0() { return ~a; // a ^ -1 , not } -// CHECK: cir.func dso_local @_Z3un0v() -> !u32i +// CHECK: cir.func {{.*}} @_Z3un0v() -> !u32i // CHECK: %[[#RET:]] = cir.alloca !u32i, !cir.ptr, ["__retval"] // CHECK: %[[#A:]] = cir.alloca !u32i, !cir.ptr, ["a", init] // CHECK: %[[#INPUT:]] = cir.load{{.*}} %[[#A]] @@ -43,7 +43,7 @@ int inc0() { return a; } -// CHECK: cir.func dso_local @_Z4inc0v() -> !s32i +// CHECK: cir.func {{.*}} @_Z4inc0v() -> !s32i // CHECK: %[[#RET:]] = cir.alloca !s32i, !cir.ptr, ["__retval"] // CHECK: %[[#A:]] = cir.alloca !s32i, !cir.ptr, ["a", init] // CHECK: %[[#ATMP:]] = cir.const #cir.int<1> : !s32i @@ -62,7 +62,7 @@ int dec0() { return a; } -// CHECK: cir.func dso_local @_Z4dec0v() -> !s32i +// CHECK: cir.func {{.*}} @_Z4dec0v() -> !s32i // CHECK: %[[#RET:]] = cir.alloca !s32i, !cir.ptr, ["__retval"] // CHECK: %[[#A:]] = cir.alloca !s32i, !cir.ptr, ["a", init] // CHECK: %[[#ATMP:]] = cir.const #cir.int<1> : !s32i @@ -82,7 +82,7 @@ int inc1() { return a; } -// CHECK: cir.func dso_local @_Z4inc1v() -> !s32i +// CHECK: cir.func {{.*}} @_Z4inc1v() -> !s32i // CHECK: %[[#RET:]] = cir.alloca !s32i, !cir.ptr, ["__retval"] // CHECK: %[[#A:]] = cir.alloca !s32i, !cir.ptr, ["a", init] // CHECK: %[[#ATMP:]] = cir.const #cir.int<1> : !s32i @@ -101,7 +101,7 @@ int dec1() { return a; } -// CHECK: cir.func dso_local @_Z4dec1v() -> !s32i +// CHECK: cir.func {{.*}} @_Z4dec1v() -> !s32i // CHECK: %[[#RET:]] = cir.alloca !s32i, !cir.ptr, ["__retval"] // CHECK: %[[#A:]] = cir.alloca !s32i, !cir.ptr, ["a", init] // CHECK: %[[#ATMP:]] = cir.const #cir.int<1> : !s32i @@ -121,7 +121,7 @@ int inc2() { return b; } -// CHECK: cir.func dso_local @_Z4inc2v() -> !s32i +// CHECK: cir.func {{.*}} @_Z4inc2v() -> !s32i // CHECK: %[[#RET:]] = cir.alloca !s32i, !cir.ptr, ["__retval"] // CHECK: %[[#A:]] = cir.alloca !s32i, !cir.ptr, ["a", init] // CHECK: %[[#B:]] = cir.alloca !s32i, !cir.ptr, ["b", init] @@ -142,7 +142,7 @@ int *inc_p(int *i) { return i; } -// CHECK: cir.func dso_local @_Z5inc_pPi(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @_Z5inc_pPi(%arg0: !cir.ptr // CHECK: %[[#i_addr:]] = cir.alloca !cir.ptr, !cir.ptr>, ["i", init] {alignment = 8 : i64} // CHECK: %[[#i_dec:]] = cir.load{{.*}} %[[#i_addr]] : !cir.ptr>, !cir.ptr @@ -154,7 +154,7 @@ int *inc_p(int *i) { // CHECK: = cir.ptr_stride %[[#i_inc]], %[[#inc_const]] : (!cir.ptr, !s32i) -> !cir.ptr void floats(float f) { -// CHECK: cir.func dso_local @{{.+}}floats{{.+}} +// CHECK: cir.func {{.*}} @{{.+}}floats{{.+}} f = +f; // CHECK: %{{[0-9]+}} = cir.unary(plus, %{{[0-9]+}}) : !cir.float, !cir.float f = -f; // CHECK: %{{[0-9]+}} = cir.unary(minus, %{{[0-9]+}}) : !cir.float, !cir.float ++f; // CHECK: = cir.unary(inc, %{{[0-9]+}}) : !cir.float, !cir.float @@ -168,7 +168,7 @@ void floats(float f) { } void doubles(double d) { -// CHECK: cir.func dso_local @{{.+}}doubles{{.+}} +// CHECK: cir.func {{.*}} @{{.+}}doubles{{.+}} d = +d; // CHECK: %{{[0-9]+}} = cir.unary(plus, %{{[0-9]+}}) : !cir.double, !cir.double d = -d; // CHECK: %{{[0-9]+}} = cir.unary(minus, %{{[0-9]+}}) : !cir.double, !cir.double ++d; // CHECK: = cir.unary(inc, %{{[0-9]+}}) : !cir.double, !cir.double @@ -182,7 +182,7 @@ void doubles(double d) { } void pointers(int *p) { -// CHECK: cir.func dso_local @{{[^ ]+}}pointers +// CHECK: cir.func {{.*}} @{{[^ ]+}}pointers // CHECK: %[[#P:]] = cir.alloca !cir.ptr, !cir.ptr> p = +p; @@ -211,7 +211,7 @@ void pointers(int *p) { } void chars(char c) { -// CHECK: cir.func dso_local @{{.+}}chars{{.+}} +// CHECK: cir.func {{.*}} @{{.+}}chars{{.+}} int c1 = +c; // CHECK: %[[#PROMO:]] = cir.cast integral %{{.+}} : !s8i -> !s32i diff --git a/clang/test/CIR/CodeGen/union-empty.cpp b/clang/test/CIR/CodeGen/union-empty.cpp index 9fab3134e190..43ffb319ada4 100644 --- a/clang/test/CIR/CodeGen/union-empty.cpp +++ b/clang/test/CIR/CodeGen/union-empty.cpp @@ -12,7 +12,7 @@ void f0() { }; // CIR: !rec_EmptyUnion = !cir.record -// CIR: cir.func dso_local @_Z2f0v() +// CIR: cir.func {{.*}} @_Z2f0v() // CIR: %0 = cir.alloca !rec_EmptyUnion, !cir.ptr, ["e"] {alignment = 1 : i64} // CIR: cir.return diff --git a/clang/test/CIR/CodeGen/union-init.c b/clang/test/CIR/CodeGen/union-init.c index 0e2d8fbc51b5..18d95b8514d7 100644 --- a/clang/test/CIR/CodeGen/union-init.c +++ b/clang/test/CIR/CodeGen/union-init.c @@ -18,7 +18,7 @@ void foo(int x) { // CHECK-DAG: #[[bfi_y:.*]] = #cir.bitfield_info // CHECK-DAG: ![[anon1:.*]] = !cir.record} -// CHECK-LABEL: cir.func dso_local @foo( +// CHECK-LABEL: cir.func {{.*}} @foo( // CHECK: %[[VAL_1:.*]] = cir.alloca !s32i, !cir.ptr, ["x", init] {alignment = 4 : i64} // CHECK: %[[VAL_2:.*]] = cir.alloca !rec_A, !cir.ptr, ["a", init] {alignment = 4 : i64} // CHECK: cir.store{{.*}} {{.*}}, %[[VAL_1]] : !s32i, !cir.ptr @@ -42,7 +42,7 @@ unsigned is_little(void) { return one.c[0]; } -// CHECK: cir.func dso_local @is_little +// CHECK: cir.func {{.*}} @is_little // CHECK: %[[VAL_1:.*]] = cir.get_global @is_little.one : !cir.ptr // CHECK: %[[VAL_2:.*]] = cir.cast bitcast %[[VAL_1]] : !cir.ptr -> !cir.ptr // CHECK: %[[VAL_3:.*]] = cir.get_member %[[VAL_2]][1] {name = "c"} : !cir.ptr -> !cir.ptr> diff --git a/clang/test/CIR/CodeGen/union.cpp b/clang/test/CIR/CodeGen/union.cpp index e94e78a959ff..0c0166165af1 100644 --- a/clang/test/CIR/CodeGen/union.cpp +++ b/clang/test/CIR/CodeGen/union.cpp @@ -49,7 +49,7 @@ void m() { yolm3 q3; } -// CHECK: cir.func dso_local @_Z1mv() +// CHECK: cir.func {{.*}} @_Z1mv() // CHECK: cir.alloca !rec_yolm, !cir.ptr, ["q"] {alignment = 4 : i64} // CHECK: cir.alloca !rec_yolm2, !cir.ptr, ["q2"] {alignment = 8 : i64} // CHECK: cir.alloca !rec_yolm3, !cir.ptr, ["q3"] {alignment = 4 : i64} diff --git a/clang/test/CIR/CodeGen/unreachable.cpp b/clang/test/CIR/CodeGen/unreachable.cpp index 07c4fc434e4e..8a99a83a3974 100644 --- a/clang/test/CIR/CodeGen/unreachable.cpp +++ b/clang/test/CIR/CodeGen/unreachable.cpp @@ -8,7 +8,7 @@ void basic() { __builtin_unreachable(); } -// CHECK: cir.func dso_local @_Z5basicv() +// CHECK: cir.func {{.*}} @_Z5basicv() // CHECK-NEXT: cir.call @_Z3foov() : () -> () // CHECK-NEXT: cir.unreachable // CHECK-NEXT: } @@ -19,7 +19,7 @@ void code_after_unreachable() { foo(); } -// CHECK: cir.func dso_local @_Z22code_after_unreachablev() +// CHECK: cir.func {{.*}} @_Z22code_after_unreachablev() // CHECK: cir.call @_Z3foov() : () -> () // CHECK: cir.unreachable // CHECK: ^{{.+}}: diff --git a/clang/test/CIR/CodeGen/uwtable.cpp b/clang/test/CIR/CodeGen/uwtable.cpp index e3ca5b2bb87b..174b2f31a783 100644 --- a/clang/test/CIR/CodeGen/uwtable.cpp +++ b/clang/test/CIR/CodeGen/uwtable.cpp @@ -19,15 +19,15 @@ // CIR-NONE-NOT: #cir.uwtable // CIR-SYNC-DAG: module {{.*}} attributes {{{.*}}cir.uwtable = #cir.uwtable -// CIR-SYNC-DAG: cir.func dso_local @_Z1fv() extra(#[[f_attr:.*]]) -// CIR-SYNC-DAG: cir.func dso_local @_Z1gv() extra(#[[g_attr:.*]]) +// CIR-SYNC-DAG: cir.func {{.*}} @_Z1fv() extra(#[[f_attr:.*]]) +// CIR-SYNC-DAG: cir.func {{.*}} @_Z1gv() extra(#[[g_attr:.*]]) // CIR-SYNC-DAG: #[[f_attr]] = #cir // CIR-SYNC-DAG: #[[g_attr]] = // CIR-SYNC-NOT: #cir.uwtable // CIR-ASYNC-DAG: module {{.*}} attributes {{{.*}}cir.uwtable = #cir.uwtable -// CIR-ASYNC-DAG: cir.func dso_local @_Z1fv() extra(#[[f_attr:.*]]) -// CIR-ASYNC-DAG: cir.func dso_local @_Z1gv() extra(#[[g_attr:.*]]) +// CIR-ASYNC-DAG: cir.func {{.*}} @_Z1fv() extra(#[[f_attr:.*]]) +// CIR-ASYNC-DAG: cir.func {{.*}} @_Z1gv() extra(#[[g_attr:.*]]) // CIR-ASYNC-DAG: #[[f_attr]] = #cir // CIR-ASYNC-DAG: #[[g_attr]] = // CIR-ASYNC-NOT: #cir.uwtable diff --git a/clang/test/CIR/CodeGen/var-arg-float.c b/clang/test/CIR/CodeGen/var-arg-float.c index e5cad0a0a72f..27cf9d1c6944 100644 --- a/clang/test/CIR/CodeGen/var-arg-float.c +++ b/clang/test/CIR/CodeGen/var-arg-float.c @@ -14,7 +14,7 @@ double f1(int n, ...) { } // BEFORE: !rec___va_list = !cir.record, !cir.ptr, !cir.ptr, !s32i, !s32i} -// BEFORE: cir.func dso_local @f1(%arg0: !s32i, ...) -> !cir.double +// BEFORE: cir.func {{.*}} @f1(%arg0: !s32i, ...) -> !cir.double // BEFORE: [[RETP:%.*]] = cir.alloca !cir.double, !cir.ptr, ["__retval"] // BEFORE: [[RESP:%.*]] = cir.alloca !cir.double, !cir.ptr, ["res", init] // BEFORE: cir.va.start [[VARLIST:%.*]] : !cir.ptr @@ -28,7 +28,7 @@ double f1(int n, ...) { // beginning block cir code // AFTER: !rec___va_list = !cir.record, !cir.ptr, !cir.ptr, !s32i, !s32i} -// AFTER: cir.func dso_local @f1(%arg0: !s32i, ...) -> !cir.double +// AFTER: cir.func {{.*}} @f1(%arg0: !s32i, ...) -> !cir.double // AFTER: [[RETP:%.*]] = cir.alloca !cir.double, !cir.ptr, ["__retval"] // AFTER: [[RESP:%.*]] = cir.alloca !cir.double, !cir.ptr, ["res", init] // AFTER: cir.va.start [[VARLIST:%.*]] : !cir.ptr diff --git a/clang/test/CIR/CodeGen/var-arg-scope.c b/clang/test/CIR/CodeGen/var-arg-scope.c index e5d236f7a980..8dee702223df 100644 --- a/clang/test/CIR/CodeGen/var-arg-scope.c +++ b/clang/test/CIR/CodeGen/var-arg-scope.c @@ -7,7 +7,7 @@ void f1(__builtin_va_list c) { { __builtin_va_arg(c, void *); } } -// BEFORE: cir.func dso_local @f1(%arg0: !rec___va_list) attributes +// BEFORE: cir.func {{.*}} @f1(%arg0: !rec___va_list) attributes // BEFORE: [[VAR_LIST:%.*]] = cir.alloca !rec___va_list, !cir.ptr, ["c", init] {alignment = 8 : i64} // BEFORE: cir.store %arg0, [[VAR_LIST]] : !rec___va_list, !cir.ptr // BEFORE: cir.scope { @@ -15,7 +15,7 @@ void f1(__builtin_va_list c) { // BEFORE-NEXT: } // BEFORE-NEXT: cir.return -// AFTER: cir.func dso_local @f1(%arg0: !rec___va_list) attributes +// AFTER: cir.func {{.*}} @f1(%arg0: !rec___va_list) attributes // AFTER: [[VARLIST:%.*]] = cir.alloca !rec___va_list, !cir.ptr, ["c", init] {alignment = 8 : i64} // AFTER: cir.store %arg0, [[VARLIST]] : !rec___va_list, !cir.ptr // AFTER: cir.scope { diff --git a/clang/test/CIR/CodeGen/var-arg.c b/clang/test/CIR/CodeGen/var-arg.c index 0427eeef4c0d..cea9cdb88d6a 100644 --- a/clang/test/CIR/CodeGen/var-arg.c +++ b/clang/test/CIR/CodeGen/var-arg.c @@ -14,7 +14,7 @@ int f1(int n, ...) { } // BEFORE: !rec___va_list = !cir.record, !cir.ptr, !cir.ptr, !s32i, !s32i} -// BEFORE: cir.func dso_local @f1(%arg0: !s32i, ...) -> !s32i +// BEFORE: cir.func {{.*}} @f1(%arg0: !s32i, ...) -> !s32i // BEFORE: [[RETP:%.*]] = cir.alloca !s32i, !cir.ptr, ["__retval"] // BEFORE: [[RESP:%.*]] = cir.alloca !s32i, !cir.ptr, ["res", init] // BEFORE: cir.va.start [[VARLIST:%.*]] : !cir.ptr @@ -27,7 +27,7 @@ int f1(int n, ...) { // BEFORE: cir.return [[RETV]] : !s32i // AFTER: !rec___va_list = !cir.record, !cir.ptr, !cir.ptr, !s32i, !s32i} -// AFTER: cir.func dso_local @f1(%arg0: !s32i, ...) -> !s32i +// AFTER: cir.func {{.*}} @f1(%arg0: !s32i, ...) -> !s32i // AFTER: [[RETP:%.*]] = cir.alloca !s32i, !cir.ptr, ["__retval"] // AFTER: [[RESP:%.*]] = cir.alloca !s32i, !cir.ptr, ["res", init] // AFTER: cir.va.start [[VARLIST:%.*]] : !cir.ptr diff --git a/clang/test/CIR/CodeGen/variadic-ctor.cpp b/clang/test/CIR/CodeGen/variadic-ctor.cpp index eb5ab5c377a1..88c6d299358a 100644 --- a/clang/test/CIR/CodeGen/variadic-ctor.cpp +++ b/clang/test/CIR/CodeGen/variadic-ctor.cpp @@ -8,4 +8,4 @@ class A { A a(nullptr, 1, "str"); -// CIR: cir.func private @_ZN1AC1EPvz(!cir.ptr, !cir.ptr, ...) +// CIR: cir.func {{.*}} @_ZN1AC1EPvz(!cir.ptr, !cir.ptr, ...) diff --git a/clang/test/CIR/CodeGen/variadics.c b/clang/test/CIR/CodeGen/variadics.c index caa8a73b5446..c75198a67806 100644 --- a/clang/test/CIR/CodeGen/variadics.c +++ b/clang/test/CIR/CodeGen/variadics.c @@ -11,8 +11,8 @@ typedef __builtin_va_list va_list; // CHECK: [[VALISTTYPE:!.+va_list.*]] = !cir.record !s32i -// AMR64_CHECK: cir.func dso_local @{{.*}}average{{.*}}(%arg0: !s32i loc({{.+}}), ...) -> !s32i +// CHECK: cir.func {{.*}} @{{.*}}average{{.*}}(%arg0: !s32i, ...) -> !s32i +// AMR64_CHECK: cir.func {{.*}} @{{.*}}average{{.*}}(%arg0: !s32i loc({{.+}}), ...) -> !s32i va_list args, args_copy; va_start(args, count); // CHECK: cir.va.start %{{[0-9]+}} : !cir.ptr<[[VALISTTYPE]]> diff --git a/clang/test/CIR/CodeGen/vector.cpp b/clang/test/CIR/CodeGen/vector.cpp index f5a1dd8f590e..56387891c9e4 100644 --- a/clang/test/CIR/CodeGen/vector.cpp +++ b/clang/test/CIR/CodeGen/vector.cpp @@ -11,7 +11,7 @@ namespace std { } } // namespace std -// CHECK: cir.func linkonce_odr @_ZNSt6vectorIyE6resizeEm( +// CHECK: cir.func {{.*}} @_ZNSt6vectorIyE6resizeEm( // CHECK: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK: %1 = cir.alloca !u64i, !cir.ptr, ["__sz", init] {alignment = 8 : i64} // CHECK: %2 = cir.alloca !u64i, !cir.ptr, ["__cs", init] {alignment = 8 : i64} diff --git a/clang/test/CIR/CodeGen/vectype-ext.cpp b/clang/test/CIR/CodeGen/vectype-ext.cpp index 177d198479e9..ff9a3656e671 100644 --- a/clang/test/CIR/CodeGen/vectype-ext.cpp +++ b/clang/test/CIR/CodeGen/vectype-ext.cpp @@ -40,7 +40,7 @@ vi4 vec_e = { 1, 2, 3, 4 }; // LLVM: @[[VEC_E:.*]] = global <4 x i32> -// CIR: cir.func dso_local {{@.*vector_int_test.*}} +// CIR: cir.func {{.*}} {{@.*vector_int_test.*}} // LLVM: define dso_local void {{@.*vector_int_test.*}} void vector_int_test(int x) { @@ -225,7 +225,7 @@ void vector_int_test(int x) { // LLVM-NEXT: store <4 x i32> %[[#INS4]], ptr %{{[0-9]+}}, align 16 } -// CIR: cir.func dso_local {{@.*vector_double_test.*}} +// CIR: cir.func {{.*}} {{@.*vector_double_test.*}} // LLVM: define dso_local void {{@.*vector_double_test.*}} void vector_double_test(int x, double y) { // Vector constant. @@ -339,7 +339,7 @@ void vector_double_test(int x, double y) { // LLVM: %{{[0-9]+}} = fptoui <2 x double> %{{[0-9]+}} to <2 x i16> } -// CIR: cir.func dso_local {{@.*test_load.*}} +// CIR: cir.func {{.*}} {{@.*test_load.*}} // LLVM: define dso_local void {{@.*test_load.*}} void test_load() { vi4 a = { 1, 2, 3, 4 }; @@ -368,7 +368,7 @@ void test_load() { } -// CIR: cir.func dso_local {{@.*test_store.*}} +// CIR: cir.func {{.*}} {{@.*test_store.*}} // LLVM: define dso_local void {{@.*test_store.*}} void test_store() { vi4 a; @@ -457,7 +457,7 @@ void test_store() { } -// CIR: cir.func dso_local {{@.*test_build_lvalue.*}} +// CIR: cir.func {{.*}} {{@.*test_build_lvalue.*}} // LLVM: define dso_local void {{@.*test_build_lvalue.*}} void test_build_lvalue() { // special cases only @@ -520,7 +520,7 @@ void test_build_lvalue() { } -// CIR: cir.func dso_local {{@.*test_vec3.*}} +// CIR: cir.func {{.*}} {{@.*test_vec3.*}} // LLVM: define dso_local void {{@.*test_vec3.*}} void test_vec3() { vi3 v = {}; @@ -568,7 +568,7 @@ void vector_shuffle_dynamic_mask_test() { // This documents how vec3 arrays are handled in memory accesses // Original CodeGen treats vec3 as vec4 for aligned memory access // See issue #685 -// CIR: cir.func dso_local {{@.*test_vec3_array.*}} +// CIR: cir.func {{.*}} {{@.*test_vec3_array.*}} // LLVM: define dso_local void {{@.*test_vec3_array.*}} void test_vec3_array() { vi3 arr[4] = {}; diff --git a/clang/test/CIR/CodeGen/virtual-destructor-calls.cpp b/clang/test/CIR/CodeGen/virtual-destructor-calls.cpp index 8fb3dfdae335..df0e681e37a1 100644 --- a/clang/test/CIR/CodeGen/virtual-destructor-calls.cpp +++ b/clang/test/CIR/CodeGen/virtual-destructor-calls.cpp @@ -29,7 +29,7 @@ struct B : A { // LLVM: @_ZN1CD1Ev = alias void (ptr), ptr @_ZN1CD2Ev // Base dtor: actually calls A's base dtor. -// CIR: cir.func dso_local @_ZN1BD2Ev +// CIR: cir.func {{.*}} @_ZN1BD2Ev // CIR: cir.call @_ZN6MemberD1Ev // CIR: cir.call @_ZN1AD2Ev // LLVM: define{{.*}} void @_ZN1BD2Ev(ptr @@ -37,7 +37,7 @@ struct B : A { // LLVM: call void @_ZN1AD2Ev // Complete dtor: just an alias because there are no virtual bases. -// CIR: cir.func private dso_local @_ZN1BD1Ev(!cir.ptr) special_member<#cir.cxx_dtor> alias(@_ZN1BD2Ev) +// CIR: cir.func {{.*}} @_ZN1BD1Ev(!cir.ptr) special_member<#cir.cxx_dtor> alias(@_ZN1BD2Ev) // Deleting dtor: defers to the complete dtor. // LLVM: define{{.*}} void @_ZN1BD0Ev(ptr @@ -45,10 +45,10 @@ struct B : A { // LLVM: call void @_ZdlPv // (aliases from C) -// CIR: cir.func dso_local @_ZN1CD2Ev(%arg0: !cir.ptr{{.*}})) {{.*}} { -// CIR: cir.func private dso_local @_ZN1CD1Ev(!cir.ptr) special_member<#cir.cxx_dtor> alias(@_ZN1CD2Ev) +// CIR: cir.func {{.*}} @_ZN1CD2Ev(%arg0: !cir.ptr{{.*}})) {{.*}} { +// CIR: cir.func {{.*}} @_ZN1CD1Ev(!cir.ptr) special_member<#cir.cxx_dtor> alias(@_ZN1CD2Ev) -// CIR_O1-NOT: cir.func dso_local @_ZN1CD2Ev(%arg0: !cir.ptr{{.*}})) {{.*}} { +// CIR_O1-NOT: cir.func {{.*}} @_ZN1CD2Ev(%arg0: !cir.ptr{{.*}})) {{.*}} { // CIR_O1: cir.func private dso_local @_ZN1CD2Ev(!cir.ptr) special_member<#cir.cxx_dtor> alias(@_ZN1BD2Ev) // CIR_O1: cir.func private dso_local @_ZN1CD1Ev(!cir.ptr) special_member<#cir.cxx_dtor> alias(@_ZN1CD2Ev) @@ -69,7 +69,7 @@ C::~C() { } // Complete dtor: just an alias (checked above). // Deleting dtor: defers to the complete dtor. -// CIR: cir.func dso_local @_ZN1CD0Ev +// CIR: cir.func {{.*}} @_ZN1CD0Ev // CIR: cir.call @_ZN1CD1Ev // CIR: cir.call @_ZdlPvm // LLVM: define{{.*}} void @_ZN1CD0Ev(ptr @@ -84,7 +84,7 @@ namespace PR12798 { struct A { virtual ~A(); }; template void f(T *p) { p->A::~A(); } - // CIR: cir.func weak_odr @_ZN7PR127981fINS_1AEEEvPT_ + // CIR: cir.func {{.*}} @_ZN7PR127981fINS_1AEEEvPT_ // CIR: cir.call @_ZN7PR127981AD1Ev // LLVM: define {{.*}} @_ZN7PR127981fINS_1AEEEvPT_( // LLVM: call void @_ZN7PR127981AD1Ev( diff --git a/clang/test/CIR/CodeGen/virtual-destructor-explicit-unqualified-call.cpp b/clang/test/CIR/CodeGen/virtual-destructor-explicit-unqualified-call.cpp index ebe379f9327c..99f9570e6844 100644 --- a/clang/test/CIR/CodeGen/virtual-destructor-explicit-unqualified-call.cpp +++ b/clang/test/CIR/CodeGen/virtual-destructor-explicit-unqualified-call.cpp @@ -12,7 +12,7 @@ class A { A B(A); }; A A::B(A) { - // CIR-LABEL: cir.func dso_local @_ZN1A1BES_( + // CIR-LABEL: cir.func {{.*}} @_ZN1A1BES_( // CIR-SAME: %[[THIS_ARG:.*]]: !cir.ptr // CIR-NEXT: %[[THIS_VAR:.*]] = cir.alloca !cir.ptr, !cir.ptr> // CIR: cir.store %[[THIS_ARG]], %[[THIS_VAR]] : !cir.ptr, !cir.ptr> diff --git a/clang/test/CIR/CodeGen/visibility-attribute.c b/clang/test/CIR/CodeGen/visibility-attribute.c index 145b04698b77..087e7938f815 100644 --- a/clang/test/CIR/CodeGen/visibility-attribute.c +++ b/clang/test/CIR/CodeGen/visibility-attribute.c @@ -21,27 +21,27 @@ int call_glob() } void foo_default(); -// CIR: cir.func no_proto private @foo_default(...) +// CIR: cir.func {{.*}} private @foo_default(...) // LLVM: declare void @foo_default(...) void __attribute__((__visibility__("hidden"))) foo_hidden(); -// CIR: cir.func no_proto private hidden @foo_hidden(...) +// CIR: cir.func {{.*}} private hidden @foo_hidden(...) // LLVM: declare hidden void @foo_hidden(...) void __attribute__((__visibility__("protected"))) foo_protected(); -// CIR: cir.func no_proto private protected @foo_protected(...) +// CIR: cir.func {{.*}} private protected @foo_protected(...) // LLVM: declare protected void @foo_protected(...) static void static_foo_default() {} -// CIR: cir.func no_proto internal private dso_local @static_foo_default() +// CIR: cir.func {{.*}} internal private {{.*}} @static_foo_default() // LLVM: define internal void @static_foo_default() static void __attribute__((__visibility__("hidden"))) static_foo_hidden() {} -// CIR: cir.func no_proto internal private dso_local @static_foo_hidden() +// CIR: cir.func {{.*}} internal private {{.*}} @static_foo_hidden() // LLVM: define internal void @static_foo_hidden() static void __attribute__((__visibility__("protected"))) static_foo_protected() {} -// CIR: cir.func no_proto internal private dso_local @static_foo_protected() +// CIR: cir.func {{.*}} internal private {{.*}} @static_foo_protected() // LLVM: define internal void @static_foo_protected() void call_foo() diff --git a/clang/test/CIR/CodeGen/vla.c b/clang/test/CIR/CodeGen/vla.c index e26569802212..6aee44ae6188 100644 --- a/clang/test/CIR/CodeGen/vla.c +++ b/clang/test/CIR/CodeGen/vla.c @@ -7,7 +7,7 @@ // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll // RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s -// CHECK: cir.func dso_local @f0(%arg0: !s32i +// CHECK: cir.func {{.*}} @f0(%arg0: !s32i // CHECK: [[TMP0:%.*]] = cir.alloca !s32i, !cir.ptr, ["len", init] {alignment = 4 : i64} // CHECK: [[TMP1:%.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["saved_stack"] {alignment = 8 : i64} // CHECK: cir.store{{.*}} %arg0, [[TMP0]] : !s32i, !cir.ptr @@ -22,7 +22,7 @@ void f0(int len) { int a[len]; } -// CHECK: cir.func dso_local @f1 +// CHECK: cir.func {{.*}} @f1 // CHECK-NOT: cir.stack_save // CHECK-NOT: cir.stack_restore // CHECK: cir.return @@ -30,7 +30,7 @@ int f1(int n) { return sizeof(int[n]); } -// CHECK: cir.func dso_local @f2 +// CHECK: cir.func {{.*}} @f2 // CHECK: cir.stack_save // DONT_CHECK: cir.stack_restore // CHECK: cir.return @@ -39,7 +39,7 @@ int f2(int x) { return vla[x-1]; } -// CHECK: cir.func dso_local @f3 +// CHECK: cir.func {{.*}} @f3 // CHECK: cir.stack_save // CHECK: cir.stack_restore // CHECK: cir.return @@ -51,7 +51,7 @@ void f3(int count) { } -// CHECK: cir.func dso_local @f4 +// CHECK: cir.func {{.*}} @f4 // CHECK-NOT: cir.stack_save // CHECK-NOT: cir.stack_restore // CHECK: cir.return diff --git a/clang/test/CIR/CodeGen/volatile.cpp b/clang/test/CIR/CodeGen/volatile.cpp index ef1f4c82dd56..e5c414958a81 100644 --- a/clang/test/CIR/CodeGen/volatile.cpp +++ b/clang/test/CIR/CodeGen/volatile.cpp @@ -5,14 +5,14 @@ int test_load(volatile int *ptr) { return *ptr; } -// CHECK: cir.func dso_local @_Z9test_loadPVi +// CHECK: cir.func {{.*}} @_Z9test_loadPVi // CHECK: %{{.+}} = cir.load volatile void test_store(volatile int *ptr) { *ptr = 42; } -// CHECK: cir.func dso_local @_Z10test_storePVi +// CHECK: cir.func {{.*}} @_Z10test_storePVi // CHECK: cir.store volatile struct Foo { @@ -25,7 +25,7 @@ int test_load_field1(volatile Foo *ptr) { return ptr->x; } -// CHECK: cir.func dso_local @_Z16test_load_field1PV3Foo +// CHECK: cir.func {{.*}} @_Z16test_load_field1PV3Foo // CHECK: %[[MemberAddr:.*]] = cir.get_member // CHECK: %{{.+}} = cir.load volatile{{.*}} %[[MemberAddr]] @@ -33,7 +33,7 @@ int test_load_field2(Foo *ptr) { return ptr->y; } -// CHECK: cir.func dso_local @_Z16test_load_field2P3Foo +// CHECK: cir.func {{.*}} @_Z16test_load_field2P3Foo // CHECK: %[[MemberAddr:.+]] = cir.get_member // CHECK: %{{.+}} = cir.load volatile{{.*}} %[[MemberAddr]] @@ -41,7 +41,7 @@ int test_load_field3(Foo *ptr) { return ptr->z; } -// CHECK: cir.func dso_local @_Z16test_load_field3P3Foo +// CHECK: cir.func {{.*}} @_Z16test_load_field3P3Foo // CHECK: %[[MemberAddr:.+]] = cir.get_member // CHECK: %{{.+}} = cir.get_bitfield align(4) (#bfi_z, %[[MemberAddr:.+]] {is_volatile} @@ -49,7 +49,7 @@ void test_store_field1(volatile Foo *ptr) { ptr->x = 42; } -// CHECK: cir.func dso_local @_Z17test_store_field1PV3Foo +// CHECK: cir.func {{.*}} @_Z17test_store_field1PV3Foo // CHECK: %[[MemberAddr:.+]] = cir.get_member // CHECK: cir.store volatile{{.*}} %{{.+}}, %[[MemberAddr]] @@ -57,7 +57,7 @@ void test_store_field2(Foo *ptr) { ptr->y = 42; } -// CHECK: cir.func dso_local @_Z17test_store_field2P3Foo +// CHECK: cir.func {{.*}} @_Z17test_store_field2P3Foo // CHECK: %[[MemberAddr:.+]] = cir.get_member // CHECK: cir.store volatile{{.*}} %{{.+}}, %[[MemberAddr]] @@ -65,6 +65,6 @@ void test_store_field3(Foo *ptr) { ptr->z = 4; } -// CHECK: cir.func dso_local @_Z17test_store_field3P3Foo +// CHECK: cir.func {{.*}} @_Z17test_store_field3P3Foo // CHECK: %[[MemberAddr:.+]] = cir.get_member // CHECK: cir.set_bitfield align(4) (#bfi_z, %[[MemberAddr:.+]] : !cir.ptr, %1 : !s32i) {is_volatile} diff --git a/clang/test/CIR/CodeGen/vtable-emission.cpp b/clang/test/CIR/CodeGen/vtable-emission.cpp index e1b30ec6d340..fe915cfb6e67 100644 --- a/clang/test/CIR/CodeGen/vtable-emission.cpp +++ b/clang/test/CIR/CodeGen/vtable-emission.cpp @@ -27,4 +27,4 @@ void S::key() {} // LLVM-SAME: (i8, ptr @_ZTV1S, i64 16) }, align 8 // The reference from the vtable should result in nonKey being emitted. -// CHECK: cir.func linkonce_odr @_ZN1S6nonKeyEv({{.*}} { +// CHECK: cir.func {{.*}} @_ZN1S6nonKeyEv({{.*}} { diff --git a/clang/test/CIR/CodeGen/vtable-rtti.cpp b/clang/test/CIR/CodeGen/vtable-rtti.cpp index 1f40bad2a018..cb56a4c9c9ac 100644 --- a/clang/test/CIR/CodeGen/vtable-rtti.cpp +++ b/clang/test/CIR/CodeGen/vtable-rtti.cpp @@ -37,8 +37,8 @@ class B : public A // B ctor => @B::B() // Calls @A::A() and initialize __vptr with address of B's vtable. // -// CHECK: cir.func linkonce_odr @_ZN1BC2Ev(%arg0: !cir.ptr -// RTTI_DISABLED: cir.func linkonce_odr @_ZN1BC2Ev(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @_ZN1BC2Ev(%arg0: !cir.ptr +// RTTI_DISABLED: cir.func {{.*}} @_ZN1BC2Ev(%arg0: !cir.ptr // CHECK: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK: cir.store{{.*}} %arg0, %0 : !cir.ptr, !cir.ptr> @@ -53,7 +53,7 @@ class B : public A // foo - zero initialize object B and call ctor (@B::B()) // -// CHECK: cir.func dso_local @_Z3foov() +// CHECK: cir.func {{.*}} @_Z3foov() // CHECK: cir.scope { // CHECK: %0 = cir.alloca !rec_B, !cir.ptr, ["agg.tmp.ensured"] {alignment = 8 : i64} // CHECK: %1 = cir.const #cir.zero : ![[ClassB]] @@ -69,7 +69,7 @@ class B : public A // A ctor => @A::A() // Calls @A::A() and initialize __vptr with address of A's vtable // -// CHECK: cir.func linkonce_odr @_ZN1AC2Ev(%arg0: !cir.ptr +// CHECK: cir.func {{.*}} @_ZN1AC2Ev(%arg0: !cir.ptr // CHECK: %0 = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CHECK: cir.store{{.*}} %arg0, %0 : !cir.ptr, !cir.ptr> // CHECK: %1 = cir.load %0 : !cir.ptr>, !cir.ptr diff --git a/clang/test/CIR/CodeGen/vtt.cpp b/clang/test/CIR/CodeGen/vtt.cpp index bdbc1a262d81..676cf210ceee 100644 --- a/clang/test/CIR/CodeGen/vtt.cpp +++ b/clang/test/CIR/CodeGen/vtt.cpp @@ -37,7 +37,7 @@ int f() { // CIR: cir.global constant linkonce_odr @_ZTV1A = #cir.vtable<{#cir.const_array<[#cir.ptr : !cir.ptr, #cir.global_view<@_ZTI1A> : !cir.ptr, #cir.global_view<@_ZN1A1vEv> : !cir.ptr]> : !cir.array x 3>}> : !rec_anon_struct3 {alignment = 8 : i64} // Class A constructor -// CIR: cir.func linkonce_odr @_ZN1AC2Ev(%arg0: !cir.ptr +// CIR: cir.func {{.*}} @_ZN1AC2Ev(%arg0: !cir.ptr // CIR: %{{[0-9]+}} = cir.vtable.address_point(@_ZTV1A, address_point = ) : !cir.vptr // CIR: %{{[0-9]+}} = cir.vtable.get_vptr %{{.*}} : !cir.ptr -> !cir.ptr // CIR: cir.store{{.*}} %{{[0-9]+}}, %{{[0-9]+}} : !cir.vptr, !cir.ptr @@ -49,7 +49,7 @@ int f() { // CIR: cir.global constant linkonce_odr @_ZTT1D = #cir.const_array<[#cir.global_view<@_ZTV1D, [0 : i32, 3 : i32]> : !cir.ptr, #cir.global_view<@_ZTC1D0_1B, [0 : i32, 3 : i32]> : !cir.ptr, #cir.global_view<@_ZTC1D0_1B, [1 : i32, 3 : i32]> : !cir.ptr, #cir.global_view<@_ZTC1D16_1C, [0 : i32, 3 : i32]> : !cir.ptr, #cir.global_view<@_ZTC1D16_1C, [1 : i32, 3 : i32]> : !cir.ptr, #cir.global_view<@_ZTV1D, [2 : i32, 3 : i32]> : !cir.ptr, #cir.global_view<@_ZTV1D, [1 : i32, 3 : i32]> : !cir.ptr]> : !cir.array x 7> {alignment = 8 : i64} // Class B constructor -// CIR: cir.func linkonce_odr @_ZN1BC2Ev(%arg0: !cir.ptr +// CIR: cir.func {{.*}} @_ZN1BC2Ev(%arg0: !cir.ptr // CIR: %{{[0-9]+}} = cir.vtt.address_point %{{[0-9]+}} : !cir.ptr>, offset = 0 -> !cir.ptr> // CIR: %{{[0-9]+}} = cir.cast bitcast %{{[0-9]+}} : !cir.ptr> -> !cir.ptr // CIR: %{{[0-9]+}} = cir.load align(8) %{{[0-9]+}} : !cir.ptr, !cir.vptr @@ -83,7 +83,7 @@ int f() { // LLVM: } // Class C constructor -// CIR: cir.func linkonce_odr @_ZN1CC2Ev(%arg0: !cir.ptr +// CIR: cir.func {{.*}} @_ZN1CC2Ev(%arg0: !cir.ptr // CIR: %{{[0-9]+}} = cir.vtt.address_point %{{[0-9]+}} : !cir.ptr>, offset = 0 -> !cir.ptr> // CIR: %{{[0-9]+}} = cir.cast bitcast %{{[0-9]+}} : !cir.ptr> -> !cir.ptr // CIR: %{{[0-9]+}} = cir.load align(8) %{{[0-9]+}} : !cir.ptr, !cir.vptr @@ -107,7 +107,7 @@ int f() { // CIR: } // Class D constructor -// CIR: cir.func linkonce_odr @_ZN1DC1Ev(%arg0: !cir.ptr +// CIR: cir.func {{.*}} @_ZN1DC1Ev(%arg0: !cir.ptr // CIR: %{{[0-9]+}} = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CIR: cir.store{{.*}} %arg0, %{{[0-9]+}} : !cir.ptr, !cir.ptr> // CIR: %[[D_PTR:.*]] = cir.load{{.*}} %0 : !cir.ptr>, !cir.ptr @@ -172,7 +172,7 @@ namespace other { } } -// CIR-LABEL: cir.func dso_local @_ZN5other1BD1Ev( +// CIR-LABEL: cir.func {{.*}} @_ZN5other1BD1Ev( // CIR-SAME: %[[VAL_0:.*]]: !cir.ptr // CIR: %[[VAL_1:.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["this", init] {alignment = 8 : i64} // CIR: cir.store{{.*}} %[[VAL_0]], %[[VAL_1]] : !cir.ptr, !cir.ptr> diff --git a/clang/test/CIR/CodeGen/weak.c b/clang/test/CIR/CodeGen/weak.c index 0dc93f351cfc..8b87b658e87b 100644 --- a/clang/test/CIR/CodeGen/weak.c +++ b/clang/test/CIR/CodeGen/weak.c @@ -15,7 +15,7 @@ void active (void) // LLVM: @x = weak global // CIR: cir.func extern_weak private @B() -// CIR: cir.func dso_local @active() +// CIR: cir.func {{.*}} @active() // CIR-NEXT: cir.call @B() : () -> () // LLVM: declare extern_weak void @B() diff --git a/clang/test/CIR/IR/dynamic-cast.cir b/clang/test/CIR/IR/dynamic-cast.cir index 283f11e25b82..aa542f26ba3b 100644 --- a/clang/test/CIR/IR/dynamic-cast.cir +++ b/clang/test/CIR/IR/dynamic-cast.cir @@ -42,7 +42,7 @@ module { cir.return %0 : !cir.ptr } - // CHECK: cir.func dso_local @test_cast_to_void(%arg0: !cir.ptr) -> !cir.ptr { + // CHECK: cir.func {{.*}} @test_cast_to_void(%arg0: !cir.ptr) -> !cir.ptr { // CHECK: %0 = cir.dyn_cast ptr %arg0 : !cir.ptr -> !cir.ptr // CHECK: cir.return %0 : !cir.ptr // CHECK: } @@ -52,7 +52,7 @@ module { cir.return %0 : !cir.ptr } - // CHECK: cir.func dso_local @test_relative_layout_cast(%arg0: !cir.ptr) -> !cir.ptr { + // CHECK: cir.func {{.*}} @test_relative_layout_cast(%arg0: !cir.ptr) -> !cir.ptr { // CHECK: %0 = cir.dyn_cast ptr relative_layout %arg0 : !cir.ptr -> !cir.ptr // CHECK: cir.return %0 : !cir.ptr // CHECK: } diff --git a/clang/test/CIR/IR/func-dsolocal-parser.cir b/clang/test/CIR/IR/func-dsolocal-parser.cir index 3b5a5bc20053..409974fb8ec0 100644 --- a/clang/test/CIR/IR/func-dsolocal-parser.cir +++ b/clang/test/CIR/IR/func-dsolocal-parser.cir @@ -10,4 +10,4 @@ module { } } -// CHECK: cir.func dso_local @foo(%arg0: !s32i) extra(#fn_attr) +// CHECK: cir.func {{.*}} @foo(%arg0: !s32i) extra(#fn_attr) diff --git a/clang/test/CIR/Lowering/try-catch.cpp b/clang/test/CIR/Lowering/try-catch.cpp index a3eb0102abb9..c10cd365aac4 100644 --- a/clang/test/CIR/Lowering/try-catch.cpp +++ b/clang/test/CIR/Lowering/try-catch.cpp @@ -4,8 +4,8 @@ // RUN_DISABLED: FileCheck --input-file=%t.flat.cir --check-prefix=CIR_LLVM %s double division(int a, int b); -// CIR: cir.func dso_local @_Z2tcv() -// CIR_FLAT: cir.func dso_local @_Z2tcv() +// CIR: cir.func {{.*}} @_Z2tcv() +// CIR_FLAT: cir.func {{.*}} @_Z2tcv() unsigned long long tc() { int x = 50, y = 3; unsigned long long z; @@ -60,7 +60,7 @@ unsigned long long tc() { return z; } -// CIR_FLAT: cir.func dso_local @_Z3tc2v +// CIR_FLAT: cir.func {{.*}} @_Z3tc2v unsigned long long tc2() { int x = 50, y = 3; unsigned long long z; @@ -89,7 +89,7 @@ unsigned long long tc2() { return z; } -// CIR_FLAT: cir.func dso_local @_Z3tc3v +// CIR_FLAT: cir.func {{.*}} @_Z3tc3v unsigned long long tc3() { int x = 50, y = 3; unsigned long long z; diff --git a/clang/test/CIR/Lowering/var-arg-x86_64.c b/clang/test/CIR/Lowering/var-arg-x86_64.c index db2245911860..3c86881f7bd4 100644 --- a/clang/test/CIR/Lowering/var-arg-x86_64.c +++ b/clang/test/CIR/Lowering/var-arg-x86_64.c @@ -41,7 +41,7 @@ double f1(int n, ...) { // CHECK: [[VA_LIST3:%.+]] = getelementptr {{.*}} [[VA_LIST_ALLOCA]], i32 0 // CHECK: call {{.*}}@llvm.va_end.p0(ptr [[VA_LIST3]]) -// CIR: cir.func dso_local @f1 +// CIR: cir.func {{.*}} @f1 // CIR: [[VA_LIST_ALLOCA:%.+]] = cir.alloca !cir.array, // CIR: [[RES:%.+]] = cir.alloca !cir.double, !cir.ptr, ["res", // CIR: [[VASTED_VA_LIST:%.+]] = cir.cast array_to_ptrdecay [[VA_LIST_ALLOCA]] @@ -110,7 +110,7 @@ long double f2(int n, ...) { // CHECK: [[RETURN_VALUE:%.+]] = load x86_fp80, ptr [[RESULT]] // CHECK: ret x86_fp80 [[RETURN_VALUE]] -// CIR: cir.func dso_local @f2 +// CIR: cir.func {{.*}} @f2 // CIR: [[VA_LIST_ALLOCA:%.+]] = cir.alloca !cir.array, !cir.ptr>, ["valist"] // CIR: [[RES:%.+]] = cir.alloca !cir.long_double, !cir.ptr>, ["res" // CIR: [[VASTED_VA_LIST:%.+]] = cir.cast array_to_ptrdecay [[VA_LIST_ALLOCA]] @@ -160,7 +160,7 @@ const char *f3(va_list args) { // ... // CHECK: ret -// CIR-LABEL: cir.func dso_local @f3( +// CIR-LABEL: cir.func {{.*}} @f3( // CIR: %[[VALIST_VAR:.*]] = cir.alloca !cir.ptr, !cir.ptr>, ["args", init] {alignment = 8 : i64} // CIR: %[[VALIST:.*]] = cir.load align(8) %[[VALIST_VAR]] : !cir.ptr>, !cir.ptr // CIR: %[[GP_OFFSET_PTR:.*]] = cir.get_member %[[VALIST]][0] {name = "gp_offset"} : !cir.ptr -> !cir.ptr @@ -192,7 +192,7 @@ const char *f3(va_list args) { void f4(va_list args) { for (; va_arg(args, int); ); } -// CIR-LABEL: cir.func dso_local @f4 +// CIR-LABEL: cir.func {{.*}} @f4 // CIR: cir.for : cond { // CIR: %[[VALIST:.*]] = cir.load align(8) %[[VALIST_VAR]] : !cir.ptr>, !cir.ptr // CIR: %[[VAARG_RESULT:.*]] = cir.scope { diff --git a/clang/test/CIR/driver.c b/clang/test/CIR/driver.c index 9fb907a7b7b2..0a223edb2899 100644 --- a/clang/test/CIR/driver.c +++ b/clang/test/CIR/driver.c @@ -30,13 +30,13 @@ void foo(void) {} // CIR: module {{.*}} { -// CIR-NEXT: cir.func dso_local @foo() +// CIR-NEXT: cir.func{{.*}} @foo() // CIR-NEXT: cir.return // CIR-NEXT: } // CIR-NEXT: } // CIR_MACOS: module {{.*}} { -// CIR_MACOS-NEXT: cir.func @foo() +// CIR_MACOS-NEXT: cir.func{{.*}} @foo() // CIR_MACOS-NEXT: cir.return // CIR_MACOS-NEXT: } // CIR_MACOS-NEXT: } diff --git a/clang/test/CIR/emit-mlir.c b/clang/test/CIR/emit-mlir.c index 12cee5fc25e6..5adae9aab924 100644 --- a/clang/test/CIR/emit-mlir.c +++ b/clang/test/CIR/emit-mlir.c @@ -32,9 +32,9 @@ int foo(int a, int b) { // LLVM: llvm.func @foo // CORE: func.func @foo -// CIR: cir.func dso_local @foo +// CIR: cir.func {{.*}} @foo // CIR: cir.scope -// CIR_FLAT: cir.func dso_local @foo +// CIR_FLAT: cir.func {{.*}} @foo // CIR_FLAT: ^bb1 // CIR_FLAT-NOT: cir.scope // CORE_ERR: ClangIR direct lowering is incompatible with emitting of MLIR standard dialects diff --git a/clang/test/CIR/hello.c b/clang/test/CIR/hello.c index 077f5c6ac908..04ca3095ed7f 100644 --- a/clang/test/CIR/hello.c +++ b/clang/test/CIR/hello.c @@ -2,4 +2,4 @@ // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o - | FileCheck %s void foo() {} -// CHECK: cir.func no_proto dso_local @foo +// CHECK: cir.func {{.*}} @foo diff --git a/clang/test/CIR/mlirprint.c b/clang/test/CIR/mlirprint.c index 90dfbc26f01b..f631e8edaee4 100644 --- a/clang/test/CIR/mlirprint.c +++ b/clang/test/CIR/mlirprint.c @@ -12,20 +12,20 @@ int foo(void) { // CIR: IR Dump After CIRCanonicalize (cir-canonicalize) -// CIR: cir.func dso_local @foo() -> !s32i +// CIR: cir.func {{.*}} @foo() -> !s32i // CIR: IR Dump After LoweringPrepare (cir-lowering-prepare) -// CIR: cir.func dso_local @foo() -> !s32i +// CIR: cir.func {{.*}} @foo() -> !s32i // CIR-NOT: IR Dump After FlattenCFG // CIR-NOT: IR Dump After SCFPrepare // CIR: IR Dump After DropAST (cir-drop-ast) -// CIR: cir.func dso_local @foo() -> !s32i +// CIR: cir.func {{.*}} @foo() -> !s32i // CIRFLAT: IR Dump After CIRCanonicalize (cir-canonicalize) -// CIRFLAT: cir.func dso_local @foo() -> !s32i +// CIRFLAT: cir.func {{.*}} @foo() -> !s32i // CIRFLAT: IR Dump After LoweringPrepare (cir-lowering-prepare) -// CIRFLAT: cir.func dso_local @foo() -> !s32i +// CIRFLAT: cir.func {{.*}} @foo() -> !s32i // CIRFLAT: IR Dump After FlattenCFG (cir-flatten-cfg) // CIRFLAT: IR Dump After DropAST (cir-drop-ast) -// CIRFLAT: cir.func dso_local @foo() -> !s32i +// CIRFLAT: cir.func {{.*}} @foo() -> !s32i // CIRMLIR: IR Dump After CIRCanonicalize (cir-canonicalize) // CIRMLIR: IR Dump After LoweringPrepare (cir-lowering-prepare) // CIRMLIR: IR Dump After SCFPrepare (cir-mlir-scf-prepare