From 789a46f2d742e11edaade28cb59a0f4d2a1d770e Mon Sep 17 00:00:00 2001 From: Fangrui Song <maskray@google.com> Date: Sun, 2 Feb 2020 12:23:47 -0800 Subject: [PATCH] [CodeGenModule] Assume dso_local for -fpic -fno-semantic-interposition Summary: Clang -fpic defaults to -fno-semantic-interposition (GCC -fpic defaults to -fsemantic-interposition). Users need to specify -fsemantic-interposition to get semantic interposition behavior. Semantic interposition is currently a best-effort feature. There may still be some cases where it is not handled well. Reviewers: peter.smith, rnk, serge-sans-paille, sfertile, jfb, jdoerfert Subscribers: dschuff, jyknight, dylanmckay, nemanjai, jvesely, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, jrtc27, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, arphaman, PkmX, jocewei, jsji, Jim, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D73865 --- clang/lib/CodeGen/CodeGenModule.cpp | 4 +- clang/test/CXX/expr/p10-0x.cpp | 4 +- .../test/CodeGen/2006-05-19-SingleEltReturn.c | 4 +- .../2008-07-30-implicit-initialization.c | 6 +- ...promotion-of-compound-pointer-arithmetic.c | 6 +- clang/test/CodeGen/3dnow-builtins.c | 100 ++-- clang/test/CodeGen/_Bool-conversion.c | 2 +- clang/test/CodeGen/aapcs-align.cpp | 14 +- clang/test/CodeGen/aapcs64-align.cpp | 10 +- clang/test/CodeGen/aarch64-args.cpp | 20 +- .../CodeGen/aarch64-branch-protection-attr.c | 48 +- clang/test/CodeGen/aarch64-byval-temp.c | 4 +- clang/test/CodeGen/aarch64-neon-3v.c | 160 +++--- clang/test/CodeGen/aarch64-neon-across.c | 88 +-- clang/test/CodeGen/aarch64-neon-dot-product.c | 24 +- clang/test/CodeGen/aarch64-neon-extract.c | 48 +- .../CodeGen/aarch64-neon-fcvt-intrinsics.c | 42 +- clang/test/CodeGen/aarch64-neon-fma.c | 48 +- clang/test/CodeGen/aarch64-neon-fp16fml.c | 48 +- clang/test/CodeGen/aarch64-neon-ldst-one.c | 540 +++++++++--------- clang/test/CodeGen/aarch64-neon-scalar-copy.c | 48 +- .../aarch64-neon-scalar-x-indexed-elem.c | 84 +-- clang/test/CodeGen/aarch64-neon-tbl.c | 144 ++--- clang/test/CodeGen/aarch64-neon-vcombine.c | 28 +- clang/test/CodeGen/aarch64-neon-vget-hilo.c | 56 +- clang/test/CodeGen/aarch64-poly128.c | 62 +- clang/test/CodeGen/aarch64-poly64.c | 96 ++-- clang/test/CodeGen/aarch64-tme.cpp | 2 +- clang/test/CodeGen/aarch64-varargs.c | 50 +- clang/test/CodeGen/aarch64-vpcs.c | 8 +- clang/test/CodeGen/address-space.c | 14 +- clang/test/CodeGen/alias.c | 30 +- clang/test/CodeGen/align-systemz.c | 4 +- clang/test/CodeGen/align_value.cpp | 2 +- clang/test/CodeGen/alignment.c | 2 +- clang/test/CodeGen/alloc-align-attr.c | 12 +- clang/test/CodeGen/altivec.c | 12 +- clang/test/CodeGen/arc/arguments.c | 44 +- clang/test/CodeGen/arc/struct-align.c | 4 +- clang/test/CodeGen/arm-aapcs-vfp.c | 2 +- clang/test/CodeGen/arm-cc.c | 6 +- clang/test/CodeGen/arm-float-helpers.c | 76 +-- clang/test/CodeGen/arm-fp16-arguments.c | 24 +- clang/test/CodeGen/arm-homogenous.c | 2 +- .../test/CodeGen/arm-neon-directed-rounding.c | 30 +- clang/test/CodeGen/arm-neon-dot-product.c | 16 +- clang/test/CodeGen/arm-neon-fma.c | 8 +- clang/test/CodeGen/arm-neon-numeric-maxmin.c | 8 +- clang/test/CodeGen/arm-neon-vcvtX.c | 32 +- clang/test/CodeGen/arm-pcs.c | 2 +- clang/test/CodeGen/arm-varargs.c | 36 +- clang/test/CodeGen/arm-vfp16-arguments.c | 36 +- clang/test/CodeGen/arm-vfp16-arguments2.cpp | 30 +- clang/test/CodeGen/arm64-aapcs-arguments.c | 6 +- clang/test/CodeGen/arm64-mte.c | 26 +- clang/test/CodeGen/arm_function_epilog.cpp | 2 +- clang/test/CodeGen/asm-label.c | 2 +- clang/test/CodeGen/assign.c | 4 +- clang/test/CodeGen/atomics-inlining.c | 10 +- clang/test/CodeGen/attr-msp430.c | 2 +- clang/test/CodeGen/attr-target-mv.c | 52 +- clang/test/CodeGen/attr-weakref.c | 4 +- clang/test/CodeGen/attr-weakref2.c | 4 +- clang/test/CodeGen/attr-x86-interrupt.c | 8 +- clang/test/CodeGen/attributes.c | 32 +- clang/test/CodeGen/avr-builtins.c | 30 +- clang/test/CodeGen/avr/attributes/interrupt.c | 2 +- clang/test/CodeGen/avr/attributes/signal.c | 2 +- clang/test/CodeGen/bitfield-2.c | 16 +- clang/test/CodeGen/blocks.c | 6 +- clang/test/CodeGen/bool-convert.c | 10 +- clang/test/CodeGen/bool-init.c | 2 +- clang/test/CodeGen/bool_test.c | 4 +- clang/test/CodeGen/builtin-align.c | 12 +- clang/test/CodeGen/builtin-constant-p.c | 4 +- clang/test/CodeGen/builtin-expect.c | 12 +- clang/test/CodeGen/builtin-ms-noop.cpp | 8 +- clang/test/CodeGen/builtin-unpredictable.c | 2 +- clang/test/CodeGen/builtins-arm.c | 36 +- clang/test/CodeGen/builtins-ppc-altivec.c | 30 +- clang/test/CodeGen/builtins-ppc-crypto.c | 58 +- clang/test/CodeGen/builtins-ppc-htm.c | 2 +- clang/test/CodeGen/builtins-ppc-p7.c | 10 +- clang/test/CodeGen/builtins-ppc-p8vector.c | 2 +- clang/test/CodeGen/builtins-ppc-quadword.c | 2 +- clang/test/CodeGen/builtins-ppc-vsx.c | 4 +- clang/test/CodeGen/builtins-ppc.c | 2 +- clang/test/CodeGen/c11atomics.c | 14 +- ...mption-attribute-align_value-on-lvalue.cpp | 2 +- ...tion-attribute-align_value-on-paramvar.cpp | 4 +- ...ibute-alloc_align-on-function-variable.cpp | 4 +- ...tion-attribute-alloc_align-on-function.cpp | 4 +- ...-assume_aligned-on-function-two-params.cpp | 4 +- ...n-attribute-assume_aligned-on-function.cpp | 4 +- ...n_assume_aligned-three-params-variable.cpp | 2 +- ...on-builtin_assume_aligned-three-params.cpp | 2 +- ...tion-builtin_assume_aligned-two-params.cpp | 2 +- .../catch-alignment-assumption-openmp.cpp | 2 +- ...ptr-and-nonzero-offset-in-offsetof-idiom.c | 4 +- ...d-nonzero-offset-when-nullptr-is-defined.c | 2 +- .../catch-nullptr-and-nonzero-offset.c | 32 +- .../CodeGen/catch-pointer-overflow-volatile.c | 2 +- clang/test/CodeGen/catch-pointer-overflow.c | 16 +- .../CodeGen/cfi-icall-canonical-jump-tables.c | 4 +- clang/test/CodeGen/cfi-icall-cross-dso2.c | 2 +- clang/test/CodeGen/cfi-icall-generalize.c | 2 +- .../CodeGen/cfstring-elf-cfbuild-x86_64.c | 4 +- clang/test/CodeGen/clang-sections-attribute.c | 10 +- clang/test/CodeGen/cleanup-destslot-simple.c | 2 +- clang/test/CodeGen/const-arithmetic.c | 4 +- clang/test/CodeGen/const-init.c | 44 +- clang/test/CodeGen/decl-in-prototype.c | 4 +- clang/test/CodeGen/default-address-space.c | 16 +- clang/test/CodeGen/default-function-attr.c | 2 +- clang/test/CodeGen/designated-initializers.c | 16 +- clang/test/CodeGen/dllexport-1.c | 6 +- clang/test/CodeGen/dso-local-executable.c | 6 +- clang/test/CodeGen/enable_if.c | 10 +- clang/test/CodeGen/exceptions.c | 2 +- clang/test/CodeGen/exprs.c | 16 +- clang/test/CodeGen/flatten.c | 2 +- clang/test/CodeGen/flexible-array-init.c | 4 +- clang/test/CodeGen/fp16-ops.c | 2 +- clang/test/CodeGen/function-attributes.c | 30 +- clang/test/CodeGen/functions.c | 8 +- clang/test/CodeGen/global-decls.c | 6 +- clang/test/CodeGen/global-init.c | 12 +- clang/test/CodeGen/iamcu-abi.c | 8 +- clang/test/CodeGen/ifunc.c | 4 +- clang/test/CodeGen/init-memset.c | 16 +- clang/test/CodeGen/init.c | 14 +- clang/test/CodeGen/inline.c | 58 +- clang/test/CodeGen/lanai-arguments.c | 22 +- clang/test/CodeGen/le32-arguments.c | 18 +- clang/test/CodeGen/le32-libcall-pow.c | 2 +- clang/test/CodeGen/le32-vaarg.c | 6 +- clang/test/CodeGen/libcalls.c | 14 +- clang/test/CodeGen/lifetime-debuginfo-1.c | 2 +- clang/test/CodeGen/lifetime-debuginfo-2.c | 2 +- clang/test/CodeGen/link-bitcode-file.c | 6 +- clang/test/CodeGen/long-call-attr.c | 4 +- clang/test/CodeGen/long_double_fp128.cpp | 14 +- clang/test/CodeGen/malign-double-x86-nacl.c | 6 +- clang/test/CodeGen/malign-double.cpp | 66 +-- clang/test/CodeGen/mangle-windows.c | 16 +- clang/test/CodeGen/mbackchain.c | 2 +- clang/test/CodeGen/mcu-struct-return.c | 12 +- clang/test/CodeGen/micromips-attr.c | 4 +- clang/test/CodeGen/microsoft-call-conv.c | 8 +- clang/test/CodeGen/mips-byval-arg.c | 4 +- clang/test/CodeGen/mips-interrupt-attr.c | 18 +- clang/test/CodeGen/mips-transparent-union.c | 2 +- clang/test/CodeGen/mips-varargs.c | 16 +- clang/test/CodeGen/mips-vector-arg.c | 8 +- clang/test/CodeGen/mips-vector-return.c | 6 +- clang/test/CodeGen/mips-zero-sized-struct.c | 6 +- clang/test/CodeGen/mips16-attr.c | 4 +- clang/test/CodeGen/mips64-class-return.cpp | 8 +- clang/test/CodeGen/mips64-padding-arg.c | 10 +- clang/test/CodeGen/mrtd.c | 6 +- clang/test/CodeGen/ms_abi.c | 8 +- clang/test/CodeGen/ms_abi_aarch64.c | 4 +- clang/test/CodeGen/no-builtin.cpp | 22 +- clang/test/CodeGen/noduplicate-cxx11-test.cpp | 2 +- clang/test/CodeGen/nvptx-abi.c | 2 +- clang/test/CodeGen/packed-arrays.c | 54 +- clang/test/CodeGen/packed-structure.c | 40 +- .../test/CodeGen/partial-reinitialization1.c | 4 +- clang/test/CodeGen/patchable-function-entry.c | 16 +- clang/test/CodeGen/powerpc_types.c | 6 +- clang/test/CodeGen/ppc-signbit.c | 2 +- clang/test/CodeGen/ppc64-align-struct.c | 26 +- clang/test/CodeGen/ppc64-complex-parms.c | 32 +- clang/test/CodeGen/ppc64-complex-return.c | 32 +- clang/test/CodeGen/ppc64-dwarf.c | 2 +- clang/test/CodeGen/ppc64-elf-abi.c | 4 +- clang/test/CodeGen/ppc64-extend.c | 8 +- clang/test/CodeGen/ppc64-inline-asm.c | 2 +- clang/test/CodeGen/ppc64-long-double.cpp | 12 +- clang/test/CodeGen/ppc64-qpx-vector.c | 6 +- clang/test/CodeGen/ppc64-soft-float.c | 44 +- clang/test/CodeGen/ppc64-struct-onefloat.c | 4 +- clang/test/CodeGen/ppc64-struct-onevect.c | 2 +- clang/test/CodeGen/ppc64-vector.c | 14 +- clang/test/CodeGen/ppc64le-aggregates.c | 90 +-- clang/test/CodeGen/ppc64le-f128Aggregates.c | 24 +- clang/test/CodeGen/pr25786.c | 8 +- clang/test/CodeGen/pr34021.c | 4 +- clang/test/CodeGen/pr9614.c | 2 +- clang/test/CodeGen/pragma-weak.c | 2 +- clang/test/CodeGen/prefetchw-builtins.c | 4 +- clang/test/CodeGen/redefine_extname.c | 2 +- clang/test/CodeGen/regcall.c | 60 +- clang/test/CodeGen/regparm.c | 2 +- clang/test/CodeGen/riscv-inline-asm.c | 10 +- clang/test/CodeGen/riscv32-ilp32-abi.c | 8 +- clang/test/CodeGen/riscv32-ilp32-ilp32f-abi.c | 8 +- .../CodeGen/riscv32-ilp32-ilp32f-ilp32d-abi.c | 76 +-- clang/test/CodeGen/riscv32-ilp32d-abi.c | 106 ++-- clang/test/CodeGen/riscv32-ilp32f-abi.c | 14 +- .../test/CodeGen/riscv32-ilp32f-ilp32d-abi.c | 96 ++-- clang/test/CodeGen/riscv64-lp64-abi.c | 4 +- clang/test/CodeGen/riscv64-lp64-lp64f-abi.c | 4 +- .../CodeGen/riscv64-lp64-lp64f-lp64d-abi.c | 68 +-- clang/test/CodeGen/riscv64-lp64d-abi.c | 96 ++-- clang/test/CodeGen/riscv64-lp64f-lp64d-abi.c | 92 +-- .../sanitize-address-field-padding.cpp | 6 +- clang/test/CodeGen/sparc-arguments.c | 2 +- clang/test/CodeGen/sparc-vaarg.c | 6 +- clang/test/CodeGen/sparcv8-abi.c | 6 +- clang/test/CodeGen/sparcv8-inline-asm.c | 2 +- clang/test/CodeGen/sparcv9-abi.c | 30 +- clang/test/CodeGen/sparcv9-dwarf.c | 2 +- clang/test/CodeGen/spir-half-type.cpp | 2 +- clang/test/CodeGen/stackrealign-main.c | 4 +- clang/test/CodeGen/stdcall-fastcall.c | 30 +- clang/test/CodeGen/switch.c | 20 +- clang/test/CodeGen/systemz-abi-vector.c | 180 +++--- clang/test/CodeGen/systemz-abi.c | 106 ++-- clang/test/CodeGen/systemz-abi.cpp | 2 +- clang/test/CodeGen/systemz-inline-asm.c | 36 +- clang/test/CodeGen/thread-specifier.c | 10 +- clang/test/CodeGen/tls-model.c | 24 +- clang/test/CodeGen/transparent-union-redecl.c | 10 +- clang/test/CodeGen/transparent-union.c | 4 +- clang/test/CodeGen/ubsan-asan-noreturn.c | 2 +- clang/test/CodeGen/ubsan-function.cpp | 4 +- clang/test/CodeGen/unaligned-decl.c | 4 +- clang/test/CodeGen/union-tbaa1.c | 2 +- .../test/CodeGen/unsigned-overflow-minimal.c | 6 +- clang/test/CodeGen/unwind-attr.c | 12 +- clang/test/CodeGen/variadic-null-win64.c | 2 +- clang/test/CodeGen/visibility.c | 18 +- clang/test/CodeGen/vla.c | 18 +- clang/test/CodeGen/volatile-complex.c | 8 +- .../CodeGen/x86-inline-asm-min-vector-width.c | 12 +- clang/test/CodeGen/x86-long-double.cpp | 20 +- clang/test/CodeGen/x86-soft-float.c | 4 +- clang/test/CodeGen/x86-vec-i128.c | 16 +- clang/test/CodeGen/x86_32-arguments-iamcu.c | 32 +- clang/test/CodeGen/x86_32-arguments-linux.c | 2 +- clang/test/CodeGen/x86_32-arguments-nommx.c | 4 +- clang/test/CodeGen/x86_64-arguments-nacl.c | 26 +- clang/test/CodeGen/x86_64-arguments.c | 92 +-- clang/test/CodeGen/x86_64-floatvectors.c | 14 +- clang/test/CodeGen/x86_64-longdouble.c | 54 +- clang/test/CodeGen/xcore-abi.c | 6 +- clang/test/CodeGen/xcore-abi.cpp | 4 +- clang/test/CodeGen/xray-always-instrument.cpp | 6 +- clang/test/CodeGen/xray-attr-list.cpp | 8 +- .../xray-attributes-noxray-supported.cpp | 4 +- .../CodeGen/xray-attributes-supported.cpp | 4 +- clang/test/CodeGen/xray-ignore-loops.cpp | 2 +- clang/test/CodeGen/xray-imbue-arg1.cpp | 4 +- .../CodeGen/xray-instruction-threshold.cpp | 4 +- .../CodeGen/xray-instrumentation-bundles.cpp | 2 +- clang/test/CodeGen/xray-log-args.cpp | 4 +- clang/test/CodeGen/xray-never-instrument.cpp | 6 +- clang/test/CodeGen/zvector.c | 68 +-- .../2009-05-04-PureConstNounwind.cpp | 2 +- .../CodeGenCXX/2011-12-19-init-list-ctor.cpp | 2 +- clang/test/CodeGenCXX/aarch64-arguments.cpp | 2 +- clang/test/CodeGenCXX/alloca-align.cpp | 6 +- .../CodeGenCXX/amdgcn-automatic-variable.cpp | 14 +- clang/test/CodeGenCXX/amdgcn-func-arg.cpp | 12 +- .../test/CodeGenCXX/amdgcn-string-literal.cpp | 8 +- clang/test/CodeGenCXX/amdgcn_declspec_get.cpp | 2 +- clang/test/CodeGenCXX/arm64-darwinpcs.cpp | 8 +- clang/test/CodeGenCXX/attr-callback.cpp | 12 +- clang/test/CodeGenCXX/attr-cpuspecific.cpp | 6 +- ...ation.dont_assume_extern_instantiation.cpp | 10 +- .../CodeGenCXX/attr-target-mv-func-ptrs.cpp | 2 +- ...member-function-implicit-instantiation.cpp | 2 +- clang/test/CodeGenCXX/attr-x86-interrupt.cpp | 12 +- clang/test/CodeGenCXX/attr.cpp | 4 +- .../CodeGenCXX/auto-variable-template.cpp | 4 +- clang/test/CodeGenCXX/bitfield.cpp | 88 +-- clang/test/CodeGenCXX/bool-bitfield.cpp | 2 +- .../test/CodeGenCXX/builtin-calling-conv.cpp | 4 +- .../builtin-is-constant-evaluated.cpp | 18 +- clang/test/CodeGenCXX/builtin-launder.cpp | 48 +- .../builtin-operator-new-delete.cpp | 6 +- clang/test/CodeGenCXX/builtin_LINE.cpp | 12 +- ...r-and-nonzero-offset-in-offsetof-idiom.cpp | 4 +- .../test/CodeGenCXX/catch-undef-behavior.cpp | 24 +- clang/test/CodeGenCXX/char8_t.cpp | 4 +- .../CodeGenCXX/clang-sections-tentative.c | 12 +- clang/test/CodeGenCXX/clang-sections.cpp | 36 +- clang/test/CodeGenCXX/compound-literals.cpp | 6 +- clang/test/CodeGenCXX/conditional-gnu-ext.cpp | 8 +- .../CodeGenCXX/conditional-temporaries.cpp | 2 +- clang/test/CodeGenCXX/const-init-cxx11.cpp | 2 +- clang/test/CodeGenCXX/const-init-cxx2a.cpp | 14 +- clang/test/CodeGenCXX/constructor-alias.cpp | 2 +- .../constructor-destructor-return-this.cpp | 62 +- .../CodeGenCXX/copy-constructor-elim-2.cpp | 6 +- clang/test/CodeGenCXX/ctor-dtor-alias.cpp | 2 +- .../CodeGenCXX/cxx0x-delegating-ctors.cpp | 2 +- .../CodeGenCXX/cxx0x-initializer-array.cpp | 12 +- .../cxx0x-initializer-constructors.cpp | 8 +- ...nitializer-stdinitializerlist-startend.cpp | 8 +- .../cxx0x-initializer-stdinitializerlist.cpp | 36 +- .../CodeGenCXX/cxx11-extern-constexpr.cpp | 10 +- .../cxx11-initializer-aggregate.cpp | 8 +- .../cxx11-thread-local-reference.cpp | 6 +- .../cxx11-thread-local-visibility.cpp | 2 +- clang/test/CodeGenCXX/cxx11-thread-local.cpp | 12 +- .../CodeGenCXX/cxx1y-deduced-return-type.cpp | 2 +- .../CodeGenCXX/cxx1y-init-captures-eh.cpp | 6 +- clang/test/CodeGenCXX/cxx1y-init-captures.cpp | 8 +- .../cxx1y-initializer-aggregate.cpp | 8 +- .../CodeGenCXX/cxx1y-sized-deallocation.cpp | 14 +- .../CodeGenCXX/cxx1y-variable-template.cpp | 2 +- clang/test/CodeGenCXX/cxx1z-decomposition.cpp | 20 +- .../cxx1z-initializer-aggregate.cpp | 10 +- .../CodeGenCXX/cxx1z-inline-variables.cpp | 32 +- .../CodeGenCXX/cxx2a-destroying-delete.cpp | 4 +- .../cxx2a-thread-local-constinit.cpp | 8 +- clang/test/CodeGenCXX/debug-info.cpp | 4 +- .../test/CodeGenCXX/default_calling_conv.cpp | 34 +- clang/test/CodeGenCXX/delete-two-arg.cpp | 8 +- clang/test/CodeGenCXX/derived-cast.cpp | 2 +- clang/test/CodeGenCXX/designated-init.cpp | 6 +- .../CodeGenCXX/devirtualize-dtor-final.cpp | 6 +- ...irtualize-virtual-function-calls-final.cpp | 36 +- .../devirtualize-virtual-function-calls.cpp | 2 +- clang/test/CodeGenCXX/exceptions.cpp | 36 +- .../CodeGenCXX/explicit-instantiation.cpp | 30 +- .../CodeGenCXX/extern-section-attribute.cpp | 2 +- clang/test/CodeGenCXX/fastcall.cpp | 4 +- clang/test/CodeGenCXX/flatten.cpp | 2 +- .../test/CodeGenCXX/float128-declarations.cpp | 28 +- clang/test/CodeGenCXX/fp16-mangle.cpp | 6 +- .../test/CodeGenCXX/global-dtor-no-atexit.cpp | 2 +- .../CodeGenCXX/homogeneous-aggregates.cpp | 44 +- .../CodeGenCXX/implicit-record-visibility.cpp | 2 +- .../CodeGenCXX/inheriting-constructor.cpp | 28 +- clang/test/CodeGenCXX/init-invariant.cpp | 10 +- .../initializer-list-ctor-order.cpp | 4 +- .../CodeGenCXX/invariant.group-for-vptrs.cpp | 8 +- clang/test/CodeGenCXX/key-function-vtable.cpp | 2 +- .../CodeGenCXX/linetable-virtual-variadic.cpp | 4 +- clang/test/CodeGenCXX/mangle-win64-ccs.cpp | 2 +- .../CodeGenCXX/member-function-pointers.cpp | 28 +- .../CodeGenCXX/microsoft-abi-default-cc.cpp | 12 +- .../microsoft-abi-sret-and-byval.cpp | 36 +- .../CodeGenCXX/microsoft-uuidof-mangling.cpp | 10 +- clang/test/CodeGenCXX/microsoft-uuidof.cpp | 24 +- .../test/CodeGenCXX/mips-size_t-ptrdiff_t.cpp | 12 +- clang/test/CodeGenCXX/new-alias.cpp | 2 +- .../CodeGenCXX/new-array-init-exceptions.cpp | 4 +- clang/test/CodeGenCXX/new-array-init.cpp | 24 +- clang/test/CodeGenCXX/new-overflow.cpp | 18 +- clang/test/CodeGenCXX/new.cpp | 28 +- .../test/CodeGenCXX/no-elide-constructors.cpp | 2 +- clang/test/CodeGenCXX/no-odr-use.cpp | 8 +- clang/test/CodeGenCXX/no-unique-address.cpp | 22 +- clang/test/CodeGenCXX/nrvo.cpp | 26 +- clang/test/CodeGenCXX/powerpc-byval.cpp | 2 +- clang/test/CodeGenCXX/pr12251.cpp | 36 +- clang/test/CodeGenCXX/pr13396.cpp | 12 +- clang/test/CodeGenCXX/pr31054.cpp | 2 +- clang/test/CodeGenCXX/pr9130.cpp | 2 +- clang/test/CodeGenCXX/pragma-visibility.cpp | 6 +- clang/test/CodeGenCXX/redefine_extname.cpp | 2 +- clang/test/CodeGenCXX/regcall.cpp | 22 +- clang/test/CodeGenCXX/rtti-qualfn.cpp | 10 +- .../CodeGenCXX/stack-reuse-exceptions.cpp | 6 +- clang/test/CodeGenCXX/stack-reuse.cpp | 14 +- clang/test/CodeGenCXX/static-data-member.cpp | 6 +- clang/test/CodeGenCXX/static-init-4.cpp | 2 +- clang/test/CodeGenCXX/static-init.cpp | 24 +- .../static-initializer-branch-weights.cpp | 2 +- .../static-local-in-local-class.cpp | 12 +- ...ember-variable-explicit-specialization.cpp | 2 +- clang/test/CodeGenCXX/std-byte.cpp | 4 +- .../CodeGenCXX/template-anonymous-types.cpp | 12 +- .../CodeGenCXX/thiscall-struct-return.cpp | 2 +- .../CodeGenCXX/throw-expression-cleanup.cpp | 2 +- clang/test/CodeGenCXX/throw-expressions.cpp | 8 +- clang/test/CodeGenCXX/thunk-linkonce-odr.cpp | 4 +- .../CodeGenCXX/thunk-returning-memptr.cpp | 2 +- clang/test/CodeGenCXX/thunks.cpp | 30 +- clang/test/CodeGenCXX/type-metadata.cpp | 4 +- .../CodeGenCXX/ubsan-function-noexcept.cpp | 4 +- clang/test/CodeGenCXX/ubsan-vtable-checks.cpp | 6 +- clang/test/CodeGenCXX/uncopyable-args.cpp | 44 +- clang/test/CodeGenCXX/virt-dtor-key.cpp | 2 +- .../virtual-function-elimination.cpp | 10 +- .../visibility-inlines-hidden-staticvar.cpp | 38 +- .../CodeGenCXX/visibility-inlines-hidden.cpp | 8 +- clang/test/CodeGenCXX/vla-consruct.cpp | 2 +- clang/test/CodeGenCXX/vla.cpp | 2 +- .../CodeGenCXX/vtable-key-function-arm.cpp | 4 +- clang/test/CodeGenCXX/vtable-linkage.cpp | 8 +- .../test/CodeGenCXX/x86_64-arguments-avx.cpp | 8 +- .../CodeGenCXX/x86_64-arguments-nacl-x32.cpp | 16 +- clang/test/CodeGenCXX/x86_64-arguments.cpp | 14 +- .../coro-await-resume-eh.cpp | 2 +- clang/test/CodeGenCoroutines/coro-cleanup.cpp | 4 +- .../test/CodeGenCoroutines/coro-gro-nrvo.cpp | 4 +- clang/test/CodeGenCoroutines/coro-gro.cpp | 2 +- clang/test/CodeGenCoroutines/coro-lambda.cpp | 2 +- clang/test/CodeGenCoroutines/coro-params.cpp | 4 +- .../test/CodeGenCoroutines/coro-ret-void.cpp | 4 +- .../test/Modules/codegen-extern-template.cpp | 2 +- clang/test/Modules/initializers.cpp | 16 +- clang/test/Modules/var-templates.cpp | 2 +- clang/test/OpenMP/allocate_codegen.cpp | 10 +- clang/test/OpenMP/constexpr_codegen.cpp | 2 +- .../OpenMP/declare_variant_mixed_codegen.c | 2 +- clang/test/OpenMP/for_codegen.cpp | 6 +- clang/test/OpenMP/for_private_codegen.cpp | 2 +- ...x_declare_target_var_ctor_dtor_codegen.cpp | 2 +- ..._target_requires_unified_shared_memory.cpp | 4 +- .../OpenMP/openmp_offload_registration.cpp | 4 +- clang/test/OpenMP/parallel_codegen.cpp | 2 +- .../OpenMP/parallel_firstprivate_codegen.cpp | 4 +- clang/test/OpenMP/parallel_master_codegen.cpp | 12 +- .../test/OpenMP/parallel_private_codegen.cpp | 2 +- .../test/OpenMP/sections_private_codegen.cpp | 2 +- clang/test/OpenMP/simd_metadata.c | 34 +- clang/test/OpenMP/single_codegen.cpp | 8 +- clang/test/OpenMP/single_private_codegen.cpp | 2 +- .../OpenMP/target_codegen_global_capture.cpp | 8 +- .../OpenMP/target_codegen_registration.cpp | 36 +- .../target_data_use_device_ptr_codegen.cpp | 2 +- .../test/OpenMP/target_defaultmap_codegen.cpp | 2 +- .../OpenMP/target_is_device_ptr_codegen.cpp | 2 +- clang/test/OpenMP/target_map_codegen.cpp | 2 +- .../target_parallel_codegen_registration.cpp | 36 +- ...rget_parallel_for_codegen_registration.cpp | 36 +- ...parallel_for_simd_codegen_registration.cpp | 36 +- .../target_simd_codegen_registration.cpp | 36 +- .../target_teams_codegen_registration.cpp | 36 +- ..._teams_distribute_codegen_registration.cpp | 36 +- ..._teams_distribute_firstprivate_codegen.cpp | 12 +- ...bute_parallel_for_firstprivate_codegen.cpp | 12 +- ...istribute_parallel_for_private_codegen.cpp | 2 +- ...parallel_for_simd_codegen_registration.cpp | 36 +- ...parallel_for_simd_firstprivate_codegen.cpp | 12 +- ...bute_parallel_for_simd_private_codegen.cpp | 2 +- ...arget_teams_distribute_private_codegen.cpp | 12 +- ...s_distribute_simd_codegen_registration.cpp | 36 +- ...s_distribute_simd_firstprivate_codegen.cpp | 12 +- ..._teams_distribute_simd_private_codegen.cpp | 12 +- .../teams_distribute_firstprivate_codegen.cpp | 12 +- ...bute_parallel_for_firstprivate_codegen.cpp | 12 +- ...istribute_parallel_for_private_codegen.cpp | 12 +- ...parallel_for_simd_firstprivate_codegen.cpp | 12 +- ...bute_parallel_for_simd_private_codegen.cpp | 12 +- .../teams_distribute_private_codegen.cpp | 12 +- ...s_distribute_simd_firstprivate_codegen.cpp | 12 +- .../teams_distribute_simd_private_codegen.cpp | 12 +- clang/test/OpenMP/teams_private_codegen.cpp | 2 +- clang/test/OpenMP/threadprivate_codegen.cpp | 16 +- .../test/PCH/chain-pending-instantiations.cpp | 2 +- ...ttr-on-explicit-template-instantiation.cpp | 2 +- ...cxx03-aligned-allocation-unscoped-enum.cpp | 2 +- 459 files changed, 3878 insertions(+), 3878 deletions(-) diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 6a43b6bba627..4a61e0e86dff 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -846,7 +846,7 @@ static bool shouldAssumeDSOLocal(const CodeGenModule &CGM, const auto &CGOpts = CGM.getCodeGenOpts(); llvm::Reloc::Model RM = CGOpts.RelocationModel; const auto &LOpts = CGM.getLangOpts(); - if (RM != llvm::Reloc::Static && !LOpts.PIE) + if (RM != llvm::Reloc::Static && LOpts.SemanticInterposition) return false; // A definition cannot be preempted from an executable. @@ -868,7 +868,7 @@ static bool shouldAssumeDSOLocal(const CodeGenModule &CGM, // If we can use copy relocations we can assume it is local. if (auto *Var = dyn_cast<llvm::GlobalVariable>(GV)) if (!Var->isThreadLocal() && - (RM == llvm::Reloc::Static || CGOpts.PIECopyRelocations)) + (RM == llvm::Reloc::Static || (LOpts.PIE && CGOpts.PIECopyRelocations))) return true; // If we can use a plt entry as the symbol address we can assume it diff --git a/clang/test/CXX/expr/p10-0x.cpp b/clang/test/CXX/expr/p10-0x.cpp index a42986c85fef..b16024a06ac4 100644 --- a/clang/test/CXX/expr/p10-0x.cpp +++ b/clang/test/CXX/expr/p10-0x.cpp @@ -7,7 +7,7 @@ struct S { volatile int& refcall(); -// CHECK: define void @_Z2f1PViPV1S +// CHECK: define dso_local void @_Z2f1PViPV1S void f1(volatile int *x, volatile S* s) { // We should perform the load in these cases. // CHECK: load volatile i32, i32* @@ -36,7 +36,7 @@ void f1(volatile int *x, volatile S* s) { // CHECK: ret } -// CHECK: define void @_Z2f2PVi +// CHECK: define dso_local void @_Z2f2PVi // CHECK-NOT: load volatile // CHECK: ret void f2(volatile int *x) { diff --git a/clang/test/CodeGen/2006-05-19-SingleEltReturn.c b/clang/test/CodeGen/2006-05-19-SingleEltReturn.c index dfc23f84ab42..2220ed08e92c 100644 --- a/clang/test/CodeGen/2006-05-19-SingleEltReturn.c +++ b/clang/test/CodeGen/2006-05-19-SingleEltReturn.c @@ -23,8 +23,8 @@ struct Y bar() { } -// X86_32: define void @foo(%struct.Y* %P) +// X86_32: define dso_local void @foo(%struct.Y* %P) // X86_32: call void @bar(%struct.Y* sret %{{[^),]*}}) -// X86_32: define void @bar(%struct.Y* noalias sret %{{[^,)]*}}) +// X86_32: define dso_local void @bar(%struct.Y* noalias sret %{{[^,)]*}}) // X86_32: ret void diff --git a/clang/test/CodeGen/2008-07-30-implicit-initialization.c b/clang/test/CodeGen/2008-07-30-implicit-initialization.c index f2621f4560ec..7870e69fe034 100644 --- a/clang/test/CodeGen/2008-07-30-implicit-initialization.c +++ b/clang/test/CodeGen/2008-07-30-implicit-initialization.c @@ -1,9 +1,9 @@ // RUN: %clang_cc1 -triple i386-unknown-unknown -O2 -emit-llvm -o - %s | FileCheck %s -// CHECK-LABEL: define i32 @f0() +// CHECK-LABEL: define dso_local i32 @f0() // CHECK: ret i32 0 -// CHECK-LABEL: define i32 @f1() +// CHECK-LABEL: define dso_local i32 @f1() // CHECK: ret i32 0 -// CHECK-LABEL: define i32 @f2() +// CHECK-LABEL: define dso_local i32 @f2() // CHECK: ret i32 0 // <rdar://problem/6113085> diff --git a/clang/test/CodeGen/2008-07-31-promotion-of-compound-pointer-arithmetic.c b/clang/test/CodeGen/2008-07-31-promotion-of-compound-pointer-arithmetic.c index f348b2b6fda6..b47c50bea5e0 100644 --- a/clang/test/CodeGen/2008-07-31-promotion-of-compound-pointer-arithmetic.c +++ b/clang/test/CodeGen/2008-07-31-promotion-of-compound-pointer-arithmetic.c @@ -1,9 +1,9 @@ // RUN: %clang_cc1 -triple i386-unknown-unknown -O1 -emit-llvm -o - %s | FileCheck %s -// CHECK-LABEL: define i32 @f0 +// CHECK-LABEL: define dso_local i32 @f0 // CHECK: ret i32 1 -// CHECK-LABEL: define i32 @f1 +// CHECK-LABEL: define dso_local i32 @f1 // CHECK: ret i32 1 -// CHECK-LABEL: define i32 @f2 +// CHECK-LABEL: define dso_local i32 @f2 // CHECK: ret i32 1 // <rdr://6115726> diff --git a/clang/test/CodeGen/3dnow-builtins.c b/clang/test/CodeGen/3dnow-builtins.c index 26e8700b9a2c..0f994227556c 100644 --- a/clang/test/CodeGen/3dnow-builtins.c +++ b/clang/test/CodeGen/3dnow-builtins.c @@ -5,176 +5,176 @@ #include <x86intrin.h> __m64 test_m_pavgusb(__m64 m1, __m64 m2) { - // PS4-LABEL: define i64 @test_m_pavgusb - // GCC-LABEL: define double @test_m_pavgusb + // PS4-LABEL: define dso_local i64 @test_m_pavgusb + // GCC-LABEL: define dso_local double @test_m_pavgusb // CHECK: @llvm.x86.3dnow.pavgusb return _m_pavgusb(m1, m2); } __m64 test_m_pf2id(__m64 m) { - // PS4-LABEL: define i64 @test_m_pf2id - // GCC-LABEL: define double @test_m_pf2id + // PS4-LABEL: define dso_local i64 @test_m_pf2id + // GCC-LABEL: define dso_local double @test_m_pf2id // CHECK: @llvm.x86.3dnow.pf2id return _m_pf2id(m); } __m64 test_m_pfacc(__m64 m1, __m64 m2) { - // PS4-LABEL: define i64 @test_m_pfacc - // GCC-LABEL: define double @test_m_pfacc + // PS4-LABEL: define dso_local i64 @test_m_pfacc + // GCC-LABEL: define dso_local double @test_m_pfacc // CHECK: @llvm.x86.3dnow.pfacc return _m_pfacc(m1, m2); } __m64 test_m_pfadd(__m64 m1, __m64 m2) { - // PS4-LABEL: define i64 @test_m_pfadd - // GCC-LABEL: define double @test_m_pfadd + // PS4-LABEL: define dso_local i64 @test_m_pfadd + // GCC-LABEL: define dso_local double @test_m_pfadd // CHECK: @llvm.x86.3dnow.pfadd return _m_pfadd(m1, m2); } __m64 test_m_pfcmpeq(__m64 m1, __m64 m2) { - // PS4-LABEL: define i64 @test_m_pfcmpeq - // GCC-LABEL: define double @test_m_pfcmpeq + // PS4-LABEL: define dso_local i64 @test_m_pfcmpeq + // GCC-LABEL: define dso_local double @test_m_pfcmpeq // CHECK: @llvm.x86.3dnow.pfcmpeq return _m_pfcmpeq(m1, m2); } __m64 test_m_pfcmpge(__m64 m1, __m64 m2) { - // PS4-LABEL: define i64 @test_m_pfcmpge - // GCC-LABEL: define double @test_m_pfcmpge + // PS4-LABEL: define dso_local i64 @test_m_pfcmpge + // GCC-LABEL: define dso_local double @test_m_pfcmpge // CHECK: @llvm.x86.3dnow.pfcmpge return _m_pfcmpge(m1, m2); } __m64 test_m_pfcmpgt(__m64 m1, __m64 m2) { - // PS4-LABEL: define i64 @test_m_pfcmpgt - // GCC-LABEL: define double @test_m_pfcmpgt + // PS4-LABEL: define dso_local i64 @test_m_pfcmpgt + // GCC-LABEL: define dso_local double @test_m_pfcmpgt // CHECK: @llvm.x86.3dnow.pfcmpgt return _m_pfcmpgt(m1, m2); } __m64 test_m_pfmax(__m64 m1, __m64 m2) { - // PS4-LABEL: define i64 @test_m_pfmax - // GCC-LABEL: define double @test_m_pfmax + // PS4-LABEL: define dso_local i64 @test_m_pfmax + // GCC-LABEL: define dso_local double @test_m_pfmax // CHECK: @llvm.x86.3dnow.pfmax return _m_pfmax(m1, m2); } __m64 test_m_pfmin(__m64 m1, __m64 m2) { - // PS4-LABEL: define i64 @test_m_pfmin - // GCC-LABEL: define double @test_m_pfmin + // PS4-LABEL: define dso_local i64 @test_m_pfmin + // GCC-LABEL: define dso_local double @test_m_pfmin // CHECK: @llvm.x86.3dnow.pfmin return _m_pfmin(m1, m2); } __m64 test_m_pfmul(__m64 m1, __m64 m2) { - // PS4-LABEL: define i64 @test_m_pfmul - // GCC-LABEL: define double @test_m_pfmul + // PS4-LABEL: define dso_local i64 @test_m_pfmul + // GCC-LABEL: define dso_local double @test_m_pfmul // CHECK: @llvm.x86.3dnow.pfmul return _m_pfmul(m1, m2); } __m64 test_m_pfrcp(__m64 m) { - // PS4-LABEL: define i64 @test_m_pfrcp - // GCC-LABEL: define double @test_m_pfrcp + // PS4-LABEL: define dso_local i64 @test_m_pfrcp + // GCC-LABEL: define dso_local double @test_m_pfrcp // CHECK: @llvm.x86.3dnow.pfrcp return _m_pfrcp(m); } __m64 test_m_pfrcpit1(__m64 m1, __m64 m2) { - // PS4-LABEL: define i64 @test_m_pfrcpit1 - // GCC-LABEL: define double @test_m_pfrcpit1 + // PS4-LABEL: define dso_local i64 @test_m_pfrcpit1 + // GCC-LABEL: define dso_local double @test_m_pfrcpit1 // CHECK: @llvm.x86.3dnow.pfrcpit1 return _m_pfrcpit1(m1, m2); } __m64 test_m_pfrcpit2(__m64 m1, __m64 m2) { - // PS4-LABEL: define i64 @test_m_pfrcpit2 - // GCC-LABEL: define double @test_m_pfrcpit2 + // PS4-LABEL: define dso_local i64 @test_m_pfrcpit2 + // GCC-LABEL: define dso_local double @test_m_pfrcpit2 // CHECK: @llvm.x86.3dnow.pfrcpit2 return _m_pfrcpit2(m1, m2); } __m64 test_m_pfrsqrt(__m64 m) { - // PS4-LABEL: define i64 @test_m_pfrsqrt - // GCC-LABEL: define double @test_m_pfrsqrt + // PS4-LABEL: define dso_local i64 @test_m_pfrsqrt + // GCC-LABEL: define dso_local double @test_m_pfrsqrt // CHECK: @llvm.x86.3dnow.pfrsqrt return _m_pfrsqrt(m); } __m64 test_m_pfrsqrtit1(__m64 m1, __m64 m2) { - // PS4-LABEL: define i64 @test_m_pfrsqrtit1 - // GCC-LABEL: define double @test_m_pfrsqrtit1 + // PS4-LABEL: define dso_local i64 @test_m_pfrsqrtit1 + // GCC-LABEL: define dso_local double @test_m_pfrsqrtit1 // CHECK: @llvm.x86.3dnow.pfrsqit1 return _m_pfrsqrtit1(m1, m2); } __m64 test_m_pfsub(__m64 m1, __m64 m2) { - // PS4-LABEL: define i64 @test_m_pfsub - // GCC-LABEL: define double @test_m_pfsub + // PS4-LABEL: define dso_local i64 @test_m_pfsub + // GCC-LABEL: define dso_local double @test_m_pfsub // CHECK: @llvm.x86.3dnow.pfsub return _m_pfsub(m1, m2); } __m64 test_m_pfsubr(__m64 m1, __m64 m2) { - // PS4-LABEL: define i64 @test_m_pfsubr - // GCC-LABEL: define double @test_m_pfsubr + // PS4-LABEL: define dso_local i64 @test_m_pfsubr + // GCC-LABEL: define dso_local double @test_m_pfsubr // CHECK: @llvm.x86.3dnow.pfsubr return _m_pfsubr(m1, m2); } __m64 test_m_pi2fd(__m64 m) { - // PS4-LABEL: define i64 @test_m_pi2fd - // GCC-LABEL: define double @test_m_pi2fd + // PS4-LABEL: define dso_local i64 @test_m_pi2fd + // GCC-LABEL: define dso_local double @test_m_pi2fd // CHECK: @llvm.x86.3dnow.pi2fd return _m_pi2fd(m); } __m64 test_m_pmulhrw(__m64 m1, __m64 m2) { - // PS4-LABEL: define i64 @test_m_pmulhrw - // GCC-LABEL: define double @test_m_pmulhrw + // PS4-LABEL: define dso_local i64 @test_m_pmulhrw + // GCC-LABEL: define dso_local double @test_m_pmulhrw // CHECK: @llvm.x86.3dnow.pmulhrw return _m_pmulhrw(m1, m2); } __m64 test_m_pf2iw(__m64 m) { - // PS4-LABEL: define i64 @test_m_pf2iw - // GCC-LABEL: define double @test_m_pf2iw + // PS4-LABEL: define dso_local i64 @test_m_pf2iw + // GCC-LABEL: define dso_local double @test_m_pf2iw // CHECK: @llvm.x86.3dnowa.pf2iw return _m_pf2iw(m); } __m64 test_m_pfnacc(__m64 m1, __m64 m2) { - // PS4-LABEL: define i64 @test_m_pfnacc - // GCC-LABEL: define double @test_m_pfnacc + // PS4-LABEL: define dso_local i64 @test_m_pfnacc + // GCC-LABEL: define dso_local double @test_m_pfnacc // CHECK: @llvm.x86.3dnowa.pfnacc return _m_pfnacc(m1, m2); } __m64 test_m_pfpnacc(__m64 m1, __m64 m2) { - // PS4-LABEL: define i64 @test_m_pfpnacc - // GCC-LABEL: define double @test_m_pfpnacc + // PS4-LABEL: define dso_local i64 @test_m_pfpnacc + // GCC-LABEL: define dso_local double @test_m_pfpnacc // CHECK: @llvm.x86.3dnowa.pfpnacc return _m_pfpnacc(m1, m2); } __m64 test_m_pi2fw(__m64 m) { - // PS4-LABEL: define i64 @test_m_pi2fw - // GCC-LABEL: define double @test_m_pi2fw + // PS4-LABEL: define dso_local i64 @test_m_pi2fw + // GCC-LABEL: define dso_local double @test_m_pi2fw // CHECK: @llvm.x86.3dnowa.pi2fw return _m_pi2fw(m); } __m64 test_m_pswapdsf(__m64 m) { - // PS4-LABEL: define i64 @test_m_pswapdsf - // GCC-LABEL: define double @test_m_pswapdsf + // PS4-LABEL: define dso_local i64 @test_m_pswapdsf + // GCC-LABEL: define dso_local double @test_m_pswapdsf // CHECK: @llvm.x86.3dnowa.pswapd return _m_pswapdsf(m); } __m64 test_m_pswapdsi(__m64 m) { - // PS4-LABEL: define i64 @test_m_pswapdsi - // GCC-LABEL: define double @test_m_pswapdsi + // PS4-LABEL: define dso_local i64 @test_m_pswapdsi + // GCC-LABEL: define dso_local double @test_m_pswapdsi // CHECK: @llvm.x86.3dnowa.pswapd return _m_pswapdsi(m); } diff --git a/clang/test/CodeGen/_Bool-conversion.c b/clang/test/CodeGen/_Bool-conversion.c index a51cd8ecf535..2d897ff78121 100644 --- a/clang/test/CodeGen/_Bool-conversion.c +++ b/clang/test/CodeGen/_Bool-conversion.c @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -triple i386 -emit-llvm -O2 -o - %s | FileCheck %s -// CHECK-LABEL: define i32 @f0() +// CHECK-LABEL: define dso_local i32 @f0() // CHECK: ret i32 1 // CHECK: } diff --git a/clang/test/CodeGen/aapcs-align.cpp b/clang/test/CodeGen/aapcs-align.cpp index 3d2c7ef6a4d3..88a86467435e 100644 --- a/clang/test/CodeGen/aapcs-align.cpp +++ b/clang/test/CodeGen/aapcs-align.cpp @@ -18,7 +18,7 @@ void g0() { f0(1, s); f0m(1, 2, 3, 4, 5, s); } -// CHECK: define void @g0 +// CHECK: define dso_local void @g0 // CHECK: call void @f0(i32 1, [2 x i32] [i32 6, i32 7] // CHECK: call void @f0m(i32 1, i32 2, i32 3, i32 4, i32 5, [2 x i32] [i32 6, i32 7] // CHECK: declare void @f0(i32, [2 x i32]) @@ -36,7 +36,7 @@ void g1() { f1(1, s); f1m(1, 2, 3, 4, 5, s); } -// CHECK: define void @g1 +// CHECK: define dso_local void @g1 // CHECK: call void @f1(i32 1, [2 x i32] [i32 6, i32 7] // CHECK: call void @f1m(i32 1, i32 2, i32 3, i32 4, i32 5, [2 x i32] [i32 6, i32 7] // CHECK: declare void @f1(i32, [2 x i32]) @@ -55,7 +55,7 @@ void g2() { f2(1, s); f2m(1, 2, 3, 4, 5, s); } -// CHECK: define void @g2 +// CHECK: define dso_local void @g2 // CHECK: call void @f2(i32 1, [4 x i32] [i32 6, i32 7 // CHECK: call void @f2m(i32 1, i32 2, i32 3, i32 4, i32 5, [4 x i32] [i32 6, i32 7 // CHECK: declare void @f2(i32, [4 x i32]) @@ -74,7 +74,7 @@ void g3() { f3(1, s); f3m(1, 2, 3, 4, 5, s); } -// CHECK: define void @g3 +// CHECK: define dso_local void @g3 // CHECK: call void @f3(i32 1, [1 x i64] [i64 30064771078] // CHECK: call void @f3m(i32 1, i32 2, i32 3, i32 4, i32 5, [1 x i64] [i64 30064771078] // CHECK: declare void @f3(i32, [1 x i64]) @@ -94,7 +94,7 @@ void g4() { f4(1, s); f4m(1, 2, 3, 4, 5, s); } -// CHECK: define void @g4 +// CHECK: define dso_local void @g4 // CHECK: call void @f4(i32 1, %struct.SF16* nonnull byval(%struct.SF16) align 8 // CHECK: call void @f4m(i32 1, i32 2, i32 3, i32 4, i32 5, %struct.SF16* nonnull byval(%struct.SF16) align 8 // CHECK: declare void @f4(i32, %struct.SF16* byval(%struct.SF16) align 8) @@ -113,7 +113,7 @@ void g5() { f5(1, s); f5m(1, 2, 3, 4, 5, s); } -// CHECK: define void @g5 +// CHECK: define dso_local void @g5 // CHECK: call void @f5(i32 1, [3 x i32] [i32 6, i32 7, i32 0]) // CHECK: call void @f5m(i32 1, i32 2, i32 3, i32 4, i32 5, [3 x i32] [i32 6, i32 7, i32 0]) // CHECK: declare void @f5(i32, [3 x i32]) @@ -133,7 +133,7 @@ void g6() { f6(1, s); f6m(1, 2, 3, 4, 5, s); } -// CHECK: define void @g6 +// CHECK: define dso_local void @g6 // CHECK: call void @f6(i32 1, [4 x i32] [i32 6, i32 7, i32 0, i32 0]) // CHECK: call void @f6m(i32 1, i32 2, i32 3, i32 4, i32 5, [4 x i32] [i32 6, i32 7, i32 0, i32 0]) // CHECK: declare void @f6(i32, [4 x i32]) diff --git a/clang/test/CodeGen/aapcs64-align.cpp b/clang/test/CodeGen/aapcs64-align.cpp index 1b7c99ea8719..0f74291c46e3 100644 --- a/clang/test/CodeGen/aapcs64-align.cpp +++ b/clang/test/CodeGen/aapcs64-align.cpp @@ -17,7 +17,7 @@ void g0() { f0(1, s); f0m(1, 2, 3, 4, 5, s); } -// CHECK: define void @g0 +// CHECK: define dso_local void @g0 // CHECK: call void @f0(i64 1, [2 x i64] [i64 6, i64 7] // CHECK: call void @f0m{{.*}}[2 x i64] [i64 6, i64 7] // CHECK: declare void @f0(i64, [2 x i64]) @@ -35,7 +35,7 @@ void g1() { f1(1, s); f1m(1, 2, 3, 4, 5, s); } -// CHECK: define void @g1 +// CHECK: define dso_local void @g1 // CHECK: call void @f1{{.*}}[2 x i64] [i64 6, i64 7] // CHECK: call void @f1m{{.*}}[2 x i64] [i64 6, i64 7] // CHECK: declare void @f1(i64, [2 x i64]) @@ -54,7 +54,7 @@ void g3() { f3(1, s); f3m(1, 2, 3, 4, 5, s); } -// CHECK: define void @g3 +// CHECK: define dso_local void @g3 // CHECK: call void @f3(i64 1, i128 129127208515966861318) // CHECK: call void @f3m(i64 1, i64 2, i64 3, i64 4, i64 5, i128 129127208515966861318) // CHECK: declare void @f3(i64, i128) @@ -74,7 +74,7 @@ void g4() { f4(1, s); f4m(1, 2, 3, 4, 5, s); } -// CHECK: define void @g4() +// CHECK: define dso_local void @g4() // CHECK: call void @f4(i32 1, [2 x i64] [i64 30064771078, i64 0]) // CHECK: void @f4m(i32 1, i32 2, i32 3, i32 4, i32 5, [2 x i64] [i64 30064771078, i64 0]) // CHECK: declare void @f4(i32, [2 x i64]) @@ -94,7 +94,7 @@ void f5m(int, int, int, int, int, P16); f5(1, s); f5m(1, 2, 3, 4, 5, s); } -// CHECK: define void @g5() +// CHECK: define dso_local void @g5() // CHECK: call void @f5(i32 1, [2 x i64] [i64 30064771078, i64 0]) // CHECK: void @f5m(i32 1, i32 2, i32 3, i32 4, i32 5, [2 x i64] [i64 30064771078, i64 0]) // CHECK: declare void @f5(i32, [2 x i64]) diff --git a/clang/test/CodeGen/aarch64-args.cpp b/clang/test/CodeGen/aarch64-args.cpp index 409773627261..c76dc8c17d94 100644 --- a/clang/test/CodeGen/aarch64-args.cpp +++ b/clang/test/CodeGen/aarch64-args.cpp @@ -16,15 +16,15 @@ struct Empty {}; // CHECK: define i32 @empty_arg(i32 %a) -// CHECK-GNU-C: define i32 @empty_arg(i32 %a) -// CHECK-GNU-CXX: define i32 @empty_arg(i8 %e.coerce, i32 %a) +// CHECK-GNU-C: define dso_local i32 @empty_arg(i32 %a) +// CHECK-GNU-CXX: define dso_local i32 @empty_arg(i8 %e.coerce, i32 %a) EXTERNC int empty_arg(struct Empty e, int a) { return a; } // CHECK: define void @empty_ret() -// CHECK-GNU-C: define void @empty_ret() -// CHECK-GNU-CXX: define void @empty_ret() +// CHECK-GNU-C: define dso_local void @empty_ret() +// CHECK-GNU-CXX: define dso_local void @empty_ret() EXTERNC struct Empty empty_ret() { struct Empty e; return e; @@ -39,8 +39,8 @@ struct SuperEmpty { }; // CHECK: define i32 @super_empty_arg(i32 %a) -// CHECK-GNU-C: define i32 @super_empty_arg(i32 %a) -// CHECK-GNU-CXX: define i32 @super_empty_arg(i32 %a) +// CHECK-GNU-C: define dso_local i32 @super_empty_arg(i32 %a) +// CHECK-GNU-CXX: define dso_local i32 @super_empty_arg(i32 %a) EXTERNC int super_empty_arg(struct SuperEmpty e, int a) { return a; } @@ -52,15 +52,15 @@ struct SortOfEmpty { }; // CHECK: define i32 @sort_of_empty_arg(i32 %a) -// CHECK-GNU-C: define i32 @sort_of_empty_arg(i32 %a) -// CHECK-GNU-CXX: define i32 @sort_of_empty_arg(i8 %e.coerce, i32 %a) +// CHECK-GNU-C: define dso_local i32 @sort_of_empty_arg(i32 %a) +// CHECK-GNU-CXX: define dso_local i32 @sort_of_empty_arg(i8 %e.coerce, i32 %a) EXTERNC int sort_of_empty_arg(struct Empty e, int a) { return a; } // CHECK: define void @sort_of_empty_ret() -// CHECK-GNU-C: define void @sort_of_empty_ret() -// CHECK-GNU-CXX: define void @sort_of_empty_ret() +// CHECK-GNU-C: define dso_local void @sort_of_empty_ret() +// CHECK-GNU-CXX: define dso_local void @sort_of_empty_ret() EXTERNC struct SortOfEmpty sort_of_empty_ret() { struct SortOfEmpty e; return e; diff --git a/clang/test/CodeGen/aarch64-branch-protection-attr.c b/clang/test/CodeGen/aarch64-branch-protection-attr.c index ee761d6e8977..322a50b9f07b 100644 --- a/clang/test/CodeGen/aarch64-branch-protection-attr.c +++ b/clang/test/CodeGen/aarch64-branch-protection-attr.c @@ -6,63 +6,63 @@ // RUN: | FileCheck %s --check-prefix=CHECK --check-prefix=OVERRIDE void missing() {} -// NO-OVERRIDE: define void @missing() #[[#NONE:]] -// OVERRIDE: define void @missing() #[[#STD:]] +// NO-OVERRIDE: define dso_local void @missing() #[[#NONE:]] +// OVERRIDE: define dso_local void @missing() #[[#STD:]] __attribute__ ((target("branch-protection=none"))) void none() {} -// NO-OVERRIDE: define void @none() #[[#NONE]] -// OVERRIDE: define void @none() #[[#NONE:]] +// NO-OVERRIDE: define dso_local void @none() #[[#NONE]] +// OVERRIDE: define dso_local void @none() #[[#NONE:]] __attribute__ ((target("branch-protection=standard"))) void std() {} -// NO-OVERRIDE: define void @std() #[[#STD:]] -// OVERRIDE: define void @std() #[[#STD]] +// NO-OVERRIDE: define dso_local void @std() #[[#STD:]] +// OVERRIDE: define dso_local void @std() #[[#STD]] __attribute__ ((target("branch-protection=bti"))) void btionly() {} -// NO-OVERRIDE: define void @btionly() #[[#BTI:]] -// OVERRIDE: define void @btionly() #[[#BTI:]] +// NO-OVERRIDE: define dso_local void @btionly() #[[#BTI:]] +// OVERRIDE: define dso_local void @btionly() #[[#BTI:]] __attribute__ ((target("branch-protection=pac-ret"))) void paconly() {} -// NO-OVERRIDE: define void @paconly() #[[#PAC:]] -// OVERRIDE: define void @paconly() #[[#PAC:]] +// NO-OVERRIDE: define dso_local void @paconly() #[[#PAC:]] +// OVERRIDE: define dso_local void @paconly() #[[#PAC:]] __attribute__ ((target("branch-protection=pac-ret+bti"))) void pacbti0() {} -// NO-OVERRIDE: define void @pacbti0() #[[#PACBTI:]] -// OVERRIDE: define void @pacbti0() #[[#PACBTI:]] +// NO-OVERRIDE: define dso_local void @pacbti0() #[[#PACBTI:]] +// OVERRIDE: define dso_local void @pacbti0() #[[#PACBTI:]] __attribute__ ((target("branch-protection=bti+pac-ret"))) void pacbti1() {} -// NO-OVERRIDE: define void @pacbti1() #[[#PACBTI]] -// OVERRIDE: define void @pacbti1() #[[#PACBTI]] +// NO-OVERRIDE: define dso_local void @pacbti1() #[[#PACBTI]] +// OVERRIDE: define dso_local void @pacbti1() #[[#PACBTI]] __attribute__ ((target("branch-protection=pac-ret+leaf"))) void leaf() {} -// NO-OVERRIDE: define void @leaf() #[[#PACLEAF:]] -// OVERRIDE: define void @leaf() #[[#PACLEAF:]] +// NO-OVERRIDE: define dso_local void @leaf() #[[#PACLEAF:]] +// OVERRIDE: define dso_local void @leaf() #[[#PACLEAF:]] __attribute__ ((target("branch-protection=pac-ret+b-key"))) void bkey() {} -// NO-OVERRIDE: define void @bkey() #[[#PACBKEY:]] -// OVERRIDE: define void @bkey() #[[#PACBKEY:]] +// NO-OVERRIDE: define dso_local void @bkey() #[[#PACBKEY:]] +// OVERRIDE: define dso_local void @bkey() #[[#PACBKEY:]] __attribute__ ((target("branch-protection=pac-ret+b-key+leaf"))) void bkeyleaf0() {} -// NO-OVERRIDE: define void @bkeyleaf0() #[[#PACBKEYLEAF:]] -// OVERRIDE: define void @bkeyleaf0() #[[#PACBKEYLEAF:]] +// NO-OVERRIDE: define dso_local void @bkeyleaf0() #[[#PACBKEYLEAF:]] +// OVERRIDE: define dso_local void @bkeyleaf0() #[[#PACBKEYLEAF:]] __attribute__ ((target("branch-protection=pac-ret+leaf+b-key"))) void bkeyleaf1() {} -// NO-OVERRIDE: define void @bkeyleaf1() #[[#PACBKEYLEAF]] -// OVERRIDE: define void @bkeyleaf1() #[[#PACBKEYLEAF]] +// NO-OVERRIDE: define dso_local void @bkeyleaf1() #[[#PACBKEYLEAF]] +// OVERRIDE: define dso_local void @bkeyleaf1() #[[#PACBKEYLEAF]] __attribute__ ((target("branch-protection=pac-ret+leaf+bti"))) void btileaf() {} -// NO-OVERRIDE: define void @btileaf() #[[#BTIPACLEAF:]] -// OVERRIDE: define void @btileaf() #[[#BTIPACLEAF:]] +// NO-OVERRIDE: define dso_local void @btileaf() #[[#BTIPACLEAF:]] +// OVERRIDE: define dso_local void @btileaf() #[[#BTIPACLEAF:]] // CHECK-DAG: attributes #[[#NONE]] diff --git a/clang/test/CodeGen/aarch64-byval-temp.c b/clang/test/CodeGen/aarch64-byval-temp.c index f70f605e2423..bf23f79b242c 100644 --- a/clang/test/CodeGen/aarch64-byval-temp.c +++ b/clang/test/CodeGen/aarch64-byval-temp.c @@ -17,7 +17,7 @@ void example() { pass_large(l); pass_large(l); } -// CHECK-O0-LABEL: define void @example( +// CHECK-O0-LABEL: define dso_local void @example( // The alloca for the struct on the stack. // CHECK-O0: %[[l:[0-9A-Za-z-]+]] = alloca %struct.large, align 8 // The alloca for the temporary stack space that we use to pass the argument. @@ -42,7 +42,7 @@ void example() { // // At O3, we should have lifetime markers to help the optimizer re-use the temporary allocas. // -// CHECK-O3-LABEL: define void @example( +// CHECK-O3-LABEL: define dso_local void @example( // The alloca for the struct on the stack. // CHECK-O3: %[[l:[0-9A-Za-z-]+]] = alloca %struct.large, align 8 // The alloca for the temporary stack space that we use to pass the argument. diff --git a/clang/test/CodeGen/aarch64-neon-3v.c b/clang/test/CodeGen/aarch64-neon-3v.c index 0ededf940d16..569ab59a8a4f 100644 --- a/clang/test/CodeGen/aarch64-neon-3v.c +++ b/clang/test/CodeGen/aarch64-neon-3v.c @@ -4,343 +4,343 @@ #include <arm_neon.h> -// CHECK-LABEL: define <8 x i8> @test_vand_s8(<8 x i8> %a, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vand_s8(<8 x i8> %a, <8 x i8> %b) #0 { // CHECK: [[AND_I:%.*]] = and <8 x i8> %a, %b // CHECK: ret <8 x i8> [[AND_I]] int8x8_t test_vand_s8(int8x8_t a, int8x8_t b) { return vand_s8(a, b); } -// CHECK-LABEL: define <16 x i8> @test_vandq_s8(<16 x i8> %a, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vandq_s8(<16 x i8> %a, <16 x i8> %b) #1 { // CHECK: [[AND_I:%.*]] = and <16 x i8> %a, %b // CHECK: ret <16 x i8> [[AND_I]] int8x16_t test_vandq_s8(int8x16_t a, int8x16_t b) { return vandq_s8(a, b); } -// CHECK-LABEL: define <4 x i16> @test_vand_s16(<4 x i16> %a, <4 x i16> %b) #0 { +// CHECK-LABEL: define dso_local <4 x i16> @test_vand_s16(<4 x i16> %a, <4 x i16> %b) #0 { // CHECK: [[AND_I:%.*]] = and <4 x i16> %a, %b // CHECK: ret <4 x i16> [[AND_I]] int16x4_t test_vand_s16(int16x4_t a, int16x4_t b) { return vand_s16(a, b); } -// CHECK-LABEL: define <8 x i16> @test_vandq_s16(<8 x i16> %a, <8 x i16> %b) #1 { +// CHECK-LABEL: define dso_local <8 x i16> @test_vandq_s16(<8 x i16> %a, <8 x i16> %b) #1 { // CHECK: [[AND_I:%.*]] = and <8 x i16> %a, %b // CHECK: ret <8 x i16> [[AND_I]] int16x8_t test_vandq_s16(int16x8_t a, int16x8_t b) { return vandq_s16(a, b); } -// CHECK-LABEL: define <2 x i32> @test_vand_s32(<2 x i32> %a, <2 x i32> %b) #0 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vand_s32(<2 x i32> %a, <2 x i32> %b) #0 { // CHECK: [[AND_I:%.*]] = and <2 x i32> %a, %b // CHECK: ret <2 x i32> [[AND_I]] int32x2_t test_vand_s32(int32x2_t a, int32x2_t b) { return vand_s32(a, b); } -// CHECK-LABEL: define <4 x i32> @test_vandq_s32(<4 x i32> %a, <4 x i32> %b) #1 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vandq_s32(<4 x i32> %a, <4 x i32> %b) #1 { // CHECK: [[AND_I:%.*]] = and <4 x i32> %a, %b // CHECK: ret <4 x i32> [[AND_I]] int32x4_t test_vandq_s32(int32x4_t a, int32x4_t b) { return vandq_s32(a, b); } -// CHECK-LABEL: define <1 x i64> @test_vand_s64(<1 x i64> %a, <1 x i64> %b) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vand_s64(<1 x i64> %a, <1 x i64> %b) #0 { // CHECK: [[AND_I:%.*]] = and <1 x i64> %a, %b // CHECK: ret <1 x i64> [[AND_I]] int64x1_t test_vand_s64(int64x1_t a, int64x1_t b) { return vand_s64(a, b); } -// CHECK-LABEL: define <2 x i64> @test_vandq_s64(<2 x i64> %a, <2 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vandq_s64(<2 x i64> %a, <2 x i64> %b) #1 { // CHECK: [[AND_I:%.*]] = and <2 x i64> %a, %b // CHECK: ret <2 x i64> [[AND_I]] int64x2_t test_vandq_s64(int64x2_t a, int64x2_t b) { return vandq_s64(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vand_u8(<8 x i8> %a, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vand_u8(<8 x i8> %a, <8 x i8> %b) #0 { // CHECK: [[AND_I:%.*]] = and <8 x i8> %a, %b // CHECK: ret <8 x i8> [[AND_I]] uint8x8_t test_vand_u8(uint8x8_t a, uint8x8_t b) { return vand_u8(a, b); } -// CHECK-LABEL: define <16 x i8> @test_vandq_u8(<16 x i8> %a, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vandq_u8(<16 x i8> %a, <16 x i8> %b) #1 { // CHECK: [[AND_I:%.*]] = and <16 x i8> %a, %b // CHECK: ret <16 x i8> [[AND_I]] uint8x16_t test_vandq_u8(uint8x16_t a, uint8x16_t b) { return vandq_u8(a, b); } -// CHECK-LABEL: define <4 x i16> @test_vand_u16(<4 x i16> %a, <4 x i16> %b) #0 { +// CHECK-LABEL: define dso_local <4 x i16> @test_vand_u16(<4 x i16> %a, <4 x i16> %b) #0 { // CHECK: [[AND_I:%.*]] = and <4 x i16> %a, %b // CHECK: ret <4 x i16> [[AND_I]] uint16x4_t test_vand_u16(uint16x4_t a, uint16x4_t b) { return vand_u16(a, b); } -// CHECK-LABEL: define <8 x i16> @test_vandq_u16(<8 x i16> %a, <8 x i16> %b) #1 { +// CHECK-LABEL: define dso_local <8 x i16> @test_vandq_u16(<8 x i16> %a, <8 x i16> %b) #1 { // CHECK: [[AND_I:%.*]] = and <8 x i16> %a, %b // CHECK: ret <8 x i16> [[AND_I]] uint16x8_t test_vandq_u16(uint16x8_t a, uint16x8_t b) { return vandq_u16(a, b); } -// CHECK-LABEL: define <2 x i32> @test_vand_u32(<2 x i32> %a, <2 x i32> %b) #0 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vand_u32(<2 x i32> %a, <2 x i32> %b) #0 { // CHECK: [[AND_I:%.*]] = and <2 x i32> %a, %b // CHECK: ret <2 x i32> [[AND_I]] uint32x2_t test_vand_u32(uint32x2_t a, uint32x2_t b) { return vand_u32(a, b); } -// CHECK-LABEL: define <4 x i32> @test_vandq_u32(<4 x i32> %a, <4 x i32> %b) #1 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vandq_u32(<4 x i32> %a, <4 x i32> %b) #1 { // CHECK: [[AND_I:%.*]] = and <4 x i32> %a, %b // CHECK: ret <4 x i32> [[AND_I]] uint32x4_t test_vandq_u32(uint32x4_t a, uint32x4_t b) { return vandq_u32(a, b); } -// CHECK-LABEL: define <1 x i64> @test_vand_u64(<1 x i64> %a, <1 x i64> %b) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vand_u64(<1 x i64> %a, <1 x i64> %b) #0 { // CHECK: [[AND_I:%.*]] = and <1 x i64> %a, %b // CHECK: ret <1 x i64> [[AND_I]] uint64x1_t test_vand_u64(uint64x1_t a, uint64x1_t b) { return vand_u64(a, b); } -// CHECK-LABEL: define <2 x i64> @test_vandq_u64(<2 x i64> %a, <2 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vandq_u64(<2 x i64> %a, <2 x i64> %b) #1 { // CHECK: [[AND_I:%.*]] = and <2 x i64> %a, %b // CHECK: ret <2 x i64> [[AND_I]] uint64x2_t test_vandq_u64(uint64x2_t a, uint64x2_t b) { return vandq_u64(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vorr_s8(<8 x i8> %a, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vorr_s8(<8 x i8> %a, <8 x i8> %b) #0 { // CHECK: [[OR_I:%.*]] = or <8 x i8> %a, %b // CHECK: ret <8 x i8> [[OR_I]] int8x8_t test_vorr_s8(int8x8_t a, int8x8_t b) { return vorr_s8(a, b); } -// CHECK-LABEL: define <16 x i8> @test_vorrq_s8(<16 x i8> %a, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vorrq_s8(<16 x i8> %a, <16 x i8> %b) #1 { // CHECK: [[OR_I:%.*]] = or <16 x i8> %a, %b // CHECK: ret <16 x i8> [[OR_I]] int8x16_t test_vorrq_s8(int8x16_t a, int8x16_t b) { return vorrq_s8(a, b); } -// CHECK-LABEL: define <4 x i16> @test_vorr_s16(<4 x i16> %a, <4 x i16> %b) #0 { +// CHECK-LABEL: define dso_local <4 x i16> @test_vorr_s16(<4 x i16> %a, <4 x i16> %b) #0 { // CHECK: [[OR_I:%.*]] = or <4 x i16> %a, %b // CHECK: ret <4 x i16> [[OR_I]] int16x4_t test_vorr_s16(int16x4_t a, int16x4_t b) { return vorr_s16(a, b); } -// CHECK-LABEL: define <8 x i16> @test_vorrq_s16(<8 x i16> %a, <8 x i16> %b) #1 { +// CHECK-LABEL: define dso_local <8 x i16> @test_vorrq_s16(<8 x i16> %a, <8 x i16> %b) #1 { // CHECK: [[OR_I:%.*]] = or <8 x i16> %a, %b // CHECK: ret <8 x i16> [[OR_I]] int16x8_t test_vorrq_s16(int16x8_t a, int16x8_t b) { return vorrq_s16(a, b); } -// CHECK-LABEL: define <2 x i32> @test_vorr_s32(<2 x i32> %a, <2 x i32> %b) #0 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vorr_s32(<2 x i32> %a, <2 x i32> %b) #0 { // CHECK: [[OR_I:%.*]] = or <2 x i32> %a, %b // CHECK: ret <2 x i32> [[OR_I]] int32x2_t test_vorr_s32(int32x2_t a, int32x2_t b) { return vorr_s32(a, b); } -// CHECK-LABEL: define <4 x i32> @test_vorrq_s32(<4 x i32> %a, <4 x i32> %b) #1 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vorrq_s32(<4 x i32> %a, <4 x i32> %b) #1 { // CHECK: [[OR_I:%.*]] = or <4 x i32> %a, %b // CHECK: ret <4 x i32> [[OR_I]] int32x4_t test_vorrq_s32(int32x4_t a, int32x4_t b) { return vorrq_s32(a, b); } -// CHECK-LABEL: define <1 x i64> @test_vorr_s64(<1 x i64> %a, <1 x i64> %b) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vorr_s64(<1 x i64> %a, <1 x i64> %b) #0 { // CHECK: [[OR_I:%.*]] = or <1 x i64> %a, %b // CHECK: ret <1 x i64> [[OR_I]] int64x1_t test_vorr_s64(int64x1_t a, int64x1_t b) { return vorr_s64(a, b); } -// CHECK-LABEL: define <2 x i64> @test_vorrq_s64(<2 x i64> %a, <2 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vorrq_s64(<2 x i64> %a, <2 x i64> %b) #1 { // CHECK: [[OR_I:%.*]] = or <2 x i64> %a, %b // CHECK: ret <2 x i64> [[OR_I]] int64x2_t test_vorrq_s64(int64x2_t a, int64x2_t b) { return vorrq_s64(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vorr_u8(<8 x i8> %a, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vorr_u8(<8 x i8> %a, <8 x i8> %b) #0 { // CHECK: [[OR_I:%.*]] = or <8 x i8> %a, %b // CHECK: ret <8 x i8> [[OR_I]] uint8x8_t test_vorr_u8(uint8x8_t a, uint8x8_t b) { return vorr_u8(a, b); } -// CHECK-LABEL: define <16 x i8> @test_vorrq_u8(<16 x i8> %a, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vorrq_u8(<16 x i8> %a, <16 x i8> %b) #1 { // CHECK: [[OR_I:%.*]] = or <16 x i8> %a, %b // CHECK: ret <16 x i8> [[OR_I]] uint8x16_t test_vorrq_u8(uint8x16_t a, uint8x16_t b) { return vorrq_u8(a, b); } -// CHECK-LABEL: define <4 x i16> @test_vorr_u16(<4 x i16> %a, <4 x i16> %b) #0 { +// CHECK-LABEL: define dso_local <4 x i16> @test_vorr_u16(<4 x i16> %a, <4 x i16> %b) #0 { // CHECK: [[OR_I:%.*]] = or <4 x i16> %a, %b // CHECK: ret <4 x i16> [[OR_I]] uint16x4_t test_vorr_u16(uint16x4_t a, uint16x4_t b) { return vorr_u16(a, b); } -// CHECK-LABEL: define <8 x i16> @test_vorrq_u16(<8 x i16> %a, <8 x i16> %b) #1 { +// CHECK-LABEL: define dso_local <8 x i16> @test_vorrq_u16(<8 x i16> %a, <8 x i16> %b) #1 { // CHECK: [[OR_I:%.*]] = or <8 x i16> %a, %b // CHECK: ret <8 x i16> [[OR_I]] uint16x8_t test_vorrq_u16(uint16x8_t a, uint16x8_t b) { return vorrq_u16(a, b); } -// CHECK-LABEL: define <2 x i32> @test_vorr_u32(<2 x i32> %a, <2 x i32> %b) #0 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vorr_u32(<2 x i32> %a, <2 x i32> %b) #0 { // CHECK: [[OR_I:%.*]] = or <2 x i32> %a, %b // CHECK: ret <2 x i32> [[OR_I]] uint32x2_t test_vorr_u32(uint32x2_t a, uint32x2_t b) { return vorr_u32(a, b); } -// CHECK-LABEL: define <4 x i32> @test_vorrq_u32(<4 x i32> %a, <4 x i32> %b) #1 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vorrq_u32(<4 x i32> %a, <4 x i32> %b) #1 { // CHECK: [[OR_I:%.*]] = or <4 x i32> %a, %b // CHECK: ret <4 x i32> [[OR_I]] uint32x4_t test_vorrq_u32(uint32x4_t a, uint32x4_t b) { return vorrq_u32(a, b); } -// CHECK-LABEL: define <1 x i64> @test_vorr_u64(<1 x i64> %a, <1 x i64> %b) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vorr_u64(<1 x i64> %a, <1 x i64> %b) #0 { // CHECK: [[OR_I:%.*]] = or <1 x i64> %a, %b // CHECK: ret <1 x i64> [[OR_I]] uint64x1_t test_vorr_u64(uint64x1_t a, uint64x1_t b) { return vorr_u64(a, b); } -// CHECK-LABEL: define <2 x i64> @test_vorrq_u64(<2 x i64> %a, <2 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vorrq_u64(<2 x i64> %a, <2 x i64> %b) #1 { // CHECK: [[OR_I:%.*]] = or <2 x i64> %a, %b // CHECK: ret <2 x i64> [[OR_I]] uint64x2_t test_vorrq_u64(uint64x2_t a, uint64x2_t b) { return vorrq_u64(a, b); } -// CHECK-LABEL: define <8 x i8> @test_veor_s8(<8 x i8> %a, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_veor_s8(<8 x i8> %a, <8 x i8> %b) #0 { // CHECK: [[XOR_I:%.*]] = xor <8 x i8> %a, %b // CHECK: ret <8 x i8> [[XOR_I]] int8x8_t test_veor_s8(int8x8_t a, int8x8_t b) { return veor_s8(a, b); } -// CHECK-LABEL: define <16 x i8> @test_veorq_s8(<16 x i8> %a, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_veorq_s8(<16 x i8> %a, <16 x i8> %b) #1 { // CHECK: [[XOR_I:%.*]] = xor <16 x i8> %a, %b // CHECK: ret <16 x i8> [[XOR_I]] int8x16_t test_veorq_s8(int8x16_t a, int8x16_t b) { return veorq_s8(a, b); } -// CHECK-LABEL: define <4 x i16> @test_veor_s16(<4 x i16> %a, <4 x i16> %b) #0 { +// CHECK-LABEL: define dso_local <4 x i16> @test_veor_s16(<4 x i16> %a, <4 x i16> %b) #0 { // CHECK: [[XOR_I:%.*]] = xor <4 x i16> %a, %b // CHECK: ret <4 x i16> [[XOR_I]] int16x4_t test_veor_s16(int16x4_t a, int16x4_t b) { return veor_s16(a, b); } -// CHECK-LABEL: define <8 x i16> @test_veorq_s16(<8 x i16> %a, <8 x i16> %b) #1 { +// CHECK-LABEL: define dso_local <8 x i16> @test_veorq_s16(<8 x i16> %a, <8 x i16> %b) #1 { // CHECK: [[XOR_I:%.*]] = xor <8 x i16> %a, %b // CHECK: ret <8 x i16> [[XOR_I]] int16x8_t test_veorq_s16(int16x8_t a, int16x8_t b) { return veorq_s16(a, b); } -// CHECK-LABEL: define <2 x i32> @test_veor_s32(<2 x i32> %a, <2 x i32> %b) #0 { +// CHECK-LABEL: define dso_local <2 x i32> @test_veor_s32(<2 x i32> %a, <2 x i32> %b) #0 { // CHECK: [[XOR_I:%.*]] = xor <2 x i32> %a, %b // CHECK: ret <2 x i32> [[XOR_I]] int32x2_t test_veor_s32(int32x2_t a, int32x2_t b) { return veor_s32(a, b); } -// CHECK-LABEL: define <4 x i32> @test_veorq_s32(<4 x i32> %a, <4 x i32> %b) #1 { +// CHECK-LABEL: define dso_local <4 x i32> @test_veorq_s32(<4 x i32> %a, <4 x i32> %b) #1 { // CHECK: [[XOR_I:%.*]] = xor <4 x i32> %a, %b // CHECK: ret <4 x i32> [[XOR_I]] int32x4_t test_veorq_s32(int32x4_t a, int32x4_t b) { return veorq_s32(a, b); } -// CHECK-LABEL: define <1 x i64> @test_veor_s64(<1 x i64> %a, <1 x i64> %b) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_veor_s64(<1 x i64> %a, <1 x i64> %b) #0 { // CHECK: [[XOR_I:%.*]] = xor <1 x i64> %a, %b // CHECK: ret <1 x i64> [[XOR_I]] int64x1_t test_veor_s64(int64x1_t a, int64x1_t b) { return veor_s64(a, b); } -// CHECK-LABEL: define <2 x i64> @test_veorq_s64(<2 x i64> %a, <2 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_veorq_s64(<2 x i64> %a, <2 x i64> %b) #1 { // CHECK: [[XOR_I:%.*]] = xor <2 x i64> %a, %b // CHECK: ret <2 x i64> [[XOR_I]] int64x2_t test_veorq_s64(int64x2_t a, int64x2_t b) { return veorq_s64(a, b); } -// CHECK-LABEL: define <8 x i8> @test_veor_u8(<8 x i8> %a, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_veor_u8(<8 x i8> %a, <8 x i8> %b) #0 { // CHECK: [[XOR_I:%.*]] = xor <8 x i8> %a, %b // CHECK: ret <8 x i8> [[XOR_I]] uint8x8_t test_veor_u8(uint8x8_t a, uint8x8_t b) { return veor_u8(a, b); } -// CHECK-LABEL: define <16 x i8> @test_veorq_u8(<16 x i8> %a, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_veorq_u8(<16 x i8> %a, <16 x i8> %b) #1 { // CHECK: [[XOR_I:%.*]] = xor <16 x i8> %a, %b // CHECK: ret <16 x i8> [[XOR_I]] uint8x16_t test_veorq_u8(uint8x16_t a, uint8x16_t b) { return veorq_u8(a, b); } -// CHECK-LABEL: define <4 x i16> @test_veor_u16(<4 x i16> %a, <4 x i16> %b) #0 { +// CHECK-LABEL: define dso_local <4 x i16> @test_veor_u16(<4 x i16> %a, <4 x i16> %b) #0 { // CHECK: [[XOR_I:%.*]] = xor <4 x i16> %a, %b // CHECK: ret <4 x i16> [[XOR_I]] uint16x4_t test_veor_u16(uint16x4_t a, uint16x4_t b) { return veor_u16(a, b); } -// CHECK-LABEL: define <8 x i16> @test_veorq_u16(<8 x i16> %a, <8 x i16> %b) #1 { +// CHECK-LABEL: define dso_local <8 x i16> @test_veorq_u16(<8 x i16> %a, <8 x i16> %b) #1 { // CHECK: [[XOR_I:%.*]] = xor <8 x i16> %a, %b // CHECK: ret <8 x i16> [[XOR_I]] uint16x8_t test_veorq_u16(uint16x8_t a, uint16x8_t b) { return veorq_u16(a, b); } -// CHECK-LABEL: define <2 x i32> @test_veor_u32(<2 x i32> %a, <2 x i32> %b) #0 { +// CHECK-LABEL: define dso_local <2 x i32> @test_veor_u32(<2 x i32> %a, <2 x i32> %b) #0 { // CHECK: [[XOR_I:%.*]] = xor <2 x i32> %a, %b // CHECK: ret <2 x i32> [[XOR_I]] uint32x2_t test_veor_u32(uint32x2_t a, uint32x2_t b) { return veor_u32(a, b); } -// CHECK-LABEL: define <4 x i32> @test_veorq_u32(<4 x i32> %a, <4 x i32> %b) #1 { +// CHECK-LABEL: define dso_local <4 x i32> @test_veorq_u32(<4 x i32> %a, <4 x i32> %b) #1 { // CHECK: [[XOR_I:%.*]] = xor <4 x i32> %a, %b // CHECK: ret <4 x i32> [[XOR_I]] uint32x4_t test_veorq_u32(uint32x4_t a, uint32x4_t b) { return veorq_u32(a, b); } -// CHECK-LABEL: define <1 x i64> @test_veor_u64(<1 x i64> %a, <1 x i64> %b) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_veor_u64(<1 x i64> %a, <1 x i64> %b) #0 { // CHECK: [[XOR_I:%.*]] = xor <1 x i64> %a, %b // CHECK: ret <1 x i64> [[XOR_I]] uint64x1_t test_veor_u64(uint64x1_t a, uint64x1_t b) { return veor_u64(a, b); } -// CHECK-LABEL: define <2 x i64> @test_veorq_u64(<2 x i64> %a, <2 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_veorq_u64(<2 x i64> %a, <2 x i64> %b) #1 { // CHECK: [[XOR_I:%.*]] = xor <2 x i64> %a, %b // CHECK: ret <2 x i64> [[XOR_I]] uint64x2_t test_veorq_u64(uint64x2_t a, uint64x2_t b) { return veorq_u64(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vbic_s8(<8 x i8> %a, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vbic_s8(<8 x i8> %a, <8 x i8> %b) #0 { // CHECK: [[NEG_I:%.*]] = xor <8 x i8> %b, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1> // CHECK: [[AND_I:%.*]] = and <8 x i8> %a, [[NEG_I]] // CHECK: ret <8 x i8> [[AND_I]] @@ -348,7 +348,7 @@ int8x8_t test_vbic_s8(int8x8_t a, int8x8_t b) { return vbic_s8(a, b); } -// CHECK-LABEL: define <16 x i8> @test_vbicq_s8(<16 x i8> %a, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vbicq_s8(<16 x i8> %a, <16 x i8> %b) #1 { // CHECK: [[NEG_I:%.*]] = xor <16 x i8> %b, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1> // CHECK: [[AND_I:%.*]] = and <16 x i8> %a, [[NEG_I]] // CHECK: ret <16 x i8> [[AND_I]] @@ -356,7 +356,7 @@ int8x16_t test_vbicq_s8(int8x16_t a, int8x16_t b) { return vbicq_s8(a, b); } -// CHECK-LABEL: define <4 x i16> @test_vbic_s16(<4 x i16> %a, <4 x i16> %b) #0 { +// CHECK-LABEL: define dso_local <4 x i16> @test_vbic_s16(<4 x i16> %a, <4 x i16> %b) #0 { // CHECK: [[NEG_I:%.*]] = xor <4 x i16> %b, <i16 -1, i16 -1, i16 -1, i16 -1> // CHECK: [[AND_I:%.*]] = and <4 x i16> %a, [[NEG_I]] // CHECK: ret <4 x i16> [[AND_I]] @@ -364,7 +364,7 @@ int16x4_t test_vbic_s16(int16x4_t a, int16x4_t b) { return vbic_s16(a, b); } -// CHECK-LABEL: define <8 x i16> @test_vbicq_s16(<8 x i16> %a, <8 x i16> %b) #1 { +// CHECK-LABEL: define dso_local <8 x i16> @test_vbicq_s16(<8 x i16> %a, <8 x i16> %b) #1 { // CHECK: [[NEG_I:%.*]] = xor <8 x i16> %b, <i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1> // CHECK: [[AND_I:%.*]] = and <8 x i16> %a, [[NEG_I]] // CHECK: ret <8 x i16> [[AND_I]] @@ -372,7 +372,7 @@ int16x8_t test_vbicq_s16(int16x8_t a, int16x8_t b) { return vbicq_s16(a, b); } -// CHECK-LABEL: define <2 x i32> @test_vbic_s32(<2 x i32> %a, <2 x i32> %b) #0 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vbic_s32(<2 x i32> %a, <2 x i32> %b) #0 { // CHECK: [[NEG_I:%.*]] = xor <2 x i32> %b, <i32 -1, i32 -1> // CHECK: [[AND_I:%.*]] = and <2 x i32> %a, [[NEG_I]] // CHECK: ret <2 x i32> [[AND_I]] @@ -380,7 +380,7 @@ int32x2_t test_vbic_s32(int32x2_t a, int32x2_t b) { return vbic_s32(a, b); } -// CHECK-LABEL: define <4 x i32> @test_vbicq_s32(<4 x i32> %a, <4 x i32> %b) #1 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vbicq_s32(<4 x i32> %a, <4 x i32> %b) #1 { // CHECK: [[NEG_I:%.*]] = xor <4 x i32> %b, <i32 -1, i32 -1, i32 -1, i32 -1> // CHECK: [[AND_I:%.*]] = and <4 x i32> %a, [[NEG_I]] // CHECK: ret <4 x i32> [[AND_I]] @@ -388,7 +388,7 @@ int32x4_t test_vbicq_s32(int32x4_t a, int32x4_t b) { return vbicq_s32(a, b); } -// CHECK-LABEL: define <1 x i64> @test_vbic_s64(<1 x i64> %a, <1 x i64> %b) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vbic_s64(<1 x i64> %a, <1 x i64> %b) #0 { // CHECK: [[NEG_I:%.*]] = xor <1 x i64> %b, <i64 -1> // CHECK: [[AND_I:%.*]] = and <1 x i64> %a, [[NEG_I]] // CHECK: ret <1 x i64> [[AND_I]] @@ -396,7 +396,7 @@ int64x1_t test_vbic_s64(int64x1_t a, int64x1_t b) { return vbic_s64(a, b); } -// CHECK-LABEL: define <2 x i64> @test_vbicq_s64(<2 x i64> %a, <2 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vbicq_s64(<2 x i64> %a, <2 x i64> %b) #1 { // CHECK: [[NEG_I:%.*]] = xor <2 x i64> %b, <i64 -1, i64 -1> // CHECK: [[AND_I:%.*]] = and <2 x i64> %a, [[NEG_I]] // CHECK: ret <2 x i64> [[AND_I]] @@ -404,7 +404,7 @@ int64x2_t test_vbicq_s64(int64x2_t a, int64x2_t b) { return vbicq_s64(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vbic_u8(<8 x i8> %a, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vbic_u8(<8 x i8> %a, <8 x i8> %b) #0 { // CHECK: [[NEG_I:%.*]] = xor <8 x i8> %b, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1> // CHECK: [[AND_I:%.*]] = and <8 x i8> %a, [[NEG_I]] // CHECK: ret <8 x i8> [[AND_I]] @@ -412,7 +412,7 @@ uint8x8_t test_vbic_u8(uint8x8_t a, uint8x8_t b) { return vbic_u8(a, b); } -// CHECK-LABEL: define <16 x i8> @test_vbicq_u8(<16 x i8> %a, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vbicq_u8(<16 x i8> %a, <16 x i8> %b) #1 { // CHECK: [[NEG_I:%.*]] = xor <16 x i8> %b, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1> // CHECK: [[AND_I:%.*]] = and <16 x i8> %a, [[NEG_I]] // CHECK: ret <16 x i8> [[AND_I]] @@ -420,7 +420,7 @@ uint8x16_t test_vbicq_u8(uint8x16_t a, uint8x16_t b) { return vbicq_u8(a, b); } -// CHECK-LABEL: define <4 x i16> @test_vbic_u16(<4 x i16> %a, <4 x i16> %b) #0 { +// CHECK-LABEL: define dso_local <4 x i16> @test_vbic_u16(<4 x i16> %a, <4 x i16> %b) #0 { // CHECK: [[NEG_I:%.*]] = xor <4 x i16> %b, <i16 -1, i16 -1, i16 -1, i16 -1> // CHECK: [[AND_I:%.*]] = and <4 x i16> %a, [[NEG_I]] // CHECK: ret <4 x i16> [[AND_I]] @@ -428,7 +428,7 @@ uint16x4_t test_vbic_u16(uint16x4_t a, uint16x4_t b) { return vbic_u16(a, b); } -// CHECK-LABEL: define <8 x i16> @test_vbicq_u16(<8 x i16> %a, <8 x i16> %b) #1 { +// CHECK-LABEL: define dso_local <8 x i16> @test_vbicq_u16(<8 x i16> %a, <8 x i16> %b) #1 { // CHECK: [[NEG_I:%.*]] = xor <8 x i16> %b, <i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1> // CHECK: [[AND_I:%.*]] = and <8 x i16> %a, [[NEG_I]] // CHECK: ret <8 x i16> [[AND_I]] @@ -436,7 +436,7 @@ uint16x8_t test_vbicq_u16(uint16x8_t a, uint16x8_t b) { return vbicq_u16(a, b); } -// CHECK-LABEL: define <2 x i32> @test_vbic_u32(<2 x i32> %a, <2 x i32> %b) #0 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vbic_u32(<2 x i32> %a, <2 x i32> %b) #0 { // CHECK: [[NEG_I:%.*]] = xor <2 x i32> %b, <i32 -1, i32 -1> // CHECK: [[AND_I:%.*]] = and <2 x i32> %a, [[NEG_I]] // CHECK: ret <2 x i32> [[AND_I]] @@ -444,7 +444,7 @@ uint32x2_t test_vbic_u32(uint32x2_t a, uint32x2_t b) { return vbic_u32(a, b); } -// CHECK-LABEL: define <4 x i32> @test_vbicq_u32(<4 x i32> %a, <4 x i32> %b) #1 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vbicq_u32(<4 x i32> %a, <4 x i32> %b) #1 { // CHECK: [[NEG_I:%.*]] = xor <4 x i32> %b, <i32 -1, i32 -1, i32 -1, i32 -1> // CHECK: [[AND_I:%.*]] = and <4 x i32> %a, [[NEG_I]] // CHECK: ret <4 x i32> [[AND_I]] @@ -452,7 +452,7 @@ uint32x4_t test_vbicq_u32(uint32x4_t a, uint32x4_t b) { return vbicq_u32(a, b); } -// CHECK-LABEL: define <1 x i64> @test_vbic_u64(<1 x i64> %a, <1 x i64> %b) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vbic_u64(<1 x i64> %a, <1 x i64> %b) #0 { // CHECK: [[NEG_I:%.*]] = xor <1 x i64> %b, <i64 -1> // CHECK: [[AND_I:%.*]] = and <1 x i64> %a, [[NEG_I]] // CHECK: ret <1 x i64> [[AND_I]] @@ -460,7 +460,7 @@ uint64x1_t test_vbic_u64(uint64x1_t a, uint64x1_t b) { return vbic_u64(a, b); } -// CHECK-LABEL: define <2 x i64> @test_vbicq_u64(<2 x i64> %a, <2 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vbicq_u64(<2 x i64> %a, <2 x i64> %b) #1 { // CHECK: [[NEG_I:%.*]] = xor <2 x i64> %b, <i64 -1, i64 -1> // CHECK: [[AND_I:%.*]] = and <2 x i64> %a, [[NEG_I]] // CHECK: ret <2 x i64> [[AND_I]] @@ -468,7 +468,7 @@ uint64x2_t test_vbicq_u64(uint64x2_t a, uint64x2_t b) { return vbicq_u64(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vorn_s8(<8 x i8> %a, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vorn_s8(<8 x i8> %a, <8 x i8> %b) #0 { // CHECK: [[NEG_I:%.*]] = xor <8 x i8> %b, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1> // CHECK: [[OR_I:%.*]] = or <8 x i8> %a, [[NEG_I]] // CHECK: ret <8 x i8> [[OR_I]] @@ -476,7 +476,7 @@ int8x8_t test_vorn_s8(int8x8_t a, int8x8_t b) { return vorn_s8(a, b); } -// CHECK-LABEL: define <16 x i8> @test_vornq_s8(<16 x i8> %a, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vornq_s8(<16 x i8> %a, <16 x i8> %b) #1 { // CHECK: [[NEG_I:%.*]] = xor <16 x i8> %b, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1> // CHECK: [[OR_I:%.*]] = or <16 x i8> %a, [[NEG_I]] // CHECK: ret <16 x i8> [[OR_I]] @@ -484,7 +484,7 @@ int8x16_t test_vornq_s8(int8x16_t a, int8x16_t b) { return vornq_s8(a, b); } -// CHECK-LABEL: define <4 x i16> @test_vorn_s16(<4 x i16> %a, <4 x i16> %b) #0 { +// CHECK-LABEL: define dso_local <4 x i16> @test_vorn_s16(<4 x i16> %a, <4 x i16> %b) #0 { // CHECK: [[NEG_I:%.*]] = xor <4 x i16> %b, <i16 -1, i16 -1, i16 -1, i16 -1> // CHECK: [[OR_I:%.*]] = or <4 x i16> %a, [[NEG_I]] // CHECK: ret <4 x i16> [[OR_I]] @@ -492,7 +492,7 @@ int16x4_t test_vorn_s16(int16x4_t a, int16x4_t b) { return vorn_s16(a, b); } -// CHECK-LABEL: define <8 x i16> @test_vornq_s16(<8 x i16> %a, <8 x i16> %b) #1 { +// CHECK-LABEL: define dso_local <8 x i16> @test_vornq_s16(<8 x i16> %a, <8 x i16> %b) #1 { // CHECK: [[NEG_I:%.*]] = xor <8 x i16> %b, <i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1> // CHECK: [[OR_I:%.*]] = or <8 x i16> %a, [[NEG_I]] // CHECK: ret <8 x i16> [[OR_I]] @@ -500,7 +500,7 @@ int16x8_t test_vornq_s16(int16x8_t a, int16x8_t b) { return vornq_s16(a, b); } -// CHECK-LABEL: define <2 x i32> @test_vorn_s32(<2 x i32> %a, <2 x i32> %b) #0 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vorn_s32(<2 x i32> %a, <2 x i32> %b) #0 { // CHECK: [[NEG_I:%.*]] = xor <2 x i32> %b, <i32 -1, i32 -1> // CHECK: [[OR_I:%.*]] = or <2 x i32> %a, [[NEG_I]] // CHECK: ret <2 x i32> [[OR_I]] @@ -508,7 +508,7 @@ int32x2_t test_vorn_s32(int32x2_t a, int32x2_t b) { return vorn_s32(a, b); } -// CHECK-LABEL: define <4 x i32> @test_vornq_s32(<4 x i32> %a, <4 x i32> %b) #1 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vornq_s32(<4 x i32> %a, <4 x i32> %b) #1 { // CHECK: [[NEG_I:%.*]] = xor <4 x i32> %b, <i32 -1, i32 -1, i32 -1, i32 -1> // CHECK: [[OR_I:%.*]] = or <4 x i32> %a, [[NEG_I]] // CHECK: ret <4 x i32> [[OR_I]] @@ -516,7 +516,7 @@ int32x4_t test_vornq_s32(int32x4_t a, int32x4_t b) { return vornq_s32(a, b); } -// CHECK-LABEL: define <1 x i64> @test_vorn_s64(<1 x i64> %a, <1 x i64> %b) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vorn_s64(<1 x i64> %a, <1 x i64> %b) #0 { // CHECK: [[NEG_I:%.*]] = xor <1 x i64> %b, <i64 -1> // CHECK: [[OR_I:%.*]] = or <1 x i64> %a, [[NEG_I]] // CHECK: ret <1 x i64> [[OR_I]] @@ -524,7 +524,7 @@ int64x1_t test_vorn_s64(int64x1_t a, int64x1_t b) { return vorn_s64(a, b); } -// CHECK-LABEL: define <2 x i64> @test_vornq_s64(<2 x i64> %a, <2 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vornq_s64(<2 x i64> %a, <2 x i64> %b) #1 { // CHECK: [[NEG_I:%.*]] = xor <2 x i64> %b, <i64 -1, i64 -1> // CHECK: [[OR_I:%.*]] = or <2 x i64> %a, [[NEG_I]] // CHECK: ret <2 x i64> [[OR_I]] @@ -532,7 +532,7 @@ int64x2_t test_vornq_s64(int64x2_t a, int64x2_t b) { return vornq_s64(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vorn_u8(<8 x i8> %a, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vorn_u8(<8 x i8> %a, <8 x i8> %b) #0 { // CHECK: [[NEG_I:%.*]] = xor <8 x i8> %b, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1> // CHECK: [[OR_I:%.*]] = or <8 x i8> %a, [[NEG_I]] // CHECK: ret <8 x i8> [[OR_I]] @@ -540,7 +540,7 @@ uint8x8_t test_vorn_u8(uint8x8_t a, uint8x8_t b) { return vorn_u8(a, b); } -// CHECK-LABEL: define <16 x i8> @test_vornq_u8(<16 x i8> %a, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vornq_u8(<16 x i8> %a, <16 x i8> %b) #1 { // CHECK: [[NEG_I:%.*]] = xor <16 x i8> %b, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1> // CHECK: [[OR_I:%.*]] = or <16 x i8> %a, [[NEG_I]] // CHECK: ret <16 x i8> [[OR_I]] @@ -548,7 +548,7 @@ uint8x16_t test_vornq_u8(uint8x16_t a, uint8x16_t b) { return vornq_u8(a, b); } -// CHECK-LABEL: define <4 x i16> @test_vorn_u16(<4 x i16> %a, <4 x i16> %b) #0 { +// CHECK-LABEL: define dso_local <4 x i16> @test_vorn_u16(<4 x i16> %a, <4 x i16> %b) #0 { // CHECK: [[NEG_I:%.*]] = xor <4 x i16> %b, <i16 -1, i16 -1, i16 -1, i16 -1> // CHECK: [[OR_I:%.*]] = or <4 x i16> %a, [[NEG_I]] // CHECK: ret <4 x i16> [[OR_I]] @@ -556,7 +556,7 @@ uint16x4_t test_vorn_u16(uint16x4_t a, uint16x4_t b) { return vorn_u16(a, b); } -// CHECK-LABEL: define <8 x i16> @test_vornq_u16(<8 x i16> %a, <8 x i16> %b) #1 { +// CHECK-LABEL: define dso_local <8 x i16> @test_vornq_u16(<8 x i16> %a, <8 x i16> %b) #1 { // CHECK: [[NEG_I:%.*]] = xor <8 x i16> %b, <i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1> // CHECK: [[OR_I:%.*]] = or <8 x i16> %a, [[NEG_I]] // CHECK: ret <8 x i16> [[OR_I]] @@ -564,7 +564,7 @@ uint16x8_t test_vornq_u16(uint16x8_t a, uint16x8_t b) { return vornq_u16(a, b); } -// CHECK-LABEL: define <2 x i32> @test_vorn_u32(<2 x i32> %a, <2 x i32> %b) #0 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vorn_u32(<2 x i32> %a, <2 x i32> %b) #0 { // CHECK: [[NEG_I:%.*]] = xor <2 x i32> %b, <i32 -1, i32 -1> // CHECK: [[OR_I:%.*]] = or <2 x i32> %a, [[NEG_I]] // CHECK: ret <2 x i32> [[OR_I]] @@ -572,7 +572,7 @@ uint32x2_t test_vorn_u32(uint32x2_t a, uint32x2_t b) { return vorn_u32(a, b); } -// CHECK-LABEL: define <4 x i32> @test_vornq_u32(<4 x i32> %a, <4 x i32> %b) #1 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vornq_u32(<4 x i32> %a, <4 x i32> %b) #1 { // CHECK: [[NEG_I:%.*]] = xor <4 x i32> %b, <i32 -1, i32 -1, i32 -1, i32 -1> // CHECK: [[OR_I:%.*]] = or <4 x i32> %a, [[NEG_I]] // CHECK: ret <4 x i32> [[OR_I]] @@ -580,7 +580,7 @@ uint32x4_t test_vornq_u32(uint32x4_t a, uint32x4_t b) { return vornq_u32(a, b); } -// CHECK-LABEL: define <1 x i64> @test_vorn_u64(<1 x i64> %a, <1 x i64> %b) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vorn_u64(<1 x i64> %a, <1 x i64> %b) #0 { // CHECK: [[NEG_I:%.*]] = xor <1 x i64> %b, <i64 -1> // CHECK: [[OR_I:%.*]] = or <1 x i64> %a, [[NEG_I]] // CHECK: ret <1 x i64> [[OR_I]] @@ -588,7 +588,7 @@ uint64x1_t test_vorn_u64(uint64x1_t a, uint64x1_t b) { return vorn_u64(a, b); } -// CHECK-LABEL: define <2 x i64> @test_vornq_u64(<2 x i64> %a, <2 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vornq_u64(<2 x i64> %a, <2 x i64> %b) #1 { // CHECK: [[NEG_I:%.*]] = xor <2 x i64> %b, <i64 -1, i64 -1> // CHECK: [[OR_I:%.*]] = or <2 x i64> %a, [[NEG_I]] // CHECK: ret <2 x i64> [[OR_I]] diff --git a/clang/test/CodeGen/aarch64-neon-across.c b/clang/test/CodeGen/aarch64-neon-across.c index 4431d117a80b..ea56af75864a 100644 --- a/clang/test/CodeGen/aarch64-neon-across.c +++ b/clang/test/CodeGen/aarch64-neon-across.c @@ -5,7 +5,7 @@ #include <arm_neon.h> -// CHECK-LABEL: define i16 @test_vaddlv_s8(<8 x i8> %a) #0 { +// CHECK-LABEL: define dso_local i16 @test_vaddlv_s8(<8 x i8> %a) #0 { // CHECK: [[VADDLV_I:%.*]] = call i32 @llvm.aarch64.neon.saddlv.i32.v8i8(<8 x i8> %a) #3 // CHECK: [[TMP0:%.*]] = trunc i32 [[VADDLV_I]] to i16 // CHECK: ret i16 [[TMP0]] @@ -13,14 +13,14 @@ int16_t test_vaddlv_s8(int8x8_t a) { return vaddlv_s8(a); } -// CHECK-LABEL: define i32 @test_vaddlv_s16(<4 x i16> %a) #0 { +// CHECK-LABEL: define dso_local i32 @test_vaddlv_s16(<4 x i16> %a) #0 { // CHECK: [[VADDLV_I:%.*]] = call i32 @llvm.aarch64.neon.saddlv.i32.v4i16(<4 x i16> %a) #3 // CHECK: ret i32 [[VADDLV_I]] int32_t test_vaddlv_s16(int16x4_t a) { return vaddlv_s16(a); } -// CHECK-LABEL: define i16 @test_vaddlv_u8(<8 x i8> %a) #0 { +// CHECK-LABEL: define dso_local i16 @test_vaddlv_u8(<8 x i8> %a) #0 { // CHECK: [[VADDLV_I:%.*]] = call i32 @llvm.aarch64.neon.uaddlv.i32.v8i8(<8 x i8> %a) #3 // CHECK: [[TMP0:%.*]] = trunc i32 [[VADDLV_I]] to i16 // CHECK: ret i16 [[TMP0]] @@ -28,14 +28,14 @@ uint16_t test_vaddlv_u8(uint8x8_t a) { return vaddlv_u8(a); } -// CHECK-LABEL: define i32 @test_vaddlv_u16(<4 x i16> %a) #0 { +// CHECK-LABEL: define dso_local i32 @test_vaddlv_u16(<4 x i16> %a) #0 { // CHECK: [[VADDLV_I:%.*]] = call i32 @llvm.aarch64.neon.uaddlv.i32.v4i16(<4 x i16> %a) #3 // CHECK: ret i32 [[VADDLV_I]] uint32_t test_vaddlv_u16(uint16x4_t a) { return vaddlv_u16(a); } -// CHECK-LABEL: define i16 @test_vaddlvq_s8(<16 x i8> %a) #1 { +// CHECK-LABEL: define dso_local i16 @test_vaddlvq_s8(<16 x i8> %a) #1 { // CHECK: [[VADDLV_I:%.*]] = call i32 @llvm.aarch64.neon.saddlv.i32.v16i8(<16 x i8> %a) #3 // CHECK: [[TMP0:%.*]] = trunc i32 [[VADDLV_I]] to i16 // CHECK: ret i16 [[TMP0]] @@ -43,21 +43,21 @@ int16_t test_vaddlvq_s8(int8x16_t a) { return vaddlvq_s8(a); } -// CHECK-LABEL: define i32 @test_vaddlvq_s16(<8 x i16> %a) #1 { +// CHECK-LABEL: define dso_local i32 @test_vaddlvq_s16(<8 x i16> %a) #1 { // CHECK: [[VADDLV_I:%.*]] = call i32 @llvm.aarch64.neon.saddlv.i32.v8i16(<8 x i16> %a) #3 // CHECK: ret i32 [[VADDLV_I]] int32_t test_vaddlvq_s16(int16x8_t a) { return vaddlvq_s16(a); } -// CHECK-LABEL: define i64 @test_vaddlvq_s32(<4 x i32> %a) #1 { +// CHECK-LABEL: define dso_local i64 @test_vaddlvq_s32(<4 x i32> %a) #1 { // CHECK: [[VADDLVQ_S32_I:%.*]] = call i64 @llvm.aarch64.neon.saddlv.i64.v4i32(<4 x i32> %a) #3 // CHECK: ret i64 [[VADDLVQ_S32_I]] int64_t test_vaddlvq_s32(int32x4_t a) { return vaddlvq_s32(a); } -// CHECK-LABEL: define i16 @test_vaddlvq_u8(<16 x i8> %a) #1 { +// CHECK-LABEL: define dso_local i16 @test_vaddlvq_u8(<16 x i8> %a) #1 { // CHECK: [[VADDLV_I:%.*]] = call i32 @llvm.aarch64.neon.uaddlv.i32.v16i8(<16 x i8> %a) #3 // CHECK: [[TMP0:%.*]] = trunc i32 [[VADDLV_I]] to i16 // CHECK: ret i16 [[TMP0]] @@ -65,21 +65,21 @@ uint16_t test_vaddlvq_u8(uint8x16_t a) { return vaddlvq_u8(a); } -// CHECK-LABEL: define i32 @test_vaddlvq_u16(<8 x i16> %a) #1 { +// CHECK-LABEL: define dso_local i32 @test_vaddlvq_u16(<8 x i16> %a) #1 { // CHECK: [[VADDLV_I:%.*]] = call i32 @llvm.aarch64.neon.uaddlv.i32.v8i16(<8 x i16> %a) #3 // CHECK: ret i32 [[VADDLV_I]] uint32_t test_vaddlvq_u16(uint16x8_t a) { return vaddlvq_u16(a); } -// CHECK-LABEL: define i64 @test_vaddlvq_u32(<4 x i32> %a) #1 { +// CHECK-LABEL: define dso_local i64 @test_vaddlvq_u32(<4 x i32> %a) #1 { // CHECK: [[VADDLVQ_U32_I:%.*]] = call i64 @llvm.aarch64.neon.uaddlv.i64.v4i32(<4 x i32> %a) #3 // CHECK: ret i64 [[VADDLVQ_U32_I]] uint64_t test_vaddlvq_u32(uint32x4_t a) { return vaddlvq_u32(a); } -// CHECK-LABEL: define i8 @test_vmaxv_s8(<8 x i8> %a) #0 { +// CHECK-LABEL: define dso_local i8 @test_vmaxv_s8(<8 x i8> %a) #0 { // CHECK: [[VMAXV_I:%.*]] = call i32 @llvm.aarch64.neon.smaxv.i32.v8i8(<8 x i8> %a) #3 // CHECK: [[TMP0:%.*]] = trunc i32 [[VMAXV_I]] to i8 // CHECK: ret i8 [[TMP0]] @@ -87,7 +87,7 @@ int8_t test_vmaxv_s8(int8x8_t a) { return vmaxv_s8(a); } -// CHECK-LABEL: define i16 @test_vmaxv_s16(<4 x i16> %a) #0 { +// CHECK-LABEL: define dso_local i16 @test_vmaxv_s16(<4 x i16> %a) #0 { // CHECK: [[VMAXV_I:%.*]] = call i32 @llvm.aarch64.neon.smaxv.i32.v4i16(<4 x i16> %a) #3 // CHECK: [[TMP2:%.*]] = trunc i32 [[VMAXV_I]] to i16 // CHECK: ret i16 [[TMP2]] @@ -95,7 +95,7 @@ int16_t test_vmaxv_s16(int16x4_t a) { return vmaxv_s16(a); } -// CHECK-LABEL: define i8 @test_vmaxv_u8(<8 x i8> %a) #0 { +// CHECK-LABEL: define dso_local i8 @test_vmaxv_u8(<8 x i8> %a) #0 { // CHECK: [[VMAXV_I:%.*]] = call i32 @llvm.aarch64.neon.umaxv.i32.v8i8(<8 x i8> %a) #3 // CHECK: [[TMP0:%.*]] = trunc i32 [[VMAXV_I]] to i8 // CHECK: ret i8 [[TMP0]] @@ -103,7 +103,7 @@ uint8_t test_vmaxv_u8(uint8x8_t a) { return vmaxv_u8(a); } -// CHECK-LABEL: define i16 @test_vmaxv_u16(<4 x i16> %a) #0 { +// CHECK-LABEL: define dso_local i16 @test_vmaxv_u16(<4 x i16> %a) #0 { // CHECK: [[VMAXV_I:%.*]] = call i32 @llvm.aarch64.neon.umaxv.i32.v4i16(<4 x i16> %a) #3 // CHECK: [[TMP2:%.*]] = trunc i32 [[VMAXV_I]] to i16 // CHECK: ret i16 [[TMP2]] @@ -111,7 +111,7 @@ uint16_t test_vmaxv_u16(uint16x4_t a) { return vmaxv_u16(a); } -// CHECK-LABEL: define i8 @test_vmaxvq_s8(<16 x i8> %a) #1 { +// CHECK-LABEL: define dso_local i8 @test_vmaxvq_s8(<16 x i8> %a) #1 { // CHECK: [[VMAXV_I:%.*]] = call i32 @llvm.aarch64.neon.smaxv.i32.v16i8(<16 x i8> %a) #3 // CHECK: [[TMP0:%.*]] = trunc i32 [[VMAXV_I]] to i8 // CHECK: ret i8 [[TMP0]] @@ -119,7 +119,7 @@ int8_t test_vmaxvq_s8(int8x16_t a) { return vmaxvq_s8(a); } -// CHECK-LABEL: define i16 @test_vmaxvq_s16(<8 x i16> %a) #1 { +// CHECK-LABEL: define dso_local i16 @test_vmaxvq_s16(<8 x i16> %a) #1 { // CHECK: [[VMAXV_I:%.*]] = call i32 @llvm.aarch64.neon.smaxv.i32.v8i16(<8 x i16> %a) #3 // CHECK: [[TMP2:%.*]] = trunc i32 [[VMAXV_I]] to i16 // CHECK: ret i16 [[TMP2]] @@ -127,14 +127,14 @@ int16_t test_vmaxvq_s16(int16x8_t a) { return vmaxvq_s16(a); } -// CHECK-LABEL: define i32 @test_vmaxvq_s32(<4 x i32> %a) #1 { +// CHECK-LABEL: define dso_local i32 @test_vmaxvq_s32(<4 x i32> %a) #1 { // CHECK: [[VMAXVQ_S32_I:%.*]] = call i32 @llvm.aarch64.neon.smaxv.i32.v4i32(<4 x i32> %a) #3 // CHECK: ret i32 [[VMAXVQ_S32_I]] int32_t test_vmaxvq_s32(int32x4_t a) { return vmaxvq_s32(a); } -// CHECK-LABEL: define i8 @test_vmaxvq_u8(<16 x i8> %a) #1 { +// CHECK-LABEL: define dso_local i8 @test_vmaxvq_u8(<16 x i8> %a) #1 { // CHECK: [[VMAXV_I:%.*]] = call i32 @llvm.aarch64.neon.umaxv.i32.v16i8(<16 x i8> %a) #3 // CHECK: [[TMP0:%.*]] = trunc i32 [[VMAXV_I]] to i8 // CHECK: ret i8 [[TMP0]] @@ -142,7 +142,7 @@ uint8_t test_vmaxvq_u8(uint8x16_t a) { return vmaxvq_u8(a); } -// CHECK-LABEL: define i16 @test_vmaxvq_u16(<8 x i16> %a) #1 { +// CHECK-LABEL: define dso_local i16 @test_vmaxvq_u16(<8 x i16> %a) #1 { // CHECK: [[VMAXV_I:%.*]] = call i32 @llvm.aarch64.neon.umaxv.i32.v8i16(<8 x i16> %a) #3 // CHECK: [[TMP2:%.*]] = trunc i32 [[VMAXV_I]] to i16 // CHECK: ret i16 [[TMP2]] @@ -150,14 +150,14 @@ uint16_t test_vmaxvq_u16(uint16x8_t a) { return vmaxvq_u16(a); } -// CHECK-LABEL: define i32 @test_vmaxvq_u32(<4 x i32> %a) #1 { +// CHECK-LABEL: define dso_local i32 @test_vmaxvq_u32(<4 x i32> %a) #1 { // CHECK: [[VMAXVQ_U32_I:%.*]] = call i32 @llvm.aarch64.neon.umaxv.i32.v4i32(<4 x i32> %a) #3 // CHECK: ret i32 [[VMAXVQ_U32_I]] uint32_t test_vmaxvq_u32(uint32x4_t a) { return vmaxvq_u32(a); } -// CHECK-LABEL: define i8 @test_vminv_s8(<8 x i8> %a) #0 { +// CHECK-LABEL: define dso_local i8 @test_vminv_s8(<8 x i8> %a) #0 { // CHECK: [[VMINV_I:%.*]] = call i32 @llvm.aarch64.neon.sminv.i32.v8i8(<8 x i8> %a) #3 // CHECK: [[TMP0:%.*]] = trunc i32 [[VMINV_I]] to i8 // CHECK: ret i8 [[TMP0]] @@ -165,7 +165,7 @@ int8_t test_vminv_s8(int8x8_t a) { return vminv_s8(a); } -// CHECK-LABEL: define i16 @test_vminv_s16(<4 x i16> %a) #0 { +// CHECK-LABEL: define dso_local i16 @test_vminv_s16(<4 x i16> %a) #0 { // CHECK: [[VMINV_I:%.*]] = call i32 @llvm.aarch64.neon.sminv.i32.v4i16(<4 x i16> %a) #3 // CHECK: [[TMP2:%.*]] = trunc i32 [[VMINV_I]] to i16 // CHECK: ret i16 [[TMP2]] @@ -173,7 +173,7 @@ int16_t test_vminv_s16(int16x4_t a) { return vminv_s16(a); } -// CHECK-LABEL: define i8 @test_vminv_u8(<8 x i8> %a) #0 { +// CHECK-LABEL: define dso_local i8 @test_vminv_u8(<8 x i8> %a) #0 { // CHECK: [[VMINV_I:%.*]] = call i32 @llvm.aarch64.neon.uminv.i32.v8i8(<8 x i8> %a) #3 // CHECK: [[TMP0:%.*]] = trunc i32 [[VMINV_I]] to i8 // CHECK: ret i8 [[TMP0]] @@ -181,7 +181,7 @@ uint8_t test_vminv_u8(uint8x8_t a) { return vminv_u8(a); } -// CHECK-LABEL: define i16 @test_vminv_u16(<4 x i16> %a) #0 { +// CHECK-LABEL: define dso_local i16 @test_vminv_u16(<4 x i16> %a) #0 { // CHECK: [[VMINV_I:%.*]] = call i32 @llvm.aarch64.neon.uminv.i32.v4i16(<4 x i16> %a) #3 // CHECK: [[TMP2:%.*]] = trunc i32 [[VMINV_I]] to i16 // CHECK: ret i16 [[TMP2]] @@ -189,7 +189,7 @@ uint16_t test_vminv_u16(uint16x4_t a) { return vminv_u16(a); } -// CHECK-LABEL: define i8 @test_vminvq_s8(<16 x i8> %a) #1 { +// CHECK-LABEL: define dso_local i8 @test_vminvq_s8(<16 x i8> %a) #1 { // CHECK: [[VMINV_I:%.*]] = call i32 @llvm.aarch64.neon.sminv.i32.v16i8(<16 x i8> %a) #3 // CHECK: [[TMP0:%.*]] = trunc i32 [[VMINV_I]] to i8 // CHECK: ret i8 [[TMP0]] @@ -197,7 +197,7 @@ int8_t test_vminvq_s8(int8x16_t a) { return vminvq_s8(a); } -// CHECK-LABEL: define i16 @test_vminvq_s16(<8 x i16> %a) #1 { +// CHECK-LABEL: define dso_local i16 @test_vminvq_s16(<8 x i16> %a) #1 { // CHECK: [[VMINV_I:%.*]] = call i32 @llvm.aarch64.neon.sminv.i32.v8i16(<8 x i16> %a) #3 // CHECK: [[TMP2:%.*]] = trunc i32 [[VMINV_I]] to i16 // CHECK: ret i16 [[TMP2]] @@ -205,14 +205,14 @@ int16_t test_vminvq_s16(int16x8_t a) { return vminvq_s16(a); } -// CHECK-LABEL: define i32 @test_vminvq_s32(<4 x i32> %a) #1 { +// CHECK-LABEL: define dso_local i32 @test_vminvq_s32(<4 x i32> %a) #1 { // CHECK: [[VMINVQ_S32_I:%.*]] = call i32 @llvm.aarch64.neon.sminv.i32.v4i32(<4 x i32> %a) #3 // CHECK: ret i32 [[VMINVQ_S32_I]] int32_t test_vminvq_s32(int32x4_t a) { return vminvq_s32(a); } -// CHECK-LABEL: define i8 @test_vminvq_u8(<16 x i8> %a) #1 { +// CHECK-LABEL: define dso_local i8 @test_vminvq_u8(<16 x i8> %a) #1 { // CHECK: [[VMINV_I:%.*]] = call i32 @llvm.aarch64.neon.uminv.i32.v16i8(<16 x i8> %a) #3 // CHECK: [[TMP0:%.*]] = trunc i32 [[VMINV_I]] to i8 // CHECK: ret i8 [[TMP0]] @@ -220,7 +220,7 @@ uint8_t test_vminvq_u8(uint8x16_t a) { return vminvq_u8(a); } -// CHECK-LABEL: define i16 @test_vminvq_u16(<8 x i16> %a) #1 { +// CHECK-LABEL: define dso_local i16 @test_vminvq_u16(<8 x i16> %a) #1 { // CHECK: [[VMINV_I:%.*]] = call i32 @llvm.aarch64.neon.uminv.i32.v8i16(<8 x i16> %a) #3 // CHECK: [[TMP2:%.*]] = trunc i32 [[VMINV_I]] to i16 // CHECK: ret i16 [[TMP2]] @@ -228,14 +228,14 @@ uint16_t test_vminvq_u16(uint16x8_t a) { return vminvq_u16(a); } -// CHECK-LABEL: define i32 @test_vminvq_u32(<4 x i32> %a) #1 { +// CHECK-LABEL: define dso_local i32 @test_vminvq_u32(<4 x i32> %a) #1 { // CHECK: [[VMINVQ_U32_I:%.*]] = call i32 @llvm.aarch64.neon.uminv.i32.v4i32(<4 x i32> %a) #3 // CHECK: ret i32 [[VMINVQ_U32_I]] uint32_t test_vminvq_u32(uint32x4_t a) { return vminvq_u32(a); } -// CHECK-LABEL: define i8 @test_vaddv_s8(<8 x i8> %a) #0 { +// CHECK-LABEL: define dso_local i8 @test_vaddv_s8(<8 x i8> %a) #0 { // CHECK: [[VADDV_I:%.*]] = call i32 @llvm.aarch64.neon.saddv.i32.v8i8(<8 x i8> %a) #3 // CHECK: [[TMP0:%.*]] = trunc i32 [[VADDV_I]] to i8 // CHECK: ret i8 [[TMP0]] @@ -243,7 +243,7 @@ int8_t test_vaddv_s8(int8x8_t a) { return vaddv_s8(a); } -// CHECK-LABEL: define i16 @test_vaddv_s16(<4 x i16> %a) #0 { +// CHECK-LABEL: define dso_local i16 @test_vaddv_s16(<4 x i16> %a) #0 { // CHECK: [[VADDV_I:%.*]] = call i32 @llvm.aarch64.neon.saddv.i32.v4i16(<4 x i16> %a) #3 // CHECK: [[TMP2:%.*]] = trunc i32 [[VADDV_I]] to i16 // CHECK: ret i16 [[TMP2]] @@ -251,7 +251,7 @@ int16_t test_vaddv_s16(int16x4_t a) { return vaddv_s16(a); } -// CHECK-LABEL: define i8 @test_vaddv_u8(<8 x i8> %a) #0 { +// CHECK-LABEL: define dso_local i8 @test_vaddv_u8(<8 x i8> %a) #0 { // CHECK: [[VADDV_I:%.*]] = call i32 @llvm.aarch64.neon.uaddv.i32.v8i8(<8 x i8> %a) #3 // CHECK: [[TMP0:%.*]] = trunc i32 [[VADDV_I]] to i8 // CHECK: ret i8 [[TMP0]] @@ -259,7 +259,7 @@ uint8_t test_vaddv_u8(uint8x8_t a) { return vaddv_u8(a); } -// CHECK-LABEL: define i16 @test_vaddv_u16(<4 x i16> %a) #0 { +// CHECK-LABEL: define dso_local i16 @test_vaddv_u16(<4 x i16> %a) #0 { // CHECK: [[VADDV_I:%.*]] = call i32 @llvm.aarch64.neon.uaddv.i32.v4i16(<4 x i16> %a) #3 // CHECK: [[TMP2:%.*]] = trunc i32 [[VADDV_I]] to i16 // CHECK: ret i16 [[TMP2]] @@ -267,7 +267,7 @@ uint16_t test_vaddv_u16(uint16x4_t a) { return vaddv_u16(a); } -// CHECK-LABEL: define i8 @test_vaddvq_s8(<16 x i8> %a) #1 { +// CHECK-LABEL: define dso_local i8 @test_vaddvq_s8(<16 x i8> %a) #1 { // CHECK: [[VADDV_I:%.*]] = call i32 @llvm.aarch64.neon.saddv.i32.v16i8(<16 x i8> %a) #3 // CHECK: [[TMP0:%.*]] = trunc i32 [[VADDV_I]] to i8 // CHECK: ret i8 [[TMP0]] @@ -275,7 +275,7 @@ int8_t test_vaddvq_s8(int8x16_t a) { return vaddvq_s8(a); } -// CHECK-LABEL: define i16 @test_vaddvq_s16(<8 x i16> %a) #1 { +// CHECK-LABEL: define dso_local i16 @test_vaddvq_s16(<8 x i16> %a) #1 { // CHECK: [[VADDV_I:%.*]] = call i32 @llvm.aarch64.neon.saddv.i32.v8i16(<8 x i16> %a) #3 // CHECK: [[TMP2:%.*]] = trunc i32 [[VADDV_I]] to i16 // CHECK: ret i16 [[TMP2]] @@ -283,14 +283,14 @@ int16_t test_vaddvq_s16(int16x8_t a) { return vaddvq_s16(a); } -// CHECK-LABEL: define i32 @test_vaddvq_s32(<4 x i32> %a) #1 { +// CHECK-LABEL: define dso_local i32 @test_vaddvq_s32(<4 x i32> %a) #1 { // CHECK: [[VADDVQ_S32_I:%.*]] = call i32 @llvm.aarch64.neon.saddv.i32.v4i32(<4 x i32> %a) #3 // CHECK: ret i32 [[VADDVQ_S32_I]] int32_t test_vaddvq_s32(int32x4_t a) { return vaddvq_s32(a); } -// CHECK-LABEL: define i8 @test_vaddvq_u8(<16 x i8> %a) #1 { +// CHECK-LABEL: define dso_local i8 @test_vaddvq_u8(<16 x i8> %a) #1 { // CHECK: [[VADDV_I:%.*]] = call i32 @llvm.aarch64.neon.uaddv.i32.v16i8(<16 x i8> %a) #3 // CHECK: [[TMP0:%.*]] = trunc i32 [[VADDV_I]] to i8 // CHECK: ret i8 [[TMP0]] @@ -298,7 +298,7 @@ uint8_t test_vaddvq_u8(uint8x16_t a) { return vaddvq_u8(a); } -// CHECK-LABEL: define i16 @test_vaddvq_u16(<8 x i16> %a) #1 { +// CHECK-LABEL: define dso_local i16 @test_vaddvq_u16(<8 x i16> %a) #1 { // CHECK: [[VADDV_I:%.*]] = call i32 @llvm.aarch64.neon.uaddv.i32.v8i16(<8 x i16> %a) #3 // CHECK: [[TMP2:%.*]] = trunc i32 [[VADDV_I]] to i16 // CHECK: ret i16 [[TMP2]] @@ -306,35 +306,35 @@ uint16_t test_vaddvq_u16(uint16x8_t a) { return vaddvq_u16(a); } -// CHECK-LABEL: define i32 @test_vaddvq_u32(<4 x i32> %a) #1 { +// CHECK-LABEL: define dso_local i32 @test_vaddvq_u32(<4 x i32> %a) #1 { // CHECK: [[VADDVQ_U32_I:%.*]] = call i32 @llvm.aarch64.neon.uaddv.i32.v4i32(<4 x i32> %a) #3 // CHECK: ret i32 [[VADDVQ_U32_I]] uint32_t test_vaddvq_u32(uint32x4_t a) { return vaddvq_u32(a); } -// CHECK-LABEL: define float @test_vmaxvq_f32(<4 x float> %a) #1 { +// CHECK-LABEL: define dso_local float @test_vmaxvq_f32(<4 x float> %a) #1 { // CHECK: [[VMAXVQ_F32_I:%.*]] = call float @llvm.aarch64.neon.fmaxv.f32.v4f32(<4 x float> %a) #3 // CHECK: ret float [[VMAXVQ_F32_I]] float32_t test_vmaxvq_f32(float32x4_t a) { return vmaxvq_f32(a); } -// CHECK-LABEL: define float @test_vminvq_f32(<4 x float> %a) #1 { +// CHECK-LABEL: define dso_local float @test_vminvq_f32(<4 x float> %a) #1 { // CHECK: [[VMINVQ_F32_I:%.*]] = call float @llvm.aarch64.neon.fminv.f32.v4f32(<4 x float> %a) #3 // CHECK: ret float [[VMINVQ_F32_I]] float32_t test_vminvq_f32(float32x4_t a) { return vminvq_f32(a); } -// CHECK-LABEL: define float @test_vmaxnmvq_f32(<4 x float> %a) #1 { +// CHECK-LABEL: define dso_local float @test_vmaxnmvq_f32(<4 x float> %a) #1 { // CHECK: [[VMAXNMVQ_F32_I:%.*]] = call float @llvm.aarch64.neon.fmaxnmv.f32.v4f32(<4 x float> %a) #3 // CHECK: ret float [[VMAXNMVQ_F32_I]] float32_t test_vmaxnmvq_f32(float32x4_t a) { return vmaxnmvq_f32(a); } -// CHECK-LABEL: define float @test_vminnmvq_f32(<4 x float> %a) #1 { +// CHECK-LABEL: define dso_local float @test_vminnmvq_f32(<4 x float> %a) #1 { // CHECK: [[VMINNMVQ_F32_I:%.*]] = call float @llvm.aarch64.neon.fminnmv.f32.v4f32(<4 x float> %a) #3 // CHECK: ret float [[VMINNMVQ_F32_I]] float32_t test_vminnmvq_f32(float32x4_t a) { diff --git a/clang/test/CodeGen/aarch64-neon-dot-product.c b/clang/test/CodeGen/aarch64-neon-dot-product.c index de18db5655c1..bed615e16c7a 100644 --- a/clang/test/CodeGen/aarch64-neon-dot-product.c +++ b/clang/test/CodeGen/aarch64-neon-dot-product.c @@ -8,35 +8,35 @@ #include <arm_neon.h> uint32x2_t test_vdot_u32(uint32x2_t a, uint8x8_t b, uint8x8_t c) { -// CHECK-LABEL: define <2 x i32> @test_vdot_u32(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) +// CHECK-LABEL: define dso_local <2 x i32> @test_vdot_u32(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) // CHECK: [[RESULT:%.*]] = call <2 x i32> @llvm.aarch64.neon.udot.v2i32.v8i8(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) // CHECK: ret <2 x i32> [[RESULT]] return vdot_u32(a, b, c); } uint32x4_t test_vdotq_u32(uint32x4_t a, uint8x16_t b, uint8x16_t c) { -// CHECK-LABEL: define <4 x i32> @test_vdotq_u32(<4 x i32> %a, <16 x i8> %b, <16 x i8> %c) +// CHECK-LABEL: define dso_local <4 x i32> @test_vdotq_u32(<4 x i32> %a, <16 x i8> %b, <16 x i8> %c) // CHECK: [[RESULT:%.*]] = call <4 x i32> @llvm.aarch64.neon.udot.v4i32.v16i8(<4 x i32> %a, <16 x i8> %b, <16 x i8> %c) // CHECK: ret <4 x i32> [[RESULT]] return vdotq_u32(a, b, c); } int32x2_t test_vdot_s32(int32x2_t a, int8x8_t b, int8x8_t c) { -// CHECK-LABEL: define <2 x i32> @test_vdot_s32(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) +// CHECK-LABEL: define dso_local <2 x i32> @test_vdot_s32(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) // CHECK: [[RESULT:%.*]] = call <2 x i32> @llvm.aarch64.neon.sdot.v2i32.v8i8(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) // CHECK: ret <2 x i32> [[RESULT]] return vdot_s32(a, b, c); } int32x4_t test_vdotq_s32(int32x4_t a, int8x16_t b, int8x16_t c) { -// CHECK-LABEL: define <4 x i32> @test_vdotq_s32(<4 x i32> %a, <16 x i8> %b, <16 x i8> %c) +// CHECK-LABEL: define dso_local <4 x i32> @test_vdotq_s32(<4 x i32> %a, <16 x i8> %b, <16 x i8> %c) // CHECK: [[RESULT:%.*]] = call <4 x i32> @llvm.aarch64.neon.sdot.v4i32.v16i8(<4 x i32> %a, <16 x i8> %b, <16 x i8> %c) // CHECK: ret <4 x i32> [[RESULT]] return vdotq_s32(a, b, c); } uint32x2_t test_vdot_lane_u32(uint32x2_t a, uint8x8_t b, uint8x8_t c) { -// CHECK-LABEL: define <2 x i32> @test_vdot_lane_u32(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) +// CHECK-LABEL: define dso_local <2 x i32> @test_vdot_lane_u32(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) // CHECK: [[CAST1:%.*]] = bitcast <8 x i8> %c to <2 x i32> // CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x i32> [[CAST1]], <2 x i32> undef, <2 x i32> <i32 1, i32 1> // CHECK: [[CAST2:%.*]] = bitcast <2 x i32> [[SHUFFLE]] to <8 x i8> @@ -46,7 +46,7 @@ uint32x2_t test_vdot_lane_u32(uint32x2_t a, uint8x8_t b, uint8x8_t c) { } uint32x4_t test_vdotq_lane_u32(uint32x4_t a, uint8x16_t b, uint8x8_t c) { -// CHECK-LABEL: define <4 x i32> @test_vdotq_lane_u32(<4 x i32> %a, <16 x i8> %b, <8 x i8> %c) +// CHECK-LABEL: define dso_local <4 x i32> @test_vdotq_lane_u32(<4 x i32> %a, <16 x i8> %b, <8 x i8> %c) // CHECK: [[CAST1:%.*]] = bitcast <8 x i8> %c to <2 x i32> // CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x i32> [[CAST1]], <2 x i32> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> // CHECK: [[CAST2:%.*]] = bitcast <4 x i32> [[SHUFFLE]] to <16 x i8> @@ -56,7 +56,7 @@ uint32x4_t test_vdotq_lane_u32(uint32x4_t a, uint8x16_t b, uint8x8_t c) { } uint32x2_t test_vdot_laneq_u32(uint32x2_t a, uint8x8_t b, uint8x16_t c) { -// CHECK-LABEL: define <2 x i32> @test_vdot_laneq_u32(<2 x i32> %a, <8 x i8> %b, <16 x i8> %c) +// CHECK-LABEL: define dso_local <2 x i32> @test_vdot_laneq_u32(<2 x i32> %a, <8 x i8> %b, <16 x i8> %c) // CHECK: [[CAST1:%.*]] = bitcast <16 x i8> %c to <4 x i32> // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x i32> [[CAST1]], <4 x i32> undef, <2 x i32> <i32 1, i32 1> // CHECK: [[CAST2:%.*]] = bitcast <2 x i32> [[SHUFFLE]] to <8 x i8> @@ -66,7 +66,7 @@ uint32x2_t test_vdot_laneq_u32(uint32x2_t a, uint8x8_t b, uint8x16_t c) { } uint32x4_t test_vdotq_laneq_u32(uint32x4_t a, uint8x16_t b, uint8x16_t c) { -// CHECK-LABEL: define <4 x i32> @test_vdotq_laneq_u32(<4 x i32> %a, <16 x i8> %b, <16 x i8> %c) +// CHECK-LABEL: define dso_local <4 x i32> @test_vdotq_laneq_u32(<4 x i32> %a, <16 x i8> %b, <16 x i8> %c) // CHECK: [[CAST1:%.*]] = bitcast <16 x i8> %c to <4 x i32> // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x i32> [[CAST1]], <4 x i32> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> // CHECK: [[CAST2:%.*]] = bitcast <4 x i32> [[SHUFFLE]] to <16 x i8> @@ -76,7 +76,7 @@ uint32x4_t test_vdotq_laneq_u32(uint32x4_t a, uint8x16_t b, uint8x16_t c) { } int32x2_t test_vdot_lane_s32(int32x2_t a, int8x8_t b, int8x8_t c) { -// CHECK-LABEL: define <2 x i32> @test_vdot_lane_s32(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) +// CHECK-LABEL: define dso_local <2 x i32> @test_vdot_lane_s32(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) // CHECK: [[CAST1:%.*]] = bitcast <8 x i8> %c to <2 x i32> // CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x i32> [[CAST1]], <2 x i32> undef, <2 x i32> <i32 1, i32 1> // CHECK: [[CAST2:%.*]] = bitcast <2 x i32> [[SHUFFLE]] to <8 x i8> @@ -86,7 +86,7 @@ int32x2_t test_vdot_lane_s32(int32x2_t a, int8x8_t b, int8x8_t c) { } int32x4_t test_vdotq_lane_s32(int32x4_t a, int8x16_t b, int8x8_t c) { -// CHECK-LABEL: define <4 x i32> @test_vdotq_lane_s32(<4 x i32> %a, <16 x i8> %b, <8 x i8> %c) +// CHECK-LABEL: define dso_local <4 x i32> @test_vdotq_lane_s32(<4 x i32> %a, <16 x i8> %b, <8 x i8> %c) // CHECK: [[CAST1:%.*]] = bitcast <8 x i8> %c to <2 x i32> // CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x i32> [[CAST1]], <2 x i32> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> // CHECK: [[CAST2:%.*]] = bitcast <4 x i32> [[SHUFFLE]] to <16 x i8> @@ -96,7 +96,7 @@ int32x4_t test_vdotq_lane_s32(int32x4_t a, int8x16_t b, int8x8_t c) { } int32x2_t test_vdot_laneq_s32(int32x2_t a, int8x8_t b, int8x16_t c) { -// CHECK-LABEL: define <2 x i32> @test_vdot_laneq_s32(<2 x i32> %a, <8 x i8> %b, <16 x i8> %c) +// CHECK-LABEL: define dso_local <2 x i32> @test_vdot_laneq_s32(<2 x i32> %a, <8 x i8> %b, <16 x i8> %c) // CHECK: [[CAST1:%.*]] = bitcast <16 x i8> %c to <4 x i32> // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x i32> [[CAST1]], <4 x i32> undef, <2 x i32> <i32 1, i32 1> // CHECK: [[CAST2:%.*]] = bitcast <2 x i32> [[SHUFFLE]] to <8 x i8> @@ -106,7 +106,7 @@ int32x2_t test_vdot_laneq_s32(int32x2_t a, int8x8_t b, int8x16_t c) { } int32x4_t test_vdotq_laneq_s32(int32x4_t a, int8x16_t b, int8x16_t c) { -// CHECK-LABEL: define <4 x i32> @test_vdotq_laneq_s32(<4 x i32> %a, <16 x i8> %b, <16 x i8> %c) +// CHECK-LABEL: define dso_local <4 x i32> @test_vdotq_laneq_s32(<4 x i32> %a, <16 x i8> %b, <16 x i8> %c) // CHECK: [[CAST1:%.*]] = bitcast <16 x i8> %c to <4 x i32> // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x i32> [[CAST1]], <4 x i32> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> // CHECK: [[CAST2:%.*]] = bitcast <4 x i32> [[SHUFFLE]] to <16 x i8> diff --git a/clang/test/CodeGen/aarch64-neon-extract.c b/clang/test/CodeGen/aarch64-neon-extract.c index cd40b311390d..95082fb93c65 100644 --- a/clang/test/CodeGen/aarch64-neon-extract.c +++ b/clang/test/CodeGen/aarch64-neon-extract.c @@ -6,14 +6,14 @@ #include <arm_neon.h> -// CHECK-LABEL: define <8 x i8> @test_vext_s8(<8 x i8> %a, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vext_s8(<8 x i8> %a, <8 x i8> %b) #0 { // CHECK: [[VEXT:%.*]] = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9> // CHECK: ret <8 x i8> [[VEXT]] int8x8_t test_vext_s8(int8x8_t a, int8x8_t b) { return vext_s8(a, b, 2); } -// CHECK-LABEL: define <4 x i16> @test_vext_s16(<4 x i16> %a, <4 x i16> %b) #0 { +// CHECK-LABEL: define dso_local <4 x i16> @test_vext_s16(<4 x i16> %a, <4 x i16> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast <4 x i16> %a to <8 x i8> // CHECK: [[TMP1:%.*]] = bitcast <4 x i16> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP0]] to <4 x i16> @@ -24,7 +24,7 @@ int16x4_t test_vext_s16(int16x4_t a, int16x4_t b) { return vext_s16(a, b, 3); } -// CHECK-LABEL: define <2 x i32> @test_vext_s32(<2 x i32> %a, <2 x i32> %b) #0 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vext_s32(<2 x i32> %a, <2 x i32> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast <2 x i32> %a to <8 x i8> // CHECK: [[TMP1:%.*]] = bitcast <2 x i32> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP0]] to <2 x i32> @@ -35,7 +35,7 @@ int32x2_t test_vext_s32(int32x2_t a, int32x2_t b) { return vext_s32(a, b, 1); } -// CHECK-LABEL: define <1 x i64> @test_vext_s64(<1 x i64> %a, <1 x i64> %b) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vext_s64(<1 x i64> %a, <1 x i64> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast <1 x i64> %a to <8 x i8> // CHECK: [[TMP1:%.*]] = bitcast <1 x i64> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP0]] to <1 x i64> @@ -46,14 +46,14 @@ int64x1_t test_vext_s64(int64x1_t a, int64x1_t b) { return vext_s64(a, b, 0); } -// CHECK-LABEL: define <16 x i8> @test_vextq_s8(<16 x i8> %a, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vextq_s8(<16 x i8> %a, <16 x i8> %b) #1 { // CHECK: [[VEXT:%.*]] = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17> // CHECK: ret <16 x i8> [[VEXT]] int8x16_t test_vextq_s8(int8x16_t a, int8x16_t b) { return vextq_s8(a, b, 2); } -// CHECK-LABEL: define <8 x i16> @test_vextq_s16(<8 x i16> %a, <8 x i16> %b) #1 { +// CHECK-LABEL: define dso_local <8 x i16> @test_vextq_s16(<8 x i16> %a, <8 x i16> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8> // CHECK: [[TMP1:%.*]] = bitcast <8 x i16> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP0]] to <8 x i16> @@ -64,7 +64,7 @@ int16x8_t test_vextq_s16(int16x8_t a, int16x8_t b) { return vextq_s16(a, b, 3); } -// CHECK-LABEL: define <4 x i32> @test_vextq_s32(<4 x i32> %a, <4 x i32> %b) #1 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vextq_s32(<4 x i32> %a, <4 x i32> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8> // CHECK: [[TMP1:%.*]] = bitcast <4 x i32> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP0]] to <4 x i32> @@ -75,7 +75,7 @@ int32x4_t test_vextq_s32(int32x4_t a, int32x4_t b) { return vextq_s32(a, b, 1); } -// CHECK-LABEL: define <2 x i64> @test_vextq_s64(<2 x i64> %a, <2 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vextq_s64(<2 x i64> %a, <2 x i64> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast <2 x i64> %a to <16 x i8> // CHECK: [[TMP1:%.*]] = bitcast <2 x i64> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP0]] to <2 x i64> @@ -86,14 +86,14 @@ int64x2_t test_vextq_s64(int64x2_t a, int64x2_t b) { return vextq_s64(a, b, 1); } -// CHECK-LABEL: define <8 x i8> @test_vext_u8(<8 x i8> %a, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vext_u8(<8 x i8> %a, <8 x i8> %b) #0 { // CHECK: [[VEXT:%.*]] = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9> // CHECK: ret <8 x i8> [[VEXT]] uint8x8_t test_vext_u8(uint8x8_t a, uint8x8_t b) { return vext_u8(a, b, 2); } -// CHECK-LABEL: define <4 x i16> @test_vext_u16(<4 x i16> %a, <4 x i16> %b) #0 { +// CHECK-LABEL: define dso_local <4 x i16> @test_vext_u16(<4 x i16> %a, <4 x i16> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast <4 x i16> %a to <8 x i8> // CHECK: [[TMP1:%.*]] = bitcast <4 x i16> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP0]] to <4 x i16> @@ -104,7 +104,7 @@ uint16x4_t test_vext_u16(uint16x4_t a, uint16x4_t b) { return vext_u16(a, b, 3); } -// CHECK-LABEL: define <2 x i32> @test_vext_u32(<2 x i32> %a, <2 x i32> %b) #0 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vext_u32(<2 x i32> %a, <2 x i32> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast <2 x i32> %a to <8 x i8> // CHECK: [[TMP1:%.*]] = bitcast <2 x i32> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP0]] to <2 x i32> @@ -115,7 +115,7 @@ uint32x2_t test_vext_u32(uint32x2_t a, uint32x2_t b) { return vext_u32(a, b, 1); } -// CHECK-LABEL: define <1 x i64> @test_vext_u64(<1 x i64> %a, <1 x i64> %b) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vext_u64(<1 x i64> %a, <1 x i64> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast <1 x i64> %a to <8 x i8> // CHECK: [[TMP1:%.*]] = bitcast <1 x i64> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP0]] to <1 x i64> @@ -126,14 +126,14 @@ uint64x1_t test_vext_u64(uint64x1_t a, uint64x1_t b) { return vext_u64(a, b, 0); } -// CHECK-LABEL: define <16 x i8> @test_vextq_u8(<16 x i8> %a, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vextq_u8(<16 x i8> %a, <16 x i8> %b) #1 { // CHECK: [[VEXT:%.*]] = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17> // CHECK: ret <16 x i8> [[VEXT]] uint8x16_t test_vextq_u8(uint8x16_t a, uint8x16_t b) { return vextq_u8(a, b, 2); } -// CHECK-LABEL: define <8 x i16> @test_vextq_u16(<8 x i16> %a, <8 x i16> %b) #1 { +// CHECK-LABEL: define dso_local <8 x i16> @test_vextq_u16(<8 x i16> %a, <8 x i16> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8> // CHECK: [[TMP1:%.*]] = bitcast <8 x i16> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP0]] to <8 x i16> @@ -144,7 +144,7 @@ uint16x8_t test_vextq_u16(uint16x8_t a, uint16x8_t b) { return vextq_u16(a, b, 3); } -// CHECK-LABEL: define <4 x i32> @test_vextq_u32(<4 x i32> %a, <4 x i32> %b) #1 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vextq_u32(<4 x i32> %a, <4 x i32> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8> // CHECK: [[TMP1:%.*]] = bitcast <4 x i32> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP0]] to <4 x i32> @@ -155,7 +155,7 @@ uint32x4_t test_vextq_u32(uint32x4_t a, uint32x4_t b) { return vextq_u32(a, b, 1); } -// CHECK-LABEL: define <2 x i64> @test_vextq_u64(<2 x i64> %a, <2 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vextq_u64(<2 x i64> %a, <2 x i64> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast <2 x i64> %a to <16 x i8> // CHECK: [[TMP1:%.*]] = bitcast <2 x i64> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP0]] to <2 x i64> @@ -166,7 +166,7 @@ uint64x2_t test_vextq_u64(uint64x2_t a, uint64x2_t b) { return vextq_u64(a, b, 1); } -// CHECK-LABEL: define <2 x float> @test_vext_f32(<2 x float> %a, <2 x float> %b) #0 { +// CHECK-LABEL: define dso_local <2 x float> @test_vext_f32(<2 x float> %a, <2 x float> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast <2 x float> %a to <8 x i8> // CHECK: [[TMP1:%.*]] = bitcast <2 x float> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP0]] to <2 x float> @@ -177,7 +177,7 @@ float32x2_t test_vext_f32(float32x2_t a, float32x2_t b) { return vext_f32(a, b, 1); } -// CHECK-LABEL: define <1 x double> @test_vext_f64(<1 x double> %a, <1 x double> %b) #0 { +// CHECK-LABEL: define dso_local <1 x double> @test_vext_f64(<1 x double> %a, <1 x double> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast <1 x double> %a to <8 x i8> // CHECK: [[TMP1:%.*]] = bitcast <1 x double> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP0]] to <1 x double> @@ -188,7 +188,7 @@ float64x1_t test_vext_f64(float64x1_t a, float64x1_t b) { return vext_f64(a, b, 0); } -// CHECK-LABEL: define <4 x float> @test_vextq_f32(<4 x float> %a, <4 x float> %b) #1 { +// CHECK-LABEL: define dso_local <4 x float> @test_vextq_f32(<4 x float> %a, <4 x float> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast <4 x float> %a to <16 x i8> // CHECK: [[TMP1:%.*]] = bitcast <4 x float> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP0]] to <4 x float> @@ -199,7 +199,7 @@ float32x4_t test_vextq_f32(float32x4_t a, float32x4_t b) { return vextq_f32(a, b, 1); } -// CHECK-LABEL: define <2 x double> @test_vextq_f64(<2 x double> %a, <2 x double> %b) #1 { +// CHECK-LABEL: define dso_local <2 x double> @test_vextq_f64(<2 x double> %a, <2 x double> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8> // CHECK: [[TMP1:%.*]] = bitcast <2 x double> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP0]] to <2 x double> @@ -210,14 +210,14 @@ float64x2_t test_vextq_f64(float64x2_t a, float64x2_t b) { return vextq_f64(a, b, 1); } -// CHECK-LABEL: define <8 x i8> @test_vext_p8(<8 x i8> %a, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vext_p8(<8 x i8> %a, <8 x i8> %b) #0 { // CHECK: [[VEXT:%.*]] = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9> // CHECK: ret <8 x i8> [[VEXT]] poly8x8_t test_vext_p8(poly8x8_t a, poly8x8_t b) { return vext_p8(a, b, 2); } -// CHECK-LABEL: define <4 x i16> @test_vext_p16(<4 x i16> %a, <4 x i16> %b) #0 { +// CHECK-LABEL: define dso_local <4 x i16> @test_vext_p16(<4 x i16> %a, <4 x i16> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast <4 x i16> %a to <8 x i8> // CHECK: [[TMP1:%.*]] = bitcast <4 x i16> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP0]] to <4 x i16> @@ -228,14 +228,14 @@ poly16x4_t test_vext_p16(poly16x4_t a, poly16x4_t b) { return vext_p16(a, b, 3); } -// CHECK-LABEL: define <16 x i8> @test_vextq_p8(<16 x i8> %a, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vextq_p8(<16 x i8> %a, <16 x i8> %b) #1 { // CHECK: [[VEXT:%.*]] = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17> // CHECK: ret <16 x i8> [[VEXT]] poly8x16_t test_vextq_p8(poly8x16_t a, poly8x16_t b) { return vextq_p8(a, b, 2); } -// CHECK-LABEL: define <8 x i16> @test_vextq_p16(<8 x i16> %a, <8 x i16> %b) #1 { +// CHECK-LABEL: define dso_local <8 x i16> @test_vextq_p16(<8 x i16> %a, <8 x i16> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8> // CHECK: [[TMP1:%.*]] = bitcast <8 x i16> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP0]] to <8 x i16> diff --git a/clang/test/CodeGen/aarch64-neon-fcvt-intrinsics.c b/clang/test/CodeGen/aarch64-neon-fcvt-intrinsics.c index 929a6501df77..40bea7f95367 100644 --- a/clang/test/CodeGen/aarch64-neon-fcvt-intrinsics.c +++ b/clang/test/CodeGen/aarch64-neon-fcvt-intrinsics.c @@ -5,147 +5,147 @@ #include <arm_neon.h> -// CHECK-LABEL: define float @test_vcvtxd_f32_f64(double %a) #0 { +// CHECK-LABEL: define dso_local float @test_vcvtxd_f32_f64(double %a) #0 { // CHECK: [[VCVTXD_F32_F64_I:%.*]] = call float @llvm.aarch64.sisd.fcvtxn(double %a) #2 // CHECK: ret float [[VCVTXD_F32_F64_I]] float32_t test_vcvtxd_f32_f64(float64_t a) { return (float32_t)vcvtxd_f32_f64(a); } -// CHECK-LABEL: define i32 @test_vcvtas_s32_f32(float %a) #0 { +// CHECK-LABEL: define dso_local i32 @test_vcvtas_s32_f32(float %a) #0 { // CHECK: [[VCVTAS_S32_F32_I:%.*]] = call i32 @llvm.aarch64.neon.fcvtas.i32.f32(float %a) #2 // CHECK: ret i32 [[VCVTAS_S32_F32_I]] int32_t test_vcvtas_s32_f32(float32_t a) { return (int32_t)vcvtas_s32_f32(a); } -// CHECK-LABEL: define i64 @test_test_vcvtad_s64_f64(double %a) #0 { +// CHECK-LABEL: define dso_local i64 @test_test_vcvtad_s64_f64(double %a) #0 { // CHECK: [[VCVTAD_S64_F64_I:%.*]] = call i64 @llvm.aarch64.neon.fcvtas.i64.f64(double %a) #2 // CHECK: ret i64 [[VCVTAD_S64_F64_I]] int64_t test_test_vcvtad_s64_f64(float64_t a) { return (int64_t)vcvtad_s64_f64(a); } -// CHECK-LABEL: define i32 @test_vcvtas_u32_f32(float %a) #0 { +// CHECK-LABEL: define dso_local i32 @test_vcvtas_u32_f32(float %a) #0 { // CHECK: [[VCVTAS_U32_F32_I:%.*]] = call i32 @llvm.aarch64.neon.fcvtau.i32.f32(float %a) #2 // CHECK: ret i32 [[VCVTAS_U32_F32_I]] uint32_t test_vcvtas_u32_f32(float32_t a) { return (uint32_t)vcvtas_u32_f32(a); } -// CHECK-LABEL: define i64 @test_vcvtad_u64_f64(double %a) #0 { +// CHECK-LABEL: define dso_local i64 @test_vcvtad_u64_f64(double %a) #0 { // CHECK: [[VCVTAD_U64_F64_I:%.*]] = call i64 @llvm.aarch64.neon.fcvtau.i64.f64(double %a) #2 // CHECK: ret i64 [[VCVTAD_U64_F64_I]] uint64_t test_vcvtad_u64_f64(float64_t a) { return (uint64_t)vcvtad_u64_f64(a); } -// CHECK-LABEL: define i32 @test_vcvtms_s32_f32(float %a) #0 { +// CHECK-LABEL: define dso_local i32 @test_vcvtms_s32_f32(float %a) #0 { // CHECK: [[VCVTMS_S32_F32_I:%.*]] = call i32 @llvm.aarch64.neon.fcvtms.i32.f32(float %a) #2 // CHECK: ret i32 [[VCVTMS_S32_F32_I]] int32_t test_vcvtms_s32_f32(float32_t a) { return (int32_t)vcvtms_s32_f32(a); } -// CHECK-LABEL: define i64 @test_vcvtmd_s64_f64(double %a) #0 { +// CHECK-LABEL: define dso_local i64 @test_vcvtmd_s64_f64(double %a) #0 { // CHECK: [[VCVTMD_S64_F64_I:%.*]] = call i64 @llvm.aarch64.neon.fcvtms.i64.f64(double %a) #2 // CHECK: ret i64 [[VCVTMD_S64_F64_I]] int64_t test_vcvtmd_s64_f64(float64_t a) { return (int64_t)vcvtmd_s64_f64(a); } -// CHECK-LABEL: define i32 @test_vcvtms_u32_f32(float %a) #0 { +// CHECK-LABEL: define dso_local i32 @test_vcvtms_u32_f32(float %a) #0 { // CHECK: [[VCVTMS_U32_F32_I:%.*]] = call i32 @llvm.aarch64.neon.fcvtmu.i32.f32(float %a) #2 // CHECK: ret i32 [[VCVTMS_U32_F32_I]] uint32_t test_vcvtms_u32_f32(float32_t a) { return (uint32_t)vcvtms_u32_f32(a); } -// CHECK-LABEL: define i64 @test_vcvtmd_u64_f64(double %a) #0 { +// CHECK-LABEL: define dso_local i64 @test_vcvtmd_u64_f64(double %a) #0 { // CHECK: [[VCVTMD_U64_F64_I:%.*]] = call i64 @llvm.aarch64.neon.fcvtmu.i64.f64(double %a) #2 // CHECK: ret i64 [[VCVTMD_U64_F64_I]] uint64_t test_vcvtmd_u64_f64(float64_t a) { return (uint64_t)vcvtmd_u64_f64(a); } -// CHECK-LABEL: define i32 @test_vcvtns_s32_f32(float %a) #0 { +// CHECK-LABEL: define dso_local i32 @test_vcvtns_s32_f32(float %a) #0 { // CHECK: [[VCVTNS_S32_F32_I:%.*]] = call i32 @llvm.aarch64.neon.fcvtns.i32.f32(float %a) #2 // CHECK: ret i32 [[VCVTNS_S32_F32_I]] int32_t test_vcvtns_s32_f32(float32_t a) { return (int32_t)vcvtns_s32_f32(a); } -// CHECK-LABEL: define i64 @test_vcvtnd_s64_f64(double %a) #0 { +// CHECK-LABEL: define dso_local i64 @test_vcvtnd_s64_f64(double %a) #0 { // CHECK: [[VCVTND_S64_F64_I:%.*]] = call i64 @llvm.aarch64.neon.fcvtns.i64.f64(double %a) #2 // CHECK: ret i64 [[VCVTND_S64_F64_I]] int64_t test_vcvtnd_s64_f64(float64_t a) { return (int64_t)vcvtnd_s64_f64(a); } -// CHECK-LABEL: define i32 @test_vcvtns_u32_f32(float %a) #0 { +// CHECK-LABEL: define dso_local i32 @test_vcvtns_u32_f32(float %a) #0 { // CHECK: [[VCVTNS_U32_F32_I:%.*]] = call i32 @llvm.aarch64.neon.fcvtnu.i32.f32(float %a) #2 // CHECK: ret i32 [[VCVTNS_U32_F32_I]] uint32_t test_vcvtns_u32_f32(float32_t a) { return (uint32_t)vcvtns_u32_f32(a); } -// CHECK-LABEL: define i64 @test_vcvtnd_u64_f64(double %a) #0 { +// CHECK-LABEL: define dso_local i64 @test_vcvtnd_u64_f64(double %a) #0 { // CHECK: [[VCVTND_U64_F64_I:%.*]] = call i64 @llvm.aarch64.neon.fcvtnu.i64.f64(double %a) #2 // CHECK: ret i64 [[VCVTND_U64_F64_I]] uint64_t test_vcvtnd_u64_f64(float64_t a) { return (uint64_t)vcvtnd_u64_f64(a); } -// CHECK-LABEL: define i32 @test_vcvtps_s32_f32(float %a) #0 { +// CHECK-LABEL: define dso_local i32 @test_vcvtps_s32_f32(float %a) #0 { // CHECK: [[VCVTPS_S32_F32_I:%.*]] = call i32 @llvm.aarch64.neon.fcvtps.i32.f32(float %a) #2 // CHECK: ret i32 [[VCVTPS_S32_F32_I]] int32_t test_vcvtps_s32_f32(float32_t a) { return (int32_t)vcvtps_s32_f32(a); } -// CHECK-LABEL: define i64 @test_vcvtpd_s64_f64(double %a) #0 { +// CHECK-LABEL: define dso_local i64 @test_vcvtpd_s64_f64(double %a) #0 { // CHECK: [[VCVTPD_S64_F64_I:%.*]] = call i64 @llvm.aarch64.neon.fcvtps.i64.f64(double %a) #2 // CHECK: ret i64 [[VCVTPD_S64_F64_I]] int64_t test_vcvtpd_s64_f64(float64_t a) { return (int64_t)vcvtpd_s64_f64(a); } -// CHECK-LABEL: define i32 @test_vcvtps_u32_f32(float %a) #0 { +// CHECK-LABEL: define dso_local i32 @test_vcvtps_u32_f32(float %a) #0 { // CHECK: [[VCVTPS_U32_F32_I:%.*]] = call i32 @llvm.aarch64.neon.fcvtpu.i32.f32(float %a) #2 // CHECK: ret i32 [[VCVTPS_U32_F32_I]] uint32_t test_vcvtps_u32_f32(float32_t a) { return (uint32_t)vcvtps_u32_f32(a); } -// CHECK-LABEL: define i64 @test_vcvtpd_u64_f64(double %a) #0 { +// CHECK-LABEL: define dso_local i64 @test_vcvtpd_u64_f64(double %a) #0 { // CHECK: [[VCVTPD_U64_F64_I:%.*]] = call i64 @llvm.aarch64.neon.fcvtpu.i64.f64(double %a) #2 // CHECK: ret i64 [[VCVTPD_U64_F64_I]] uint64_t test_vcvtpd_u64_f64(float64_t a) { return (uint64_t)vcvtpd_u64_f64(a); } -// CHECK-LABEL: define i32 @test_vcvts_s32_f32(float %a) #0 { +// CHECK-LABEL: define dso_local i32 @test_vcvts_s32_f32(float %a) #0 { // CHECK: [[TMP0:%.*]] = fptosi float %a to i32 // CHECK: ret i32 [[TMP0]] int32_t test_vcvts_s32_f32(float32_t a) { return (int32_t)vcvts_s32_f32(a); } -// CHECK-LABEL: define i64 @test_vcvtd_s64_f64(double %a) #0 { +// CHECK-LABEL: define dso_local i64 @test_vcvtd_s64_f64(double %a) #0 { // CHECK: [[TMP0:%.*]] = fptosi double %a to i64 // CHECK: ret i64 [[TMP0]] int64_t test_vcvtd_s64_f64(float64_t a) { return (int64_t)vcvtd_s64_f64(a); } -// CHECK-LABEL: define i32 @test_vcvts_u32_f32(float %a) #0 { +// CHECK-LABEL: define dso_local i32 @test_vcvts_u32_f32(float %a) #0 { // CHECK: [[TMP0:%.*]] = fptoui float %a to i32 // CHECK: ret i32 [[TMP0]] uint32_t test_vcvts_u32_f32(float32_t a) { return (uint32_t)vcvts_u32_f32(a); } -// CHECK-LABEL: define i64 @test_vcvtd_u64_f64(double %a) #0 { +// CHECK-LABEL: define dso_local i64 @test_vcvtd_u64_f64(double %a) #0 { // CHECK: [[TMP0:%.*]] = fptoui double %a to i64 // CHECK: ret i64 [[TMP0]] uint64_t test_vcvtd_u64_f64(float64_t a) { diff --git a/clang/test/CodeGen/aarch64-neon-fma.c b/clang/test/CodeGen/aarch64-neon-fma.c index ae02bfbffb98..e516883041ee 100644 --- a/clang/test/CodeGen/aarch64-neon-fma.c +++ b/clang/test/CodeGen/aarch64-neon-fma.c @@ -4,7 +4,7 @@ #include <arm_neon.h> -// CHECK-LABEL: define <2 x float> @test_vmla_n_f32(<2 x float> %a, <2 x float> %b, float %c) #0 { +// CHECK-LABEL: define dso_local <2 x float> @test_vmla_n_f32(<2 x float> %a, <2 x float> %b, float %c) #0 { // CHECK: [[VECINIT_I:%.*]] = insertelement <2 x float> undef, float %c, i32 0 // CHECK: [[VECINIT1_I:%.*]] = insertelement <2 x float> [[VECINIT_I]], float %c, i32 1 // CHECK: [[MUL_I:%.*]] = fmul <2 x float> %b, [[VECINIT1_I]] @@ -14,7 +14,7 @@ float32x2_t test_vmla_n_f32(float32x2_t a, float32x2_t b, float32_t c) { return vmla_n_f32(a, b, c); } -// CHECK-LABEL: define <4 x float> @test_vmlaq_n_f32(<4 x float> %a, <4 x float> %b, float %c) #1 { +// CHECK-LABEL: define dso_local <4 x float> @test_vmlaq_n_f32(<4 x float> %a, <4 x float> %b, float %c) #1 { // CHECK: [[VECINIT_I:%.*]] = insertelement <4 x float> undef, float %c, i32 0 // CHECK: [[VECINIT1_I:%.*]] = insertelement <4 x float> [[VECINIT_I]], float %c, i32 1 // CHECK: [[VECINIT2_I:%.*]] = insertelement <4 x float> [[VECINIT1_I]], float %c, i32 2 @@ -26,7 +26,7 @@ float32x4_t test_vmlaq_n_f32(float32x4_t a, float32x4_t b, float32_t c) { return vmlaq_n_f32(a, b, c); } -// CHECK-LABEL: define <2 x double> @test_vmlaq_n_f64(<2 x double> %a, <2 x double> %b, double %c) #1 { +// CHECK-LABEL: define dso_local <2 x double> @test_vmlaq_n_f64(<2 x double> %a, <2 x double> %b, double %c) #1 { // CHECK: [[VECINIT_I:%.*]] = insertelement <2 x double> undef, double %c, i32 0 // CHECK: [[VECINIT1_I:%.*]] = insertelement <2 x double> [[VECINIT_I]], double %c, i32 1 // CHECK: [[MUL_I:%.*]] = fmul <2 x double> %b, [[VECINIT1_I]] @@ -36,7 +36,7 @@ float64x2_t test_vmlaq_n_f64(float64x2_t a, float64x2_t b, float64_t c) { return vmlaq_n_f64(a, b, c); } -// CHECK-LABEL: define <4 x float> @test_vmlsq_n_f32(<4 x float> %a, <4 x float> %b, float %c) #1 { +// CHECK-LABEL: define dso_local <4 x float> @test_vmlsq_n_f32(<4 x float> %a, <4 x float> %b, float %c) #1 { // CHECK: [[VECINIT_I:%.*]] = insertelement <4 x float> undef, float %c, i32 0 // CHECK: [[VECINIT1_I:%.*]] = insertelement <4 x float> [[VECINIT_I]], float %c, i32 1 // CHECK: [[VECINIT2_I:%.*]] = insertelement <4 x float> [[VECINIT1_I]], float %c, i32 2 @@ -48,7 +48,7 @@ float32x4_t test_vmlsq_n_f32(float32x4_t a, float32x4_t b, float32_t c) { return vmlsq_n_f32(a, b, c); } -// CHECK-LABEL: define <2 x float> @test_vmls_n_f32(<2 x float> %a, <2 x float> %b, float %c) #0 { +// CHECK-LABEL: define dso_local <2 x float> @test_vmls_n_f32(<2 x float> %a, <2 x float> %b, float %c) #0 { // CHECK: [[VECINIT_I:%.*]] = insertelement <2 x float> undef, float %c, i32 0 // CHECK: [[VECINIT1_I:%.*]] = insertelement <2 x float> [[VECINIT_I]], float %c, i32 1 // CHECK: [[MUL_I:%.*]] = fmul <2 x float> %b, [[VECINIT1_I]] @@ -58,7 +58,7 @@ float32x2_t test_vmls_n_f32(float32x2_t a, float32x2_t b, float32_t c) { return vmls_n_f32(a, b, c); } -// CHECK-LABEL: define <2 x double> @test_vmlsq_n_f64(<2 x double> %a, <2 x double> %b, double %c) #1 { +// CHECK-LABEL: define dso_local <2 x double> @test_vmlsq_n_f64(<2 x double> %a, <2 x double> %b, double %c) #1 { // CHECK: [[VECINIT_I:%.*]] = insertelement <2 x double> undef, double %c, i32 0 // CHECK: [[VECINIT1_I:%.*]] = insertelement <2 x double> [[VECINIT_I]], double %c, i32 1 // CHECK: [[MUL_I:%.*]] = fmul <2 x double> %b, [[VECINIT1_I]] @@ -68,7 +68,7 @@ float64x2_t test_vmlsq_n_f64(float64x2_t a, float64x2_t b, float64_t c) { return vmlsq_n_f64(a, b, c); } -// CHECK-LABEL: define <2 x float> @test_vmla_lane_f32_0(<2 x float> %a, <2 x float> %b, <2 x float> %v) #0 { +// CHECK-LABEL: define dso_local <2 x float> @test_vmla_lane_f32_0(<2 x float> %a, <2 x float> %b, <2 x float> %v) #0 { // CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x float> %v, <2 x float> %v, <2 x i32> zeroinitializer // CHECK: [[MUL:%.*]] = fmul <2 x float> %b, [[SHUFFLE]] // CHECK: [[ADD:%.*]] = fadd <2 x float> %a, [[MUL]] @@ -77,7 +77,7 @@ float32x2_t test_vmla_lane_f32_0(float32x2_t a, float32x2_t b, float32x2_t v) { return vmla_lane_f32(a, b, v, 0); } -// CHECK-LABEL: define <4 x float> @test_vmlaq_lane_f32_0(<4 x float> %a, <4 x float> %b, <2 x float> %v) #1 { +// CHECK-LABEL: define dso_local <4 x float> @test_vmlaq_lane_f32_0(<4 x float> %a, <4 x float> %b, <2 x float> %v) #1 { // CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x float> %v, <2 x float> %v, <4 x i32> zeroinitializer // CHECK: [[MUL:%.*]] = fmul <4 x float> %b, [[SHUFFLE]] // CHECK: [[ADD:%.*]] = fadd <4 x float> %a, [[MUL]] @@ -86,7 +86,7 @@ float32x4_t test_vmlaq_lane_f32_0(float32x4_t a, float32x4_t b, float32x2_t v) { return vmlaq_lane_f32(a, b, v, 0); } -// CHECK-LABEL: define <2 x float> @test_vmla_laneq_f32_0(<2 x float> %a, <2 x float> %b, <4 x float> %v) #1 { +// CHECK-LABEL: define dso_local <2 x float> @test_vmla_laneq_f32_0(<2 x float> %a, <2 x float> %b, <4 x float> %v) #1 { // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x float> %v, <4 x float> %v, <2 x i32> zeroinitializer // CHECK: [[MUL:%.*]] = fmul <2 x float> %b, [[SHUFFLE]] // CHECK: [[ADD:%.*]] = fadd <2 x float> %a, [[MUL]] @@ -95,7 +95,7 @@ float32x2_t test_vmla_laneq_f32_0(float32x2_t a, float32x2_t b, float32x4_t v) { return vmla_laneq_f32(a, b, v, 0); } -// CHECK-LABEL: define <4 x float> @test_vmlaq_laneq_f32_0(<4 x float> %a, <4 x float> %b, <4 x float> %v) #1 { +// CHECK-LABEL: define dso_local <4 x float> @test_vmlaq_laneq_f32_0(<4 x float> %a, <4 x float> %b, <4 x float> %v) #1 { // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x float> %v, <4 x float> %v, <4 x i32> zeroinitializer // CHECK: [[MUL:%.*]] = fmul <4 x float> %b, [[SHUFFLE]] // CHECK: [[ADD:%.*]] = fadd <4 x float> %a, [[MUL]] @@ -104,7 +104,7 @@ float32x4_t test_vmlaq_laneq_f32_0(float32x4_t a, float32x4_t b, float32x4_t v) return vmlaq_laneq_f32(a, b, v, 0); } -// CHECK-LABEL: define <2 x float> @test_vmls_lane_f32_0(<2 x float> %a, <2 x float> %b, <2 x float> %v) #0 { +// CHECK-LABEL: define dso_local <2 x float> @test_vmls_lane_f32_0(<2 x float> %a, <2 x float> %b, <2 x float> %v) #0 { // CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x float> %v, <2 x float> %v, <2 x i32> zeroinitializer // CHECK: [[MUL:%.*]] = fmul <2 x float> %b, [[SHUFFLE]] // CHECK: [[SUB:%.*]] = fsub <2 x float> %a, [[MUL]] @@ -113,7 +113,7 @@ float32x2_t test_vmls_lane_f32_0(float32x2_t a, float32x2_t b, float32x2_t v) { return vmls_lane_f32(a, b, v, 0); } -// CHECK-LABEL: define <4 x float> @test_vmlsq_lane_f32_0(<4 x float> %a, <4 x float> %b, <2 x float> %v) #1 { +// CHECK-LABEL: define dso_local <4 x float> @test_vmlsq_lane_f32_0(<4 x float> %a, <4 x float> %b, <2 x float> %v) #1 { // CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x float> %v, <2 x float> %v, <4 x i32> zeroinitializer // CHECK: [[MUL:%.*]] = fmul <4 x float> %b, [[SHUFFLE]] // CHECK: [[SUB:%.*]] = fsub <4 x float> %a, [[MUL]] @@ -122,7 +122,7 @@ float32x4_t test_vmlsq_lane_f32_0(float32x4_t a, float32x4_t b, float32x2_t v) { return vmlsq_lane_f32(a, b, v, 0); } -// CHECK-LABEL: define <2 x float> @test_vmls_laneq_f32_0(<2 x float> %a, <2 x float> %b, <4 x float> %v) #1 { +// CHECK-LABEL: define dso_local <2 x float> @test_vmls_laneq_f32_0(<2 x float> %a, <2 x float> %b, <4 x float> %v) #1 { // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x float> %v, <4 x float> %v, <2 x i32> zeroinitializer // CHECK: [[MUL:%.*]] = fmul <2 x float> %b, [[SHUFFLE]] // CHECK: [[SUB:%.*]] = fsub <2 x float> %a, [[MUL]] @@ -131,7 +131,7 @@ float32x2_t test_vmls_laneq_f32_0(float32x2_t a, float32x2_t b, float32x4_t v) { return vmls_laneq_f32(a, b, v, 0); } -// CHECK-LABEL: define <4 x float> @test_vmlsq_laneq_f32_0(<4 x float> %a, <4 x float> %b, <4 x float> %v) #1 { +// CHECK-LABEL: define dso_local <4 x float> @test_vmlsq_laneq_f32_0(<4 x float> %a, <4 x float> %b, <4 x float> %v) #1 { // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x float> %v, <4 x float> %v, <4 x i32> zeroinitializer // CHECK: [[MUL:%.*]] = fmul <4 x float> %b, [[SHUFFLE]] // CHECK: [[SUB:%.*]] = fsub <4 x float> %a, [[MUL]] @@ -140,7 +140,7 @@ float32x4_t test_vmlsq_laneq_f32_0(float32x4_t a, float32x4_t b, float32x4_t v) return vmlsq_laneq_f32(a, b, v, 0); } -// CHECK-LABEL: define <2 x float> @test_vmla_lane_f32(<2 x float> %a, <2 x float> %b, <2 x float> %v) #0 { +// CHECK-LABEL: define dso_local <2 x float> @test_vmla_lane_f32(<2 x float> %a, <2 x float> %b, <2 x float> %v) #0 { // CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x float> %v, <2 x float> %v, <2 x i32> <i32 1, i32 1> // CHECK: [[MUL:%.*]] = fmul <2 x float> %b, [[SHUFFLE]] // CHECK: [[ADD:%.*]] = fadd <2 x float> %a, [[MUL]] @@ -149,7 +149,7 @@ float32x2_t test_vmla_lane_f32(float32x2_t a, float32x2_t b, float32x2_t v) { return vmla_lane_f32(a, b, v, 1); } -// CHECK-LABEL: define <4 x float> @test_vmlaq_lane_f32(<4 x float> %a, <4 x float> %b, <2 x float> %v) #1 { +// CHECK-LABEL: define dso_local <4 x float> @test_vmlaq_lane_f32(<4 x float> %a, <4 x float> %b, <2 x float> %v) #1 { // CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x float> %v, <2 x float> %v, <4 x i32> <i32 1, i32 1, i32 1, i32 1> // CHECK: [[MUL:%.*]] = fmul <4 x float> %b, [[SHUFFLE]] // CHECK: [[ADD:%.*]] = fadd <4 x float> %a, [[MUL]] @@ -158,7 +158,7 @@ float32x4_t test_vmlaq_lane_f32(float32x4_t a, float32x4_t b, float32x2_t v) { return vmlaq_lane_f32(a, b, v, 1); } -// CHECK-LABEL: define <2 x float> @test_vmla_laneq_f32(<2 x float> %a, <2 x float> %b, <4 x float> %v) #1 { +// CHECK-LABEL: define dso_local <2 x float> @test_vmla_laneq_f32(<2 x float> %a, <2 x float> %b, <4 x float> %v) #1 { // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x float> %v, <4 x float> %v, <2 x i32> <i32 3, i32 3> // CHECK: [[MUL:%.*]] = fmul <2 x float> %b, [[SHUFFLE]] // CHECK: [[ADD:%.*]] = fadd <2 x float> %a, [[MUL]] @@ -167,7 +167,7 @@ float32x2_t test_vmla_laneq_f32(float32x2_t a, float32x2_t b, float32x4_t v) { return vmla_laneq_f32(a, b, v, 3); } -// CHECK-LABEL: define <4 x float> @test_vmlaq_laneq_f32(<4 x float> %a, <4 x float> %b, <4 x float> %v) #1 { +// CHECK-LABEL: define dso_local <4 x float> @test_vmlaq_laneq_f32(<4 x float> %a, <4 x float> %b, <4 x float> %v) #1 { // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x float> %v, <4 x float> %v, <4 x i32> <i32 3, i32 3, i32 3, i32 3> // CHECK: [[MUL:%.*]] = fmul <4 x float> %b, [[SHUFFLE]] // CHECK: [[ADD:%.*]] = fadd <4 x float> %a, [[MUL]] @@ -176,7 +176,7 @@ float32x4_t test_vmlaq_laneq_f32(float32x4_t a, float32x4_t b, float32x4_t v) { return vmlaq_laneq_f32(a, b, v, 3); } -// CHECK-LABEL: define <2 x float> @test_vmls_lane_f32(<2 x float> %a, <2 x float> %b, <2 x float> %v) #0 { +// CHECK-LABEL: define dso_local <2 x float> @test_vmls_lane_f32(<2 x float> %a, <2 x float> %b, <2 x float> %v) #0 { // CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x float> %v, <2 x float> %v, <2 x i32> <i32 1, i32 1> // CHECK: [[MUL:%.*]] = fmul <2 x float> %b, [[SHUFFLE]] // CHECK: [[SUB:%.*]] = fsub <2 x float> %a, [[MUL]] @@ -185,7 +185,7 @@ float32x2_t test_vmls_lane_f32(float32x2_t a, float32x2_t b, float32x2_t v) { return vmls_lane_f32(a, b, v, 1); } -// CHECK-LABEL: define <4 x float> @test_vmlsq_lane_f32(<4 x float> %a, <4 x float> %b, <2 x float> %v) #1 { +// CHECK-LABEL: define dso_local <4 x float> @test_vmlsq_lane_f32(<4 x float> %a, <4 x float> %b, <2 x float> %v) #1 { // CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x float> %v, <2 x float> %v, <4 x i32> <i32 1, i32 1, i32 1, i32 1> // CHECK: [[MUL:%.*]] = fmul <4 x float> %b, [[SHUFFLE]] // CHECK: [[SUB:%.*]] = fsub <4 x float> %a, [[MUL]] @@ -193,7 +193,7 @@ float32x2_t test_vmls_lane_f32(float32x2_t a, float32x2_t b, float32x2_t v) { float32x4_t test_vmlsq_lane_f32(float32x4_t a, float32x4_t b, float32x2_t v) { return vmlsq_lane_f32(a, b, v, 1); } -// CHECK-LABEL: define <2 x float> @test_vmls_laneq_f32(<2 x float> %a, <2 x float> %b, <4 x float> %v) #1 { +// CHECK-LABEL: define dso_local <2 x float> @test_vmls_laneq_f32(<2 x float> %a, <2 x float> %b, <4 x float> %v) #1 { // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x float> %v, <4 x float> %v, <2 x i32> <i32 3, i32 3> // CHECK: [[MUL:%.*]] = fmul <2 x float> %b, [[SHUFFLE]] // CHECK: [[SUB:%.*]] = fsub <2 x float> %a, [[MUL]] @@ -202,7 +202,7 @@ float32x2_t test_vmls_laneq_f32(float32x2_t a, float32x2_t b, float32x4_t v) { return vmls_laneq_f32(a, b, v, 3); } -// CHECK-LABEL: define <4 x float> @test_vmlsq_laneq_f32(<4 x float> %a, <4 x float> %b, <4 x float> %v) #1 { +// CHECK-LABEL: define dso_local <4 x float> @test_vmlsq_laneq_f32(<4 x float> %a, <4 x float> %b, <4 x float> %v) #1 { // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x float> %v, <4 x float> %v, <4 x i32> <i32 3, i32 3, i32 3, i32 3> // CHECK: [[MUL:%.*]] = fmul <4 x float> %b, [[SHUFFLE]] // CHECK: [[SUB:%.*]] = fsub <4 x float> %a, [[MUL]] @@ -211,7 +211,7 @@ float32x4_t test_vmlsq_laneq_f32(float32x4_t a, float32x4_t b, float32x4_t v) { return vmlsq_laneq_f32(a, b, v, 3); } -// CHECK-LABEL: define <2 x double> @test_vfmaq_n_f64(<2 x double> %a, <2 x double> %b, double %c) #1 { +// CHECK-LABEL: define dso_local <2 x double> @test_vfmaq_n_f64(<2 x double> %a, <2 x double> %b, double %c) #1 { // CHECK: [[VECINIT_I:%.*]] = insertelement <2 x double> undef, double %c, i32 0 // CHECK: [[VECINIT1_I:%.*]] = insertelement <2 x double> [[VECINIT_I]], double %c, i32 1 // CHECK: [[TMP6:%.*]] = call <2 x double> @llvm.fma.v2f64(<2 x double> %b, <2 x double> [[VECINIT1_I]], <2 x double> %a) @@ -220,7 +220,7 @@ float64x2_t test_vfmaq_n_f64(float64x2_t a, float64x2_t b, float64_t c) { return vfmaq_n_f64(a, b, c); } -// CHECK-LABEL: define <2 x double> @test_vfmsq_n_f64(<2 x double> %a, <2 x double> %b, double %c) #1 { +// CHECK-LABEL: define dso_local <2 x double> @test_vfmsq_n_f64(<2 x double> %a, <2 x double> %b, double %c) #1 { // CHECK: [[SUB_I:%.*]] = fneg <2 x double> %b // CHECK: [[VECINIT_I:%.*]] = insertelement <2 x double> undef, double %c, i32 0 // CHECK: [[VECINIT1_I:%.*]] = insertelement <2 x double> [[VECINIT_I]], double %c, i32 1 diff --git a/clang/test/CodeGen/aarch64-neon-fp16fml.c b/clang/test/CodeGen/aarch64-neon-fp16fml.c index 3436d8b212ef..67f2d0c46a20 100644 --- a/clang/test/CodeGen/aarch64-neon-fp16fml.c +++ b/clang/test/CodeGen/aarch64-neon-fp16fml.c @@ -10,56 +10,56 @@ // Vector form float32x2_t test_vfmlal_low_f16(float32x2_t a, float16x4_t b, float16x4_t c) { -// CHECK-LABEL: define <2 x float> @test_vfmlal_low_f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) +// CHECK-LABEL: define dso_local <2 x float> @test_vfmlal_low_f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) // CHECK: [[RESULT:%.*]] = call <2 x float> @llvm.aarch64.neon.fmlal.v2f32.v4f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) // CHECK: ret <2 x float> [[RESULT]] return vfmlal_low_f16(a, b, c); } float32x2_t test_vfmlsl_low_f16(float32x2_t a, float16x4_t b, float16x4_t c) { -// CHECK-LABEL: define <2 x float> @test_vfmlsl_low_f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) +// CHECK-LABEL: define dso_local <2 x float> @test_vfmlsl_low_f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) // CHECK: [[RESULT:%.*]] = call <2 x float> @llvm.aarch64.neon.fmlsl.v2f32.v4f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) // CHECK: ret <2 x float> [[RESULT]] return vfmlsl_low_f16(a, b, c); } float32x2_t test_vfmlal_high_f16(float32x2_t a, float16x4_t b, float16x4_t c) { -// CHECK-LABEL: define <2 x float> @test_vfmlal_high_f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) +// CHECK-LABEL: define dso_local <2 x float> @test_vfmlal_high_f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) // CHECK: [[RESULT:%.*]] = call <2 x float> @llvm.aarch64.neon.fmlal2.v2f32.v4f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) // CHECK: ret <2 x float> [[RESULT]] return vfmlal_high_f16(a, b, c); } float32x2_t test_vfmlsl_high_f16(float32x2_t a, float16x4_t b, float16x4_t c) { -// CHECK-LABEL: define <2 x float> @test_vfmlsl_high_f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) +// CHECK-LABEL: define dso_local <2 x float> @test_vfmlsl_high_f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) // CHECK: [[RESULT:%.*]] = call <2 x float> @llvm.aarch64.neon.fmlsl2.v2f32.v4f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) // CHECK: ret <2 x float> [[RESULT]] return vfmlsl_high_f16(a, b, c); } float32x4_t test_vfmlalq_low_f16(float32x4_t a, float16x8_t b, float16x8_t c) { -// CHECK-LABEL: define <4 x float> @test_vfmlalq_low_f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) +// CHECK-LABEL: define dso_local <4 x float> @test_vfmlalq_low_f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) // CHECK: [[RESULT:%.*]] = call <4 x float> @llvm.aarch64.neon.fmlal.v4f32.v8f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) // CHECK: ret <4 x float> [[RESULT]] return vfmlalq_low_f16(a, b, c); } float32x4_t test_vfmlslq_low_f16(float32x4_t a, float16x8_t b, float16x8_t c) { -// CHECK-LABEL: define <4 x float> @test_vfmlslq_low_f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) +// CHECK-LABEL: define dso_local <4 x float> @test_vfmlslq_low_f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) // CHECK: [[RESULT:%.*]] = call <4 x float> @llvm.aarch64.neon.fmlsl.v4f32.v8f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) // CHECK: ret <4 x float> [[RESULT]] return vfmlslq_low_f16(a, b, c); } float32x4_t test_vfmlalq_high_f16(float32x4_t a, float16x8_t b, float16x8_t c) { -// CHECK-LABEL: define <4 x float> @test_vfmlalq_high_f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) +// CHECK-LABEL: define dso_local <4 x float> @test_vfmlalq_high_f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) // CHECK: [[RESULT:%.*]] = call <4 x float> @llvm.aarch64.neon.fmlal2.v4f32.v8f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) // CHECK: ret <4 x float> [[RESULT]] return vfmlalq_high_f16(a, b, c); } float32x4_t test_vfmlslq_high_f16(float32x4_t a, float16x8_t b, float16x8_t c) { -// CHECK-LABEL: define <4 x float> @test_vfmlslq_high_f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) +// CHECK-LABEL: define dso_local <4 x float> @test_vfmlslq_high_f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) // CHECK: [[RESULT:%.*]] = call <4 x float> @llvm.aarch64.neon.fmlsl2.v4f32.v8f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) // CHECK: ret <4 x float> [[RESULT]] return vfmlslq_high_f16(a, b, c); @@ -68,7 +68,7 @@ float32x4_t test_vfmlslq_high_f16(float32x4_t a, float16x8_t b, float16x8_t c) { // Indexed form float32x2_t test_vfmlal_lane_low_f16(float32x2_t a, float16x4_t b, float16x4_t c) { -// CHECK-LABEL: define <2 x float> @test_vfmlal_lane_low_f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) +// CHECK-LABEL: define dso_local <2 x float> @test_vfmlal_lane_low_f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x half> %c, <4 x half> undef, <4 x i32> zeroinitializer // CHECK: [[RESULT:%.*]] = call <2 x float> @llvm.aarch64.neon.fmlal.v2f32.v4f16(<2 x float> %a, <4 x half> %b, <4 x half> [[SHUFFLE]]) // CHECK: ret <2 x float> [[RESULT]] @@ -76,7 +76,7 @@ float32x2_t test_vfmlal_lane_low_f16(float32x2_t a, float16x4_t b, float16x4_t c } float32x2_t test_vfmlal_lane_high_f16(float32x2_t a, float16x4_t b, float16x4_t c) { -// CHECK-LABEL: define <2 x float> @test_vfmlal_lane_high_f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) +// CHECK-LABEL: define dso_local <2 x float> @test_vfmlal_lane_high_f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x half> %c, <4 x half> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> // CHECK: [[RESULT:%.*]] = call <2 x float> @llvm.aarch64.neon.fmlal2.v2f32.v4f16(<2 x float> %a, <4 x half> %b, <4 x half> [[SHUFFLE]]) // CHECK: ret <2 x float> [[RESULT]] @@ -84,7 +84,7 @@ float32x2_t test_vfmlal_lane_high_f16(float32x2_t a, float16x4_t b, float16x4_t } float32x4_t test_vfmlalq_lane_low_f16(float32x4_t a, float16x8_t b, float16x4_t c) { -// CHECK-LABEL: define <4 x float> @test_vfmlalq_lane_low_f16(<4 x float> %a, <8 x half> %b, <4 x half> %c) +// CHECK-LABEL: define dso_local <4 x float> @test_vfmlalq_lane_low_f16(<4 x float> %a, <8 x half> %b, <4 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x half> %c, <4 x half> undef, <8 x i32> <i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2> // CHECK: [[RESULT:%.*]] = call <4 x float> @llvm.aarch64.neon.fmlal.v4f32.v8f16(<4 x float> %a, <8 x half> %b, <8 x half> [[SHUFFLE]]) // CHECK: ret <4 x float> [[RESULT]] @@ -92,7 +92,7 @@ float32x4_t test_vfmlalq_lane_low_f16(float32x4_t a, float16x8_t b, float16x4_t } float32x4_t test_vfmlalq_lane_high_f16(float32x4_t a, float16x8_t b, float16x4_t c) { -// CHECK-LABEL: define <4 x float> @test_vfmlalq_lane_high_f16(<4 x float> %a, <8 x half> %b, <4 x half> %c) +// CHECK-LABEL: define dso_local <4 x float> @test_vfmlalq_lane_high_f16(<4 x float> %a, <8 x half> %b, <4 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x half> %c, <4 x half> undef, <8 x i32> <i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3> // CHECK: [[RESULT:%.*]] = call <4 x float> @llvm.aarch64.neon.fmlal2.v4f32.v8f16(<4 x float> %a, <8 x half> %b, <8 x half> [[SHUFFLE]]) // CHECK: ret <4 x float> [[RESULT]] @@ -100,7 +100,7 @@ float32x4_t test_vfmlalq_lane_high_f16(float32x4_t a, float16x8_t b, float16x4_t } float32x2_t test_vfmlal_laneq_low_f16(float32x2_t a, float16x4_t b, float16x8_t c) { -// CHECK-LABEL: define <2 x float> @test_vfmlal_laneq_low_f16(<2 x float> %a, <4 x half> %b, <8 x half> %c) +// CHECK-LABEL: define dso_local <2 x float> @test_vfmlal_laneq_low_f16(<2 x float> %a, <4 x half> %b, <8 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <8 x half> %c, <8 x half> undef, <4 x i32> <i32 4, i32 4, i32 4, i32 4> // CHECK: [[RESULT:%.*]] = call <2 x float> @llvm.aarch64.neon.fmlal.v2f32.v4f16(<2 x float> %a, <4 x half> %b, <4 x half> [[SHUFFLE]]) // CHECK: ret <2 x float> [[RESULT]] @@ -108,7 +108,7 @@ float32x2_t test_vfmlal_laneq_low_f16(float32x2_t a, float16x4_t b, float16x8_t } float32x2_t test_vfmlal_laneq_high_f16(float32x2_t a, float16x4_t b, float16x8_t c) { -// CHECK-LABEL: define <2 x float> @test_vfmlal_laneq_high_f16(<2 x float> %a, <4 x half> %b, <8 x half> %c) +// CHECK-LABEL: define dso_local <2 x float> @test_vfmlal_laneq_high_f16(<2 x float> %a, <4 x half> %b, <8 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <8 x half> %c, <8 x half> undef, <4 x i32> <i32 5, i32 5, i32 5, i32 5> // CHECK: [[RESULT:%.*]] = call <2 x float> @llvm.aarch64.neon.fmlal2.v2f32.v4f16(<2 x float> %a, <4 x half> %b, <4 x half> [[SHUFFLE]]) // CHECK: ret <2 x float> [[RESULT]] @@ -116,7 +116,7 @@ float32x2_t test_vfmlal_laneq_high_f16(float32x2_t a, float16x4_t b, float16x8_t } float32x4_t test_vfmlalq_laneq_low_f16(float32x4_t a, float16x8_t b, float16x8_t c) { -// CHECK-LABEL: define <4 x float> @test_vfmlalq_laneq_low_f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) +// CHECK-LABEL: define dso_local <4 x float> @test_vfmlalq_laneq_low_f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <8 x half> %c, <8 x half> undef, <8 x i32> <i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6> // CHECK: [[RESULT:%.*]] = call <4 x float> @llvm.aarch64.neon.fmlal.v4f32.v8f16(<4 x float> %a, <8 x half> %b, <8 x half> [[SHUFFLE]]) // CHECK: ret <4 x float> [[RESULT]] @@ -124,7 +124,7 @@ float32x4_t test_vfmlalq_laneq_low_f16(float32x4_t a, float16x8_t b, float16x8_t } float32x4_t test_vfmlalq_laneq_high_f16(float32x4_t a, float16x8_t b, float16x8_t c) { -// CHECK-LABEL: define <4 x float> @test_vfmlalq_laneq_high_f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) +// CHECK-LABEL: define dso_local <4 x float> @test_vfmlalq_laneq_high_f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <8 x half> %c, <8 x half> undef, <8 x i32> <i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7> // CHECK: [[RESULT:%.*]] = call <4 x float> @llvm.aarch64.neon.fmlal2.v4f32.v8f16(<4 x float> %a, <8 x half> %b, <8 x half> [[SHUFFLE]]) // CHECK: ret <4 x float> [[RESULT]] @@ -132,7 +132,7 @@ float32x4_t test_vfmlalq_laneq_high_f16(float32x4_t a, float16x8_t b, float16x8_ } float32x2_t test_vfmlsl_lane_low_f16(float32x2_t a, float16x4_t b, float16x4_t c) { -// CHECK-LABEL: define <2 x float> @test_vfmlsl_lane_low_f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) +// CHECK-LABEL: define dso_local <2 x float> @test_vfmlsl_lane_low_f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x half> %c, <4 x half> undef, <4 x i32> zeroinitializer // CHECK: [[RESULT:%.*]] = call <2 x float> @llvm.aarch64.neon.fmlsl.v2f32.v4f16(<2 x float> %a, <4 x half> %b, <4 x half> [[SHUFFLE]]) // CHECK: ret <2 x float> [[RESULT]] @@ -140,7 +140,7 @@ float32x2_t test_vfmlsl_lane_low_f16(float32x2_t a, float16x4_t b, float16x4_t c } float32x2_t test_vfmlsl_lane_high_f16(float32x2_t a, float16x4_t b, float16x4_t c) { -// CHECK-LABEL: define <2 x float> @test_vfmlsl_lane_high_f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) +// CHECK-LABEL: define dso_local <2 x float> @test_vfmlsl_lane_high_f16(<2 x float> %a, <4 x half> %b, <4 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x half> %c, <4 x half> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> // CHECK: [[RESULT:%.*]] = call <2 x float> @llvm.aarch64.neon.fmlsl2.v2f32.v4f16(<2 x float> %a, <4 x half> %b, <4 x half> [[SHUFFLE]]) // CHECK: ret <2 x float> [[RESULT]] @@ -148,7 +148,7 @@ float32x2_t test_vfmlsl_lane_high_f16(float32x2_t a, float16x4_t b, float16x4_t } float32x4_t test_vfmlslq_lane_low_f16(float32x4_t a, float16x8_t b, float16x4_t c) { -// CHECK-LABEL: define <4 x float> @test_vfmlslq_lane_low_f16(<4 x float> %a, <8 x half> %b, <4 x half> %c) +// CHECK-LABEL: define dso_local <4 x float> @test_vfmlslq_lane_low_f16(<4 x float> %a, <8 x half> %b, <4 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x half> %c, <4 x half> undef, <8 x i32> <i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2> // CHECK: [[RESULT:%.*]] = call <4 x float> @llvm.aarch64.neon.fmlsl.v4f32.v8f16(<4 x float> %a, <8 x half> %b, <8 x half> [[SHUFFLE]]) // CHECK: ret <4 x float> [[RESULT]] @@ -156,7 +156,7 @@ float32x4_t test_vfmlslq_lane_low_f16(float32x4_t a, float16x8_t b, float16x4_t } float32x4_t test_vfmlslq_lane_high_f16(float32x4_t a, float16x8_t b, float16x4_t c) { -// CHECK-LABEL: define <4 x float> @test_vfmlslq_lane_high_f16(<4 x float> %a, <8 x half> %b, <4 x half> %c) +// CHECK-LABEL: define dso_local <4 x float> @test_vfmlslq_lane_high_f16(<4 x float> %a, <8 x half> %b, <4 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x half> %c, <4 x half> undef, <8 x i32> <i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3> // CHECK: [[RESULT:%.*]] = call <4 x float> @llvm.aarch64.neon.fmlsl2.v4f32.v8f16(<4 x float> %a, <8 x half> %b, <8 x half> [[SHUFFLE]]) // CHECK: ret <4 x float> [[RESULT]] @@ -164,7 +164,7 @@ float32x4_t test_vfmlslq_lane_high_f16(float32x4_t a, float16x8_t b, float16x4_t } float32x2_t test_vfmlsl_laneq_low_f16(float32x2_t a, float16x4_t b, float16x8_t c) { -// CHECK-LABEL: define <2 x float> @test_vfmlsl_laneq_low_f16(<2 x float> %a, <4 x half> %b, <8 x half> %c) +// CHECK-LABEL: define dso_local <2 x float> @test_vfmlsl_laneq_low_f16(<2 x float> %a, <4 x half> %b, <8 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <8 x half> %c, <8 x half> undef, <4 x i32> <i32 4, i32 4, i32 4, i32 4> // CHECK: [[RESULT:%.*]] = call <2 x float> @llvm.aarch64.neon.fmlsl.v2f32.v4f16(<2 x float> %a, <4 x half> %b, <4 x half> [[SHUFFLE]]) // CHECK: ret <2 x float> [[RESULT]] @@ -172,7 +172,7 @@ float32x2_t test_vfmlsl_laneq_low_f16(float32x2_t a, float16x4_t b, float16x8_t } float32x2_t test_vfmlsl_laneq_high_f16(float32x2_t a, float16x4_t b, float16x8_t c) { -// CHECK-LABEL: define <2 x float> @test_vfmlsl_laneq_high_f16(<2 x float> %a, <4 x half> %b, <8 x half> %c) +// CHECK-LABEL: define dso_local <2 x float> @test_vfmlsl_laneq_high_f16(<2 x float> %a, <4 x half> %b, <8 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <8 x half> %c, <8 x half> undef, <4 x i32> <i32 5, i32 5, i32 5, i32 5> // CHECK: [[RESULT:%.*]] = call <2 x float> @llvm.aarch64.neon.fmlsl2.v2f32.v4f16(<2 x float> %a, <4 x half> %b, <4 x half> [[SHUFFLE]]) // CHECK: ret <2 x float> [[RESULT]] @@ -180,7 +180,7 @@ float32x2_t test_vfmlsl_laneq_high_f16(float32x2_t a, float16x4_t b, float16x8_t } float32x4_t test_vfmlslq_laneq_low_f16(float32x4_t a, float16x8_t b, float16x8_t c) { -// CHECK-LABEL: define <4 x float> @test_vfmlslq_laneq_low_f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) +// CHECK-LABEL: define dso_local <4 x float> @test_vfmlslq_laneq_low_f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <8 x half> %c, <8 x half> undef, <8 x i32> <i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6> // CHECK: [[RESULT:%.*]] = call <4 x float> @llvm.aarch64.neon.fmlsl.v4f32.v8f16(<4 x float> %a, <8 x half> %b, <8 x half> [[SHUFFLE]]) // CHECK: ret <4 x float> [[RESULT]] @@ -188,7 +188,7 @@ float32x4_t test_vfmlslq_laneq_low_f16(float32x4_t a, float16x8_t b, float16x8_t } float32x4_t test_vfmlslq_laneq_high_f16(float32x4_t a, float16x8_t b, float16x8_t c) { -// CHECK-LABEL: define <4 x float> @test_vfmlslq_laneq_high_f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) +// CHECK-LABEL: define dso_local <4 x float> @test_vfmlslq_laneq_high_f16(<4 x float> %a, <8 x half> %b, <8 x half> %c) // CHECK: [[SHUFFLE:%.*]] = shufflevector <8 x half> %c, <8 x half> undef, <8 x i32> <i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7> // CHECK: [[RESULT:%.*]] = call <4 x float> @llvm.aarch64.neon.fmlsl2.v4f32.v8f16(<4 x float> %a, <8 x half> %b, <8 x half> [[SHUFFLE]]) // CHECK: ret <4 x float> [[RESULT]] diff --git a/clang/test/CodeGen/aarch64-neon-ldst-one.c b/clang/test/CodeGen/aarch64-neon-ldst-one.c index 0d20982408cf..83a4188fddbb 100644 --- a/clang/test/CodeGen/aarch64-neon-ldst-one.c +++ b/clang/test/CodeGen/aarch64-neon-ldst-one.c @@ -4,7 +4,7 @@ #include <arm_neon.h> -// CHECK-LABEL: define <16 x i8> @test_vld1q_dup_u8(i8* %a) #0 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vld1q_dup_u8(i8* %a) #0 { // CHECK: [[TMP0:%.*]] = load i8, i8* %a // CHECK: [[TMP1:%.*]] = insertelement <16 x i8> undef, i8 [[TMP0]], i32 0 // CHECK: [[LANE:%.*]] = shufflevector <16 x i8> [[TMP1]], <16 x i8> [[TMP1]], <16 x i32> zeroinitializer @@ -13,7 +13,7 @@ uint8x16_t test_vld1q_dup_u8(uint8_t *a) { return vld1q_dup_u8(a); } -// CHECK-LABEL: define <8 x i16> @test_vld1q_dup_u16(i16* %a) #0 { +// CHECK-LABEL: define dso_local <8 x i16> @test_vld1q_dup_u16(i16* %a) #0 { // CHECK: [[TMP0:%.*]] = bitcast i16* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i16* // CHECK: [[TMP2:%.*]] = load i16, i16* [[TMP1]] @@ -24,7 +24,7 @@ uint16x8_t test_vld1q_dup_u16(uint16_t *a) { return vld1q_dup_u16(a); } -// CHECK-LABEL: define <4 x i32> @test_vld1q_dup_u32(i32* %a) #0 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vld1q_dup_u32(i32* %a) #0 { // CHECK: [[TMP0:%.*]] = bitcast i32* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i32* // CHECK: [[TMP2:%.*]] = load i32, i32* [[TMP1]] @@ -35,7 +35,7 @@ uint32x4_t test_vld1q_dup_u32(uint32_t *a) { return vld1q_dup_u32(a); } -// CHECK-LABEL: define <2 x i64> @test_vld1q_dup_u64(i64* %a) #0 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vld1q_dup_u64(i64* %a) #0 { // CHECK: [[TMP0:%.*]] = bitcast i64* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i64* // CHECK: [[TMP2:%.*]] = load i64, i64* [[TMP1]] @@ -46,7 +46,7 @@ uint64x2_t test_vld1q_dup_u64(uint64_t *a) { return vld1q_dup_u64(a); } -// CHECK-LABEL: define <16 x i8> @test_vld1q_dup_s8(i8* %a) #0 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vld1q_dup_s8(i8* %a) #0 { // CHECK: [[TMP0:%.*]] = load i8, i8* %a // CHECK: [[TMP1:%.*]] = insertelement <16 x i8> undef, i8 [[TMP0]], i32 0 // CHECK: [[LANE:%.*]] = shufflevector <16 x i8> [[TMP1]], <16 x i8> [[TMP1]], <16 x i32> zeroinitializer @@ -55,7 +55,7 @@ int8x16_t test_vld1q_dup_s8(int8_t *a) { return vld1q_dup_s8(a); } -// CHECK-LABEL: define <8 x i16> @test_vld1q_dup_s16(i16* %a) #0 { +// CHECK-LABEL: define dso_local <8 x i16> @test_vld1q_dup_s16(i16* %a) #0 { // CHECK: [[TMP0:%.*]] = bitcast i16* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i16* // CHECK: [[TMP2:%.*]] = load i16, i16* [[TMP1]] @@ -66,7 +66,7 @@ int16x8_t test_vld1q_dup_s16(int16_t *a) { return vld1q_dup_s16(a); } -// CHECK-LABEL: define <4 x i32> @test_vld1q_dup_s32(i32* %a) #0 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vld1q_dup_s32(i32* %a) #0 { // CHECK: [[TMP0:%.*]] = bitcast i32* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i32* // CHECK: [[TMP2:%.*]] = load i32, i32* [[TMP1]] @@ -77,7 +77,7 @@ int32x4_t test_vld1q_dup_s32(int32_t *a) { return vld1q_dup_s32(a); } -// CHECK-LABEL: define <2 x i64> @test_vld1q_dup_s64(i64* %a) #0 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vld1q_dup_s64(i64* %a) #0 { // CHECK: [[TMP0:%.*]] = bitcast i64* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i64* // CHECK: [[TMP2:%.*]] = load i64, i64* [[TMP1]] @@ -88,7 +88,7 @@ int64x2_t test_vld1q_dup_s64(int64_t *a) { return vld1q_dup_s64(a); } -// CHECK-LABEL: define <8 x half> @test_vld1q_dup_f16(half* %a) #0 { +// CHECK-LABEL: define dso_local <8 x half> @test_vld1q_dup_f16(half* %a) #0 { // CHECK: [[TMP0:%.*]] = bitcast half* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to half* // CHECK: [[TMP2:%.*]] = load half, half* [[TMP1]] @@ -99,7 +99,7 @@ float16x8_t test_vld1q_dup_f16(float16_t *a) { return vld1q_dup_f16(a); } -// CHECK-LABEL: define <4 x float> @test_vld1q_dup_f32(float* %a) #0 { +// CHECK-LABEL: define dso_local <4 x float> @test_vld1q_dup_f32(float* %a) #0 { // CHECK: [[TMP0:%.*]] = bitcast float* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to float* // CHECK: [[TMP2:%.*]] = load float, float* [[TMP1]] @@ -110,7 +110,7 @@ float32x4_t test_vld1q_dup_f32(float32_t *a) { return vld1q_dup_f32(a); } -// CHECK-LABEL: define <2 x double> @test_vld1q_dup_f64(double* %a) #0 { +// CHECK-LABEL: define dso_local <2 x double> @test_vld1q_dup_f64(double* %a) #0 { // CHECK: [[TMP0:%.*]] = bitcast double* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to double* // CHECK: [[TMP2:%.*]] = load double, double* [[TMP1]] @@ -121,7 +121,7 @@ float64x2_t test_vld1q_dup_f64(float64_t *a) { return vld1q_dup_f64(a); } -// CHECK-LABEL: define <16 x i8> @test_vld1q_dup_p8(i8* %a) #0 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vld1q_dup_p8(i8* %a) #0 { // CHECK: [[TMP0:%.*]] = load i8, i8* %a // CHECK: [[TMP1:%.*]] = insertelement <16 x i8> undef, i8 [[TMP0]], i32 0 // CHECK: [[LANE:%.*]] = shufflevector <16 x i8> [[TMP1]], <16 x i8> [[TMP1]], <16 x i32> zeroinitializer @@ -130,7 +130,7 @@ poly8x16_t test_vld1q_dup_p8(poly8_t *a) { return vld1q_dup_p8(a); } -// CHECK-LABEL: define <8 x i16> @test_vld1q_dup_p16(i16* %a) #0 { +// CHECK-LABEL: define dso_local <8 x i16> @test_vld1q_dup_p16(i16* %a) #0 { // CHECK: [[TMP0:%.*]] = bitcast i16* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i16* // CHECK: [[TMP2:%.*]] = load i16, i16* [[TMP1]] @@ -141,7 +141,7 @@ poly16x8_t test_vld1q_dup_p16(poly16_t *a) { return vld1q_dup_p16(a); } -// CHECK-LABEL: define <2 x i64> @test_vld1q_dup_p64(i64* %a) #0 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vld1q_dup_p64(i64* %a) #0 { // CHECK: [[TMP0:%.*]] = bitcast i64* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i64* // CHECK: [[TMP2:%.*]] = load i64, i64* [[TMP1]] @@ -152,7 +152,7 @@ poly64x2_t test_vld1q_dup_p64(poly64_t *a) { return vld1q_dup_p64(a); } -// CHECK-LABEL: define <8 x i8> @test_vld1_dup_u8(i8* %a) #1 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vld1_dup_u8(i8* %a) #1 { // CHECK: [[TMP0:%.*]] = load i8, i8* %a // CHECK: [[TMP1:%.*]] = insertelement <8 x i8> undef, i8 [[TMP0]], i32 0 // CHECK: [[LANE:%.*]] = shufflevector <8 x i8> [[TMP1]], <8 x i8> [[TMP1]], <8 x i32> zeroinitializer @@ -161,7 +161,7 @@ uint8x8_t test_vld1_dup_u8(uint8_t *a) { return vld1_dup_u8(a); } -// CHECK-LABEL: define <4 x i16> @test_vld1_dup_u16(i16* %a) #1 { +// CHECK-LABEL: define dso_local <4 x i16> @test_vld1_dup_u16(i16* %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast i16* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i16* // CHECK: [[TMP2:%.*]] = load i16, i16* [[TMP1]] @@ -172,7 +172,7 @@ uint16x4_t test_vld1_dup_u16(uint16_t *a) { return vld1_dup_u16(a); } -// CHECK-LABEL: define <2 x i32> @test_vld1_dup_u32(i32* %a) #1 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vld1_dup_u32(i32* %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast i32* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i32* // CHECK: [[TMP2:%.*]] = load i32, i32* [[TMP1]] @@ -183,7 +183,7 @@ uint32x2_t test_vld1_dup_u32(uint32_t *a) { return vld1_dup_u32(a); } -// CHECK-LABEL: define <1 x i64> @test_vld1_dup_u64(i64* %a) #1 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vld1_dup_u64(i64* %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast i64* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i64* // CHECK: [[TMP2:%.*]] = load i64, i64* [[TMP1]] @@ -194,7 +194,7 @@ uint64x1_t test_vld1_dup_u64(uint64_t *a) { return vld1_dup_u64(a); } -// CHECK-LABEL: define <8 x i8> @test_vld1_dup_s8(i8* %a) #1 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vld1_dup_s8(i8* %a) #1 { // CHECK: [[TMP0:%.*]] = load i8, i8* %a // CHECK: [[TMP1:%.*]] = insertelement <8 x i8> undef, i8 [[TMP0]], i32 0 // CHECK: [[LANE:%.*]] = shufflevector <8 x i8> [[TMP1]], <8 x i8> [[TMP1]], <8 x i32> zeroinitializer @@ -203,7 +203,7 @@ int8x8_t test_vld1_dup_s8(int8_t *a) { return vld1_dup_s8(a); } -// CHECK-LABEL: define <4 x i16> @test_vld1_dup_s16(i16* %a) #1 { +// CHECK-LABEL: define dso_local <4 x i16> @test_vld1_dup_s16(i16* %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast i16* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i16* // CHECK: [[TMP2:%.*]] = load i16, i16* [[TMP1]] @@ -214,7 +214,7 @@ int16x4_t test_vld1_dup_s16(int16_t *a) { return vld1_dup_s16(a); } -// CHECK-LABEL: define <2 x i32> @test_vld1_dup_s32(i32* %a) #1 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vld1_dup_s32(i32* %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast i32* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i32* // CHECK: [[TMP2:%.*]] = load i32, i32* [[TMP1]] @@ -225,7 +225,7 @@ int32x2_t test_vld1_dup_s32(int32_t *a) { return vld1_dup_s32(a); } -// CHECK-LABEL: define <1 x i64> @test_vld1_dup_s64(i64* %a) #1 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vld1_dup_s64(i64* %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast i64* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i64* // CHECK: [[TMP2:%.*]] = load i64, i64* [[TMP1]] @@ -236,7 +236,7 @@ int64x1_t test_vld1_dup_s64(int64_t *a) { return vld1_dup_s64(a); } -// CHECK-LABEL: define <4 x half> @test_vld1_dup_f16(half* %a) #1 { +// CHECK-LABEL: define dso_local <4 x half> @test_vld1_dup_f16(half* %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast half* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to half* // CHECK: [[TMP2:%.*]] = load half, half* [[TMP1]] @@ -247,7 +247,7 @@ float16x4_t test_vld1_dup_f16(float16_t *a) { return vld1_dup_f16(a); } -// CHECK-LABEL: define <2 x float> @test_vld1_dup_f32(float* %a) #1 { +// CHECK-LABEL: define dso_local <2 x float> @test_vld1_dup_f32(float* %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast float* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to float* // CHECK: [[TMP2:%.*]] = load float, float* [[TMP1]] @@ -258,7 +258,7 @@ float32x2_t test_vld1_dup_f32(float32_t *a) { return vld1_dup_f32(a); } -// CHECK-LABEL: define <1 x double> @test_vld1_dup_f64(double* %a) #1 { +// CHECK-LABEL: define dso_local <1 x double> @test_vld1_dup_f64(double* %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast double* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to double* // CHECK: [[TMP2:%.*]] = load double, double* [[TMP1]] @@ -269,7 +269,7 @@ float64x1_t test_vld1_dup_f64(float64_t *a) { return vld1_dup_f64(a); } -// CHECK-LABEL: define <8 x i8> @test_vld1_dup_p8(i8* %a) #1 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vld1_dup_p8(i8* %a) #1 { // CHECK: [[TMP0:%.*]] = load i8, i8* %a // CHECK: [[TMP1:%.*]] = insertelement <8 x i8> undef, i8 [[TMP0]], i32 0 // CHECK: [[LANE:%.*]] = shufflevector <8 x i8> [[TMP1]], <8 x i8> [[TMP1]], <8 x i32> zeroinitializer @@ -278,7 +278,7 @@ poly8x8_t test_vld1_dup_p8(poly8_t *a) { return vld1_dup_p8(a); } -// CHECK-LABEL: define <4 x i16> @test_vld1_dup_p16(i16* %a) #1 { +// CHECK-LABEL: define dso_local <4 x i16> @test_vld1_dup_p16(i16* %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast i16* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i16* // CHECK: [[TMP2:%.*]] = load i16, i16* [[TMP1]] @@ -289,7 +289,7 @@ poly16x4_t test_vld1_dup_p16(poly16_t *a) { return vld1_dup_p16(a); } -// CHECK-LABEL: define <1 x i64> @test_vld1_dup_p64(i64* %a) #1 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vld1_dup_p64(i64* %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast i64* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i64* // CHECK: [[TMP2:%.*]] = load i64, i64* [[TMP1]] @@ -300,7 +300,7 @@ poly64x1_t test_vld1_dup_p64(poly64_t *a) { return vld1_dup_p64(a); } -// CHECK-LABEL: define %struct.uint64x2x2_t @test_vld2q_dup_u64(i64* %a) #2 { +// CHECK-LABEL: define dso_local %struct.uint64x2x2_t @test_vld2q_dup_u64(i64* %a) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint64x2x2_t, align 16 // CHECK: [[__RET:%.*]] = alloca %struct.uint64x2x2_t, align 16 // CHECK: [[TMP0:%.*]] = bitcast %struct.uint64x2x2_t* [[__RET]] to i8* @@ -318,7 +318,7 @@ uint64x2x2_t test_vld2q_dup_u64(uint64_t *a) { return vld2q_dup_u64(a); } -// CHECK-LABEL: define %struct.int64x2x2_t @test_vld2q_dup_s64(i64* %a) #2 { +// CHECK-LABEL: define dso_local %struct.int64x2x2_t @test_vld2q_dup_s64(i64* %a) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int64x2x2_t, align 16 // CHECK: [[__RET:%.*]] = alloca %struct.int64x2x2_t, align 16 // CHECK: [[TMP0:%.*]] = bitcast %struct.int64x2x2_t* [[__RET]] to i8* @@ -336,7 +336,7 @@ int64x2x2_t test_vld2q_dup_s64(int64_t *a) { return vld2q_dup_s64(a); } -// CHECK-LABEL: define %struct.float64x2x2_t @test_vld2q_dup_f64(double* %a) #2 { +// CHECK-LABEL: define dso_local %struct.float64x2x2_t @test_vld2q_dup_f64(double* %a) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.float64x2x2_t, align 16 // CHECK: [[__RET:%.*]] = alloca %struct.float64x2x2_t, align 16 // CHECK: [[TMP0:%.*]] = bitcast %struct.float64x2x2_t* [[__RET]] to i8* @@ -354,7 +354,7 @@ float64x2x2_t test_vld2q_dup_f64(float64_t *a) { return vld2q_dup_f64(a); } -// CHECK-LABEL: define %struct.poly64x2x2_t @test_vld2q_dup_p64(i64* %a) #2 { +// CHECK-LABEL: define dso_local %struct.poly64x2x2_t @test_vld2q_dup_p64(i64* %a) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly64x2x2_t, align 16 // CHECK: [[__RET:%.*]] = alloca %struct.poly64x2x2_t, align 16 // CHECK: [[TMP0:%.*]] = bitcast %struct.poly64x2x2_t* [[__RET]] to i8* @@ -372,7 +372,7 @@ poly64x2x2_t test_vld2q_dup_p64(poly64_t *a) { return vld2q_dup_p64(a); } -// CHECK-LABEL: define %struct.float64x1x2_t @test_vld2_dup_f64(double* %a) #2 { +// CHECK-LABEL: define dso_local %struct.float64x1x2_t @test_vld2_dup_f64(double* %a) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.float64x1x2_t, align 8 // CHECK: [[__RET:%.*]] = alloca %struct.float64x1x2_t, align 8 // CHECK: [[TMP0:%.*]] = bitcast %struct.float64x1x2_t* [[__RET]] to i8* @@ -390,7 +390,7 @@ float64x1x2_t test_vld2_dup_f64(float64_t *a) { return vld2_dup_f64(a); } -// CHECK-LABEL: define %struct.poly64x1x2_t @test_vld2_dup_p64(i64* %a) #2 { +// CHECK-LABEL: define dso_local %struct.poly64x1x2_t @test_vld2_dup_p64(i64* %a) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly64x1x2_t, align 8 // CHECK: [[__RET:%.*]] = alloca %struct.poly64x1x2_t, align 8 // CHECK: [[TMP0:%.*]] = bitcast %struct.poly64x1x2_t* [[__RET]] to i8* @@ -408,7 +408,7 @@ poly64x1x2_t test_vld2_dup_p64(poly64_t *a) { return vld2_dup_p64(a); } -// CHECK-LABEL: define %struct.uint64x2x3_t @test_vld3q_dup_u64(i64* %a) #2 { +// CHECK-LABEL: define dso_local %struct.uint64x2x3_t @test_vld3q_dup_u64(i64* %a) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint64x2x3_t, align 16 // CHECK: [[__RET:%.*]] = alloca %struct.uint64x2x3_t, align 16 // CHECK: [[TMP0:%.*]] = bitcast %struct.uint64x2x3_t* [[__RET]] to i8* @@ -427,7 +427,7 @@ uint64x2x3_t test_vld3q_dup_u64(uint64_t *a) { // [{{x[0-9]+|sp}}] } -// CHECK-LABEL: define %struct.int64x2x3_t @test_vld3q_dup_s64(i64* %a) #2 { +// CHECK-LABEL: define dso_local %struct.int64x2x3_t @test_vld3q_dup_s64(i64* %a) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int64x2x3_t, align 16 // CHECK: [[__RET:%.*]] = alloca %struct.int64x2x3_t, align 16 // CHECK: [[TMP0:%.*]] = bitcast %struct.int64x2x3_t* [[__RET]] to i8* @@ -446,7 +446,7 @@ int64x2x3_t test_vld3q_dup_s64(int64_t *a) { // [{{x[0-9]+|sp}}] } -// CHECK-LABEL: define %struct.float64x2x3_t @test_vld3q_dup_f64(double* %a) #2 { +// CHECK-LABEL: define dso_local %struct.float64x2x3_t @test_vld3q_dup_f64(double* %a) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.float64x2x3_t, align 16 // CHECK: [[__RET:%.*]] = alloca %struct.float64x2x3_t, align 16 // CHECK: [[TMP0:%.*]] = bitcast %struct.float64x2x3_t* [[__RET]] to i8* @@ -465,7 +465,7 @@ float64x2x3_t test_vld3q_dup_f64(float64_t *a) { // [{{x[0-9]+|sp}}] } -// CHECK-LABEL: define %struct.poly64x2x3_t @test_vld3q_dup_p64(i64* %a) #2 { +// CHECK-LABEL: define dso_local %struct.poly64x2x3_t @test_vld3q_dup_p64(i64* %a) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly64x2x3_t, align 16 // CHECK: [[__RET:%.*]] = alloca %struct.poly64x2x3_t, align 16 // CHECK: [[TMP0:%.*]] = bitcast %struct.poly64x2x3_t* [[__RET]] to i8* @@ -484,7 +484,7 @@ poly64x2x3_t test_vld3q_dup_p64(poly64_t *a) { // [{{x[0-9]+|sp}}] } -// CHECK-LABEL: define %struct.float64x1x3_t @test_vld3_dup_f64(double* %a) #2 { +// CHECK-LABEL: define dso_local %struct.float64x1x3_t @test_vld3_dup_f64(double* %a) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.float64x1x3_t, align 8 // CHECK: [[__RET:%.*]] = alloca %struct.float64x1x3_t, align 8 // CHECK: [[TMP0:%.*]] = bitcast %struct.float64x1x3_t* [[__RET]] to i8* @@ -503,7 +503,7 @@ float64x1x3_t test_vld3_dup_f64(float64_t *a) { // [{{x[0-9]+|sp}}] } -// CHECK-LABEL: define %struct.poly64x1x3_t @test_vld3_dup_p64(i64* %a) #2 { +// CHECK-LABEL: define dso_local %struct.poly64x1x3_t @test_vld3_dup_p64(i64* %a) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly64x1x3_t, align 8 // CHECK: [[__RET:%.*]] = alloca %struct.poly64x1x3_t, align 8 // CHECK: [[TMP0:%.*]] = bitcast %struct.poly64x1x3_t* [[__RET]] to i8* @@ -522,7 +522,7 @@ poly64x1x3_t test_vld3_dup_p64(poly64_t *a) { // [{{x[0-9]+|sp}}] } -// CHECK-LABEL: define %struct.uint64x2x4_t @test_vld4q_dup_u64(i64* %a) #2 { +// CHECK-LABEL: define dso_local %struct.uint64x2x4_t @test_vld4q_dup_u64(i64* %a) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint64x2x4_t, align 16 // CHECK: [[__RET:%.*]] = alloca %struct.uint64x2x4_t, align 16 // CHECK: [[TMP0:%.*]] = bitcast %struct.uint64x2x4_t* [[__RET]] to i8* @@ -540,7 +540,7 @@ uint64x2x4_t test_vld4q_dup_u64(uint64_t *a) { return vld4q_dup_u64(a); } -// CHECK-LABEL: define %struct.int64x2x4_t @test_vld4q_dup_s64(i64* %a) #2 { +// CHECK-LABEL: define dso_local %struct.int64x2x4_t @test_vld4q_dup_s64(i64* %a) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int64x2x4_t, align 16 // CHECK: [[__RET:%.*]] = alloca %struct.int64x2x4_t, align 16 // CHECK: [[TMP0:%.*]] = bitcast %struct.int64x2x4_t* [[__RET]] to i8* @@ -558,7 +558,7 @@ int64x2x4_t test_vld4q_dup_s64(int64_t *a) { return vld4q_dup_s64(a); } -// CHECK-LABEL: define %struct.float64x2x4_t @test_vld4q_dup_f64(double* %a) #2 { +// CHECK-LABEL: define dso_local %struct.float64x2x4_t @test_vld4q_dup_f64(double* %a) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.float64x2x4_t, align 16 // CHECK: [[__RET:%.*]] = alloca %struct.float64x2x4_t, align 16 // CHECK: [[TMP0:%.*]] = bitcast %struct.float64x2x4_t* [[__RET]] to i8* @@ -576,7 +576,7 @@ float64x2x4_t test_vld4q_dup_f64(float64_t *a) { return vld4q_dup_f64(a); } -// CHECK-LABEL: define %struct.poly64x2x4_t @test_vld4q_dup_p64(i64* %a) #2 { +// CHECK-LABEL: define dso_local %struct.poly64x2x4_t @test_vld4q_dup_p64(i64* %a) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly64x2x4_t, align 16 // CHECK: [[__RET:%.*]] = alloca %struct.poly64x2x4_t, align 16 // CHECK: [[TMP0:%.*]] = bitcast %struct.poly64x2x4_t* [[__RET]] to i8* @@ -594,7 +594,7 @@ poly64x2x4_t test_vld4q_dup_p64(poly64_t *a) { return vld4q_dup_p64(a); } -// CHECK-LABEL: define %struct.float64x1x4_t @test_vld4_dup_f64(double* %a) #2 { +// CHECK-LABEL: define dso_local %struct.float64x1x4_t @test_vld4_dup_f64(double* %a) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.float64x1x4_t, align 8 // CHECK: [[__RET:%.*]] = alloca %struct.float64x1x4_t, align 8 // CHECK: [[TMP0:%.*]] = bitcast %struct.float64x1x4_t* [[__RET]] to i8* @@ -612,7 +612,7 @@ float64x1x4_t test_vld4_dup_f64(float64_t *a) { return vld4_dup_f64(a); } -// CHECK-LABEL: define %struct.poly64x1x4_t @test_vld4_dup_p64(i64* %a) #2 { +// CHECK-LABEL: define dso_local %struct.poly64x1x4_t @test_vld4_dup_p64(i64* %a) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly64x1x4_t, align 8 // CHECK: [[__RET:%.*]] = alloca %struct.poly64x1x4_t, align 8 // CHECK: [[TMP0:%.*]] = bitcast %struct.poly64x1x4_t* [[__RET]] to i8* @@ -630,7 +630,7 @@ poly64x1x4_t test_vld4_dup_p64(poly64_t *a) { return vld4_dup_p64(a); } -// CHECK-LABEL: define <16 x i8> @test_vld1q_lane_u8(i8* %a, <16 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vld1q_lane_u8(i8* %a, <16 x i8> %b) #0 { // CHECK: [[TMP0:%.*]] = load i8, i8* %a // CHECK: [[VLD1_LANE:%.*]] = insertelement <16 x i8> %b, i8 [[TMP0]], i32 15 // CHECK: ret <16 x i8> [[VLD1_LANE]] @@ -638,7 +638,7 @@ uint8x16_t test_vld1q_lane_u8(uint8_t *a, uint8x16_t b) { return vld1q_lane_u8(a, b, 15); } -// CHECK-LABEL: define <8 x i16> @test_vld1q_lane_u16(i16* %a, <8 x i16> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i16> @test_vld1q_lane_u16(i16* %a, <8 x i16> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast i16* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <8 x i16> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x i16> @@ -650,7 +650,7 @@ uint16x8_t test_vld1q_lane_u16(uint16_t *a, uint16x8_t b) { return vld1q_lane_u16(a, b, 7); } -// CHECK-LABEL: define <4 x i32> @test_vld1q_lane_u32(i32* %a, <4 x i32> %b) #0 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vld1q_lane_u32(i32* %a, <4 x i32> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast i32* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <4 x i32> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <4 x i32> @@ -662,7 +662,7 @@ uint32x4_t test_vld1q_lane_u32(uint32_t *a, uint32x4_t b) { return vld1q_lane_u32(a, b, 3); } -// CHECK-LABEL: define <2 x i64> @test_vld1q_lane_u64(i64* %a, <2 x i64> %b) #0 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vld1q_lane_u64(i64* %a, <2 x i64> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast i64* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <2 x i64> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <2 x i64> @@ -674,7 +674,7 @@ uint64x2_t test_vld1q_lane_u64(uint64_t *a, uint64x2_t b) { return vld1q_lane_u64(a, b, 1); } -// CHECK-LABEL: define <16 x i8> @test_vld1q_lane_s8(i8* %a, <16 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vld1q_lane_s8(i8* %a, <16 x i8> %b) #0 { // CHECK: [[TMP0:%.*]] = load i8, i8* %a // CHECK: [[VLD1_LANE:%.*]] = insertelement <16 x i8> %b, i8 [[TMP0]], i32 15 // CHECK: ret <16 x i8> [[VLD1_LANE]] @@ -682,7 +682,7 @@ int8x16_t test_vld1q_lane_s8(int8_t *a, int8x16_t b) { return vld1q_lane_s8(a, b, 15); } -// CHECK-LABEL: define <8 x i16> @test_vld1q_lane_s16(i16* %a, <8 x i16> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i16> @test_vld1q_lane_s16(i16* %a, <8 x i16> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast i16* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <8 x i16> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x i16> @@ -694,7 +694,7 @@ int16x8_t test_vld1q_lane_s16(int16_t *a, int16x8_t b) { return vld1q_lane_s16(a, b, 7); } -// CHECK-LABEL: define <4 x i32> @test_vld1q_lane_s32(i32* %a, <4 x i32> %b) #0 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vld1q_lane_s32(i32* %a, <4 x i32> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast i32* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <4 x i32> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <4 x i32> @@ -706,7 +706,7 @@ int32x4_t test_vld1q_lane_s32(int32_t *a, int32x4_t b) { return vld1q_lane_s32(a, b, 3); } -// CHECK-LABEL: define <2 x i64> @test_vld1q_lane_s64(i64* %a, <2 x i64> %b) #0 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vld1q_lane_s64(i64* %a, <2 x i64> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast i64* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <2 x i64> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <2 x i64> @@ -718,7 +718,7 @@ int64x2_t test_vld1q_lane_s64(int64_t *a, int64x2_t b) { return vld1q_lane_s64(a, b, 1); } -// CHECK-LABEL: define <8 x half> @test_vld1q_lane_f16(half* %a, <8 x half> %b) #0 { +// CHECK-LABEL: define dso_local <8 x half> @test_vld1q_lane_f16(half* %a, <8 x half> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast half* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <8 x half> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half> @@ -730,7 +730,7 @@ float16x8_t test_vld1q_lane_f16(float16_t *a, float16x8_t b) { return vld1q_lane_f16(a, b, 7); } -// CHECK-LABEL: define <4 x float> @test_vld1q_lane_f32(float* %a, <4 x float> %b) #0 { +// CHECK-LABEL: define dso_local <4 x float> @test_vld1q_lane_f32(float* %a, <4 x float> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast float* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <4 x float> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <4 x float> @@ -742,7 +742,7 @@ float32x4_t test_vld1q_lane_f32(float32_t *a, float32x4_t b) { return vld1q_lane_f32(a, b, 3); } -// CHECK-LABEL: define <2 x double> @test_vld1q_lane_f64(double* %a, <2 x double> %b) #0 { +// CHECK-LABEL: define dso_local <2 x double> @test_vld1q_lane_f64(double* %a, <2 x double> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast double* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <2 x double> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <2 x double> @@ -754,7 +754,7 @@ float64x2_t test_vld1q_lane_f64(float64_t *a, float64x2_t b) { return vld1q_lane_f64(a, b, 1); } -// CHECK-LABEL: define <16 x i8> @test_vld1q_lane_p8(i8* %a, <16 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vld1q_lane_p8(i8* %a, <16 x i8> %b) #0 { // CHECK: [[TMP0:%.*]] = load i8, i8* %a // CHECK: [[VLD1_LANE:%.*]] = insertelement <16 x i8> %b, i8 [[TMP0]], i32 15 // CHECK: ret <16 x i8> [[VLD1_LANE]] @@ -762,7 +762,7 @@ poly8x16_t test_vld1q_lane_p8(poly8_t *a, poly8x16_t b) { return vld1q_lane_p8(a, b, 15); } -// CHECK-LABEL: define <8 x i16> @test_vld1q_lane_p16(i16* %a, <8 x i16> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i16> @test_vld1q_lane_p16(i16* %a, <8 x i16> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast i16* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <8 x i16> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x i16> @@ -774,7 +774,7 @@ poly16x8_t test_vld1q_lane_p16(poly16_t *a, poly16x8_t b) { return vld1q_lane_p16(a, b, 7); } -// CHECK-LABEL: define <2 x i64> @test_vld1q_lane_p64(i64* %a, <2 x i64> %b) #0 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vld1q_lane_p64(i64* %a, <2 x i64> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast i64* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <2 x i64> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <2 x i64> @@ -786,7 +786,7 @@ poly64x2_t test_vld1q_lane_p64(poly64_t *a, poly64x2_t b) { return vld1q_lane_p64(a, b, 1); } -// CHECK-LABEL: define <8 x i8> @test_vld1_lane_u8(i8* %a, <8 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vld1_lane_u8(i8* %a, <8 x i8> %b) #1 { // CHECK: [[TMP0:%.*]] = load i8, i8* %a // CHECK: [[VLD1_LANE:%.*]] = insertelement <8 x i8> %b, i8 [[TMP0]], i32 7 // CHECK: ret <8 x i8> [[VLD1_LANE]] @@ -794,7 +794,7 @@ uint8x8_t test_vld1_lane_u8(uint8_t *a, uint8x8_t b) { return vld1_lane_u8(a, b, 7); } -// CHECK-LABEL: define <4 x i16> @test_vld1_lane_u16(i16* %a, <4 x i16> %b) #1 { +// CHECK-LABEL: define dso_local <4 x i16> @test_vld1_lane_u16(i16* %a, <4 x i16> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast i16* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <4 x i16> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x i16> @@ -806,7 +806,7 @@ uint16x4_t test_vld1_lane_u16(uint16_t *a, uint16x4_t b) { return vld1_lane_u16(a, b, 3); } -// CHECK-LABEL: define <2 x i32> @test_vld1_lane_u32(i32* %a, <2 x i32> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vld1_lane_u32(i32* %a, <2 x i32> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast i32* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <2 x i32> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <2 x i32> @@ -818,7 +818,7 @@ uint32x2_t test_vld1_lane_u32(uint32_t *a, uint32x2_t b) { return vld1_lane_u32(a, b, 1); } -// CHECK-LABEL: define <1 x i64> @test_vld1_lane_u64(i64* %a, <1 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vld1_lane_u64(i64* %a, <1 x i64> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast i64* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <1 x i64> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <1 x i64> @@ -830,7 +830,7 @@ uint64x1_t test_vld1_lane_u64(uint64_t *a, uint64x1_t b) { return vld1_lane_u64(a, b, 0); } -// CHECK-LABEL: define <8 x i8> @test_vld1_lane_s8(i8* %a, <8 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vld1_lane_s8(i8* %a, <8 x i8> %b) #1 { // CHECK: [[TMP0:%.*]] = load i8, i8* %a // CHECK: [[VLD1_LANE:%.*]] = insertelement <8 x i8> %b, i8 [[TMP0]], i32 7 // CHECK: ret <8 x i8> [[VLD1_LANE]] @@ -838,7 +838,7 @@ int8x8_t test_vld1_lane_s8(int8_t *a, int8x8_t b) { return vld1_lane_s8(a, b, 7); } -// CHECK-LABEL: define <4 x i16> @test_vld1_lane_s16(i16* %a, <4 x i16> %b) #1 { +// CHECK-LABEL: define dso_local <4 x i16> @test_vld1_lane_s16(i16* %a, <4 x i16> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast i16* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <4 x i16> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x i16> @@ -850,7 +850,7 @@ int16x4_t test_vld1_lane_s16(int16_t *a, int16x4_t b) { return vld1_lane_s16(a, b, 3); } -// CHECK-LABEL: define <2 x i32> @test_vld1_lane_s32(i32* %a, <2 x i32> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vld1_lane_s32(i32* %a, <2 x i32> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast i32* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <2 x i32> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <2 x i32> @@ -862,7 +862,7 @@ int32x2_t test_vld1_lane_s32(int32_t *a, int32x2_t b) { return vld1_lane_s32(a, b, 1); } -// CHECK-LABEL: define <1 x i64> @test_vld1_lane_s64(i64* %a, <1 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vld1_lane_s64(i64* %a, <1 x i64> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast i64* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <1 x i64> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <1 x i64> @@ -874,7 +874,7 @@ int64x1_t test_vld1_lane_s64(int64_t *a, int64x1_t b) { return vld1_lane_s64(a, b, 0); } -// CHECK-LABEL: define <4 x half> @test_vld1_lane_f16(half* %a, <4 x half> %b) #1 { +// CHECK-LABEL: define dso_local <4 x half> @test_vld1_lane_f16(half* %a, <4 x half> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast half* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <4 x half> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half> @@ -886,7 +886,7 @@ float16x4_t test_vld1_lane_f16(float16_t *a, float16x4_t b) { return vld1_lane_f16(a, b, 3); } -// CHECK-LABEL: define <2 x float> @test_vld1_lane_f32(float* %a, <2 x float> %b) #1 { +// CHECK-LABEL: define dso_local <2 x float> @test_vld1_lane_f32(float* %a, <2 x float> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast float* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <2 x float> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <2 x float> @@ -898,7 +898,7 @@ float32x2_t test_vld1_lane_f32(float32_t *a, float32x2_t b) { return vld1_lane_f32(a, b, 1); } -// CHECK-LABEL: define <1 x double> @test_vld1_lane_f64(double* %a, <1 x double> %b) #1 { +// CHECK-LABEL: define dso_local <1 x double> @test_vld1_lane_f64(double* %a, <1 x double> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast double* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <1 x double> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <1 x double> @@ -910,7 +910,7 @@ float64x1_t test_vld1_lane_f64(float64_t *a, float64x1_t b) { return vld1_lane_f64(a, b, 0); } -// CHECK-LABEL: define <8 x i8> @test_vld1_lane_p8(i8* %a, <8 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vld1_lane_p8(i8* %a, <8 x i8> %b) #1 { // CHECK: [[TMP0:%.*]] = load i8, i8* %a // CHECK: [[VLD1_LANE:%.*]] = insertelement <8 x i8> %b, i8 [[TMP0]], i32 7 // CHECK: ret <8 x i8> [[VLD1_LANE]] @@ -918,7 +918,7 @@ poly8x8_t test_vld1_lane_p8(poly8_t *a, poly8x8_t b) { return vld1_lane_p8(a, b, 7); } -// CHECK-LABEL: define <4 x i16> @test_vld1_lane_p16(i16* %a, <4 x i16> %b) #1 { +// CHECK-LABEL: define dso_local <4 x i16> @test_vld1_lane_p16(i16* %a, <4 x i16> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast i16* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <4 x i16> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x i16> @@ -930,7 +930,7 @@ poly16x4_t test_vld1_lane_p16(poly16_t *a, poly16x4_t b) { return vld1_lane_p16(a, b, 3); } -// CHECK-LABEL: define <1 x i64> @test_vld1_lane_p64(i64* %a, <1 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vld1_lane_p64(i64* %a, <1 x i64> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast i64* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <1 x i64> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <1 x i64> @@ -942,7 +942,7 @@ poly64x1_t test_vld1_lane_p64(poly64_t *a, poly64x1_t b) { return vld1_lane_p64(a, b, 0); } -// CHECK-LABEL: define %struct.int8x16x2_t @test_vld2q_lane_s8(i8* %ptr, [2 x <16 x i8>] %src.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.int8x16x2_t @test_vld2q_lane_s8(i8* %ptr, [2 x <16 x i8>] %src.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int8x16x2_t, align 16 // CHECK: [[SRC:%.*]] = alloca %struct.int8x16x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.int8x16x2_t, align 16 @@ -971,7 +971,7 @@ int8x16x2_t test_vld2q_lane_s8(int8_t const * ptr, int8x16x2_t src) { return vld2q_lane_s8(ptr, src, 15); } -// CHECK-LABEL: define %struct.uint8x16x2_t @test_vld2q_lane_u8(i8* %ptr, [2 x <16 x i8>] %src.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.uint8x16x2_t @test_vld2q_lane_u8(i8* %ptr, [2 x <16 x i8>] %src.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint8x16x2_t, align 16 // CHECK: [[SRC:%.*]] = alloca %struct.uint8x16x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.uint8x16x2_t, align 16 @@ -1000,7 +1000,7 @@ uint8x16x2_t test_vld2q_lane_u8(uint8_t const * ptr, uint8x16x2_t src) { return vld2q_lane_u8(ptr, src, 15); } -// CHECK-LABEL: define %struct.poly8x16x2_t @test_vld2q_lane_p8(i8* %ptr, [2 x <16 x i8>] %src.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.poly8x16x2_t @test_vld2q_lane_p8(i8* %ptr, [2 x <16 x i8>] %src.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly8x16x2_t, align 16 // CHECK: [[SRC:%.*]] = alloca %struct.poly8x16x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.poly8x16x2_t, align 16 @@ -1029,7 +1029,7 @@ poly8x16x2_t test_vld2q_lane_p8(poly8_t const * ptr, poly8x16x2_t src) { return vld2q_lane_p8(ptr, src, 15); } -// CHECK-LABEL: define %struct.int8x16x3_t @test_vld3q_lane_s8(i8* %ptr, [3 x <16 x i8>] %src.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.int8x16x3_t @test_vld3q_lane_s8(i8* %ptr, [3 x <16 x i8>] %src.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int8x16x3_t, align 16 // CHECK: [[SRC:%.*]] = alloca %struct.int8x16x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.int8x16x3_t, align 16 @@ -1061,7 +1061,7 @@ int8x16x3_t test_vld3q_lane_s8(int8_t const * ptr, int8x16x3_t src) { return vld3q_lane_s8(ptr, src, 15); } -// CHECK-LABEL: define %struct.uint8x16x3_t @test_vld3q_lane_u8(i8* %ptr, [3 x <16 x i8>] %src.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.uint8x16x3_t @test_vld3q_lane_u8(i8* %ptr, [3 x <16 x i8>] %src.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint8x16x3_t, align 16 // CHECK: [[SRC:%.*]] = alloca %struct.uint8x16x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.uint8x16x3_t, align 16 @@ -1093,7 +1093,7 @@ uint8x16x3_t test_vld3q_lane_u8(uint8_t const * ptr, uint8x16x3_t src) { return vld3q_lane_u8(ptr, src, 15); } -// CHECK-LABEL: define %struct.uint16x8x2_t @test_vld2q_lane_u16(i16* %a, [2 x <8 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.uint16x8x2_t @test_vld2q_lane_u16(i16* %a, [2 x <8 x i16>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint16x8x2_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.uint16x8x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.uint16x8x2_t, align 16 @@ -1127,7 +1127,7 @@ uint16x8x2_t test_vld2q_lane_u16(uint16_t *a, uint16x8x2_t b) { return vld2q_lane_u16(a, b, 7); } -// CHECK-LABEL: define %struct.uint32x4x2_t @test_vld2q_lane_u32(i32* %a, [2 x <4 x i32>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.uint32x4x2_t @test_vld2q_lane_u32(i32* %a, [2 x <4 x i32>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint32x4x2_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.uint32x4x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.uint32x4x2_t, align 16 @@ -1161,7 +1161,7 @@ uint32x4x2_t test_vld2q_lane_u32(uint32_t *a, uint32x4x2_t b) { return vld2q_lane_u32(a, b, 3); } -// CHECK-LABEL: define %struct.uint64x2x2_t @test_vld2q_lane_u64(i64* %a, [2 x <2 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.uint64x2x2_t @test_vld2q_lane_u64(i64* %a, [2 x <2 x i64>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint64x2x2_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.uint64x2x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.uint64x2x2_t, align 16 @@ -1195,7 +1195,7 @@ uint64x2x2_t test_vld2q_lane_u64(uint64_t *a, uint64x2x2_t b) { return vld2q_lane_u64(a, b, 1); } -// CHECK-LABEL: define %struct.int16x8x2_t @test_vld2q_lane_s16(i16* %a, [2 x <8 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.int16x8x2_t @test_vld2q_lane_s16(i16* %a, [2 x <8 x i16>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int16x8x2_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.int16x8x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.int16x8x2_t, align 16 @@ -1229,7 +1229,7 @@ int16x8x2_t test_vld2q_lane_s16(int16_t *a, int16x8x2_t b) { return vld2q_lane_s16(a, b, 7); } -// CHECK-LABEL: define %struct.int32x4x2_t @test_vld2q_lane_s32(i32* %a, [2 x <4 x i32>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.int32x4x2_t @test_vld2q_lane_s32(i32* %a, [2 x <4 x i32>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int32x4x2_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.int32x4x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.int32x4x2_t, align 16 @@ -1263,7 +1263,7 @@ int32x4x2_t test_vld2q_lane_s32(int32_t *a, int32x4x2_t b) { return vld2q_lane_s32(a, b, 3); } -// CHECK-LABEL: define %struct.int64x2x2_t @test_vld2q_lane_s64(i64* %a, [2 x <2 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.int64x2x2_t @test_vld2q_lane_s64(i64* %a, [2 x <2 x i64>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int64x2x2_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.int64x2x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.int64x2x2_t, align 16 @@ -1297,7 +1297,7 @@ int64x2x2_t test_vld2q_lane_s64(int64_t *a, int64x2x2_t b) { return vld2q_lane_s64(a, b, 1); } -// CHECK-LABEL: define %struct.float16x8x2_t @test_vld2q_lane_f16(half* %a, [2 x <8 x half>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.float16x8x2_t @test_vld2q_lane_f16(half* %a, [2 x <8 x half>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.float16x8x2_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.float16x8x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.float16x8x2_t, align 16 @@ -1331,7 +1331,7 @@ float16x8x2_t test_vld2q_lane_f16(float16_t *a, float16x8x2_t b) { return vld2q_lane_f16(a, b, 7); } -// CHECK-LABEL: define %struct.float32x4x2_t @test_vld2q_lane_f32(float* %a, [2 x <4 x float>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.float32x4x2_t @test_vld2q_lane_f32(float* %a, [2 x <4 x float>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.float32x4x2_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.float32x4x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.float32x4x2_t, align 16 @@ -1365,7 +1365,7 @@ float32x4x2_t test_vld2q_lane_f32(float32_t *a, float32x4x2_t b) { return vld2q_lane_f32(a, b, 3); } -// CHECK-LABEL: define %struct.float64x2x2_t @test_vld2q_lane_f64(double* %a, [2 x <2 x double>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.float64x2x2_t @test_vld2q_lane_f64(double* %a, [2 x <2 x double>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.float64x2x2_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.float64x2x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.float64x2x2_t, align 16 @@ -1399,7 +1399,7 @@ float64x2x2_t test_vld2q_lane_f64(float64_t *a, float64x2x2_t b) { return vld2q_lane_f64(a, b, 1); } -// CHECK-LABEL: define %struct.poly16x8x2_t @test_vld2q_lane_p16(i16* %a, [2 x <8 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.poly16x8x2_t @test_vld2q_lane_p16(i16* %a, [2 x <8 x i16>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly16x8x2_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.poly16x8x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.poly16x8x2_t, align 16 @@ -1433,7 +1433,7 @@ poly16x8x2_t test_vld2q_lane_p16(poly16_t *a, poly16x8x2_t b) { return vld2q_lane_p16(a, b, 7); } -// CHECK-LABEL: define %struct.poly64x2x2_t @test_vld2q_lane_p64(i64* %a, [2 x <2 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.poly64x2x2_t @test_vld2q_lane_p64(i64* %a, [2 x <2 x i64>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly64x2x2_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.poly64x2x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.poly64x2x2_t, align 16 @@ -1467,7 +1467,7 @@ poly64x2x2_t test_vld2q_lane_p64(poly64_t *a, poly64x2x2_t b) { return vld2q_lane_p64(a, b, 1); } -// CHECK-LABEL: define %struct.uint8x8x2_t @test_vld2_lane_u8(i8* %a, [2 x <8 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.uint8x8x2_t @test_vld2_lane_u8(i8* %a, [2 x <8 x i8>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint8x8x2_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.uint8x8x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.uint8x8x2_t, align 8 @@ -1496,7 +1496,7 @@ uint8x8x2_t test_vld2_lane_u8(uint8_t *a, uint8x8x2_t b) { return vld2_lane_u8(a, b, 7); } -// CHECK-LABEL: define %struct.uint16x4x2_t @test_vld2_lane_u16(i16* %a, [2 x <4 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.uint16x4x2_t @test_vld2_lane_u16(i16* %a, [2 x <4 x i16>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint16x4x2_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.uint16x4x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.uint16x4x2_t, align 8 @@ -1530,7 +1530,7 @@ uint16x4x2_t test_vld2_lane_u16(uint16_t *a, uint16x4x2_t b) { return vld2_lane_u16(a, b, 3); } -// CHECK-LABEL: define %struct.uint32x2x2_t @test_vld2_lane_u32(i32* %a, [2 x <2 x i32>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.uint32x2x2_t @test_vld2_lane_u32(i32* %a, [2 x <2 x i32>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint32x2x2_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.uint32x2x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.uint32x2x2_t, align 8 @@ -1564,7 +1564,7 @@ uint32x2x2_t test_vld2_lane_u32(uint32_t *a, uint32x2x2_t b) { return vld2_lane_u32(a, b, 1); } -// CHECK-LABEL: define %struct.uint64x1x2_t @test_vld2_lane_u64(i64* %a, [2 x <1 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.uint64x1x2_t @test_vld2_lane_u64(i64* %a, [2 x <1 x i64>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint64x1x2_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.uint64x1x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.uint64x1x2_t, align 8 @@ -1598,7 +1598,7 @@ uint64x1x2_t test_vld2_lane_u64(uint64_t *a, uint64x1x2_t b) { return vld2_lane_u64(a, b, 0); } -// CHECK-LABEL: define %struct.int8x8x2_t @test_vld2_lane_s8(i8* %a, [2 x <8 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.int8x8x2_t @test_vld2_lane_s8(i8* %a, [2 x <8 x i8>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int8x8x2_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.int8x8x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.int8x8x2_t, align 8 @@ -1627,7 +1627,7 @@ int8x8x2_t test_vld2_lane_s8(int8_t *a, int8x8x2_t b) { return vld2_lane_s8(a, b, 7); } -// CHECK-LABEL: define %struct.int16x4x2_t @test_vld2_lane_s16(i16* %a, [2 x <4 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.int16x4x2_t @test_vld2_lane_s16(i16* %a, [2 x <4 x i16>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int16x4x2_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.int16x4x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.int16x4x2_t, align 8 @@ -1661,7 +1661,7 @@ int16x4x2_t test_vld2_lane_s16(int16_t *a, int16x4x2_t b) { return vld2_lane_s16(a, b, 3); } -// CHECK-LABEL: define %struct.int32x2x2_t @test_vld2_lane_s32(i32* %a, [2 x <2 x i32>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.int32x2x2_t @test_vld2_lane_s32(i32* %a, [2 x <2 x i32>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int32x2x2_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.int32x2x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.int32x2x2_t, align 8 @@ -1695,7 +1695,7 @@ int32x2x2_t test_vld2_lane_s32(int32_t *a, int32x2x2_t b) { return vld2_lane_s32(a, b, 1); } -// CHECK-LABEL: define %struct.int64x1x2_t @test_vld2_lane_s64(i64* %a, [2 x <1 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.int64x1x2_t @test_vld2_lane_s64(i64* %a, [2 x <1 x i64>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int64x1x2_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.int64x1x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.int64x1x2_t, align 8 @@ -1729,7 +1729,7 @@ int64x1x2_t test_vld2_lane_s64(int64_t *a, int64x1x2_t b) { return vld2_lane_s64(a, b, 0); } -// CHECK-LABEL: define %struct.float16x4x2_t @test_vld2_lane_f16(half* %a, [2 x <4 x half>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.float16x4x2_t @test_vld2_lane_f16(half* %a, [2 x <4 x half>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.float16x4x2_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.float16x4x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.float16x4x2_t, align 8 @@ -1763,7 +1763,7 @@ float16x4x2_t test_vld2_lane_f16(float16_t *a, float16x4x2_t b) { return vld2_lane_f16(a, b, 3); } -// CHECK-LABEL: define %struct.float32x2x2_t @test_vld2_lane_f32(float* %a, [2 x <2 x float>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.float32x2x2_t @test_vld2_lane_f32(float* %a, [2 x <2 x float>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.float32x2x2_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.float32x2x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.float32x2x2_t, align 8 @@ -1797,7 +1797,7 @@ float32x2x2_t test_vld2_lane_f32(float32_t *a, float32x2x2_t b) { return vld2_lane_f32(a, b, 1); } -// CHECK-LABEL: define %struct.float64x1x2_t @test_vld2_lane_f64(double* %a, [2 x <1 x double>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.float64x1x2_t @test_vld2_lane_f64(double* %a, [2 x <1 x double>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.float64x1x2_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.float64x1x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.float64x1x2_t, align 8 @@ -1831,7 +1831,7 @@ float64x1x2_t test_vld2_lane_f64(float64_t *a, float64x1x2_t b) { return vld2_lane_f64(a, b, 0); } -// CHECK-LABEL: define %struct.poly8x8x2_t @test_vld2_lane_p8(i8* %a, [2 x <8 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.poly8x8x2_t @test_vld2_lane_p8(i8* %a, [2 x <8 x i8>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly8x8x2_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.poly8x8x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.poly8x8x2_t, align 8 @@ -1860,7 +1860,7 @@ poly8x8x2_t test_vld2_lane_p8(poly8_t *a, poly8x8x2_t b) { return vld2_lane_p8(a, b, 7); } -// CHECK-LABEL: define %struct.poly16x4x2_t @test_vld2_lane_p16(i16* %a, [2 x <4 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.poly16x4x2_t @test_vld2_lane_p16(i16* %a, [2 x <4 x i16>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly16x4x2_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.poly16x4x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.poly16x4x2_t, align 8 @@ -1894,7 +1894,7 @@ poly16x4x2_t test_vld2_lane_p16(poly16_t *a, poly16x4x2_t b) { return vld2_lane_p16(a, b, 3); } -// CHECK-LABEL: define %struct.poly64x1x2_t @test_vld2_lane_p64(i64* %a, [2 x <1 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.poly64x1x2_t @test_vld2_lane_p64(i64* %a, [2 x <1 x i64>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly64x1x2_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.poly64x1x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.poly64x1x2_t, align 8 @@ -1928,7 +1928,7 @@ poly64x1x2_t test_vld2_lane_p64(poly64_t *a, poly64x1x2_t b) { return vld2_lane_p64(a, b, 0); } -// CHECK-LABEL: define %struct.uint16x8x3_t @test_vld3q_lane_u16(i16* %a, [3 x <8 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.uint16x8x3_t @test_vld3q_lane_u16(i16* %a, [3 x <8 x i16>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint16x8x3_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.uint16x8x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.uint16x8x3_t, align 16 @@ -1967,7 +1967,7 @@ uint16x8x3_t test_vld3q_lane_u16(uint16_t *a, uint16x8x3_t b) { return vld3q_lane_u16(a, b, 7); } -// CHECK-LABEL: define %struct.uint32x4x3_t @test_vld3q_lane_u32(i32* %a, [3 x <4 x i32>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.uint32x4x3_t @test_vld3q_lane_u32(i32* %a, [3 x <4 x i32>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint32x4x3_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.uint32x4x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.uint32x4x3_t, align 16 @@ -2006,7 +2006,7 @@ uint32x4x3_t test_vld3q_lane_u32(uint32_t *a, uint32x4x3_t b) { return vld3q_lane_u32(a, b, 3); } -// CHECK-LABEL: define %struct.uint64x2x3_t @test_vld3q_lane_u64(i64* %a, [3 x <2 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.uint64x2x3_t @test_vld3q_lane_u64(i64* %a, [3 x <2 x i64>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint64x2x3_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.uint64x2x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.uint64x2x3_t, align 16 @@ -2045,7 +2045,7 @@ uint64x2x3_t test_vld3q_lane_u64(uint64_t *a, uint64x2x3_t b) { return vld3q_lane_u64(a, b, 1); } -// CHECK-LABEL: define %struct.int16x8x3_t @test_vld3q_lane_s16(i16* %a, [3 x <8 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.int16x8x3_t @test_vld3q_lane_s16(i16* %a, [3 x <8 x i16>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int16x8x3_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.int16x8x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.int16x8x3_t, align 16 @@ -2084,7 +2084,7 @@ int16x8x3_t test_vld3q_lane_s16(int16_t *a, int16x8x3_t b) { return vld3q_lane_s16(a, b, 7); } -// CHECK-LABEL: define %struct.int32x4x3_t @test_vld3q_lane_s32(i32* %a, [3 x <4 x i32>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.int32x4x3_t @test_vld3q_lane_s32(i32* %a, [3 x <4 x i32>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int32x4x3_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.int32x4x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.int32x4x3_t, align 16 @@ -2123,7 +2123,7 @@ int32x4x3_t test_vld3q_lane_s32(int32_t *a, int32x4x3_t b) { return vld3q_lane_s32(a, b, 3); } -// CHECK-LABEL: define %struct.int64x2x3_t @test_vld3q_lane_s64(i64* %a, [3 x <2 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.int64x2x3_t @test_vld3q_lane_s64(i64* %a, [3 x <2 x i64>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int64x2x3_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.int64x2x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.int64x2x3_t, align 16 @@ -2162,7 +2162,7 @@ int64x2x3_t test_vld3q_lane_s64(int64_t *a, int64x2x3_t b) { return vld3q_lane_s64(a, b, 1); } -// CHECK-LABEL: define %struct.float16x8x3_t @test_vld3q_lane_f16(half* %a, [3 x <8 x half>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.float16x8x3_t @test_vld3q_lane_f16(half* %a, [3 x <8 x half>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.float16x8x3_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.float16x8x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.float16x8x3_t, align 16 @@ -2201,7 +2201,7 @@ float16x8x3_t test_vld3q_lane_f16(float16_t *a, float16x8x3_t b) { return vld3q_lane_f16(a, b, 7); } -// CHECK-LABEL: define %struct.float32x4x3_t @test_vld3q_lane_f32(float* %a, [3 x <4 x float>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.float32x4x3_t @test_vld3q_lane_f32(float* %a, [3 x <4 x float>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.float32x4x3_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.float32x4x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.float32x4x3_t, align 16 @@ -2240,7 +2240,7 @@ float32x4x3_t test_vld3q_lane_f32(float32_t *a, float32x4x3_t b) { return vld3q_lane_f32(a, b, 3); } -// CHECK-LABEL: define %struct.float64x2x3_t @test_vld3q_lane_f64(double* %a, [3 x <2 x double>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.float64x2x3_t @test_vld3q_lane_f64(double* %a, [3 x <2 x double>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.float64x2x3_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.float64x2x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.float64x2x3_t, align 16 @@ -2279,7 +2279,7 @@ float64x2x3_t test_vld3q_lane_f64(float64_t *a, float64x2x3_t b) { return vld3q_lane_f64(a, b, 1); } -// CHECK-LABEL: define %struct.poly8x16x3_t @test_vld3q_lane_p8(i8* %a, [3 x <16 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.poly8x16x3_t @test_vld3q_lane_p8(i8* %a, [3 x <16 x i8>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly8x16x3_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.poly8x16x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.poly8x16x3_t, align 16 @@ -2311,7 +2311,7 @@ poly8x16x3_t test_vld3q_lane_p8(poly8_t *a, poly8x16x3_t b) { return vld3q_lane_p8(a, b, 15); } -// CHECK-LABEL: define %struct.poly16x8x3_t @test_vld3q_lane_p16(i16* %a, [3 x <8 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.poly16x8x3_t @test_vld3q_lane_p16(i16* %a, [3 x <8 x i16>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly16x8x3_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.poly16x8x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.poly16x8x3_t, align 16 @@ -2350,7 +2350,7 @@ poly16x8x3_t test_vld3q_lane_p16(poly16_t *a, poly16x8x3_t b) { return vld3q_lane_p16(a, b, 7); } -// CHECK-LABEL: define %struct.poly64x2x3_t @test_vld3q_lane_p64(i64* %a, [3 x <2 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.poly64x2x3_t @test_vld3q_lane_p64(i64* %a, [3 x <2 x i64>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly64x2x3_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.poly64x2x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.poly64x2x3_t, align 16 @@ -2389,7 +2389,7 @@ poly64x2x3_t test_vld3q_lane_p64(poly64_t *a, poly64x2x3_t b) { return vld3q_lane_p64(a, b, 1); } -// CHECK-LABEL: define %struct.uint8x8x3_t @test_vld3_lane_u8(i8* %a, [3 x <8 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.uint8x8x3_t @test_vld3_lane_u8(i8* %a, [3 x <8 x i8>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint8x8x3_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.uint8x8x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.uint8x8x3_t, align 8 @@ -2421,7 +2421,7 @@ uint8x8x3_t test_vld3_lane_u8(uint8_t *a, uint8x8x3_t b) { return vld3_lane_u8(a, b, 7); } -// CHECK-LABEL: define %struct.uint16x4x3_t @test_vld3_lane_u16(i16* %a, [3 x <4 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.uint16x4x3_t @test_vld3_lane_u16(i16* %a, [3 x <4 x i16>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint16x4x3_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.uint16x4x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.uint16x4x3_t, align 8 @@ -2460,7 +2460,7 @@ uint16x4x3_t test_vld3_lane_u16(uint16_t *a, uint16x4x3_t b) { return vld3_lane_u16(a, b, 3); } -// CHECK-LABEL: define %struct.uint32x2x3_t @test_vld3_lane_u32(i32* %a, [3 x <2 x i32>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.uint32x2x3_t @test_vld3_lane_u32(i32* %a, [3 x <2 x i32>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint32x2x3_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.uint32x2x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.uint32x2x3_t, align 8 @@ -2499,7 +2499,7 @@ uint32x2x3_t test_vld3_lane_u32(uint32_t *a, uint32x2x3_t b) { return vld3_lane_u32(a, b, 1); } -// CHECK-LABEL: define %struct.uint64x1x3_t @test_vld3_lane_u64(i64* %a, [3 x <1 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.uint64x1x3_t @test_vld3_lane_u64(i64* %a, [3 x <1 x i64>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint64x1x3_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.uint64x1x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.uint64x1x3_t, align 8 @@ -2538,7 +2538,7 @@ uint64x1x3_t test_vld3_lane_u64(uint64_t *a, uint64x1x3_t b) { return vld3_lane_u64(a, b, 0); } -// CHECK-LABEL: define %struct.int8x8x3_t @test_vld3_lane_s8(i8* %a, [3 x <8 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.int8x8x3_t @test_vld3_lane_s8(i8* %a, [3 x <8 x i8>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int8x8x3_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.int8x8x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.int8x8x3_t, align 8 @@ -2570,7 +2570,7 @@ int8x8x3_t test_vld3_lane_s8(int8_t *a, int8x8x3_t b) { return vld3_lane_s8(a, b, 7); } -// CHECK-LABEL: define %struct.int16x4x3_t @test_vld3_lane_s16(i16* %a, [3 x <4 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.int16x4x3_t @test_vld3_lane_s16(i16* %a, [3 x <4 x i16>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int16x4x3_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.int16x4x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.int16x4x3_t, align 8 @@ -2609,7 +2609,7 @@ int16x4x3_t test_vld3_lane_s16(int16_t *a, int16x4x3_t b) { return vld3_lane_s16(a, b, 3); } -// CHECK-LABEL: define %struct.int32x2x3_t @test_vld3_lane_s32(i32* %a, [3 x <2 x i32>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.int32x2x3_t @test_vld3_lane_s32(i32* %a, [3 x <2 x i32>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int32x2x3_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.int32x2x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.int32x2x3_t, align 8 @@ -2648,7 +2648,7 @@ int32x2x3_t test_vld3_lane_s32(int32_t *a, int32x2x3_t b) { return vld3_lane_s32(a, b, 1); } -// CHECK-LABEL: define %struct.int64x1x3_t @test_vld3_lane_s64(i64* %a, [3 x <1 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.int64x1x3_t @test_vld3_lane_s64(i64* %a, [3 x <1 x i64>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int64x1x3_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.int64x1x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.int64x1x3_t, align 8 @@ -2687,7 +2687,7 @@ int64x1x3_t test_vld3_lane_s64(int64_t *a, int64x1x3_t b) { return vld3_lane_s64(a, b, 0); } -// CHECK-LABEL: define %struct.float16x4x3_t @test_vld3_lane_f16(half* %a, [3 x <4 x half>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.float16x4x3_t @test_vld3_lane_f16(half* %a, [3 x <4 x half>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.float16x4x3_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.float16x4x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.float16x4x3_t, align 8 @@ -2726,7 +2726,7 @@ float16x4x3_t test_vld3_lane_f16(float16_t *a, float16x4x3_t b) { return vld3_lane_f16(a, b, 3); } -// CHECK-LABEL: define %struct.float32x2x3_t @test_vld3_lane_f32(float* %a, [3 x <2 x float>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.float32x2x3_t @test_vld3_lane_f32(float* %a, [3 x <2 x float>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.float32x2x3_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.float32x2x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.float32x2x3_t, align 8 @@ -2765,7 +2765,7 @@ float32x2x3_t test_vld3_lane_f32(float32_t *a, float32x2x3_t b) { return vld3_lane_f32(a, b, 1); } -// CHECK-LABEL: define %struct.float64x1x3_t @test_vld3_lane_f64(double* %a, [3 x <1 x double>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.float64x1x3_t @test_vld3_lane_f64(double* %a, [3 x <1 x double>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.float64x1x3_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.float64x1x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.float64x1x3_t, align 8 @@ -2804,7 +2804,7 @@ float64x1x3_t test_vld3_lane_f64(float64_t *a, float64x1x3_t b) { return vld3_lane_f64(a, b, 0); } -// CHECK-LABEL: define %struct.poly8x8x3_t @test_vld3_lane_p8(i8* %a, [3 x <8 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.poly8x8x3_t @test_vld3_lane_p8(i8* %a, [3 x <8 x i8>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly8x8x3_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.poly8x8x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.poly8x8x3_t, align 8 @@ -2836,7 +2836,7 @@ poly8x8x3_t test_vld3_lane_p8(poly8_t *a, poly8x8x3_t b) { return vld3_lane_p8(a, b, 7); } -// CHECK-LABEL: define %struct.poly16x4x3_t @test_vld3_lane_p16(i16* %a, [3 x <4 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.poly16x4x3_t @test_vld3_lane_p16(i16* %a, [3 x <4 x i16>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly16x4x3_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.poly16x4x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.poly16x4x3_t, align 8 @@ -2875,7 +2875,7 @@ poly16x4x3_t test_vld3_lane_p16(poly16_t *a, poly16x4x3_t b) { return vld3_lane_p16(a, b, 3); } -// CHECK-LABEL: define %struct.poly64x1x3_t @test_vld3_lane_p64(i64* %a, [3 x <1 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.poly64x1x3_t @test_vld3_lane_p64(i64* %a, [3 x <1 x i64>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly64x1x3_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.poly64x1x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.poly64x1x3_t, align 8 @@ -2914,7 +2914,7 @@ poly64x1x3_t test_vld3_lane_p64(poly64_t *a, poly64x1x3_t b) { return vld3_lane_p64(a, b, 0); } -// CHECK-LABEL: define %struct.uint8x16x4_t @test_vld4q_lane_u8(i8* %a, [4 x <16 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.uint8x16x4_t @test_vld4q_lane_u8(i8* %a, [4 x <16 x i8>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint8x16x4_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.uint8x16x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.uint8x16x4_t, align 16 @@ -2949,7 +2949,7 @@ uint8x16x4_t test_vld4q_lane_u8(uint8_t *a, uint8x16x4_t b) { return vld4q_lane_u8(a, b, 15); } -// CHECK-LABEL: define %struct.uint16x8x4_t @test_vld4q_lane_u16(i16* %a, [4 x <8 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.uint16x8x4_t @test_vld4q_lane_u16(i16* %a, [4 x <8 x i16>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint16x8x4_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.uint16x8x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.uint16x8x4_t, align 16 @@ -2993,7 +2993,7 @@ uint16x8x4_t test_vld4q_lane_u16(uint16_t *a, uint16x8x4_t b) { return vld4q_lane_u16(a, b, 7); } -// CHECK-LABEL: define %struct.uint32x4x4_t @test_vld4q_lane_u32(i32* %a, [4 x <4 x i32>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.uint32x4x4_t @test_vld4q_lane_u32(i32* %a, [4 x <4 x i32>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint32x4x4_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.uint32x4x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.uint32x4x4_t, align 16 @@ -3037,7 +3037,7 @@ uint32x4x4_t test_vld4q_lane_u32(uint32_t *a, uint32x4x4_t b) { return vld4q_lane_u32(a, b, 3); } -// CHECK-LABEL: define %struct.uint64x2x4_t @test_vld4q_lane_u64(i64* %a, [4 x <2 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.uint64x2x4_t @test_vld4q_lane_u64(i64* %a, [4 x <2 x i64>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint64x2x4_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.uint64x2x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.uint64x2x4_t, align 16 @@ -3081,7 +3081,7 @@ uint64x2x4_t test_vld4q_lane_u64(uint64_t *a, uint64x2x4_t b) { return vld4q_lane_u64(a, b, 1); } -// CHECK-LABEL: define %struct.int8x16x4_t @test_vld4q_lane_s8(i8* %a, [4 x <16 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.int8x16x4_t @test_vld4q_lane_s8(i8* %a, [4 x <16 x i8>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int8x16x4_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.int8x16x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.int8x16x4_t, align 16 @@ -3116,7 +3116,7 @@ int8x16x4_t test_vld4q_lane_s8(int8_t *a, int8x16x4_t b) { return vld4q_lane_s8(a, b, 15); } -// CHECK-LABEL: define %struct.int16x8x4_t @test_vld4q_lane_s16(i16* %a, [4 x <8 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.int16x8x4_t @test_vld4q_lane_s16(i16* %a, [4 x <8 x i16>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int16x8x4_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.int16x8x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.int16x8x4_t, align 16 @@ -3160,7 +3160,7 @@ int16x8x4_t test_vld4q_lane_s16(int16_t *a, int16x8x4_t b) { return vld4q_lane_s16(a, b, 7); } -// CHECK-LABEL: define %struct.int32x4x4_t @test_vld4q_lane_s32(i32* %a, [4 x <4 x i32>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.int32x4x4_t @test_vld4q_lane_s32(i32* %a, [4 x <4 x i32>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int32x4x4_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.int32x4x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.int32x4x4_t, align 16 @@ -3204,7 +3204,7 @@ int32x4x4_t test_vld4q_lane_s32(int32_t *a, int32x4x4_t b) { return vld4q_lane_s32(a, b, 3); } -// CHECK-LABEL: define %struct.int64x2x4_t @test_vld4q_lane_s64(i64* %a, [4 x <2 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.int64x2x4_t @test_vld4q_lane_s64(i64* %a, [4 x <2 x i64>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int64x2x4_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.int64x2x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.int64x2x4_t, align 16 @@ -3248,7 +3248,7 @@ int64x2x4_t test_vld4q_lane_s64(int64_t *a, int64x2x4_t b) { return vld4q_lane_s64(a, b, 1); } -// CHECK-LABEL: define %struct.float16x8x4_t @test_vld4q_lane_f16(half* %a, [4 x <8 x half>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.float16x8x4_t @test_vld4q_lane_f16(half* %a, [4 x <8 x half>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.float16x8x4_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.float16x8x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.float16x8x4_t, align 16 @@ -3292,7 +3292,7 @@ float16x8x4_t test_vld4q_lane_f16(float16_t *a, float16x8x4_t b) { return vld4q_lane_f16(a, b, 7); } -// CHECK-LABEL: define %struct.float32x4x4_t @test_vld4q_lane_f32(float* %a, [4 x <4 x float>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.float32x4x4_t @test_vld4q_lane_f32(float* %a, [4 x <4 x float>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.float32x4x4_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.float32x4x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.float32x4x4_t, align 16 @@ -3336,7 +3336,7 @@ float32x4x4_t test_vld4q_lane_f32(float32_t *a, float32x4x4_t b) { return vld4q_lane_f32(a, b, 3); } -// CHECK-LABEL: define %struct.float64x2x4_t @test_vld4q_lane_f64(double* %a, [4 x <2 x double>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.float64x2x4_t @test_vld4q_lane_f64(double* %a, [4 x <2 x double>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.float64x2x4_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.float64x2x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.float64x2x4_t, align 16 @@ -3380,7 +3380,7 @@ float64x2x4_t test_vld4q_lane_f64(float64_t *a, float64x2x4_t b) { return vld4q_lane_f64(a, b, 1); } -// CHECK-LABEL: define %struct.poly8x16x4_t @test_vld4q_lane_p8(i8* %a, [4 x <16 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.poly8x16x4_t @test_vld4q_lane_p8(i8* %a, [4 x <16 x i8>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly8x16x4_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.poly8x16x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.poly8x16x4_t, align 16 @@ -3415,7 +3415,7 @@ poly8x16x4_t test_vld4q_lane_p8(poly8_t *a, poly8x16x4_t b) { return vld4q_lane_p8(a, b, 15); } -// CHECK-LABEL: define %struct.poly16x8x4_t @test_vld4q_lane_p16(i16* %a, [4 x <8 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.poly16x8x4_t @test_vld4q_lane_p16(i16* %a, [4 x <8 x i16>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly16x8x4_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.poly16x8x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.poly16x8x4_t, align 16 @@ -3459,7 +3459,7 @@ poly16x8x4_t test_vld4q_lane_p16(poly16_t *a, poly16x8x4_t b) { return vld4q_lane_p16(a, b, 7); } -// CHECK-LABEL: define %struct.poly64x2x4_t @test_vld4q_lane_p64(i64* %a, [4 x <2 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.poly64x2x4_t @test_vld4q_lane_p64(i64* %a, [4 x <2 x i64>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly64x2x4_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.poly64x2x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.poly64x2x4_t, align 16 @@ -3503,7 +3503,7 @@ poly64x2x4_t test_vld4q_lane_p64(poly64_t *a, poly64x2x4_t b) { return vld4q_lane_p64(a, b, 1); } -// CHECK-LABEL: define %struct.uint8x8x4_t @test_vld4_lane_u8(i8* %a, [4 x <8 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.uint8x8x4_t @test_vld4_lane_u8(i8* %a, [4 x <8 x i8>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint8x8x4_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.uint8x8x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.uint8x8x4_t, align 8 @@ -3538,7 +3538,7 @@ uint8x8x4_t test_vld4_lane_u8(uint8_t *a, uint8x8x4_t b) { return vld4_lane_u8(a, b, 7); } -// CHECK-LABEL: define %struct.uint16x4x4_t @test_vld4_lane_u16(i16* %a, [4 x <4 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.uint16x4x4_t @test_vld4_lane_u16(i16* %a, [4 x <4 x i16>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint16x4x4_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.uint16x4x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.uint16x4x4_t, align 8 @@ -3582,7 +3582,7 @@ uint16x4x4_t test_vld4_lane_u16(uint16_t *a, uint16x4x4_t b) { return vld4_lane_u16(a, b, 3); } -// CHECK-LABEL: define %struct.uint32x2x4_t @test_vld4_lane_u32(i32* %a, [4 x <2 x i32>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.uint32x2x4_t @test_vld4_lane_u32(i32* %a, [4 x <2 x i32>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint32x2x4_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.uint32x2x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.uint32x2x4_t, align 8 @@ -3626,7 +3626,7 @@ uint32x2x4_t test_vld4_lane_u32(uint32_t *a, uint32x2x4_t b) { return vld4_lane_u32(a, b, 1); } -// CHECK-LABEL: define %struct.uint64x1x4_t @test_vld4_lane_u64(i64* %a, [4 x <1 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.uint64x1x4_t @test_vld4_lane_u64(i64* %a, [4 x <1 x i64>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.uint64x1x4_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.uint64x1x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.uint64x1x4_t, align 8 @@ -3670,7 +3670,7 @@ uint64x1x4_t test_vld4_lane_u64(uint64_t *a, uint64x1x4_t b) { return vld4_lane_u64(a, b, 0); } -// CHECK-LABEL: define %struct.int8x8x4_t @test_vld4_lane_s8(i8* %a, [4 x <8 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.int8x8x4_t @test_vld4_lane_s8(i8* %a, [4 x <8 x i8>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int8x8x4_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.int8x8x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.int8x8x4_t, align 8 @@ -3705,7 +3705,7 @@ int8x8x4_t test_vld4_lane_s8(int8_t *a, int8x8x4_t b) { return vld4_lane_s8(a, b, 7); } -// CHECK-LABEL: define %struct.int16x4x4_t @test_vld4_lane_s16(i16* %a, [4 x <4 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.int16x4x4_t @test_vld4_lane_s16(i16* %a, [4 x <4 x i16>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int16x4x4_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.int16x4x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.int16x4x4_t, align 8 @@ -3749,7 +3749,7 @@ int16x4x4_t test_vld4_lane_s16(int16_t *a, int16x4x4_t b) { return vld4_lane_s16(a, b, 3); } -// CHECK-LABEL: define %struct.int32x2x4_t @test_vld4_lane_s32(i32* %a, [4 x <2 x i32>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.int32x2x4_t @test_vld4_lane_s32(i32* %a, [4 x <2 x i32>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int32x2x4_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.int32x2x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.int32x2x4_t, align 8 @@ -3793,7 +3793,7 @@ int32x2x4_t test_vld4_lane_s32(int32_t *a, int32x2x4_t b) { return vld4_lane_s32(a, b, 1); } -// CHECK-LABEL: define %struct.int64x1x4_t @test_vld4_lane_s64(i64* %a, [4 x <1 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.int64x1x4_t @test_vld4_lane_s64(i64* %a, [4 x <1 x i64>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.int64x1x4_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.int64x1x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.int64x1x4_t, align 8 @@ -3837,7 +3837,7 @@ int64x1x4_t test_vld4_lane_s64(int64_t *a, int64x1x4_t b) { return vld4_lane_s64(a, b, 0); } -// CHECK-LABEL: define %struct.float16x4x4_t @test_vld4_lane_f16(half* %a, [4 x <4 x half>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.float16x4x4_t @test_vld4_lane_f16(half* %a, [4 x <4 x half>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.float16x4x4_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.float16x4x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.float16x4x4_t, align 8 @@ -3881,7 +3881,7 @@ float16x4x4_t test_vld4_lane_f16(float16_t *a, float16x4x4_t b) { return vld4_lane_f16(a, b, 3); } -// CHECK-LABEL: define %struct.float32x2x4_t @test_vld4_lane_f32(float* %a, [4 x <2 x float>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.float32x2x4_t @test_vld4_lane_f32(float* %a, [4 x <2 x float>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.float32x2x4_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.float32x2x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.float32x2x4_t, align 8 @@ -3925,7 +3925,7 @@ float32x2x4_t test_vld4_lane_f32(float32_t *a, float32x2x4_t b) { return vld4_lane_f32(a, b, 1); } -// CHECK-LABEL: define %struct.float64x1x4_t @test_vld4_lane_f64(double* %a, [4 x <1 x double>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.float64x1x4_t @test_vld4_lane_f64(double* %a, [4 x <1 x double>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.float64x1x4_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.float64x1x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.float64x1x4_t, align 8 @@ -3969,7 +3969,7 @@ float64x1x4_t test_vld4_lane_f64(float64_t *a, float64x1x4_t b) { return vld4_lane_f64(a, b, 0); } -// CHECK-LABEL: define %struct.poly8x8x4_t @test_vld4_lane_p8(i8* %a, [4 x <8 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.poly8x8x4_t @test_vld4_lane_p8(i8* %a, [4 x <8 x i8>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly8x8x4_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.poly8x8x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.poly8x8x4_t, align 8 @@ -4004,7 +4004,7 @@ poly8x8x4_t test_vld4_lane_p8(poly8_t *a, poly8x8x4_t b) { return vld4_lane_p8(a, b, 7); } -// CHECK-LABEL: define %struct.poly16x4x4_t @test_vld4_lane_p16(i16* %a, [4 x <4 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.poly16x4x4_t @test_vld4_lane_p16(i16* %a, [4 x <4 x i16>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly16x4x4_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.poly16x4x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.poly16x4x4_t, align 8 @@ -4048,7 +4048,7 @@ poly16x4x4_t test_vld4_lane_p16(poly16_t *a, poly16x4x4_t b) { return vld4_lane_p16(a, b, 3); } -// CHECK-LABEL: define %struct.poly64x1x4_t @test_vld4_lane_p64(i64* %a, [4 x <1 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local %struct.poly64x1x4_t @test_vld4_lane_p64(i64* %a, [4 x <1 x i64>] %b.coerce) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly64x1x4_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.poly64x1x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.poly64x1x4_t, align 8 @@ -4092,7 +4092,7 @@ poly64x1x4_t test_vld4_lane_p64(poly64_t *a, poly64x1x4_t b) { return vld4_lane_p64(a, b, 0); } -// CHECK-LABEL: define void @test_vst1q_lane_u8(i8* %a, <16 x i8> %b) #0 { +// CHECK-LABEL: define dso_local void @test_vst1q_lane_u8(i8* %a, <16 x i8> %b) #0 { // CHECK: [[TMP0:%.*]] = extractelement <16 x i8> %b, i32 15 // CHECK: store i8 [[TMP0]], i8* %a // CHECK: ret void @@ -4100,7 +4100,7 @@ void test_vst1q_lane_u8(uint8_t *a, uint8x16_t b) { vst1q_lane_u8(a, b, 15); } -// CHECK-LABEL: define void @test_vst1q_lane_u16(i16* %a, <8 x i16> %b) #0 { +// CHECK-LABEL: define dso_local void @test_vst1q_lane_u16(i16* %a, <8 x i16> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast i16* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <8 x i16> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x i16> @@ -4112,7 +4112,7 @@ void test_vst1q_lane_u16(uint16_t *a, uint16x8_t b) { vst1q_lane_u16(a, b, 7); } -// CHECK-LABEL: define void @test_vst1q_lane_u32(i32* %a, <4 x i32> %b) #0 { +// CHECK-LABEL: define dso_local void @test_vst1q_lane_u32(i32* %a, <4 x i32> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast i32* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <4 x i32> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <4 x i32> @@ -4124,7 +4124,7 @@ void test_vst1q_lane_u32(uint32_t *a, uint32x4_t b) { vst1q_lane_u32(a, b, 3); } -// CHECK-LABEL: define void @test_vst1q_lane_u64(i64* %a, <2 x i64> %b) #0 { +// CHECK-LABEL: define dso_local void @test_vst1q_lane_u64(i64* %a, <2 x i64> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast i64* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <2 x i64> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <2 x i64> @@ -4136,7 +4136,7 @@ void test_vst1q_lane_u64(uint64_t *a, uint64x2_t b) { vst1q_lane_u64(a, b, 1); } -// CHECK-LABEL: define void @test_vst1q_lane_s8(i8* %a, <16 x i8> %b) #0 { +// CHECK-LABEL: define dso_local void @test_vst1q_lane_s8(i8* %a, <16 x i8> %b) #0 { // CHECK: [[TMP0:%.*]] = extractelement <16 x i8> %b, i32 15 // CHECK: store i8 [[TMP0]], i8* %a // CHECK: ret void @@ -4144,7 +4144,7 @@ void test_vst1q_lane_s8(int8_t *a, int8x16_t b) { vst1q_lane_s8(a, b, 15); } -// CHECK-LABEL: define void @test_vst1q_lane_s16(i16* %a, <8 x i16> %b) #0 { +// CHECK-LABEL: define dso_local void @test_vst1q_lane_s16(i16* %a, <8 x i16> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast i16* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <8 x i16> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x i16> @@ -4156,7 +4156,7 @@ void test_vst1q_lane_s16(int16_t *a, int16x8_t b) { vst1q_lane_s16(a, b, 7); } -// CHECK-LABEL: define void @test_vst1q_lane_s32(i32* %a, <4 x i32> %b) #0 { +// CHECK-LABEL: define dso_local void @test_vst1q_lane_s32(i32* %a, <4 x i32> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast i32* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <4 x i32> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <4 x i32> @@ -4168,7 +4168,7 @@ void test_vst1q_lane_s32(int32_t *a, int32x4_t b) { vst1q_lane_s32(a, b, 3); } -// CHECK-LABEL: define void @test_vst1q_lane_s64(i64* %a, <2 x i64> %b) #0 { +// CHECK-LABEL: define dso_local void @test_vst1q_lane_s64(i64* %a, <2 x i64> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast i64* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <2 x i64> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <2 x i64> @@ -4180,7 +4180,7 @@ void test_vst1q_lane_s64(int64_t *a, int64x2_t b) { vst1q_lane_s64(a, b, 1); } -// CHECK-LABEL: define void @test_vst1q_lane_f16(half* %a, <8 x half> %b) #0 { +// CHECK-LABEL: define dso_local void @test_vst1q_lane_f16(half* %a, <8 x half> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast half* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <8 x half> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x half> @@ -4192,7 +4192,7 @@ void test_vst1q_lane_f16(float16_t *a, float16x8_t b) { vst1q_lane_f16(a, b, 7); } -// CHECK-LABEL: define void @test_vst1q_lane_f32(float* %a, <4 x float> %b) #0 { +// CHECK-LABEL: define dso_local void @test_vst1q_lane_f32(float* %a, <4 x float> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast float* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <4 x float> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <4 x float> @@ -4204,7 +4204,7 @@ void test_vst1q_lane_f32(float32_t *a, float32x4_t b) { vst1q_lane_f32(a, b, 3); } -// CHECK-LABEL: define void @test_vst1q_lane_f64(double* %a, <2 x double> %b) #0 { +// CHECK-LABEL: define dso_local void @test_vst1q_lane_f64(double* %a, <2 x double> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast double* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <2 x double> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <2 x double> @@ -4216,7 +4216,7 @@ void test_vst1q_lane_f64(float64_t *a, float64x2_t b) { vst1q_lane_f64(a, b, 1); } -// CHECK-LABEL: define void @test_vst1q_lane_p8(i8* %a, <16 x i8> %b) #0 { +// CHECK-LABEL: define dso_local void @test_vst1q_lane_p8(i8* %a, <16 x i8> %b) #0 { // CHECK: [[TMP0:%.*]] = extractelement <16 x i8> %b, i32 15 // CHECK: store i8 [[TMP0]], i8* %a // CHECK: ret void @@ -4224,7 +4224,7 @@ void test_vst1q_lane_p8(poly8_t *a, poly8x16_t b) { vst1q_lane_p8(a, b, 15); } -// CHECK-LABEL: define void @test_vst1q_lane_p16(i16* %a, <8 x i16> %b) #0 { +// CHECK-LABEL: define dso_local void @test_vst1q_lane_p16(i16* %a, <8 x i16> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast i16* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <8 x i16> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <8 x i16> @@ -4236,7 +4236,7 @@ void test_vst1q_lane_p16(poly16_t *a, poly16x8_t b) { vst1q_lane_p16(a, b, 7); } -// CHECK-LABEL: define void @test_vst1q_lane_p64(i64* %a, <2 x i64> %b) #0 { +// CHECK-LABEL: define dso_local void @test_vst1q_lane_p64(i64* %a, <2 x i64> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast i64* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <2 x i64> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP1]] to <2 x i64> @@ -4248,7 +4248,7 @@ void test_vst1q_lane_p64(poly64_t *a, poly64x2_t b) { vst1q_lane_p64(a, b, 1); } -// CHECK-LABEL: define void @test_vst1_lane_u8(i8* %a, <8 x i8> %b) #1 { +// CHECK-LABEL: define dso_local void @test_vst1_lane_u8(i8* %a, <8 x i8> %b) #1 { // CHECK: [[TMP0:%.*]] = extractelement <8 x i8> %b, i32 7 // CHECK: store i8 [[TMP0]], i8* %a // CHECK: ret void @@ -4256,7 +4256,7 @@ void test_vst1_lane_u8(uint8_t *a, uint8x8_t b) { vst1_lane_u8(a, b, 7); } -// CHECK-LABEL: define void @test_vst1_lane_u16(i16* %a, <4 x i16> %b) #1 { +// CHECK-LABEL: define dso_local void @test_vst1_lane_u16(i16* %a, <4 x i16> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast i16* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <4 x i16> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x i16> @@ -4268,7 +4268,7 @@ void test_vst1_lane_u16(uint16_t *a, uint16x4_t b) { vst1_lane_u16(a, b, 3); } -// CHECK-LABEL: define void @test_vst1_lane_u32(i32* %a, <2 x i32> %b) #1 { +// CHECK-LABEL: define dso_local void @test_vst1_lane_u32(i32* %a, <2 x i32> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast i32* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <2 x i32> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <2 x i32> @@ -4280,7 +4280,7 @@ void test_vst1_lane_u32(uint32_t *a, uint32x2_t b) { vst1_lane_u32(a, b, 1); } -// CHECK-LABEL: define void @test_vst1_lane_u64(i64* %a, <1 x i64> %b) #1 { +// CHECK-LABEL: define dso_local void @test_vst1_lane_u64(i64* %a, <1 x i64> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast i64* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <1 x i64> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <1 x i64> @@ -4292,7 +4292,7 @@ void test_vst1_lane_u64(uint64_t *a, uint64x1_t b) { vst1_lane_u64(a, b, 0); } -// CHECK-LABEL: define void @test_vst1_lane_s8(i8* %a, <8 x i8> %b) #1 { +// CHECK-LABEL: define dso_local void @test_vst1_lane_s8(i8* %a, <8 x i8> %b) #1 { // CHECK: [[TMP0:%.*]] = extractelement <8 x i8> %b, i32 7 // CHECK: store i8 [[TMP0]], i8* %a // CHECK: ret void @@ -4300,7 +4300,7 @@ void test_vst1_lane_s8(int8_t *a, int8x8_t b) { vst1_lane_s8(a, b, 7); } -// CHECK-LABEL: define void @test_vst1_lane_s16(i16* %a, <4 x i16> %b) #1 { +// CHECK-LABEL: define dso_local void @test_vst1_lane_s16(i16* %a, <4 x i16> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast i16* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <4 x i16> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x i16> @@ -4312,7 +4312,7 @@ void test_vst1_lane_s16(int16_t *a, int16x4_t b) { vst1_lane_s16(a, b, 3); } -// CHECK-LABEL: define void @test_vst1_lane_s32(i32* %a, <2 x i32> %b) #1 { +// CHECK-LABEL: define dso_local void @test_vst1_lane_s32(i32* %a, <2 x i32> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast i32* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <2 x i32> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <2 x i32> @@ -4324,7 +4324,7 @@ void test_vst1_lane_s32(int32_t *a, int32x2_t b) { vst1_lane_s32(a, b, 1); } -// CHECK-LABEL: define void @test_vst1_lane_s64(i64* %a, <1 x i64> %b) #1 { +// CHECK-LABEL: define dso_local void @test_vst1_lane_s64(i64* %a, <1 x i64> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast i64* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <1 x i64> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <1 x i64> @@ -4336,7 +4336,7 @@ void test_vst1_lane_s64(int64_t *a, int64x1_t b) { vst1_lane_s64(a, b, 0); } -// CHECK-LABEL: define void @test_vst1_lane_f16(half* %a, <4 x half> %b) #1 { +// CHECK-LABEL: define dso_local void @test_vst1_lane_f16(half* %a, <4 x half> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast half* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <4 x half> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x half> @@ -4348,7 +4348,7 @@ void test_vst1_lane_f16(float16_t *a, float16x4_t b) { vst1_lane_f16(a, b, 3); } -// CHECK-LABEL: define void @test_vst1_lane_f32(float* %a, <2 x float> %b) #1 { +// CHECK-LABEL: define dso_local void @test_vst1_lane_f32(float* %a, <2 x float> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast float* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <2 x float> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <2 x float> @@ -4360,7 +4360,7 @@ void test_vst1_lane_f32(float32_t *a, float32x2_t b) { vst1_lane_f32(a, b, 1); } -// CHECK-LABEL: define void @test_vst1_lane_f64(double* %a, <1 x double> %b) #1 { +// CHECK-LABEL: define dso_local void @test_vst1_lane_f64(double* %a, <1 x double> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast double* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <1 x double> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <1 x double> @@ -4372,7 +4372,7 @@ void test_vst1_lane_f64(float64_t *a, float64x1_t b) { vst1_lane_f64(a, b, 0); } -// CHECK-LABEL: define void @test_vst1_lane_p8(i8* %a, <8 x i8> %b) #1 { +// CHECK-LABEL: define dso_local void @test_vst1_lane_p8(i8* %a, <8 x i8> %b) #1 { // CHECK: [[TMP0:%.*]] = extractelement <8 x i8> %b, i32 7 // CHECK: store i8 [[TMP0]], i8* %a // CHECK: ret void @@ -4380,7 +4380,7 @@ void test_vst1_lane_p8(poly8_t *a, poly8x8_t b) { vst1_lane_p8(a, b, 7); } -// CHECK-LABEL: define void @test_vst1_lane_p16(i16* %a, <4 x i16> %b) #1 { +// CHECK-LABEL: define dso_local void @test_vst1_lane_p16(i16* %a, <4 x i16> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast i16* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <4 x i16> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <4 x i16> @@ -4392,7 +4392,7 @@ void test_vst1_lane_p16(poly16_t *a, poly16x4_t b) { vst1_lane_p16(a, b, 3); } -// CHECK-LABEL: define void @test_vst1_lane_p64(i64* %a, <1 x i64> %b) #1 { +// CHECK-LABEL: define dso_local void @test_vst1_lane_p64(i64* %a, <1 x i64> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast i64* %a to i8* // CHECK: [[TMP1:%.*]] = bitcast <1 x i64> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP1]] to <1 x i64> @@ -4404,7 +4404,7 @@ void test_vst1_lane_p64(poly64_t *a, poly64x1_t b) { vst1_lane_p64(a, b, 0); } -// CHECK-LABEL: define void @test_vst2q_lane_u8(i8* %a, [2 x <16 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2q_lane_u8(i8* %a, [2 x <16 x i8>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.uint8x16x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.uint8x16x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint8x16x2_t, %struct.uint8x16x2_t* [[B]], i32 0, i32 0 @@ -4424,7 +4424,7 @@ void test_vst2q_lane_u8(uint8_t *a, uint8x16x2_t b) { vst2q_lane_u8(a, b, 15); } -// CHECK-LABEL: define void @test_vst2q_lane_u16(i16* %a, [2 x <8 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2q_lane_u16(i16* %a, [2 x <8 x i16>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.uint16x8x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.uint16x8x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint16x8x2_t, %struct.uint16x8x2_t* [[B]], i32 0, i32 0 @@ -4449,7 +4449,7 @@ void test_vst2q_lane_u16(uint16_t *a, uint16x8x2_t b) { vst2q_lane_u16(a, b, 7); } -// CHECK-LABEL: define void @test_vst2q_lane_u32(i32* %a, [2 x <4 x i32>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2q_lane_u32(i32* %a, [2 x <4 x i32>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.uint32x4x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.uint32x4x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint32x4x2_t, %struct.uint32x4x2_t* [[B]], i32 0, i32 0 @@ -4474,7 +4474,7 @@ void test_vst2q_lane_u32(uint32_t *a, uint32x4x2_t b) { vst2q_lane_u32(a, b, 3); } -// CHECK-LABEL: define void @test_vst2q_lane_u64(i64* %a, [2 x <2 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2q_lane_u64(i64* %a, [2 x <2 x i64>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.uint64x2x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.uint64x2x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint64x2x2_t, %struct.uint64x2x2_t* [[B]], i32 0, i32 0 @@ -4499,7 +4499,7 @@ void test_vst2q_lane_u64(uint64_t *a, uint64x2x2_t b) { vst2q_lane_u64(a, b, 1); } -// CHECK-LABEL: define void @test_vst2q_lane_s8(i8* %a, [2 x <16 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2q_lane_s8(i8* %a, [2 x <16 x i8>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.int8x16x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.int8x16x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int8x16x2_t, %struct.int8x16x2_t* [[B]], i32 0, i32 0 @@ -4519,7 +4519,7 @@ void test_vst2q_lane_s8(int8_t *a, int8x16x2_t b) { vst2q_lane_s8(a, b, 15); } -// CHECK-LABEL: define void @test_vst2q_lane_s16(i16* %a, [2 x <8 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2q_lane_s16(i16* %a, [2 x <8 x i16>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.int16x8x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.int16x8x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int16x8x2_t, %struct.int16x8x2_t* [[B]], i32 0, i32 0 @@ -4544,7 +4544,7 @@ void test_vst2q_lane_s16(int16_t *a, int16x8x2_t b) { vst2q_lane_s16(a, b, 7); } -// CHECK-LABEL: define void @test_vst2q_lane_s32(i32* %a, [2 x <4 x i32>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2q_lane_s32(i32* %a, [2 x <4 x i32>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.int32x4x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.int32x4x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int32x4x2_t, %struct.int32x4x2_t* [[B]], i32 0, i32 0 @@ -4569,7 +4569,7 @@ void test_vst2q_lane_s32(int32_t *a, int32x4x2_t b) { vst2q_lane_s32(a, b, 3); } -// CHECK-LABEL: define void @test_vst2q_lane_s64(i64* %a, [2 x <2 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2q_lane_s64(i64* %a, [2 x <2 x i64>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.int64x2x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.int64x2x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int64x2x2_t, %struct.int64x2x2_t* [[B]], i32 0, i32 0 @@ -4594,7 +4594,7 @@ void test_vst2q_lane_s64(int64_t *a, int64x2x2_t b) { vst2q_lane_s64(a, b, 1); } -// CHECK-LABEL: define void @test_vst2q_lane_f16(half* %a, [2 x <8 x half>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2q_lane_f16(half* %a, [2 x <8 x half>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.float16x8x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.float16x8x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.float16x8x2_t, %struct.float16x8x2_t* [[B]], i32 0, i32 0 @@ -4619,7 +4619,7 @@ void test_vst2q_lane_f16(float16_t *a, float16x8x2_t b) { vst2q_lane_f16(a, b, 7); } -// CHECK-LABEL: define void @test_vst2q_lane_f32(float* %a, [2 x <4 x float>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2q_lane_f32(float* %a, [2 x <4 x float>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.float32x4x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.float32x4x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.float32x4x2_t, %struct.float32x4x2_t* [[B]], i32 0, i32 0 @@ -4644,7 +4644,7 @@ void test_vst2q_lane_f32(float32_t *a, float32x4x2_t b) { vst2q_lane_f32(a, b, 3); } -// CHECK-LABEL: define void @test_vst2q_lane_f64(double* %a, [2 x <2 x double>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2q_lane_f64(double* %a, [2 x <2 x double>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.float64x2x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.float64x2x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.float64x2x2_t, %struct.float64x2x2_t* [[B]], i32 0, i32 0 @@ -4669,7 +4669,7 @@ void test_vst2q_lane_f64(float64_t *a, float64x2x2_t b) { vst2q_lane_f64(a, b, 1); } -// CHECK-LABEL: define void @test_vst2q_lane_p8(i8* %a, [2 x <16 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2q_lane_p8(i8* %a, [2 x <16 x i8>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.poly8x16x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.poly8x16x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly8x16x2_t, %struct.poly8x16x2_t* [[B]], i32 0, i32 0 @@ -4689,7 +4689,7 @@ void test_vst2q_lane_p8(poly8_t *a, poly8x16x2_t b) { vst2q_lane_p8(a, b, 15); } -// CHECK-LABEL: define void @test_vst2q_lane_p16(i16* %a, [2 x <8 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2q_lane_p16(i16* %a, [2 x <8 x i16>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.poly16x8x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.poly16x8x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly16x8x2_t, %struct.poly16x8x2_t* [[B]], i32 0, i32 0 @@ -4714,7 +4714,7 @@ void test_vst2q_lane_p16(poly16_t *a, poly16x8x2_t b) { vst2q_lane_p16(a, b, 7); } -// CHECK-LABEL: define void @test_vst2q_lane_p64(i64* %a, [2 x <2 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2q_lane_p64(i64* %a, [2 x <2 x i64>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.poly64x2x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.poly64x2x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly64x2x2_t, %struct.poly64x2x2_t* [[B]], i32 0, i32 0 @@ -4739,7 +4739,7 @@ void test_vst2q_lane_p64(poly64_t *a, poly64x2x2_t b) { vst2q_lane_p64(a, b, 1); } -// CHECK-LABEL: define void @test_vst2_lane_u8(i8* %a, [2 x <8 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2_lane_u8(i8* %a, [2 x <8 x i8>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.uint8x8x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.uint8x8x2_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint8x8x2_t, %struct.uint8x8x2_t* [[B]], i32 0, i32 0 @@ -4759,7 +4759,7 @@ void test_vst2_lane_u8(uint8_t *a, uint8x8x2_t b) { vst2_lane_u8(a, b, 7); } -// CHECK-LABEL: define void @test_vst2_lane_u16(i16* %a, [2 x <4 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2_lane_u16(i16* %a, [2 x <4 x i16>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.uint16x4x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.uint16x4x2_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint16x4x2_t, %struct.uint16x4x2_t* [[B]], i32 0, i32 0 @@ -4784,7 +4784,7 @@ void test_vst2_lane_u16(uint16_t *a, uint16x4x2_t b) { vst2_lane_u16(a, b, 3); } -// CHECK-LABEL: define void @test_vst2_lane_u32(i32* %a, [2 x <2 x i32>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2_lane_u32(i32* %a, [2 x <2 x i32>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.uint32x2x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.uint32x2x2_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint32x2x2_t, %struct.uint32x2x2_t* [[B]], i32 0, i32 0 @@ -4809,7 +4809,7 @@ void test_vst2_lane_u32(uint32_t *a, uint32x2x2_t b) { vst2_lane_u32(a, b, 1); } -// CHECK-LABEL: define void @test_vst2_lane_u64(i64* %a, [2 x <1 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2_lane_u64(i64* %a, [2 x <1 x i64>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.uint64x1x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.uint64x1x2_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint64x1x2_t, %struct.uint64x1x2_t* [[B]], i32 0, i32 0 @@ -4834,7 +4834,7 @@ void test_vst2_lane_u64(uint64_t *a, uint64x1x2_t b) { vst2_lane_u64(a, b, 0); } -// CHECK-LABEL: define void @test_vst2_lane_s8(i8* %a, [2 x <8 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2_lane_s8(i8* %a, [2 x <8 x i8>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.int8x8x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.int8x8x2_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int8x8x2_t, %struct.int8x8x2_t* [[B]], i32 0, i32 0 @@ -4854,7 +4854,7 @@ void test_vst2_lane_s8(int8_t *a, int8x8x2_t b) { vst2_lane_s8(a, b, 7); } -// CHECK-LABEL: define void @test_vst2_lane_s16(i16* %a, [2 x <4 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2_lane_s16(i16* %a, [2 x <4 x i16>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.int16x4x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.int16x4x2_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int16x4x2_t, %struct.int16x4x2_t* [[B]], i32 0, i32 0 @@ -4879,7 +4879,7 @@ void test_vst2_lane_s16(int16_t *a, int16x4x2_t b) { vst2_lane_s16(a, b, 3); } -// CHECK-LABEL: define void @test_vst2_lane_s32(i32* %a, [2 x <2 x i32>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2_lane_s32(i32* %a, [2 x <2 x i32>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.int32x2x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.int32x2x2_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int32x2x2_t, %struct.int32x2x2_t* [[B]], i32 0, i32 0 @@ -4904,7 +4904,7 @@ void test_vst2_lane_s32(int32_t *a, int32x2x2_t b) { vst2_lane_s32(a, b, 1); } -// CHECK-LABEL: define void @test_vst2_lane_s64(i64* %a, [2 x <1 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2_lane_s64(i64* %a, [2 x <1 x i64>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.int64x1x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.int64x1x2_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int64x1x2_t, %struct.int64x1x2_t* [[B]], i32 0, i32 0 @@ -4929,7 +4929,7 @@ void test_vst2_lane_s64(int64_t *a, int64x1x2_t b) { vst2_lane_s64(a, b, 0); } -// CHECK-LABEL: define void @test_vst2_lane_f16(half* %a, [2 x <4 x half>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2_lane_f16(half* %a, [2 x <4 x half>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.float16x4x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.float16x4x2_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.float16x4x2_t, %struct.float16x4x2_t* [[B]], i32 0, i32 0 @@ -4954,7 +4954,7 @@ void test_vst2_lane_f16(float16_t *a, float16x4x2_t b) { vst2_lane_f16(a, b, 3); } -// CHECK-LABEL: define void @test_vst2_lane_f32(float* %a, [2 x <2 x float>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2_lane_f32(float* %a, [2 x <2 x float>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.float32x2x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.float32x2x2_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.float32x2x2_t, %struct.float32x2x2_t* [[B]], i32 0, i32 0 @@ -4979,7 +4979,7 @@ void test_vst2_lane_f32(float32_t *a, float32x2x2_t b) { vst2_lane_f32(a, b, 1); } -// CHECK-LABEL: define void @test_vst2_lane_f64(double* %a, [2 x <1 x double>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2_lane_f64(double* %a, [2 x <1 x double>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.float64x1x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.float64x1x2_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.float64x1x2_t, %struct.float64x1x2_t* [[B]], i32 0, i32 0 @@ -5004,7 +5004,7 @@ void test_vst2_lane_f64(float64_t *a, float64x1x2_t b) { vst2_lane_f64(a, b, 0); } -// CHECK-LABEL: define void @test_vst2_lane_p8(i8* %a, [2 x <8 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2_lane_p8(i8* %a, [2 x <8 x i8>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.poly8x8x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.poly8x8x2_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly8x8x2_t, %struct.poly8x8x2_t* [[B]], i32 0, i32 0 @@ -5024,7 +5024,7 @@ void test_vst2_lane_p8(poly8_t *a, poly8x8x2_t b) { vst2_lane_p8(a, b, 7); } -// CHECK-LABEL: define void @test_vst2_lane_p16(i16* %a, [2 x <4 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2_lane_p16(i16* %a, [2 x <4 x i16>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.poly16x4x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.poly16x4x2_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly16x4x2_t, %struct.poly16x4x2_t* [[B]], i32 0, i32 0 @@ -5049,7 +5049,7 @@ void test_vst2_lane_p16(poly16_t *a, poly16x4x2_t b) { vst2_lane_p16(a, b, 3); } -// CHECK-LABEL: define void @test_vst2_lane_p64(i64* %a, [2 x <1 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2_lane_p64(i64* %a, [2 x <1 x i64>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.poly64x1x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.poly64x1x2_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly64x1x2_t, %struct.poly64x1x2_t* [[B]], i32 0, i32 0 @@ -5074,7 +5074,7 @@ void test_vst2_lane_p64(poly64_t *a, poly64x1x2_t b) { vst2_lane_p64(a, b, 0); } -// CHECK-LABEL: define void @test_vst3q_lane_u8(i8* %a, [3 x <16 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3q_lane_u8(i8* %a, [3 x <16 x i8>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.uint8x16x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.uint8x16x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint8x16x3_t, %struct.uint8x16x3_t* [[B]], i32 0, i32 0 @@ -5097,7 +5097,7 @@ void test_vst3q_lane_u8(uint8_t *a, uint8x16x3_t b) { vst3q_lane_u8(a, b, 15); } -// CHECK-LABEL: define void @test_vst3q_lane_u16(i16* %a, [3 x <8 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3q_lane_u16(i16* %a, [3 x <8 x i16>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.uint16x8x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.uint16x8x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint16x8x3_t, %struct.uint16x8x3_t* [[B]], i32 0, i32 0 @@ -5127,7 +5127,7 @@ void test_vst3q_lane_u16(uint16_t *a, uint16x8x3_t b) { vst3q_lane_u16(a, b, 7); } -// CHECK-LABEL: define void @test_vst3q_lane_u32(i32* %a, [3 x <4 x i32>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3q_lane_u32(i32* %a, [3 x <4 x i32>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.uint32x4x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.uint32x4x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint32x4x3_t, %struct.uint32x4x3_t* [[B]], i32 0, i32 0 @@ -5157,7 +5157,7 @@ void test_vst3q_lane_u32(uint32_t *a, uint32x4x3_t b) { vst3q_lane_u32(a, b, 3); } -// CHECK-LABEL: define void @test_vst3q_lane_u64(i64* %a, [3 x <2 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3q_lane_u64(i64* %a, [3 x <2 x i64>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.uint64x2x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.uint64x2x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint64x2x3_t, %struct.uint64x2x3_t* [[B]], i32 0, i32 0 @@ -5187,7 +5187,7 @@ void test_vst3q_lane_u64(uint64_t *a, uint64x2x3_t b) { vst3q_lane_u64(a, b, 1); } -// CHECK-LABEL: define void @test_vst3q_lane_s8(i8* %a, [3 x <16 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3q_lane_s8(i8* %a, [3 x <16 x i8>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.int8x16x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.int8x16x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int8x16x3_t, %struct.int8x16x3_t* [[B]], i32 0, i32 0 @@ -5210,7 +5210,7 @@ void test_vst3q_lane_s8(int8_t *a, int8x16x3_t b) { vst3q_lane_s8(a, b, 15); } -// CHECK-LABEL: define void @test_vst3q_lane_s16(i16* %a, [3 x <8 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3q_lane_s16(i16* %a, [3 x <8 x i16>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.int16x8x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.int16x8x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int16x8x3_t, %struct.int16x8x3_t* [[B]], i32 0, i32 0 @@ -5240,7 +5240,7 @@ void test_vst3q_lane_s16(int16_t *a, int16x8x3_t b) { vst3q_lane_s16(a, b, 7); } -// CHECK-LABEL: define void @test_vst3q_lane_s32(i32* %a, [3 x <4 x i32>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3q_lane_s32(i32* %a, [3 x <4 x i32>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.int32x4x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.int32x4x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int32x4x3_t, %struct.int32x4x3_t* [[B]], i32 0, i32 0 @@ -5270,7 +5270,7 @@ void test_vst3q_lane_s32(int32_t *a, int32x4x3_t b) { vst3q_lane_s32(a, b, 3); } -// CHECK-LABEL: define void @test_vst3q_lane_s64(i64* %a, [3 x <2 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3q_lane_s64(i64* %a, [3 x <2 x i64>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.int64x2x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.int64x2x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int64x2x3_t, %struct.int64x2x3_t* [[B]], i32 0, i32 0 @@ -5300,7 +5300,7 @@ void test_vst3q_lane_s64(int64_t *a, int64x2x3_t b) { vst3q_lane_s64(a, b, 1); } -// CHECK-LABEL: define void @test_vst3q_lane_f16(half* %a, [3 x <8 x half>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3q_lane_f16(half* %a, [3 x <8 x half>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.float16x8x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.float16x8x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.float16x8x3_t, %struct.float16x8x3_t* [[B]], i32 0, i32 0 @@ -5330,7 +5330,7 @@ void test_vst3q_lane_f16(float16_t *a, float16x8x3_t b) { vst3q_lane_f16(a, b, 7); } -// CHECK-LABEL: define void @test_vst3q_lane_f32(float* %a, [3 x <4 x float>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3q_lane_f32(float* %a, [3 x <4 x float>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.float32x4x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.float32x4x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.float32x4x3_t, %struct.float32x4x3_t* [[B]], i32 0, i32 0 @@ -5360,7 +5360,7 @@ void test_vst3q_lane_f32(float32_t *a, float32x4x3_t b) { vst3q_lane_f32(a, b, 3); } -// CHECK-LABEL: define void @test_vst3q_lane_f64(double* %a, [3 x <2 x double>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3q_lane_f64(double* %a, [3 x <2 x double>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.float64x2x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.float64x2x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.float64x2x3_t, %struct.float64x2x3_t* [[B]], i32 0, i32 0 @@ -5390,7 +5390,7 @@ void test_vst3q_lane_f64(float64_t *a, float64x2x3_t b) { vst3q_lane_f64(a, b, 1); } -// CHECK-LABEL: define void @test_vst3q_lane_p8(i8* %a, [3 x <16 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3q_lane_p8(i8* %a, [3 x <16 x i8>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.poly8x16x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.poly8x16x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly8x16x3_t, %struct.poly8x16x3_t* [[B]], i32 0, i32 0 @@ -5413,7 +5413,7 @@ void test_vst3q_lane_p8(poly8_t *a, poly8x16x3_t b) { vst3q_lane_p8(a, b, 15); } -// CHECK-LABEL: define void @test_vst3q_lane_p16(i16* %a, [3 x <8 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3q_lane_p16(i16* %a, [3 x <8 x i16>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.poly16x8x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.poly16x8x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly16x8x3_t, %struct.poly16x8x3_t* [[B]], i32 0, i32 0 @@ -5443,7 +5443,7 @@ void test_vst3q_lane_p16(poly16_t *a, poly16x8x3_t b) { vst3q_lane_p16(a, b, 7); } -// CHECK-LABEL: define void @test_vst3q_lane_p64(i64* %a, [3 x <2 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3q_lane_p64(i64* %a, [3 x <2 x i64>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.poly64x2x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.poly64x2x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly64x2x3_t, %struct.poly64x2x3_t* [[B]], i32 0, i32 0 @@ -5473,7 +5473,7 @@ void test_vst3q_lane_p64(poly64_t *a, poly64x2x3_t b) { vst3q_lane_p64(a, b, 1); } -// CHECK-LABEL: define void @test_vst3_lane_u8(i8* %a, [3 x <8 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3_lane_u8(i8* %a, [3 x <8 x i8>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.uint8x8x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.uint8x8x3_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint8x8x3_t, %struct.uint8x8x3_t* [[B]], i32 0, i32 0 @@ -5496,7 +5496,7 @@ void test_vst3_lane_u8(uint8_t *a, uint8x8x3_t b) { vst3_lane_u8(a, b, 7); } -// CHECK-LABEL: define void @test_vst3_lane_u16(i16* %a, [3 x <4 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3_lane_u16(i16* %a, [3 x <4 x i16>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.uint16x4x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.uint16x4x3_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint16x4x3_t, %struct.uint16x4x3_t* [[B]], i32 0, i32 0 @@ -5526,7 +5526,7 @@ void test_vst3_lane_u16(uint16_t *a, uint16x4x3_t b) { vst3_lane_u16(a, b, 3); } -// CHECK-LABEL: define void @test_vst3_lane_u32(i32* %a, [3 x <2 x i32>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3_lane_u32(i32* %a, [3 x <2 x i32>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.uint32x2x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.uint32x2x3_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint32x2x3_t, %struct.uint32x2x3_t* [[B]], i32 0, i32 0 @@ -5556,7 +5556,7 @@ void test_vst3_lane_u32(uint32_t *a, uint32x2x3_t b) { vst3_lane_u32(a, b, 1); } -// CHECK-LABEL: define void @test_vst3_lane_u64(i64* %a, [3 x <1 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3_lane_u64(i64* %a, [3 x <1 x i64>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.uint64x1x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.uint64x1x3_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint64x1x3_t, %struct.uint64x1x3_t* [[B]], i32 0, i32 0 @@ -5586,7 +5586,7 @@ void test_vst3_lane_u64(uint64_t *a, uint64x1x3_t b) { vst3_lane_u64(a, b, 0); } -// CHECK-LABEL: define void @test_vst3_lane_s8(i8* %a, [3 x <8 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3_lane_s8(i8* %a, [3 x <8 x i8>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.int8x8x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.int8x8x3_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int8x8x3_t, %struct.int8x8x3_t* [[B]], i32 0, i32 0 @@ -5609,7 +5609,7 @@ void test_vst3_lane_s8(int8_t *a, int8x8x3_t b) { vst3_lane_s8(a, b, 7); } -// CHECK-LABEL: define void @test_vst3_lane_s16(i16* %a, [3 x <4 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3_lane_s16(i16* %a, [3 x <4 x i16>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.int16x4x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.int16x4x3_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int16x4x3_t, %struct.int16x4x3_t* [[B]], i32 0, i32 0 @@ -5639,7 +5639,7 @@ void test_vst3_lane_s16(int16_t *a, int16x4x3_t b) { vst3_lane_s16(a, b, 3); } -// CHECK-LABEL: define void @test_vst3_lane_s32(i32* %a, [3 x <2 x i32>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3_lane_s32(i32* %a, [3 x <2 x i32>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.int32x2x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.int32x2x3_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int32x2x3_t, %struct.int32x2x3_t* [[B]], i32 0, i32 0 @@ -5669,7 +5669,7 @@ void test_vst3_lane_s32(int32_t *a, int32x2x3_t b) { vst3_lane_s32(a, b, 1); } -// CHECK-LABEL: define void @test_vst3_lane_s64(i64* %a, [3 x <1 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3_lane_s64(i64* %a, [3 x <1 x i64>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.int64x1x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.int64x1x3_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int64x1x3_t, %struct.int64x1x3_t* [[B]], i32 0, i32 0 @@ -5699,7 +5699,7 @@ void test_vst3_lane_s64(int64_t *a, int64x1x3_t b) { vst3_lane_s64(a, b, 0); } -// CHECK-LABEL: define void @test_vst3_lane_f16(half* %a, [3 x <4 x half>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3_lane_f16(half* %a, [3 x <4 x half>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.float16x4x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.float16x4x3_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.float16x4x3_t, %struct.float16x4x3_t* [[B]], i32 0, i32 0 @@ -5729,7 +5729,7 @@ void test_vst3_lane_f16(float16_t *a, float16x4x3_t b) { vst3_lane_f16(a, b, 3); } -// CHECK-LABEL: define void @test_vst3_lane_f32(float* %a, [3 x <2 x float>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3_lane_f32(float* %a, [3 x <2 x float>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.float32x2x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.float32x2x3_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.float32x2x3_t, %struct.float32x2x3_t* [[B]], i32 0, i32 0 @@ -5759,7 +5759,7 @@ void test_vst3_lane_f32(float32_t *a, float32x2x3_t b) { vst3_lane_f32(a, b, 1); } -// CHECK-LABEL: define void @test_vst3_lane_f64(double* %a, [3 x <1 x double>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3_lane_f64(double* %a, [3 x <1 x double>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.float64x1x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.float64x1x3_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.float64x1x3_t, %struct.float64x1x3_t* [[B]], i32 0, i32 0 @@ -5789,7 +5789,7 @@ void test_vst3_lane_f64(float64_t *a, float64x1x3_t b) { vst3_lane_f64(a, b, 0); } -// CHECK-LABEL: define void @test_vst3_lane_p8(i8* %a, [3 x <8 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3_lane_p8(i8* %a, [3 x <8 x i8>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.poly8x8x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.poly8x8x3_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly8x8x3_t, %struct.poly8x8x3_t* [[B]], i32 0, i32 0 @@ -5812,7 +5812,7 @@ void test_vst3_lane_p8(poly8_t *a, poly8x8x3_t b) { vst3_lane_p8(a, b, 7); } -// CHECK-LABEL: define void @test_vst3_lane_p16(i16* %a, [3 x <4 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3_lane_p16(i16* %a, [3 x <4 x i16>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.poly16x4x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.poly16x4x3_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly16x4x3_t, %struct.poly16x4x3_t* [[B]], i32 0, i32 0 @@ -5842,7 +5842,7 @@ void test_vst3_lane_p16(poly16_t *a, poly16x4x3_t b) { vst3_lane_p16(a, b, 3); } -// CHECK-LABEL: define void @test_vst3_lane_p64(i64* %a, [3 x <1 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3_lane_p64(i64* %a, [3 x <1 x i64>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.poly64x1x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.poly64x1x3_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly64x1x3_t, %struct.poly64x1x3_t* [[B]], i32 0, i32 0 @@ -5872,7 +5872,7 @@ void test_vst3_lane_p64(poly64_t *a, poly64x1x3_t b) { vst3_lane_p64(a, b, 0); } -// CHECK-LABEL: define void @test_vst4q_lane_u8(i8* %a, [4 x <16 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4q_lane_u8(i8* %a, [4 x <16 x i8>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.uint8x16x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.uint8x16x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint8x16x4_t, %struct.uint8x16x4_t* [[B]], i32 0, i32 0 @@ -5898,7 +5898,7 @@ void test_vst4q_lane_u8(uint8_t *a, uint8x16x4_t b) { vst4q_lane_u8(a, b, 15); } -// CHECK-LABEL: define void @test_vst4q_lane_u16(i16* %a, [4 x <8 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4q_lane_u16(i16* %a, [4 x <8 x i16>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.uint16x8x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.uint16x8x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint16x8x4_t, %struct.uint16x8x4_t* [[B]], i32 0, i32 0 @@ -5933,7 +5933,7 @@ void test_vst4q_lane_u16(uint16_t *a, uint16x8x4_t b) { vst4q_lane_u16(a, b, 7); } -// CHECK-LABEL: define void @test_vst4q_lane_u32(i32* %a, [4 x <4 x i32>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4q_lane_u32(i32* %a, [4 x <4 x i32>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.uint32x4x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.uint32x4x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint32x4x4_t, %struct.uint32x4x4_t* [[B]], i32 0, i32 0 @@ -5968,7 +5968,7 @@ void test_vst4q_lane_u32(uint32_t *a, uint32x4x4_t b) { vst4q_lane_u32(a, b, 3); } -// CHECK-LABEL: define void @test_vst4q_lane_u64(i64* %a, [4 x <2 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4q_lane_u64(i64* %a, [4 x <2 x i64>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.uint64x2x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.uint64x2x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint64x2x4_t, %struct.uint64x2x4_t* [[B]], i32 0, i32 0 @@ -6003,7 +6003,7 @@ void test_vst4q_lane_u64(uint64_t *a, uint64x2x4_t b) { vst4q_lane_u64(a, b, 1); } -// CHECK-LABEL: define void @test_vst4q_lane_s8(i8* %a, [4 x <16 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4q_lane_s8(i8* %a, [4 x <16 x i8>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.int8x16x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.int8x16x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int8x16x4_t, %struct.int8x16x4_t* [[B]], i32 0, i32 0 @@ -6029,7 +6029,7 @@ void test_vst4q_lane_s8(int8_t *a, int8x16x4_t b) { vst4q_lane_s8(a, b, 15); } -// CHECK-LABEL: define void @test_vst4q_lane_s16(i16* %a, [4 x <8 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4q_lane_s16(i16* %a, [4 x <8 x i16>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.int16x8x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.int16x8x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int16x8x4_t, %struct.int16x8x4_t* [[B]], i32 0, i32 0 @@ -6064,7 +6064,7 @@ void test_vst4q_lane_s16(int16_t *a, int16x8x4_t b) { vst4q_lane_s16(a, b, 7); } -// CHECK-LABEL: define void @test_vst4q_lane_s32(i32* %a, [4 x <4 x i32>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4q_lane_s32(i32* %a, [4 x <4 x i32>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.int32x4x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.int32x4x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int32x4x4_t, %struct.int32x4x4_t* [[B]], i32 0, i32 0 @@ -6099,7 +6099,7 @@ void test_vst4q_lane_s32(int32_t *a, int32x4x4_t b) { vst4q_lane_s32(a, b, 3); } -// CHECK-LABEL: define void @test_vst4q_lane_s64(i64* %a, [4 x <2 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4q_lane_s64(i64* %a, [4 x <2 x i64>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.int64x2x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.int64x2x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int64x2x4_t, %struct.int64x2x4_t* [[B]], i32 0, i32 0 @@ -6134,7 +6134,7 @@ void test_vst4q_lane_s64(int64_t *a, int64x2x4_t b) { vst4q_lane_s64(a, b, 1); } -// CHECK-LABEL: define void @test_vst4q_lane_f16(half* %a, [4 x <8 x half>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4q_lane_f16(half* %a, [4 x <8 x half>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.float16x8x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.float16x8x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.float16x8x4_t, %struct.float16x8x4_t* [[B]], i32 0, i32 0 @@ -6169,7 +6169,7 @@ void test_vst4q_lane_f16(float16_t *a, float16x8x4_t b) { vst4q_lane_f16(a, b, 7); } -// CHECK-LABEL: define void @test_vst4q_lane_f32(float* %a, [4 x <4 x float>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4q_lane_f32(float* %a, [4 x <4 x float>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.float32x4x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.float32x4x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.float32x4x4_t, %struct.float32x4x4_t* [[B]], i32 0, i32 0 @@ -6204,7 +6204,7 @@ void test_vst4q_lane_f32(float32_t *a, float32x4x4_t b) { vst4q_lane_f32(a, b, 3); } -// CHECK-LABEL: define void @test_vst4q_lane_f64(double* %a, [4 x <2 x double>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4q_lane_f64(double* %a, [4 x <2 x double>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.float64x2x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.float64x2x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.float64x2x4_t, %struct.float64x2x4_t* [[B]], i32 0, i32 0 @@ -6239,7 +6239,7 @@ void test_vst4q_lane_f64(float64_t *a, float64x2x4_t b) { vst4q_lane_f64(a, b, 1); } -// CHECK-LABEL: define void @test_vst4q_lane_p8(i8* %a, [4 x <16 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4q_lane_p8(i8* %a, [4 x <16 x i8>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.poly8x16x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.poly8x16x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly8x16x4_t, %struct.poly8x16x4_t* [[B]], i32 0, i32 0 @@ -6265,7 +6265,7 @@ void test_vst4q_lane_p8(poly8_t *a, poly8x16x4_t b) { vst4q_lane_p8(a, b, 15); } -// CHECK-LABEL: define void @test_vst4q_lane_p16(i16* %a, [4 x <8 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4q_lane_p16(i16* %a, [4 x <8 x i16>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.poly16x8x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.poly16x8x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly16x8x4_t, %struct.poly16x8x4_t* [[B]], i32 0, i32 0 @@ -6300,7 +6300,7 @@ void test_vst4q_lane_p16(poly16_t *a, poly16x8x4_t b) { vst4q_lane_p16(a, b, 7); } -// CHECK-LABEL: define void @test_vst4q_lane_p64(i64* %a, [4 x <2 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4q_lane_p64(i64* %a, [4 x <2 x i64>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.poly64x2x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.poly64x2x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly64x2x4_t, %struct.poly64x2x4_t* [[B]], i32 0, i32 0 @@ -6335,7 +6335,7 @@ void test_vst4q_lane_p64(poly64_t *a, poly64x2x4_t b) { vst4q_lane_p64(a, b, 1); } -// CHECK-LABEL: define void @test_vst4_lane_u8(i8* %a, [4 x <8 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4_lane_u8(i8* %a, [4 x <8 x i8>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.uint8x8x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.uint8x8x4_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint8x8x4_t, %struct.uint8x8x4_t* [[B]], i32 0, i32 0 @@ -6361,7 +6361,7 @@ void test_vst4_lane_u8(uint8_t *a, uint8x8x4_t b) { vst4_lane_u8(a, b, 7); } -// CHECK-LABEL: define void @test_vst4_lane_u16(i16* %a, [4 x <4 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4_lane_u16(i16* %a, [4 x <4 x i16>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.uint16x4x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.uint16x4x4_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint16x4x4_t, %struct.uint16x4x4_t* [[B]], i32 0, i32 0 @@ -6396,7 +6396,7 @@ void test_vst4_lane_u16(uint16_t *a, uint16x4x4_t b) { vst4_lane_u16(a, b, 3); } -// CHECK-LABEL: define void @test_vst4_lane_u32(i32* %a, [4 x <2 x i32>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4_lane_u32(i32* %a, [4 x <2 x i32>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.uint32x2x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.uint32x2x4_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint32x2x4_t, %struct.uint32x2x4_t* [[B]], i32 0, i32 0 @@ -6431,7 +6431,7 @@ void test_vst4_lane_u32(uint32_t *a, uint32x2x4_t b) { vst4_lane_u32(a, b, 1); } -// CHECK-LABEL: define void @test_vst4_lane_u64(i64* %a, [4 x <1 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4_lane_u64(i64* %a, [4 x <1 x i64>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.uint64x1x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.uint64x1x4_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint64x1x4_t, %struct.uint64x1x4_t* [[B]], i32 0, i32 0 @@ -6466,7 +6466,7 @@ void test_vst4_lane_u64(uint64_t *a, uint64x1x4_t b) { vst4_lane_u64(a, b, 0); } -// CHECK-LABEL: define void @test_vst4_lane_s8(i8* %a, [4 x <8 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4_lane_s8(i8* %a, [4 x <8 x i8>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.int8x8x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.int8x8x4_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int8x8x4_t, %struct.int8x8x4_t* [[B]], i32 0, i32 0 @@ -6492,7 +6492,7 @@ void test_vst4_lane_s8(int8_t *a, int8x8x4_t b) { vst4_lane_s8(a, b, 7); } -// CHECK-LABEL: define void @test_vst4_lane_s16(i16* %a, [4 x <4 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4_lane_s16(i16* %a, [4 x <4 x i16>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.int16x4x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.int16x4x4_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int16x4x4_t, %struct.int16x4x4_t* [[B]], i32 0, i32 0 @@ -6527,7 +6527,7 @@ void test_vst4_lane_s16(int16_t *a, int16x4x4_t b) { vst4_lane_s16(a, b, 3); } -// CHECK-LABEL: define void @test_vst4_lane_s32(i32* %a, [4 x <2 x i32>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4_lane_s32(i32* %a, [4 x <2 x i32>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.int32x2x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.int32x2x4_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int32x2x4_t, %struct.int32x2x4_t* [[B]], i32 0, i32 0 @@ -6562,7 +6562,7 @@ void test_vst4_lane_s32(int32_t *a, int32x2x4_t b) { vst4_lane_s32(a, b, 1); } -// CHECK-LABEL: define void @test_vst4_lane_s64(i64* %a, [4 x <1 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4_lane_s64(i64* %a, [4 x <1 x i64>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.int64x1x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.int64x1x4_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int64x1x4_t, %struct.int64x1x4_t* [[B]], i32 0, i32 0 @@ -6597,7 +6597,7 @@ void test_vst4_lane_s64(int64_t *a, int64x1x4_t b) { vst4_lane_s64(a, b, 0); } -// CHECK-LABEL: define void @test_vst4_lane_f16(half* %a, [4 x <4 x half>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4_lane_f16(half* %a, [4 x <4 x half>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.float16x4x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.float16x4x4_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.float16x4x4_t, %struct.float16x4x4_t* [[B]], i32 0, i32 0 @@ -6632,7 +6632,7 @@ void test_vst4_lane_f16(float16_t *a, float16x4x4_t b) { vst4_lane_f16(a, b, 3); } -// CHECK-LABEL: define void @test_vst4_lane_f32(float* %a, [4 x <2 x float>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4_lane_f32(float* %a, [4 x <2 x float>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.float32x2x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.float32x2x4_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.float32x2x4_t, %struct.float32x2x4_t* [[B]], i32 0, i32 0 @@ -6667,7 +6667,7 @@ void test_vst4_lane_f32(float32_t *a, float32x2x4_t b) { vst4_lane_f32(a, b, 1); } -// CHECK-LABEL: define void @test_vst4_lane_f64(double* %a, [4 x <1 x double>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4_lane_f64(double* %a, [4 x <1 x double>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.float64x1x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.float64x1x4_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.float64x1x4_t, %struct.float64x1x4_t* [[B]], i32 0, i32 0 @@ -6702,7 +6702,7 @@ void test_vst4_lane_f64(float64_t *a, float64x1x4_t b) { vst4_lane_f64(a, b, 0); } -// CHECK-LABEL: define void @test_vst4_lane_p8(i8* %a, [4 x <8 x i8>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4_lane_p8(i8* %a, [4 x <8 x i8>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.poly8x8x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.poly8x8x4_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly8x8x4_t, %struct.poly8x8x4_t* [[B]], i32 0, i32 0 @@ -6728,7 +6728,7 @@ void test_vst4_lane_p8(poly8_t *a, poly8x8x4_t b) { vst4_lane_p8(a, b, 7); } -// CHECK-LABEL: define void @test_vst4_lane_p16(i16* %a, [4 x <4 x i16>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4_lane_p16(i16* %a, [4 x <4 x i16>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.poly16x4x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.poly16x4x4_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly16x4x4_t, %struct.poly16x4x4_t* [[B]], i32 0, i32 0 @@ -6763,7 +6763,7 @@ void test_vst4_lane_p16(poly16_t *a, poly16x4x4_t b) { vst4_lane_p16(a, b, 3); } -// CHECK-LABEL: define void @test_vst4_lane_p64(i64* %a, [4 x <1 x i64>] %b.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4_lane_p64(i64* %a, [4 x <1 x i64>] %b.coerce) #2 { // CHECK: [[B:%.*]] = alloca %struct.poly64x1x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.poly64x1x4_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly64x1x4_t, %struct.poly64x1x4_t* [[B]], i32 0, i32 0 diff --git a/clang/test/CodeGen/aarch64-neon-scalar-copy.c b/clang/test/CodeGen/aarch64-neon-scalar-copy.c index ef7ce9ca8cee..70edd2c350c5 100644 --- a/clang/test/CodeGen/aarch64-neon-scalar-copy.c +++ b/clang/test/CodeGen/aarch64-neon-scalar-copy.c @@ -3,7 +3,7 @@ #include <arm_neon.h> -// CHECK-LABEL: define float @test_vdups_lane_f32(<2 x float> %a) #0 { +// CHECK-LABEL: define dso_local float @test_vdups_lane_f32(<2 x float> %a) #0 { // CHECK: [[VDUPS_LANE:%.*]] = extractelement <2 x float> %a, i32 1 // CHECK: ret float [[VDUPS_LANE]] float32_t test_vdups_lane_f32(float32x2_t a) { @@ -11,7 +11,7 @@ float32_t test_vdups_lane_f32(float32x2_t a) { } -// CHECK-LABEL: define double @test_vdupd_lane_f64(<1 x double> %a) #0 { +// CHECK-LABEL: define dso_local double @test_vdupd_lane_f64(<1 x double> %a) #0 { // CHECK: [[VDUPD_LANE:%.*]] = extractelement <1 x double> %a, i32 0 // CHECK: ret double [[VDUPD_LANE]] float64_t test_vdupd_lane_f64(float64x1_t a) { @@ -19,7 +19,7 @@ float64_t test_vdupd_lane_f64(float64x1_t a) { } -// CHECK-LABEL: define float @test_vdups_laneq_f32(<4 x float> %a) #1 { +// CHECK-LABEL: define dso_local float @test_vdups_laneq_f32(<4 x float> %a) #1 { // CHECK: [[VGETQ_LANE:%.*]] = extractelement <4 x float> %a, i32 3 // CHECK: ret float [[VGETQ_LANE]] float32_t test_vdups_laneq_f32(float32x4_t a) { @@ -27,7 +27,7 @@ float32_t test_vdups_laneq_f32(float32x4_t a) { } -// CHECK-LABEL: define double @test_vdupd_laneq_f64(<2 x double> %a) #1 { +// CHECK-LABEL: define dso_local double @test_vdupd_laneq_f64(<2 x double> %a) #1 { // CHECK: [[VGETQ_LANE:%.*]] = extractelement <2 x double> %a, i32 1 // CHECK: ret double [[VGETQ_LANE]] float64_t test_vdupd_laneq_f64(float64x2_t a) { @@ -35,7 +35,7 @@ float64_t test_vdupd_laneq_f64(float64x2_t a) { } -// CHECK-LABEL: define i8 @test_vdupb_lane_s8(<8 x i8> %a) #0 { +// CHECK-LABEL: define dso_local i8 @test_vdupb_lane_s8(<8 x i8> %a) #0 { // CHECK: [[VGET_LANE:%.*]] = extractelement <8 x i8> %a, i32 7 // CHECK: ret i8 [[VGET_LANE]] int8_t test_vdupb_lane_s8(int8x8_t a) { @@ -43,7 +43,7 @@ int8_t test_vdupb_lane_s8(int8x8_t a) { } -// CHECK-LABEL: define i16 @test_vduph_lane_s16(<4 x i16> %a) #0 { +// CHECK-LABEL: define dso_local i16 @test_vduph_lane_s16(<4 x i16> %a) #0 { // CHECK: [[VGET_LANE:%.*]] = extractelement <4 x i16> %a, i32 3 // CHECK: ret i16 [[VGET_LANE]] int16_t test_vduph_lane_s16(int16x4_t a) { @@ -51,7 +51,7 @@ int16_t test_vduph_lane_s16(int16x4_t a) { } -// CHECK-LABEL: define i32 @test_vdups_lane_s32(<2 x i32> %a) #0 { +// CHECK-LABEL: define dso_local i32 @test_vdups_lane_s32(<2 x i32> %a) #0 { // CHECK: [[VGET_LANE:%.*]] = extractelement <2 x i32> %a, i32 1 // CHECK: ret i32 [[VGET_LANE]] int32_t test_vdups_lane_s32(int32x2_t a) { @@ -59,7 +59,7 @@ int32_t test_vdups_lane_s32(int32x2_t a) { } -// CHECK-LABEL: define i64 @test_vdupd_lane_s64(<1 x i64> %a) #0 { +// CHECK-LABEL: define dso_local i64 @test_vdupd_lane_s64(<1 x i64> %a) #0 { // CHECK: [[VGET_LANE:%.*]] = extractelement <1 x i64> %a, i32 0 // CHECK: ret i64 [[VGET_LANE]] int64_t test_vdupd_lane_s64(int64x1_t a) { @@ -67,7 +67,7 @@ int64_t test_vdupd_lane_s64(int64x1_t a) { } -// CHECK-LABEL: define i8 @test_vdupb_lane_u8(<8 x i8> %a) #0 { +// CHECK-LABEL: define dso_local i8 @test_vdupb_lane_u8(<8 x i8> %a) #0 { // CHECK: [[VGET_LANE:%.*]] = extractelement <8 x i8> %a, i32 7 // CHECK: ret i8 [[VGET_LANE]] uint8_t test_vdupb_lane_u8(uint8x8_t a) { @@ -75,7 +75,7 @@ uint8_t test_vdupb_lane_u8(uint8x8_t a) { } -// CHECK-LABEL: define i16 @test_vduph_lane_u16(<4 x i16> %a) #0 { +// CHECK-LABEL: define dso_local i16 @test_vduph_lane_u16(<4 x i16> %a) #0 { // CHECK: [[VGET_LANE:%.*]] = extractelement <4 x i16> %a, i32 3 // CHECK: ret i16 [[VGET_LANE]] uint16_t test_vduph_lane_u16(uint16x4_t a) { @@ -83,7 +83,7 @@ uint16_t test_vduph_lane_u16(uint16x4_t a) { } -// CHECK-LABEL: define i32 @test_vdups_lane_u32(<2 x i32> %a) #0 { +// CHECK-LABEL: define dso_local i32 @test_vdups_lane_u32(<2 x i32> %a) #0 { // CHECK: [[VGET_LANE:%.*]] = extractelement <2 x i32> %a, i32 1 // CHECK: ret i32 [[VGET_LANE]] uint32_t test_vdups_lane_u32(uint32x2_t a) { @@ -91,14 +91,14 @@ uint32_t test_vdups_lane_u32(uint32x2_t a) { } -// CHECK-LABEL: define i64 @test_vdupd_lane_u64(<1 x i64> %a) #0 { +// CHECK-LABEL: define dso_local i64 @test_vdupd_lane_u64(<1 x i64> %a) #0 { // CHECK: [[VGET_LANE:%.*]] = extractelement <1 x i64> %a, i32 0 // CHECK: ret i64 [[VGET_LANE]] uint64_t test_vdupd_lane_u64(uint64x1_t a) { return vdupd_lane_u64(a, 0); } -// CHECK-LABEL: define i8 @test_vdupb_laneq_s8(<16 x i8> %a) #1 { +// CHECK-LABEL: define dso_local i8 @test_vdupb_laneq_s8(<16 x i8> %a) #1 { // CHECK: [[VGETQ_LANE:%.*]] = extractelement <16 x i8> %a, i32 15 // CHECK: ret i8 [[VGETQ_LANE]] int8_t test_vdupb_laneq_s8(int8x16_t a) { @@ -106,7 +106,7 @@ int8_t test_vdupb_laneq_s8(int8x16_t a) { } -// CHECK-LABEL: define i16 @test_vduph_laneq_s16(<8 x i16> %a) #1 { +// CHECK-LABEL: define dso_local i16 @test_vduph_laneq_s16(<8 x i16> %a) #1 { // CHECK: [[VGETQ_LANE:%.*]] = extractelement <8 x i16> %a, i32 7 // CHECK: ret i16 [[VGETQ_LANE]] int16_t test_vduph_laneq_s16(int16x8_t a) { @@ -114,7 +114,7 @@ int16_t test_vduph_laneq_s16(int16x8_t a) { } -// CHECK-LABEL: define i32 @test_vdups_laneq_s32(<4 x i32> %a) #1 { +// CHECK-LABEL: define dso_local i32 @test_vdups_laneq_s32(<4 x i32> %a) #1 { // CHECK: [[VGETQ_LANE:%.*]] = extractelement <4 x i32> %a, i32 3 // CHECK: ret i32 [[VGETQ_LANE]] int32_t test_vdups_laneq_s32(int32x4_t a) { @@ -122,7 +122,7 @@ int32_t test_vdups_laneq_s32(int32x4_t a) { } -// CHECK-LABEL: define i64 @test_vdupd_laneq_s64(<2 x i64> %a) #1 { +// CHECK-LABEL: define dso_local i64 @test_vdupd_laneq_s64(<2 x i64> %a) #1 { // CHECK: [[VGETQ_LANE:%.*]] = extractelement <2 x i64> %a, i32 1 // CHECK: ret i64 [[VGETQ_LANE]] int64_t test_vdupd_laneq_s64(int64x2_t a) { @@ -130,7 +130,7 @@ int64_t test_vdupd_laneq_s64(int64x2_t a) { } -// CHECK-LABEL: define i8 @test_vdupb_laneq_u8(<16 x i8> %a) #1 { +// CHECK-LABEL: define dso_local i8 @test_vdupb_laneq_u8(<16 x i8> %a) #1 { // CHECK: [[VGETQ_LANE:%.*]] = extractelement <16 x i8> %a, i32 15 // CHECK: ret i8 [[VGETQ_LANE]] uint8_t test_vdupb_laneq_u8(uint8x16_t a) { @@ -138,7 +138,7 @@ uint8_t test_vdupb_laneq_u8(uint8x16_t a) { } -// CHECK-LABEL: define i16 @test_vduph_laneq_u16(<8 x i16> %a) #1 { +// CHECK-LABEL: define dso_local i16 @test_vduph_laneq_u16(<8 x i16> %a) #1 { // CHECK: [[VGETQ_LANE:%.*]] = extractelement <8 x i16> %a, i32 7 // CHECK: ret i16 [[VGETQ_LANE]] uint16_t test_vduph_laneq_u16(uint16x8_t a) { @@ -146,7 +146,7 @@ uint16_t test_vduph_laneq_u16(uint16x8_t a) { } -// CHECK-LABEL: define i32 @test_vdups_laneq_u32(<4 x i32> %a) #1 { +// CHECK-LABEL: define dso_local i32 @test_vdups_laneq_u32(<4 x i32> %a) #1 { // CHECK: [[VGETQ_LANE:%.*]] = extractelement <4 x i32> %a, i32 3 // CHECK: ret i32 [[VGETQ_LANE]] uint32_t test_vdups_laneq_u32(uint32x4_t a) { @@ -154,35 +154,35 @@ uint32_t test_vdups_laneq_u32(uint32x4_t a) { } -// CHECK-LABEL: define i64 @test_vdupd_laneq_u64(<2 x i64> %a) #1 { +// CHECK-LABEL: define dso_local i64 @test_vdupd_laneq_u64(<2 x i64> %a) #1 { // CHECK: [[VGETQ_LANE:%.*]] = extractelement <2 x i64> %a, i32 1 // CHECK: ret i64 [[VGETQ_LANE]] uint64_t test_vdupd_laneq_u64(uint64x2_t a) { return vdupd_laneq_u64(a, 1); } -// CHECK-LABEL: define i8 @test_vdupb_lane_p8(<8 x i8> %a) #0 { +// CHECK-LABEL: define dso_local i8 @test_vdupb_lane_p8(<8 x i8> %a) #0 { // CHECK: [[VGET_LANE:%.*]] = extractelement <8 x i8> %a, i32 7 // CHECK: ret i8 [[VGET_LANE]] poly8_t test_vdupb_lane_p8(poly8x8_t a) { return vdupb_lane_p8(a, 7); } -// CHECK-LABEL: define i16 @test_vduph_lane_p16(<4 x i16> %a) #0 { +// CHECK-LABEL: define dso_local i16 @test_vduph_lane_p16(<4 x i16> %a) #0 { // CHECK: [[VGET_LANE:%.*]] = extractelement <4 x i16> %a, i32 3 // CHECK: ret i16 [[VGET_LANE]] poly16_t test_vduph_lane_p16(poly16x4_t a) { return vduph_lane_p16(a, 3); } -// CHECK-LABEL: define i8 @test_vdupb_laneq_p8(<16 x i8> %a) #1 { +// CHECK-LABEL: define dso_local i8 @test_vdupb_laneq_p8(<16 x i8> %a) #1 { // CHECK: [[VGETQ_LANE:%.*]] = extractelement <16 x i8> %a, i32 15 // CHECK: ret i8 [[VGETQ_LANE]] poly8_t test_vdupb_laneq_p8(poly8x16_t a) { return vdupb_laneq_p8(a, 15); } -// CHECK-LABEL: define i16 @test_vduph_laneq_p16(<8 x i16> %a) #1 { +// CHECK-LABEL: define dso_local i16 @test_vduph_laneq_p16(<8 x i16> %a) #1 { // CHECK: [[VGETQ_LANE:%.*]] = extractelement <8 x i16> %a, i32 7 // CHECK: ret i16 [[VGETQ_LANE]] poly16_t test_vduph_laneq_p16(poly16x8_t a) { diff --git a/clang/test/CodeGen/aarch64-neon-scalar-x-indexed-elem.c b/clang/test/CodeGen/aarch64-neon-scalar-x-indexed-elem.c index 836e4dbd9917..75dacdc04a3f 100644 --- a/clang/test/CodeGen/aarch64-neon-scalar-x-indexed-elem.c +++ b/clang/test/CodeGen/aarch64-neon-scalar-x-indexed-elem.c @@ -6,7 +6,7 @@ #include <arm_neon.h> -// CHECK-LABEL: define float @test_vmuls_lane_f32(float %a, <2 x float> %b) #0 { +// CHECK-LABEL: define dso_local float @test_vmuls_lane_f32(float %a, <2 x float> %b) #0 { // CHECK: [[VGET_LANE:%.*]] = extractelement <2 x float> %b, i32 1 // CHECK: [[MUL:%.*]] = fmul float %a, [[VGET_LANE]] // CHECK: ret float [[MUL]] @@ -14,7 +14,7 @@ float32_t test_vmuls_lane_f32(float32_t a, float32x2_t b) { return vmuls_lane_f32(a, b, 1); } -// CHECK-LABEL: define double @test_vmuld_lane_f64(double %a, <1 x double> %b) #0 { +// CHECK-LABEL: define dso_local double @test_vmuld_lane_f64(double %a, <1 x double> %b) #0 { // CHECK: [[VGET_LANE:%.*]] = extractelement <1 x double> %b, i32 0 // CHECK: [[MUL:%.*]] = fmul double %a, [[VGET_LANE]] // CHECK: ret double [[MUL]] @@ -22,7 +22,7 @@ float64_t test_vmuld_lane_f64(float64_t a, float64x1_t b) { return vmuld_lane_f64(a, b, 0); } -// CHECK-LABEL: define float @test_vmuls_laneq_f32(float %a, <4 x float> %b) #1 { +// CHECK-LABEL: define dso_local float @test_vmuls_laneq_f32(float %a, <4 x float> %b) #1 { // CHECK: [[VGETQ_LANE:%.*]] = extractelement <4 x float> %b, i32 3 // CHECK: [[MUL:%.*]] = fmul float %a, [[VGETQ_LANE]] // CHECK: ret float [[MUL]] @@ -30,7 +30,7 @@ float32_t test_vmuls_laneq_f32(float32_t a, float32x4_t b) { return vmuls_laneq_f32(a, b, 3); } -// CHECK-LABEL: define double @test_vmuld_laneq_f64(double %a, <2 x double> %b) #1 { +// CHECK-LABEL: define dso_local double @test_vmuld_laneq_f64(double %a, <2 x double> %b) #1 { // CHECK: [[VGETQ_LANE:%.*]] = extractelement <2 x double> %b, i32 1 // CHECK: [[MUL:%.*]] = fmul double %a, [[VGETQ_LANE]] // CHECK: ret double [[MUL]] @@ -38,7 +38,7 @@ float64_t test_vmuld_laneq_f64(float64_t a, float64x2_t b) { return vmuld_laneq_f64(a, b, 1); } -// CHECK-LABEL: define <1 x double> @test_vmul_n_f64(<1 x double> %a, double %b) #0 { +// CHECK-LABEL: define dso_local <1 x double> @test_vmul_n_f64(<1 x double> %a, double %b) #0 { // CHECK: [[TMP2:%.*]] = bitcast <1 x double> %a to double // CHECK: [[TMP3:%.*]] = fmul double [[TMP2]], %b // CHECK: [[TMP4:%.*]] = bitcast double [[TMP3]] to <1 x double> @@ -47,7 +47,7 @@ float64x1_t test_vmul_n_f64(float64x1_t a, float64_t b) { return vmul_n_f64(a, b); } -// CHECK-LABEL: define float @test_vmulxs_lane_f32(float %a, <2 x float> %b) #0 { +// CHECK-LABEL: define dso_local float @test_vmulxs_lane_f32(float %a, <2 x float> %b) #0 { // CHECK: [[VGET_LANE:%.*]] = extractelement <2 x float> %b, i32 1 // CHECK: [[VMULXS_F32_I:%.*]] = call float @llvm.aarch64.neon.fmulx.f32(float %a, float [[VGET_LANE]]) // CHECK: ret float [[VMULXS_F32_I]] @@ -55,7 +55,7 @@ float32_t test_vmulxs_lane_f32(float32_t a, float32x2_t b) { return vmulxs_lane_f32(a, b, 1); } -// CHECK-LABEL: define float @test_vmulxs_laneq_f32(float %a, <4 x float> %b) #1 { +// CHECK-LABEL: define dso_local float @test_vmulxs_laneq_f32(float %a, <4 x float> %b) #1 { // CHECK: [[VGETQ_LANE:%.*]] = extractelement <4 x float> %b, i32 3 // CHECK: [[VMULXS_F32_I:%.*]] = call float @llvm.aarch64.neon.fmulx.f32(float %a, float [[VGETQ_LANE]]) // CHECK: ret float [[VMULXS_F32_I]] @@ -63,7 +63,7 @@ float32_t test_vmulxs_laneq_f32(float32_t a, float32x4_t b) { return vmulxs_laneq_f32(a, b, 3); } -// CHECK-LABEL: define double @test_vmulxd_lane_f64(double %a, <1 x double> %b) #0 { +// CHECK-LABEL: define dso_local double @test_vmulxd_lane_f64(double %a, <1 x double> %b) #0 { // CHECK: [[VGET_LANE:%.*]] = extractelement <1 x double> %b, i32 0 // CHECK: [[VMULXD_F64_I:%.*]] = call double @llvm.aarch64.neon.fmulx.f64(double %a, double [[VGET_LANE]]) // CHECK: ret double [[VMULXD_F64_I]] @@ -71,7 +71,7 @@ float64_t test_vmulxd_lane_f64(float64_t a, float64x1_t b) { return vmulxd_lane_f64(a, b, 0); } -// CHECK-LABEL: define double @test_vmulxd_laneq_f64(double %a, <2 x double> %b) #1 { +// CHECK-LABEL: define dso_local double @test_vmulxd_laneq_f64(double %a, <2 x double> %b) #1 { // CHECK: [[VGETQ_LANE:%.*]] = extractelement <2 x double> %b, i32 1 // CHECK: [[VMULXD_F64_I:%.*]] = call double @llvm.aarch64.neon.fmulx.f64(double %a, double [[VGETQ_LANE]]) // CHECK: ret double [[VMULXD_F64_I]] @@ -79,7 +79,7 @@ float64_t test_vmulxd_laneq_f64(float64_t a, float64x2_t b) { return vmulxd_laneq_f64(a, b, 1); } -// CHECK-LABEL: define <1 x double> @test_vmulx_lane_f64(<1 x double> %a, <1 x double> %b) #0 { +// CHECK-LABEL: define dso_local <1 x double> @test_vmulx_lane_f64(<1 x double> %a, <1 x double> %b) #0 { // CHECK: [[VGET_LANE:%.*]] = extractelement <1 x double> %a, i32 0 // CHECK: [[VGET_LANE6:%.*]] = extractelement <1 x double> %b, i32 0 // CHECK: [[VMULXD_F64_I:%.*]] = call double @llvm.aarch64.neon.fmulx.f64(double [[VGET_LANE]], double [[VGET_LANE6]]) @@ -90,7 +90,7 @@ float64x1_t test_vmulx_lane_f64(float64x1_t a, float64x1_t b) { } -// CHECK-LABEL: define <1 x double> @test_vmulx_laneq_f64_0(<1 x double> %a, <2 x double> %b) #1 { +// CHECK-LABEL: define dso_local <1 x double> @test_vmulx_laneq_f64_0(<1 x double> %a, <2 x double> %b) #1 { // CHECK: [[VGET_LANE:%.*]] = extractelement <1 x double> %a, i32 0 // CHECK: [[VGETQ_LANE:%.*]] = extractelement <2 x double> %b, i32 0 // CHECK: [[VMULXD_F64_I:%.*]] = call double @llvm.aarch64.neon.fmulx.f64(double [[VGET_LANE]], double [[VGETQ_LANE]]) @@ -100,7 +100,7 @@ float64x1_t test_vmulx_laneq_f64_0(float64x1_t a, float64x2_t b) { return vmulx_laneq_f64(a, b, 0); } -// CHECK-LABEL: define <1 x double> @test_vmulx_laneq_f64_1(<1 x double> %a, <2 x double> %b) #1 { +// CHECK-LABEL: define dso_local <1 x double> @test_vmulx_laneq_f64_1(<1 x double> %a, <2 x double> %b) #1 { // CHECK: [[VGET_LANE:%.*]] = extractelement <1 x double> %a, i32 0 // CHECK: [[VGETQ_LANE:%.*]] = extractelement <2 x double> %b, i32 1 // CHECK: [[VMULXD_F64_I:%.*]] = call double @llvm.aarch64.neon.fmulx.f64(double [[VGET_LANE]], double [[VGETQ_LANE]]) @@ -111,7 +111,7 @@ float64x1_t test_vmulx_laneq_f64_1(float64x1_t a, float64x2_t b) { } -// CHECK-LABEL: define float @test_vfmas_lane_f32(float %a, float %b, <2 x float> %c) #0 { +// CHECK-LABEL: define dso_local float @test_vfmas_lane_f32(float %a, float %b, <2 x float> %c) #0 { // CHECK: [[EXTRACT:%.*]] = extractelement <2 x float> %c, i32 1 // CHECK: [[TMP2:%.*]] = call float @llvm.fma.f32(float %b, float [[EXTRACT]], float %a) // CHECK: ret float [[TMP2]] @@ -119,7 +119,7 @@ float32_t test_vfmas_lane_f32(float32_t a, float32_t b, float32x2_t c) { return vfmas_lane_f32(a, b, c, 1); } -// CHECK-LABEL: define double @test_vfmad_lane_f64(double %a, double %b, <1 x double> %c) #0 { +// CHECK-LABEL: define dso_local double @test_vfmad_lane_f64(double %a, double %b, <1 x double> %c) #0 { // CHECK: [[EXTRACT:%.*]] = extractelement <1 x double> %c, i32 0 // CHECK: [[TMP2:%.*]] = call double @llvm.fma.f64(double %b, double [[EXTRACT]], double %a) // CHECK: ret double [[TMP2]] @@ -127,7 +127,7 @@ float64_t test_vfmad_lane_f64(float64_t a, float64_t b, float64x1_t c) { return vfmad_lane_f64(a, b, c, 0); } -// CHECK-LABEL: define double @test_vfmad_laneq_f64(double %a, double %b, <2 x double> %c) #1 { +// CHECK-LABEL: define dso_local double @test_vfmad_laneq_f64(double %a, double %b, <2 x double> %c) #1 { // CHECK: [[EXTRACT:%.*]] = extractelement <2 x double> %c, i32 1 // CHECK: [[TMP2:%.*]] = call double @llvm.fma.f64(double %b, double [[EXTRACT]], double %a) // CHECK: ret double [[TMP2]] @@ -135,7 +135,7 @@ float64_t test_vfmad_laneq_f64(float64_t a, float64_t b, float64x2_t c) { return vfmad_laneq_f64(a, b, c, 1); } -// CHECK-LABEL: define float @test_vfmss_lane_f32(float %a, float %b, <2 x float> %c) #0 { +// CHECK-LABEL: define dso_local float @test_vfmss_lane_f32(float %a, float %b, <2 x float> %c) #0 { // CHECK: [[SUB:%.*]] = fneg float %b // CHECK: [[EXTRACT:%.*]] = extractelement <2 x float> %c, i32 1 // CHECK: [[TMP2:%.*]] = call float @llvm.fma.f32(float [[SUB]], float [[EXTRACT]], float %a) @@ -144,7 +144,7 @@ float32_t test_vfmss_lane_f32(float32_t a, float32_t b, float32x2_t c) { return vfmss_lane_f32(a, b, c, 1); } -// CHECK-LABEL: define <1 x double> @test_vfma_lane_f64(<1 x double> %a, <1 x double> %b, <1 x double> %v) #0 { +// CHECK-LABEL: define dso_local <1 x double> @test_vfma_lane_f64(<1 x double> %a, <1 x double> %b, <1 x double> %v) #0 { // CHECK: [[TMP0:%.*]] = bitcast <1 x double> %a to <8 x i8> // CHECK: [[TMP1:%.*]] = bitcast <1 x double> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <1 x double> %v to <8 x i8> @@ -158,7 +158,7 @@ float64x1_t test_vfma_lane_f64(float64x1_t a, float64x1_t b, float64x1_t v) { return vfma_lane_f64(a, b, v, 0); } -// CHECK-LABEL: define <1 x double> @test_vfms_lane_f64(<1 x double> %a, <1 x double> %b, <1 x double> %v) #0 { +// CHECK-LABEL: define dso_local <1 x double> @test_vfms_lane_f64(<1 x double> %a, <1 x double> %b, <1 x double> %v) #0 { // CHECK: [[SUB:%.*]] = fneg <1 x double> %b // CHECK: [[TMP0:%.*]] = bitcast <1 x double> %a to <8 x i8> // CHECK: [[TMP1:%.*]] = bitcast <1 x double> [[SUB]] to <8 x i8> @@ -173,7 +173,7 @@ float64x1_t test_vfms_lane_f64(float64x1_t a, float64x1_t b, float64x1_t v) { return vfms_lane_f64(a, b, v, 0); } -// CHECK-LABEL: define <1 x double> @test_vfma_laneq_f64(<1 x double> %a, <1 x double> %b, <2 x double> %v) #1 { +// CHECK-LABEL: define dso_local <1 x double> @test_vfma_laneq_f64(<1 x double> %a, <1 x double> %b, <2 x double> %v) #1 { // CHECK: [[TMP0:%.*]] = bitcast <1 x double> %a to <8 x i8> // CHECK: [[TMP1:%.*]] = bitcast <1 x double> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <2 x double> %v to <16 x i8> @@ -188,7 +188,7 @@ float64x1_t test_vfma_laneq_f64(float64x1_t a, float64x1_t b, float64x2_t v) { return vfma_laneq_f64(a, b, v, 0); } -// CHECK-LABEL: define <1 x double> @test_vfms_laneq_f64(<1 x double> %a, <1 x double> %b, <2 x double> %v) #1 { +// CHECK-LABEL: define dso_local <1 x double> @test_vfms_laneq_f64(<1 x double> %a, <1 x double> %b, <2 x double> %v) #1 { // CHECK: [[SUB:%.*]] = fneg <1 x double> %b // CHECK: [[TMP0:%.*]] = bitcast <1 x double> %a to <8 x i8> // CHECK: [[TMP1:%.*]] = bitcast <1 x double> [[SUB]] to <8 x i8> @@ -204,7 +204,7 @@ float64x1_t test_vfms_laneq_f64(float64x1_t a, float64x1_t b, float64x2_t v) { return vfms_laneq_f64(a, b, v, 0); } -// CHECK-LABEL: define i32 @test_vqdmullh_lane_s16(i16 %a, <4 x i16> %b) #0 { +// CHECK-LABEL: define dso_local i32 @test_vqdmullh_lane_s16(i16 %a, <4 x i16> %b) #0 { // CHECK: [[VGET_LANE:%.*]] = extractelement <4 x i16> %b, i32 3 // CHECK: [[TMP2:%.*]] = insertelement <4 x i16> undef, i16 %a, i64 0 // CHECK: [[TMP3:%.*]] = insertelement <4 x i16> undef, i16 [[VGET_LANE]], i64 0 @@ -215,7 +215,7 @@ int32_t test_vqdmullh_lane_s16(int16_t a, int16x4_t b) { return vqdmullh_lane_s16(a, b, 3); } -// CHECK-LABEL: define i64 @test_vqdmulls_lane_s32(i32 %a, <2 x i32> %b) #0 { +// CHECK-LABEL: define dso_local i64 @test_vqdmulls_lane_s32(i32 %a, <2 x i32> %b) #0 { // CHECK: [[VGET_LANE:%.*]] = extractelement <2 x i32> %b, i32 1 // CHECK: [[VQDMULLS_S32_I:%.*]] = call i64 @llvm.aarch64.neon.sqdmulls.scalar(i32 %a, i32 [[VGET_LANE]]) // CHECK: ret i64 [[VQDMULLS_S32_I]] @@ -223,7 +223,7 @@ int64_t test_vqdmulls_lane_s32(int32_t a, int32x2_t b) { return vqdmulls_lane_s32(a, b, 1); } -// CHECK-LABEL: define i32 @test_vqdmullh_laneq_s16(i16 %a, <8 x i16> %b) #1 { +// CHECK-LABEL: define dso_local i32 @test_vqdmullh_laneq_s16(i16 %a, <8 x i16> %b) #1 { // CHECK: [[VGETQ_LANE:%.*]] = extractelement <8 x i16> %b, i32 7 // CHECK: [[TMP2:%.*]] = insertelement <4 x i16> undef, i16 %a, i64 0 // CHECK: [[TMP3:%.*]] = insertelement <4 x i16> undef, i16 [[VGETQ_LANE]], i64 0 @@ -234,7 +234,7 @@ int32_t test_vqdmullh_laneq_s16(int16_t a, int16x8_t b) { return vqdmullh_laneq_s16(a, b, 7); } -// CHECK-LABEL: define i64 @test_vqdmulls_laneq_s32(i32 %a, <4 x i32> %b) #1 { +// CHECK-LABEL: define dso_local i64 @test_vqdmulls_laneq_s32(i32 %a, <4 x i32> %b) #1 { // CHECK: [[VGETQ_LANE:%.*]] = extractelement <4 x i32> %b, i32 3 // CHECK: [[VQDMULLS_S32_I:%.*]] = call i64 @llvm.aarch64.neon.sqdmulls.scalar(i32 %a, i32 [[VGETQ_LANE]]) // CHECK: ret i64 [[VQDMULLS_S32_I]] @@ -242,7 +242,7 @@ int64_t test_vqdmulls_laneq_s32(int32_t a, int32x4_t b) { return vqdmulls_laneq_s32(a, b, 3); } -// CHECK-LABEL: define i16 @test_vqdmulhh_lane_s16(i16 %a, <4 x i16> %b) #0 { +// CHECK-LABEL: define dso_local i16 @test_vqdmulhh_lane_s16(i16 %a, <4 x i16> %b) #0 { // CHECK: [[VGET_LANE:%.*]] = extractelement <4 x i16> %b, i32 3 // CHECK: [[TMP2:%.*]] = insertelement <4 x i16> undef, i16 %a, i64 0 // CHECK: [[TMP3:%.*]] = insertelement <4 x i16> undef, i16 [[VGET_LANE]], i64 0 @@ -253,7 +253,7 @@ int16_t test_vqdmulhh_lane_s16(int16_t a, int16x4_t b) { return vqdmulhh_lane_s16(a, b, 3); } -// CHECK-LABEL: define i32 @test_vqdmulhs_lane_s32(i32 %a, <2 x i32> %b) #0 { +// CHECK-LABEL: define dso_local i32 @test_vqdmulhs_lane_s32(i32 %a, <2 x i32> %b) #0 { // CHECK: [[VGET_LANE:%.*]] = extractelement <2 x i32> %b, i32 1 // CHECK: [[VQDMULHS_S32_I:%.*]] = call i32 @llvm.aarch64.neon.sqdmulh.i32(i32 %a, i32 [[VGET_LANE]]) // CHECK: ret i32 [[VQDMULHS_S32_I]] @@ -262,7 +262,7 @@ int32_t test_vqdmulhs_lane_s32(int32_t a, int32x2_t b) { } -// CHECK-LABEL: define i16 @test_vqdmulhh_laneq_s16(i16 %a, <8 x i16> %b) #1 { +// CHECK-LABEL: define dso_local i16 @test_vqdmulhh_laneq_s16(i16 %a, <8 x i16> %b) #1 { // CHECK: [[VGETQ_LANE:%.*]] = extractelement <8 x i16> %b, i32 7 // CHECK: [[TMP2:%.*]] = insertelement <4 x i16> undef, i16 %a, i64 0 // CHECK: [[TMP3:%.*]] = insertelement <4 x i16> undef, i16 [[VGETQ_LANE]], i64 0 @@ -274,7 +274,7 @@ int16_t test_vqdmulhh_laneq_s16(int16_t a, int16x8_t b) { } -// CHECK-LABEL: define i32 @test_vqdmulhs_laneq_s32(i32 %a, <4 x i32> %b) #1 { +// CHECK-LABEL: define dso_local i32 @test_vqdmulhs_laneq_s32(i32 %a, <4 x i32> %b) #1 { // CHECK: [[VGETQ_LANE:%.*]] = extractelement <4 x i32> %b, i32 3 // CHECK: [[VQDMULHS_S32_I:%.*]] = call i32 @llvm.aarch64.neon.sqdmulh.i32(i32 %a, i32 [[VGETQ_LANE]]) // CHECK: ret i32 [[VQDMULHS_S32_I]] @@ -282,7 +282,7 @@ int32_t test_vqdmulhs_laneq_s32(int32_t a, int32x4_t b) { return vqdmulhs_laneq_s32(a, b, 3); } -// CHECK-LABEL: define i16 @test_vqrdmulhh_lane_s16(i16 %a, <4 x i16> %b) #0 { +// CHECK-LABEL: define dso_local i16 @test_vqrdmulhh_lane_s16(i16 %a, <4 x i16> %b) #0 { // CHECK: [[VGET_LANE:%.*]] = extractelement <4 x i16> %b, i32 3 // CHECK: [[TMP2:%.*]] = insertelement <4 x i16> undef, i16 %a, i64 0 // CHECK: [[TMP3:%.*]] = insertelement <4 x i16> undef, i16 [[VGET_LANE]], i64 0 @@ -293,7 +293,7 @@ int16_t test_vqrdmulhh_lane_s16(int16_t a, int16x4_t b) { return vqrdmulhh_lane_s16(a, b, 3); } -// CHECK-LABEL: define i32 @test_vqrdmulhs_lane_s32(i32 %a, <2 x i32> %b) #0 { +// CHECK-LABEL: define dso_local i32 @test_vqrdmulhs_lane_s32(i32 %a, <2 x i32> %b) #0 { // CHECK: [[VGET_LANE:%.*]] = extractelement <2 x i32> %b, i32 1 // CHECK: [[VQRDMULHS_S32_I:%.*]] = call i32 @llvm.aarch64.neon.sqrdmulh.i32(i32 %a, i32 [[VGET_LANE]]) // CHECK: ret i32 [[VQRDMULHS_S32_I]] @@ -302,7 +302,7 @@ int32_t test_vqrdmulhs_lane_s32(int32_t a, int32x2_t b) { } -// CHECK-LABEL: define i16 @test_vqrdmulhh_laneq_s16(i16 %a, <8 x i16> %b) #1 { +// CHECK-LABEL: define dso_local i16 @test_vqrdmulhh_laneq_s16(i16 %a, <8 x i16> %b) #1 { // CHECK: [[VGETQ_LANE:%.*]] = extractelement <8 x i16> %b, i32 7 // CHECK: [[TMP2:%.*]] = insertelement <4 x i16> undef, i16 %a, i64 0 // CHECK: [[TMP3:%.*]] = insertelement <4 x i16> undef, i16 [[VGETQ_LANE]], i64 0 @@ -314,7 +314,7 @@ int16_t test_vqrdmulhh_laneq_s16(int16_t a, int16x8_t b) { } -// CHECK-LABEL: define i32 @test_vqrdmulhs_laneq_s32(i32 %a, <4 x i32> %b) #1 { +// CHECK-LABEL: define dso_local i32 @test_vqrdmulhs_laneq_s32(i32 %a, <4 x i32> %b) #1 { // CHECK: [[VGETQ_LANE:%.*]] = extractelement <4 x i32> %b, i32 3 // CHECK: [[VQRDMULHS_S32_I:%.*]] = call i32 @llvm.aarch64.neon.sqrdmulh.i32(i32 %a, i32 [[VGETQ_LANE]]) // CHECK: ret i32 [[VQRDMULHS_S32_I]] @@ -322,7 +322,7 @@ int32_t test_vqrdmulhs_laneq_s32(int32_t a, int32x4_t b) { return vqrdmulhs_laneq_s32(a, b, 3); } -// CHECK-LABEL: define i32 @test_vqdmlalh_lane_s16(i32 %a, i16 %b, <4 x i16> %c) #0 { +// CHECK-LABEL: define dso_local i32 @test_vqdmlalh_lane_s16(i32 %a, i16 %b, <4 x i16> %c) #0 { // CHECK: [[LANE:%.*]] = extractelement <4 x i16> %c, i32 3 // CHECK: [[TMP2:%.*]] = insertelement <4 x i16> undef, i16 %b, i64 0 // CHECK: [[TMP3:%.*]] = insertelement <4 x i16> undef, i16 [[LANE]], i64 0 @@ -334,7 +334,7 @@ int32_t test_vqdmlalh_lane_s16(int32_t a, int16_t b, int16x4_t c) { return vqdmlalh_lane_s16(a, b, c, 3); } -// CHECK-LABEL: define i64 @test_vqdmlals_lane_s32(i64 %a, i32 %b, <2 x i32> %c) #0 { +// CHECK-LABEL: define dso_local i64 @test_vqdmlals_lane_s32(i64 %a, i32 %b, <2 x i32> %c) #0 { // CHECK: [[LANE:%.*]] = extractelement <2 x i32> %c, i32 1 // CHECK: [[VQDMLXL:%.*]] = call i64 @llvm.aarch64.neon.sqdmulls.scalar(i32 %b, i32 [[LANE]]) // CHECK: [[VQDMLXL1:%.*]] = call i64 @llvm.aarch64.neon.sqadd.i64(i64 %a, i64 [[VQDMLXL]]) @@ -343,7 +343,7 @@ int64_t test_vqdmlals_lane_s32(int64_t a, int32_t b, int32x2_t c) { return vqdmlals_lane_s32(a, b, c, 1); } -// CHECK-LABEL: define i32 @test_vqdmlalh_laneq_s16(i32 %a, i16 %b, <8 x i16> %c) #1 { +// CHECK-LABEL: define dso_local i32 @test_vqdmlalh_laneq_s16(i32 %a, i16 %b, <8 x i16> %c) #1 { // CHECK: [[LANE:%.*]] = extractelement <8 x i16> %c, i32 7 // CHECK: [[TMP2:%.*]] = insertelement <4 x i16> undef, i16 %b, i64 0 // CHECK: [[TMP3:%.*]] = insertelement <4 x i16> undef, i16 [[LANE]], i64 0 @@ -355,7 +355,7 @@ int32_t test_vqdmlalh_laneq_s16(int32_t a, int16_t b, int16x8_t c) { return vqdmlalh_laneq_s16(a, b, c, 7); } -// CHECK-LABEL: define i64 @test_vqdmlals_laneq_s32(i64 %a, i32 %b, <4 x i32> %c) #1 { +// CHECK-LABEL: define dso_local i64 @test_vqdmlals_laneq_s32(i64 %a, i32 %b, <4 x i32> %c) #1 { // CHECK: [[LANE:%.*]] = extractelement <4 x i32> %c, i32 3 // CHECK: [[VQDMLXL:%.*]] = call i64 @llvm.aarch64.neon.sqdmulls.scalar(i32 %b, i32 [[LANE]]) // CHECK: [[VQDMLXL1:%.*]] = call i64 @llvm.aarch64.neon.sqadd.i64(i64 %a, i64 [[VQDMLXL]]) @@ -364,7 +364,7 @@ int64_t test_vqdmlals_laneq_s32(int64_t a, int32_t b, int32x4_t c) { return vqdmlals_laneq_s32(a, b, c, 3); } -// CHECK-LABEL: define i32 @test_vqdmlslh_lane_s16(i32 %a, i16 %b, <4 x i16> %c) #0 { +// CHECK-LABEL: define dso_local i32 @test_vqdmlslh_lane_s16(i32 %a, i16 %b, <4 x i16> %c) #0 { // CHECK: [[LANE:%.*]] = extractelement <4 x i16> %c, i32 3 // CHECK: [[TMP2:%.*]] = insertelement <4 x i16> undef, i16 %b, i64 0 // CHECK: [[TMP3:%.*]] = insertelement <4 x i16> undef, i16 [[LANE]], i64 0 @@ -376,7 +376,7 @@ int32_t test_vqdmlslh_lane_s16(int32_t a, int16_t b, int16x4_t c) { return vqdmlslh_lane_s16(a, b, c, 3); } -// CHECK-LABEL: define i64 @test_vqdmlsls_lane_s32(i64 %a, i32 %b, <2 x i32> %c) #0 { +// CHECK-LABEL: define dso_local i64 @test_vqdmlsls_lane_s32(i64 %a, i32 %b, <2 x i32> %c) #0 { // CHECK: [[LANE:%.*]] = extractelement <2 x i32> %c, i32 1 // CHECK: [[VQDMLXL:%.*]] = call i64 @llvm.aarch64.neon.sqdmulls.scalar(i32 %b, i32 [[LANE]]) // CHECK: [[VQDMLXL1:%.*]] = call i64 @llvm.aarch64.neon.sqsub.i64(i64 %a, i64 [[VQDMLXL]]) @@ -385,7 +385,7 @@ int64_t test_vqdmlsls_lane_s32(int64_t a, int32_t b, int32x2_t c) { return vqdmlsls_lane_s32(a, b, c, 1); } -// CHECK-LABEL: define i32 @test_vqdmlslh_laneq_s16(i32 %a, i16 %b, <8 x i16> %c) #1 { +// CHECK-LABEL: define dso_local i32 @test_vqdmlslh_laneq_s16(i32 %a, i16 %b, <8 x i16> %c) #1 { // CHECK: [[LANE:%.*]] = extractelement <8 x i16> %c, i32 7 // CHECK: [[TMP2:%.*]] = insertelement <4 x i16> undef, i16 %b, i64 0 // CHECK: [[TMP3:%.*]] = insertelement <4 x i16> undef, i16 [[LANE]], i64 0 @@ -397,7 +397,7 @@ int32_t test_vqdmlslh_laneq_s16(int32_t a, int16_t b, int16x8_t c) { return vqdmlslh_laneq_s16(a, b, c, 7); } -// CHECK-LABEL: define i64 @test_vqdmlsls_laneq_s32(i64 %a, i32 %b, <4 x i32> %c) #1 { +// CHECK-LABEL: define dso_local i64 @test_vqdmlsls_laneq_s32(i64 %a, i32 %b, <4 x i32> %c) #1 { // CHECK: [[LANE:%.*]] = extractelement <4 x i32> %c, i32 3 // CHECK: [[VQDMLXL:%.*]] = call i64 @llvm.aarch64.neon.sqdmulls.scalar(i32 %b, i32 [[LANE]]) // CHECK: [[VQDMLXL1:%.*]] = call i64 @llvm.aarch64.neon.sqsub.i64(i64 %a, i64 [[VQDMLXL]]) @@ -406,7 +406,7 @@ int64_t test_vqdmlsls_laneq_s32(int64_t a, int32_t b, int32x4_t c) { return vqdmlsls_laneq_s32(a, b, c, 3); } -// CHECK-LABEL: define <1 x double> @test_vmulx_lane_f64_0() #0 { +// CHECK-LABEL: define dso_local <1 x double> @test_vmulx_lane_f64_0() #0 { // CHECK: [[TMP0:%.*]] = bitcast i64 4599917171378402754 to <1 x double> // CHECK: [[TMP1:%.*]] = bitcast i64 4606655882138939123 to <1 x double> // CHECK: [[VGET_LANE:%.*]] = extractelement <1 x double> [[TMP0]], i32 0 @@ -425,7 +425,7 @@ float64x1_t test_vmulx_lane_f64_0() { return result; } -// CHECK-LABEL: define <1 x double> @test_vmulx_laneq_f64_2() #1 { +// CHECK-LABEL: define dso_local <1 x double> @test_vmulx_laneq_f64_2() #1 { // CHECK: [[TMP0:%.*]] = bitcast i64 4599917171378402754 to <1 x double> // CHECK: [[TMP1:%.*]] = bitcast i64 4606655882138939123 to <1 x double> // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <1 x double> [[TMP0]], <1 x double> [[TMP1]], <2 x i32> <i32 0, i32 1> diff --git a/clang/test/CodeGen/aarch64-neon-tbl.c b/clang/test/CodeGen/aarch64-neon-tbl.c index 08addcbc489c..f3a6760172a2 100644 --- a/clang/test/CodeGen/aarch64-neon-tbl.c +++ b/clang/test/CodeGen/aarch64-neon-tbl.c @@ -5,7 +5,7 @@ #include <arm_neon.h> -// CHECK-LABEL: define <8 x i8> @test_vtbl1_s8(<8 x i8> %a, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vtbl1_s8(<8 x i8> %a, <8 x i8> %b) #0 { // CHECK: [[VTBL1_I:%.*]] = shufflevector <8 x i8> %a, <8 x i8> zeroinitializer, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15> // CHECK: [[VTBL11_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.tbl1.v8i8(<16 x i8> [[VTBL1_I]], <8 x i8> %b) #3 // CHECK: ret <8 x i8> [[VTBL11_I]] @@ -13,14 +13,14 @@ int8x8_t test_vtbl1_s8(int8x8_t a, int8x8_t b) { return vtbl1_s8(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vqtbl1_s8(<16 x i8> %a, <8 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vqtbl1_s8(<16 x i8> %a, <8 x i8> %b) #1 { // CHECK: [[VTBL1_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.tbl1.v8i8(<16 x i8> %a, <8 x i8> %b) #3 // CHECK: ret <8 x i8> [[VTBL1_I]] int8x8_t test_vqtbl1_s8(int8x16_t a, uint8x8_t b) { return vqtbl1_s8(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vtbl2_s8([2 x <8 x i8>] %a.coerce, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vtbl2_s8([2 x <8 x i8>] %a.coerce, <8 x i8> %b) #0 { // CHECK: [[__P0_I:%.*]] = alloca %struct.int8x8x2_t, align 8 // CHECK: [[A:%.*]] = alloca %struct.int8x8x2_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int8x8x2_t, %struct.int8x8x2_t* [[A]], i32 0, i32 0 @@ -42,7 +42,7 @@ int8x8_t test_vtbl2_s8(int8x8x2_t a, int8x8_t b) { return vtbl2_s8(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vqtbl2_s8([2 x <16 x i8>] %a.coerce, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vqtbl2_s8([2 x <16 x i8>] %a.coerce, <8 x i8> %b) #0 { // CHECK: [[__P0_I:%.*]] = alloca %struct.int8x16x2_t, align 16 // CHECK: [[A:%.*]] = alloca %struct.int8x16x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int8x16x2_t, %struct.int8x16x2_t* [[A]], i32 0, i32 0 @@ -63,7 +63,7 @@ int8x8_t test_vqtbl2_s8(int8x16x2_t a, uint8x8_t b) { return vqtbl2_s8(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vtbl3_s8([3 x <8 x i8>] %a.coerce, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vtbl3_s8([3 x <8 x i8>] %a.coerce, <8 x i8> %b) #0 { // CHECK: [[__P0_I:%.*]] = alloca %struct.int8x8x3_t, align 8 // CHECK: [[A:%.*]] = alloca %struct.int8x8x3_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int8x8x3_t, %struct.int8x8x3_t* [[A]], i32 0, i32 0 @@ -89,7 +89,7 @@ int8x8_t test_vtbl3_s8(int8x8x3_t a, int8x8_t b) { return vtbl3_s8(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vqtbl3_s8([3 x <16 x i8>] %a.coerce, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vqtbl3_s8([3 x <16 x i8>] %a.coerce, <8 x i8> %b) #0 { // CHECK: [[__P0_I:%.*]] = alloca %struct.int8x16x3_t, align 16 // CHECK: [[A:%.*]] = alloca %struct.int8x16x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int8x16x3_t, %struct.int8x16x3_t* [[A]], i32 0, i32 0 @@ -113,7 +113,7 @@ int8x8_t test_vqtbl3_s8(int8x16x3_t a, uint8x8_t b) { return vqtbl3_s8(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vtbl4_s8([4 x <8 x i8>] %a.coerce, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vtbl4_s8([4 x <8 x i8>] %a.coerce, <8 x i8> %b) #0 { // CHECK: [[__P0_I:%.*]] = alloca %struct.int8x8x4_t, align 8 // CHECK: [[A:%.*]] = alloca %struct.int8x8x4_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int8x8x4_t, %struct.int8x8x4_t* [[A]], i32 0, i32 0 @@ -142,7 +142,7 @@ int8x8_t test_vtbl4_s8(int8x8x4_t a, int8x8_t b) { return vtbl4_s8(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vqtbl4_s8([4 x <16 x i8>] %a.coerce, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vqtbl4_s8([4 x <16 x i8>] %a.coerce, <8 x i8> %b) #0 { // CHECK: [[__P0_I:%.*]] = alloca %struct.int8x16x4_t, align 16 // CHECK: [[A:%.*]] = alloca %struct.int8x16x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int8x16x4_t, %struct.int8x16x4_t* [[A]], i32 0, i32 0 @@ -169,14 +169,14 @@ int8x8_t test_vqtbl4_s8(int8x16x4_t a, uint8x8_t b) { return vqtbl4_s8(a, b); } -// CHECK-LABEL: define <16 x i8> @test_vqtbl1q_s8(<16 x i8> %a, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vqtbl1q_s8(<16 x i8> %a, <16 x i8> %b) #1 { // CHECK: [[VTBL1_I:%.*]] = call <16 x i8> @llvm.aarch64.neon.tbl1.v16i8(<16 x i8> %a, <16 x i8> %b) #3 // CHECK: ret <16 x i8> [[VTBL1_I]] int8x16_t test_vqtbl1q_s8(int8x16_t a, int8x16_t b) { return vqtbl1q_s8(a, b); } -// CHECK-LABEL: define <16 x i8> @test_vqtbl2q_s8([2 x <16 x i8>] %a.coerce, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vqtbl2q_s8([2 x <16 x i8>] %a.coerce, <16 x i8> %b) #1 { // CHECK: [[__P0_I:%.*]] = alloca %struct.int8x16x2_t, align 16 // CHECK: [[A:%.*]] = alloca %struct.int8x16x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int8x16x2_t, %struct.int8x16x2_t* [[A]], i32 0, i32 0 @@ -197,7 +197,7 @@ int8x16_t test_vqtbl2q_s8(int8x16x2_t a, int8x16_t b) { return vqtbl2q_s8(a, b); } -// CHECK-LABEL: define <16 x i8> @test_vqtbl3q_s8([3 x <16 x i8>] %a.coerce, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vqtbl3q_s8([3 x <16 x i8>] %a.coerce, <16 x i8> %b) #1 { // CHECK: [[__P0_I:%.*]] = alloca %struct.int8x16x3_t, align 16 // CHECK: [[A:%.*]] = alloca %struct.int8x16x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int8x16x3_t, %struct.int8x16x3_t* [[A]], i32 0, i32 0 @@ -221,7 +221,7 @@ int8x16_t test_vqtbl3q_s8(int8x16x3_t a, int8x16_t b) { return vqtbl3q_s8(a, b); } -// CHECK-LABEL: define <16 x i8> @test_vqtbl4q_s8([4 x <16 x i8>] %a.coerce, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vqtbl4q_s8([4 x <16 x i8>] %a.coerce, <16 x i8> %b) #1 { // CHECK: [[__P0_I:%.*]] = alloca %struct.int8x16x4_t, align 16 // CHECK: [[A:%.*]] = alloca %struct.int8x16x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int8x16x4_t, %struct.int8x16x4_t* [[A]], i32 0, i32 0 @@ -248,7 +248,7 @@ int8x16_t test_vqtbl4q_s8(int8x16x4_t a, int8x16_t b) { return vqtbl4q_s8(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vtbx1_s8(<8 x i8> %a, <8 x i8> %b, <8 x i8> %c) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vtbx1_s8(<8 x i8> %a, <8 x i8> %b, <8 x i8> %c) #0 { // CHECK: [[VTBL1_I:%.*]] = shufflevector <8 x i8> %b, <8 x i8> zeroinitializer, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15> // CHECK: [[VTBL11_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.tbl1.v8i8(<16 x i8> [[VTBL1_I]], <8 x i8> %c) #3 // CHECK: [[TMP0:%.*]] = icmp uge <8 x i8> %c, <i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8> @@ -262,7 +262,7 @@ int8x8_t test_vtbx1_s8(int8x8_t a, int8x8_t b, int8x8_t c) { return vtbx1_s8(a, b, c); } -// CHECK-LABEL: define <8 x i8> @test_vtbx2_s8(<8 x i8> %a, [2 x <8 x i8>] %b.coerce, <8 x i8> %c) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vtbx2_s8(<8 x i8> %a, [2 x <8 x i8>] %b.coerce, <8 x i8> %c) #0 { // CHECK: [[__P1_I:%.*]] = alloca %struct.int8x8x2_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.int8x8x2_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int8x8x2_t, %struct.int8x8x2_t* [[B]], i32 0, i32 0 @@ -284,7 +284,7 @@ int8x8_t test_vtbx2_s8(int8x8_t a, int8x8x2_t b, int8x8_t c) { return vtbx2_s8(a, b, c); } -// CHECK-LABEL: define <8 x i8> @test_vtbx3_s8(<8 x i8> %a, [3 x <8 x i8>] %b.coerce, <8 x i8> %c) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vtbx3_s8(<8 x i8> %a, [3 x <8 x i8>] %b.coerce, <8 x i8> %c) #0 { // CHECK: [[__P1_I:%.*]] = alloca %struct.int8x8x3_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.int8x8x3_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int8x8x3_t, %struct.int8x8x3_t* [[B]], i32 0, i32 0 @@ -316,7 +316,7 @@ int8x8_t test_vtbx3_s8(int8x8_t a, int8x8x3_t b, int8x8_t c) { return vtbx3_s8(a, b, c); } -// CHECK-LABEL: define <8 x i8> @test_vtbx4_s8(<8 x i8> %a, [4 x <8 x i8>] %b.coerce, <8 x i8> %c) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vtbx4_s8(<8 x i8> %a, [4 x <8 x i8>] %b.coerce, <8 x i8> %c) #0 { // CHECK: [[__P1_I:%.*]] = alloca %struct.int8x8x4_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.int8x8x4_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int8x8x4_t, %struct.int8x8x4_t* [[B]], i32 0, i32 0 @@ -345,14 +345,14 @@ int8x8_t test_vtbx4_s8(int8x8_t a, int8x8x4_t b, int8x8_t c) { return vtbx4_s8(a, b, c); } -// CHECK-LABEL: define <8 x i8> @test_vqtbx1_s8(<8 x i8> %a, <16 x i8> %b, <8 x i8> %c) #1 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vqtbx1_s8(<8 x i8> %a, <16 x i8> %b, <8 x i8> %c) #1 { // CHECK: [[VTBX1_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.tbx1.v8i8(<8 x i8> %a, <16 x i8> %b, <8 x i8> %c) #3 // CHECK: ret <8 x i8> [[VTBX1_I]] int8x8_t test_vqtbx1_s8(int8x8_t a, int8x16_t b, uint8x8_t c) { return vqtbx1_s8(a, b, c); } -// CHECK-LABEL: define <8 x i8> @test_vqtbx2_s8(<8 x i8> %a, [2 x <16 x i8>] %b.coerce, <8 x i8> %c) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vqtbx2_s8(<8 x i8> %a, [2 x <16 x i8>] %b.coerce, <8 x i8> %c) #0 { // CHECK: [[__P1_I:%.*]] = alloca %struct.int8x16x2_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.int8x16x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int8x16x2_t, %struct.int8x16x2_t* [[B]], i32 0, i32 0 @@ -373,7 +373,7 @@ int8x8_t test_vqtbx2_s8(int8x8_t a, int8x16x2_t b, uint8x8_t c) { return vqtbx2_s8(a, b, c); } -// CHECK-LABEL: define <8 x i8> @test_vqtbx3_s8(<8 x i8> %a, [3 x <16 x i8>] %b.coerce, <8 x i8> %c) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vqtbx3_s8(<8 x i8> %a, [3 x <16 x i8>] %b.coerce, <8 x i8> %c) #0 { // CHECK: [[__P1_I:%.*]] = alloca %struct.int8x16x3_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.int8x16x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int8x16x3_t, %struct.int8x16x3_t* [[B]], i32 0, i32 0 @@ -397,7 +397,7 @@ int8x8_t test_vqtbx3_s8(int8x8_t a, int8x16x3_t b, uint8x8_t c) { return vqtbx3_s8(a, b, c); } -// CHECK-LABEL: define <8 x i8> @test_vqtbx4_s8(<8 x i8> %a, [4 x <16 x i8>] %b.coerce, <8 x i8> %c) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vqtbx4_s8(<8 x i8> %a, [4 x <16 x i8>] %b.coerce, <8 x i8> %c) #0 { // CHECK: [[__P1_I:%.*]] = alloca %struct.int8x16x4_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.int8x16x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int8x16x4_t, %struct.int8x16x4_t* [[B]], i32 0, i32 0 @@ -424,14 +424,14 @@ int8x8_t test_vqtbx4_s8(int8x8_t a, int8x16x4_t b, uint8x8_t c) { return vqtbx4_s8(a, b, c); } -// CHECK-LABEL: define <16 x i8> @test_vqtbx1q_s8(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vqtbx1q_s8(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c) #1 { // CHECK: [[VTBX1_I:%.*]] = call <16 x i8> @llvm.aarch64.neon.tbx1.v16i8(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c) #3 // CHECK: ret <16 x i8> [[VTBX1_I]] int8x16_t test_vqtbx1q_s8(int8x16_t a, int8x16_t b, uint8x16_t c) { return vqtbx1q_s8(a, b, c); } -// CHECK-LABEL: define <16 x i8> @test_vqtbx2q_s8(<16 x i8> %a, [2 x <16 x i8>] %b.coerce, <16 x i8> %c) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vqtbx2q_s8(<16 x i8> %a, [2 x <16 x i8>] %b.coerce, <16 x i8> %c) #1 { // CHECK: [[__P1_I:%.*]] = alloca %struct.int8x16x2_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.int8x16x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int8x16x2_t, %struct.int8x16x2_t* [[B]], i32 0, i32 0 @@ -452,7 +452,7 @@ int8x16_t test_vqtbx2q_s8(int8x16_t a, int8x16x2_t b, int8x16_t c) { return vqtbx2q_s8(a, b, c); } -// CHECK-LABEL: define <16 x i8> @test_vqtbx3q_s8(<16 x i8> %a, [3 x <16 x i8>] %b.coerce, <16 x i8> %c) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vqtbx3q_s8(<16 x i8> %a, [3 x <16 x i8>] %b.coerce, <16 x i8> %c) #1 { // CHECK: [[__P1_I:%.*]] = alloca %struct.int8x16x3_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.int8x16x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int8x16x3_t, %struct.int8x16x3_t* [[B]], i32 0, i32 0 @@ -476,7 +476,7 @@ int8x16_t test_vqtbx3q_s8(int8x16_t a, int8x16x3_t b, int8x16_t c) { return vqtbx3q_s8(a, b, c); } -// CHECK-LABEL: define <16 x i8> @test_vqtbx4q_s8(<16 x i8> %a, [4 x <16 x i8>] %b.coerce, <16 x i8> %c) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vqtbx4q_s8(<16 x i8> %a, [4 x <16 x i8>] %b.coerce, <16 x i8> %c) #1 { // CHECK: [[__P1_I:%.*]] = alloca %struct.int8x16x4_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.int8x16x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.int8x16x4_t, %struct.int8x16x4_t* [[B]], i32 0, i32 0 @@ -503,7 +503,7 @@ int8x16_t test_vqtbx4q_s8(int8x16_t a, int8x16x4_t b, int8x16_t c) { return vqtbx4q_s8(a, b, c); } -// CHECK-LABEL: define <8 x i8> @test_vtbl1_u8(<8 x i8> %a, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vtbl1_u8(<8 x i8> %a, <8 x i8> %b) #0 { // CHECK: [[VTBL1_I:%.*]] = shufflevector <8 x i8> %a, <8 x i8> zeroinitializer, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15> // CHECK: [[VTBL11_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.tbl1.v8i8(<16 x i8> [[VTBL1_I]], <8 x i8> %b) #3 // CHECK: ret <8 x i8> [[VTBL11_I]] @@ -511,14 +511,14 @@ uint8x8_t test_vtbl1_u8(uint8x8_t a, uint8x8_t b) { return vtbl1_u8(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vqtbl1_u8(<16 x i8> %a, <8 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vqtbl1_u8(<16 x i8> %a, <8 x i8> %b) #1 { // CHECK: [[VTBL1_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.tbl1.v8i8(<16 x i8> %a, <8 x i8> %b) #3 // CHECK: ret <8 x i8> [[VTBL1_I]] uint8x8_t test_vqtbl1_u8(uint8x16_t a, uint8x8_t b) { return vqtbl1_u8(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vtbl2_u8([2 x <8 x i8>] %a.coerce, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vtbl2_u8([2 x <8 x i8>] %a.coerce, <8 x i8> %b) #0 { // CHECK: [[__P0_I:%.*]] = alloca %struct.uint8x8x2_t, align 8 // CHECK: [[A:%.*]] = alloca %struct.uint8x8x2_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint8x8x2_t, %struct.uint8x8x2_t* [[A]], i32 0, i32 0 @@ -540,7 +540,7 @@ uint8x8_t test_vtbl2_u8(uint8x8x2_t a, uint8x8_t b) { return vtbl2_u8(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vqtbl2_u8([2 x <16 x i8>] %a.coerce, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vqtbl2_u8([2 x <16 x i8>] %a.coerce, <8 x i8> %b) #0 { // CHECK: [[__P0_I:%.*]] = alloca %struct.uint8x16x2_t, align 16 // CHECK: [[A:%.*]] = alloca %struct.uint8x16x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint8x16x2_t, %struct.uint8x16x2_t* [[A]], i32 0, i32 0 @@ -561,7 +561,7 @@ uint8x8_t test_vqtbl2_u8(uint8x16x2_t a, uint8x8_t b) { return vqtbl2_u8(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vtbl3_u8([3 x <8 x i8>] %a.coerce, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vtbl3_u8([3 x <8 x i8>] %a.coerce, <8 x i8> %b) #0 { // CHECK: [[__P0_I:%.*]] = alloca %struct.uint8x8x3_t, align 8 // CHECK: [[A:%.*]] = alloca %struct.uint8x8x3_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint8x8x3_t, %struct.uint8x8x3_t* [[A]], i32 0, i32 0 @@ -587,7 +587,7 @@ uint8x8_t test_vtbl3_u8(uint8x8x3_t a, uint8x8_t b) { return vtbl3_u8(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vqtbl3_u8([3 x <16 x i8>] %a.coerce, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vqtbl3_u8([3 x <16 x i8>] %a.coerce, <8 x i8> %b) #0 { // CHECK: [[__P0_I:%.*]] = alloca %struct.uint8x16x3_t, align 16 // CHECK: [[A:%.*]] = alloca %struct.uint8x16x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint8x16x3_t, %struct.uint8x16x3_t* [[A]], i32 0, i32 0 @@ -611,7 +611,7 @@ uint8x8_t test_vqtbl3_u8(uint8x16x3_t a, uint8x8_t b) { return vqtbl3_u8(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vtbl4_u8([4 x <8 x i8>] %a.coerce, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vtbl4_u8([4 x <8 x i8>] %a.coerce, <8 x i8> %b) #0 { // CHECK: [[__P0_I:%.*]] = alloca %struct.uint8x8x4_t, align 8 // CHECK: [[A:%.*]] = alloca %struct.uint8x8x4_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint8x8x4_t, %struct.uint8x8x4_t* [[A]], i32 0, i32 0 @@ -640,7 +640,7 @@ uint8x8_t test_vtbl4_u8(uint8x8x4_t a, uint8x8_t b) { return vtbl4_u8(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vqtbl4_u8([4 x <16 x i8>] %a.coerce, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vqtbl4_u8([4 x <16 x i8>] %a.coerce, <8 x i8> %b) #0 { // CHECK: [[__P0_I:%.*]] = alloca %struct.uint8x16x4_t, align 16 // CHECK: [[A:%.*]] = alloca %struct.uint8x16x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint8x16x4_t, %struct.uint8x16x4_t* [[A]], i32 0, i32 0 @@ -667,14 +667,14 @@ uint8x8_t test_vqtbl4_u8(uint8x16x4_t a, uint8x8_t b) { return vqtbl4_u8(a, b); } -// CHECK-LABEL: define <16 x i8> @test_vqtbl1q_u8(<16 x i8> %a, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vqtbl1q_u8(<16 x i8> %a, <16 x i8> %b) #1 { // CHECK: [[VTBL1_I:%.*]] = call <16 x i8> @llvm.aarch64.neon.tbl1.v16i8(<16 x i8> %a, <16 x i8> %b) #3 // CHECK: ret <16 x i8> [[VTBL1_I]] uint8x16_t test_vqtbl1q_u8(uint8x16_t a, uint8x16_t b) { return vqtbl1q_u8(a, b); } -// CHECK-LABEL: define <16 x i8> @test_vqtbl2q_u8([2 x <16 x i8>] %a.coerce, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vqtbl2q_u8([2 x <16 x i8>] %a.coerce, <16 x i8> %b) #1 { // CHECK: [[__P0_I:%.*]] = alloca %struct.uint8x16x2_t, align 16 // CHECK: [[A:%.*]] = alloca %struct.uint8x16x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint8x16x2_t, %struct.uint8x16x2_t* [[A]], i32 0, i32 0 @@ -695,7 +695,7 @@ uint8x16_t test_vqtbl2q_u8(uint8x16x2_t a, uint8x16_t b) { return vqtbl2q_u8(a, b); } -// CHECK-LABEL: define <16 x i8> @test_vqtbl3q_u8([3 x <16 x i8>] %a.coerce, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vqtbl3q_u8([3 x <16 x i8>] %a.coerce, <16 x i8> %b) #1 { // CHECK: [[__P0_I:%.*]] = alloca %struct.uint8x16x3_t, align 16 // CHECK: [[A:%.*]] = alloca %struct.uint8x16x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint8x16x3_t, %struct.uint8x16x3_t* [[A]], i32 0, i32 0 @@ -719,7 +719,7 @@ uint8x16_t test_vqtbl3q_u8(uint8x16x3_t a, uint8x16_t b) { return vqtbl3q_u8(a, b); } -// CHECK-LABEL: define <16 x i8> @test_vqtbl4q_u8([4 x <16 x i8>] %a.coerce, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vqtbl4q_u8([4 x <16 x i8>] %a.coerce, <16 x i8> %b) #1 { // CHECK: [[__P0_I:%.*]] = alloca %struct.uint8x16x4_t, align 16 // CHECK: [[A:%.*]] = alloca %struct.uint8x16x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint8x16x4_t, %struct.uint8x16x4_t* [[A]], i32 0, i32 0 @@ -746,7 +746,7 @@ uint8x16_t test_vqtbl4q_u8(uint8x16x4_t a, uint8x16_t b) { return vqtbl4q_u8(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vtbx1_u8(<8 x i8> %a, <8 x i8> %b, <8 x i8> %c) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vtbx1_u8(<8 x i8> %a, <8 x i8> %b, <8 x i8> %c) #0 { // CHECK: [[VTBL1_I:%.*]] = shufflevector <8 x i8> %b, <8 x i8> zeroinitializer, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15> // CHECK: [[VTBL11_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.tbl1.v8i8(<16 x i8> [[VTBL1_I]], <8 x i8> %c) #3 // CHECK: [[TMP0:%.*]] = icmp uge <8 x i8> %c, <i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8> @@ -760,7 +760,7 @@ uint8x8_t test_vtbx1_u8(uint8x8_t a, uint8x8_t b, uint8x8_t c) { return vtbx1_u8(a, b, c); } -// CHECK-LABEL: define <8 x i8> @test_vtbx2_u8(<8 x i8> %a, [2 x <8 x i8>] %b.coerce, <8 x i8> %c) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vtbx2_u8(<8 x i8> %a, [2 x <8 x i8>] %b.coerce, <8 x i8> %c) #0 { // CHECK: [[__P1_I:%.*]] = alloca %struct.uint8x8x2_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.uint8x8x2_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint8x8x2_t, %struct.uint8x8x2_t* [[B]], i32 0, i32 0 @@ -782,7 +782,7 @@ uint8x8_t test_vtbx2_u8(uint8x8_t a, uint8x8x2_t b, uint8x8_t c) { return vtbx2_u8(a, b, c); } -// CHECK-LABEL: define <8 x i8> @test_vtbx3_u8(<8 x i8> %a, [3 x <8 x i8>] %b.coerce, <8 x i8> %c) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vtbx3_u8(<8 x i8> %a, [3 x <8 x i8>] %b.coerce, <8 x i8> %c) #0 { // CHECK: [[__P1_I:%.*]] = alloca %struct.uint8x8x3_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.uint8x8x3_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint8x8x3_t, %struct.uint8x8x3_t* [[B]], i32 0, i32 0 @@ -814,7 +814,7 @@ uint8x8_t test_vtbx3_u8(uint8x8_t a, uint8x8x3_t b, uint8x8_t c) { return vtbx3_u8(a, b, c); } -// CHECK-LABEL: define <8 x i8> @test_vtbx4_u8(<8 x i8> %a, [4 x <8 x i8>] %b.coerce, <8 x i8> %c) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vtbx4_u8(<8 x i8> %a, [4 x <8 x i8>] %b.coerce, <8 x i8> %c) #0 { // CHECK: [[__P1_I:%.*]] = alloca %struct.uint8x8x4_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.uint8x8x4_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint8x8x4_t, %struct.uint8x8x4_t* [[B]], i32 0, i32 0 @@ -843,14 +843,14 @@ uint8x8_t test_vtbx4_u8(uint8x8_t a, uint8x8x4_t b, uint8x8_t c) { return vtbx4_u8(a, b, c); } -// CHECK-LABEL: define <8 x i8> @test_vqtbx1_u8(<8 x i8> %a, <16 x i8> %b, <8 x i8> %c) #1 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vqtbx1_u8(<8 x i8> %a, <16 x i8> %b, <8 x i8> %c) #1 { // CHECK: [[VTBX1_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.tbx1.v8i8(<8 x i8> %a, <16 x i8> %b, <8 x i8> %c) #3 // CHECK: ret <8 x i8> [[VTBX1_I]] uint8x8_t test_vqtbx1_u8(uint8x8_t a, uint8x16_t b, uint8x8_t c) { return vqtbx1_u8(a, b, c); } -// CHECK-LABEL: define <8 x i8> @test_vqtbx2_u8(<8 x i8> %a, [2 x <16 x i8>] %b.coerce, <8 x i8> %c) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vqtbx2_u8(<8 x i8> %a, [2 x <16 x i8>] %b.coerce, <8 x i8> %c) #0 { // CHECK: [[__P1_I:%.*]] = alloca %struct.uint8x16x2_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.uint8x16x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint8x16x2_t, %struct.uint8x16x2_t* [[B]], i32 0, i32 0 @@ -871,7 +871,7 @@ uint8x8_t test_vqtbx2_u8(uint8x8_t a, uint8x16x2_t b, uint8x8_t c) { return vqtbx2_u8(a, b, c); } -// CHECK-LABEL: define <8 x i8> @test_vqtbx3_u8(<8 x i8> %a, [3 x <16 x i8>] %b.coerce, <8 x i8> %c) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vqtbx3_u8(<8 x i8> %a, [3 x <16 x i8>] %b.coerce, <8 x i8> %c) #0 { // CHECK: [[__P1_I:%.*]] = alloca %struct.uint8x16x3_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.uint8x16x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint8x16x3_t, %struct.uint8x16x3_t* [[B]], i32 0, i32 0 @@ -895,7 +895,7 @@ uint8x8_t test_vqtbx3_u8(uint8x8_t a, uint8x16x3_t b, uint8x8_t c) { return vqtbx3_u8(a, b, c); } -// CHECK-LABEL: define <8 x i8> @test_vqtbx4_u8(<8 x i8> %a, [4 x <16 x i8>] %b.coerce, <8 x i8> %c) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vqtbx4_u8(<8 x i8> %a, [4 x <16 x i8>] %b.coerce, <8 x i8> %c) #0 { // CHECK: [[__P1_I:%.*]] = alloca %struct.uint8x16x4_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.uint8x16x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint8x16x4_t, %struct.uint8x16x4_t* [[B]], i32 0, i32 0 @@ -922,14 +922,14 @@ uint8x8_t test_vqtbx4_u8(uint8x8_t a, uint8x16x4_t b, uint8x8_t c) { return vqtbx4_u8(a, b, c); } -// CHECK-LABEL: define <16 x i8> @test_vqtbx1q_u8(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vqtbx1q_u8(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c) #1 { // CHECK: [[VTBX1_I:%.*]] = call <16 x i8> @llvm.aarch64.neon.tbx1.v16i8(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c) #3 // CHECK: ret <16 x i8> [[VTBX1_I]] uint8x16_t test_vqtbx1q_u8(uint8x16_t a, uint8x16_t b, uint8x16_t c) { return vqtbx1q_u8(a, b, c); } -// CHECK-LABEL: define <16 x i8> @test_vqtbx2q_u8(<16 x i8> %a, [2 x <16 x i8>] %b.coerce, <16 x i8> %c) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vqtbx2q_u8(<16 x i8> %a, [2 x <16 x i8>] %b.coerce, <16 x i8> %c) #1 { // CHECK: [[__P1_I:%.*]] = alloca %struct.uint8x16x2_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.uint8x16x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint8x16x2_t, %struct.uint8x16x2_t* [[B]], i32 0, i32 0 @@ -950,7 +950,7 @@ uint8x16_t test_vqtbx2q_u8(uint8x16_t a, uint8x16x2_t b, uint8x16_t c) { return vqtbx2q_u8(a, b, c); } -// CHECK-LABEL: define <16 x i8> @test_vqtbx3q_u8(<16 x i8> %a, [3 x <16 x i8>] %b.coerce, <16 x i8> %c) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vqtbx3q_u8(<16 x i8> %a, [3 x <16 x i8>] %b.coerce, <16 x i8> %c) #1 { // CHECK: [[__P1_I:%.*]] = alloca %struct.uint8x16x3_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.uint8x16x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint8x16x3_t, %struct.uint8x16x3_t* [[B]], i32 0, i32 0 @@ -974,7 +974,7 @@ uint8x16_t test_vqtbx3q_u8(uint8x16_t a, uint8x16x3_t b, uint8x16_t c) { return vqtbx3q_u8(a, b, c); } -// CHECK-LABEL: define <16 x i8> @test_vqtbx4q_u8(<16 x i8> %a, [4 x <16 x i8>] %b.coerce, <16 x i8> %c) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vqtbx4q_u8(<16 x i8> %a, [4 x <16 x i8>] %b.coerce, <16 x i8> %c) #1 { // CHECK: [[__P1_I:%.*]] = alloca %struct.uint8x16x4_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.uint8x16x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.uint8x16x4_t, %struct.uint8x16x4_t* [[B]], i32 0, i32 0 @@ -1001,7 +1001,7 @@ uint8x16_t test_vqtbx4q_u8(uint8x16_t a, uint8x16x4_t b, uint8x16_t c) { return vqtbx4q_u8(a, b, c); } -// CHECK-LABEL: define <8 x i8> @test_vtbl1_p8(<8 x i8> %a, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vtbl1_p8(<8 x i8> %a, <8 x i8> %b) #0 { // CHECK: [[VTBL1_I:%.*]] = shufflevector <8 x i8> %a, <8 x i8> zeroinitializer, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15> // CHECK: [[VTBL11_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.tbl1.v8i8(<16 x i8> [[VTBL1_I]], <8 x i8> %b) #3 // CHECK: ret <8 x i8> [[VTBL11_I]] @@ -1009,14 +1009,14 @@ poly8x8_t test_vtbl1_p8(poly8x8_t a, uint8x8_t b) { return vtbl1_p8(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vqtbl1_p8(<16 x i8> %a, <8 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vqtbl1_p8(<16 x i8> %a, <8 x i8> %b) #1 { // CHECK: [[VTBL1_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.tbl1.v8i8(<16 x i8> %a, <8 x i8> %b) #3 // CHECK: ret <8 x i8> [[VTBL1_I]] poly8x8_t test_vqtbl1_p8(poly8x16_t a, uint8x8_t b) { return vqtbl1_p8(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vtbl2_p8([2 x <8 x i8>] %a.coerce, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vtbl2_p8([2 x <8 x i8>] %a.coerce, <8 x i8> %b) #0 { // CHECK: [[__P0_I:%.*]] = alloca %struct.poly8x8x2_t, align 8 // CHECK: [[A:%.*]] = alloca %struct.poly8x8x2_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly8x8x2_t, %struct.poly8x8x2_t* [[A]], i32 0, i32 0 @@ -1038,7 +1038,7 @@ poly8x8_t test_vtbl2_p8(poly8x8x2_t a, uint8x8_t b) { return vtbl2_p8(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vqtbl2_p8([2 x <16 x i8>] %a.coerce, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vqtbl2_p8([2 x <16 x i8>] %a.coerce, <8 x i8> %b) #0 { // CHECK: [[__P0_I:%.*]] = alloca %struct.poly8x16x2_t, align 16 // CHECK: [[A:%.*]] = alloca %struct.poly8x16x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly8x16x2_t, %struct.poly8x16x2_t* [[A]], i32 0, i32 0 @@ -1059,7 +1059,7 @@ poly8x8_t test_vqtbl2_p8(poly8x16x2_t a, uint8x8_t b) { return vqtbl2_p8(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vtbl3_p8([3 x <8 x i8>] %a.coerce, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vtbl3_p8([3 x <8 x i8>] %a.coerce, <8 x i8> %b) #0 { // CHECK: [[__P0_I:%.*]] = alloca %struct.poly8x8x3_t, align 8 // CHECK: [[A:%.*]] = alloca %struct.poly8x8x3_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly8x8x3_t, %struct.poly8x8x3_t* [[A]], i32 0, i32 0 @@ -1085,7 +1085,7 @@ poly8x8_t test_vtbl3_p8(poly8x8x3_t a, uint8x8_t b) { return vtbl3_p8(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vqtbl3_p8([3 x <16 x i8>] %a.coerce, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vqtbl3_p8([3 x <16 x i8>] %a.coerce, <8 x i8> %b) #0 { // CHECK: [[__P0_I:%.*]] = alloca %struct.poly8x16x3_t, align 16 // CHECK: [[A:%.*]] = alloca %struct.poly8x16x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly8x16x3_t, %struct.poly8x16x3_t* [[A]], i32 0, i32 0 @@ -1109,7 +1109,7 @@ poly8x8_t test_vqtbl3_p8(poly8x16x3_t a, uint8x8_t b) { return vqtbl3_p8(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vtbl4_p8([4 x <8 x i8>] %a.coerce, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vtbl4_p8([4 x <8 x i8>] %a.coerce, <8 x i8> %b) #0 { // CHECK: [[__P0_I:%.*]] = alloca %struct.poly8x8x4_t, align 8 // CHECK: [[A:%.*]] = alloca %struct.poly8x8x4_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly8x8x4_t, %struct.poly8x8x4_t* [[A]], i32 0, i32 0 @@ -1138,7 +1138,7 @@ poly8x8_t test_vtbl4_p8(poly8x8x4_t a, uint8x8_t b) { return vtbl4_p8(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vqtbl4_p8([4 x <16 x i8>] %a.coerce, <8 x i8> %b) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vqtbl4_p8([4 x <16 x i8>] %a.coerce, <8 x i8> %b) #0 { // CHECK: [[__P0_I:%.*]] = alloca %struct.poly8x16x4_t, align 16 // CHECK: [[A:%.*]] = alloca %struct.poly8x16x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly8x16x4_t, %struct.poly8x16x4_t* [[A]], i32 0, i32 0 @@ -1165,14 +1165,14 @@ poly8x8_t test_vqtbl4_p8(poly8x16x4_t a, uint8x8_t b) { return vqtbl4_p8(a, b); } -// CHECK-LABEL: define <16 x i8> @test_vqtbl1q_p8(<16 x i8> %a, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vqtbl1q_p8(<16 x i8> %a, <16 x i8> %b) #1 { // CHECK: [[VTBL1_I:%.*]] = call <16 x i8> @llvm.aarch64.neon.tbl1.v16i8(<16 x i8> %a, <16 x i8> %b) #3 // CHECK: ret <16 x i8> [[VTBL1_I]] poly8x16_t test_vqtbl1q_p8(poly8x16_t a, uint8x16_t b) { return vqtbl1q_p8(a, b); } -// CHECK-LABEL: define <16 x i8> @test_vqtbl2q_p8([2 x <16 x i8>] %a.coerce, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vqtbl2q_p8([2 x <16 x i8>] %a.coerce, <16 x i8> %b) #1 { // CHECK: [[__P0_I:%.*]] = alloca %struct.poly8x16x2_t, align 16 // CHECK: [[A:%.*]] = alloca %struct.poly8x16x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly8x16x2_t, %struct.poly8x16x2_t* [[A]], i32 0, i32 0 @@ -1193,7 +1193,7 @@ poly8x16_t test_vqtbl2q_p8(poly8x16x2_t a, uint8x16_t b) { return vqtbl2q_p8(a, b); } -// CHECK-LABEL: define <16 x i8> @test_vqtbl3q_p8([3 x <16 x i8>] %a.coerce, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vqtbl3q_p8([3 x <16 x i8>] %a.coerce, <16 x i8> %b) #1 { // CHECK: [[__P0_I:%.*]] = alloca %struct.poly8x16x3_t, align 16 // CHECK: [[A:%.*]] = alloca %struct.poly8x16x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly8x16x3_t, %struct.poly8x16x3_t* [[A]], i32 0, i32 0 @@ -1217,7 +1217,7 @@ poly8x16_t test_vqtbl3q_p8(poly8x16x3_t a, uint8x16_t b) { return vqtbl3q_p8(a, b); } -// CHECK-LABEL: define <16 x i8> @test_vqtbl4q_p8([4 x <16 x i8>] %a.coerce, <16 x i8> %b) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vqtbl4q_p8([4 x <16 x i8>] %a.coerce, <16 x i8> %b) #1 { // CHECK: [[__P0_I:%.*]] = alloca %struct.poly8x16x4_t, align 16 // CHECK: [[A:%.*]] = alloca %struct.poly8x16x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly8x16x4_t, %struct.poly8x16x4_t* [[A]], i32 0, i32 0 @@ -1244,7 +1244,7 @@ poly8x16_t test_vqtbl4q_p8(poly8x16x4_t a, uint8x16_t b) { return vqtbl4q_p8(a, b); } -// CHECK-LABEL: define <8 x i8> @test_vtbx1_p8(<8 x i8> %a, <8 x i8> %b, <8 x i8> %c) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vtbx1_p8(<8 x i8> %a, <8 x i8> %b, <8 x i8> %c) #0 { // CHECK: [[VTBL1_I:%.*]] = shufflevector <8 x i8> %b, <8 x i8> zeroinitializer, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15> // CHECK: [[VTBL11_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.tbl1.v8i8(<16 x i8> [[VTBL1_I]], <8 x i8> %c) #3 // CHECK: [[TMP0:%.*]] = icmp uge <8 x i8> %c, <i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8> @@ -1258,7 +1258,7 @@ poly8x8_t test_vtbx1_p8(poly8x8_t a, poly8x8_t b, uint8x8_t c) { return vtbx1_p8(a, b, c); } -// CHECK-LABEL: define <8 x i8> @test_vtbx2_p8(<8 x i8> %a, [2 x <8 x i8>] %b.coerce, <8 x i8> %c) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vtbx2_p8(<8 x i8> %a, [2 x <8 x i8>] %b.coerce, <8 x i8> %c) #0 { // CHECK: [[__P1_I:%.*]] = alloca %struct.poly8x8x2_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.poly8x8x2_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly8x8x2_t, %struct.poly8x8x2_t* [[B]], i32 0, i32 0 @@ -1280,7 +1280,7 @@ poly8x8_t test_vtbx2_p8(poly8x8_t a, poly8x8x2_t b, uint8x8_t c) { return vtbx2_p8(a, b, c); } -// CHECK-LABEL: define <8 x i8> @test_vtbx3_p8(<8 x i8> %a, [3 x <8 x i8>] %b.coerce, <8 x i8> %c) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vtbx3_p8(<8 x i8> %a, [3 x <8 x i8>] %b.coerce, <8 x i8> %c) #0 { // CHECK: [[__P1_I:%.*]] = alloca %struct.poly8x8x3_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.poly8x8x3_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly8x8x3_t, %struct.poly8x8x3_t* [[B]], i32 0, i32 0 @@ -1312,7 +1312,7 @@ poly8x8_t test_vtbx3_p8(poly8x8_t a, poly8x8x3_t b, uint8x8_t c) { return vtbx3_p8(a, b, c); } -// CHECK-LABEL: define <8 x i8> @test_vtbx4_p8(<8 x i8> %a, [4 x <8 x i8>] %b.coerce, <8 x i8> %c) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vtbx4_p8(<8 x i8> %a, [4 x <8 x i8>] %b.coerce, <8 x i8> %c) #0 { // CHECK: [[__P1_I:%.*]] = alloca %struct.poly8x8x4_t, align 8 // CHECK: [[B:%.*]] = alloca %struct.poly8x8x4_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly8x8x4_t, %struct.poly8x8x4_t* [[B]], i32 0, i32 0 @@ -1341,14 +1341,14 @@ poly8x8_t test_vtbx4_p8(poly8x8_t a, poly8x8x4_t b, uint8x8_t c) { return vtbx4_p8(a, b, c); } -// CHECK-LABEL: define <8 x i8> @test_vqtbx1_p8(<8 x i8> %a, <16 x i8> %b, <8 x i8> %c) #1 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vqtbx1_p8(<8 x i8> %a, <16 x i8> %b, <8 x i8> %c) #1 { // CHECK: [[VTBX1_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.tbx1.v8i8(<8 x i8> %a, <16 x i8> %b, <8 x i8> %c) #3 // CHECK: ret <8 x i8> [[VTBX1_I]] poly8x8_t test_vqtbx1_p8(poly8x8_t a, uint8x16_t b, uint8x8_t c) { return vqtbx1_p8(a, b, c); } -// CHECK-LABEL: define <8 x i8> @test_vqtbx2_p8(<8 x i8> %a, [2 x <16 x i8>] %b.coerce, <8 x i8> %c) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vqtbx2_p8(<8 x i8> %a, [2 x <16 x i8>] %b.coerce, <8 x i8> %c) #0 { // CHECK: [[__P1_I:%.*]] = alloca %struct.poly8x16x2_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.poly8x16x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly8x16x2_t, %struct.poly8x16x2_t* [[B]], i32 0, i32 0 @@ -1369,7 +1369,7 @@ poly8x8_t test_vqtbx2_p8(poly8x8_t a, poly8x16x2_t b, uint8x8_t c) { return vqtbx2_p8(a, b, c); } -// CHECK-LABEL: define <8 x i8> @test_vqtbx3_p8(<8 x i8> %a, [3 x <16 x i8>] %b.coerce, <8 x i8> %c) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vqtbx3_p8(<8 x i8> %a, [3 x <16 x i8>] %b.coerce, <8 x i8> %c) #0 { // CHECK: [[__P1_I:%.*]] = alloca %struct.poly8x16x3_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.poly8x16x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly8x16x3_t, %struct.poly8x16x3_t* [[B]], i32 0, i32 0 @@ -1393,7 +1393,7 @@ poly8x8_t test_vqtbx3_p8(poly8x8_t a, poly8x16x3_t b, uint8x8_t c) { return vqtbx3_p8(a, b, c); } -// CHECK-LABEL: define <8 x i8> @test_vqtbx4_p8(<8 x i8> %a, [4 x <16 x i8>] %b.coerce, <8 x i8> %c) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vqtbx4_p8(<8 x i8> %a, [4 x <16 x i8>] %b.coerce, <8 x i8> %c) #0 { // CHECK: [[__P1_I:%.*]] = alloca %struct.poly8x16x4_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.poly8x16x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly8x16x4_t, %struct.poly8x16x4_t* [[B]], i32 0, i32 0 @@ -1420,14 +1420,14 @@ poly8x8_t test_vqtbx4_p8(poly8x8_t a, poly8x16x4_t b, uint8x8_t c) { return vqtbx4_p8(a, b, c); } -// CHECK-LABEL: define <16 x i8> @test_vqtbx1q_p8(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vqtbx1q_p8(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c) #1 { // CHECK: [[VTBX1_I:%.*]] = call <16 x i8> @llvm.aarch64.neon.tbx1.v16i8(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c) #3 // CHECK: ret <16 x i8> [[VTBX1_I]] poly8x16_t test_vqtbx1q_p8(poly8x16_t a, uint8x16_t b, uint8x16_t c) { return vqtbx1q_p8(a, b, c); } -// CHECK-LABEL: define <16 x i8> @test_vqtbx2q_p8(<16 x i8> %a, [2 x <16 x i8>] %b.coerce, <16 x i8> %c) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vqtbx2q_p8(<16 x i8> %a, [2 x <16 x i8>] %b.coerce, <16 x i8> %c) #1 { // CHECK: [[__P1_I:%.*]] = alloca %struct.poly8x16x2_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.poly8x16x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly8x16x2_t, %struct.poly8x16x2_t* [[B]], i32 0, i32 0 @@ -1448,7 +1448,7 @@ poly8x16_t test_vqtbx2q_p8(poly8x16_t a, poly8x16x2_t b, uint8x16_t c) { return vqtbx2q_p8(a, b, c); } -// CHECK-LABEL: define <16 x i8> @test_vqtbx3q_p8(<16 x i8> %a, [3 x <16 x i8>] %b.coerce, <16 x i8> %c) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vqtbx3q_p8(<16 x i8> %a, [3 x <16 x i8>] %b.coerce, <16 x i8> %c) #1 { // CHECK: [[__P1_I:%.*]] = alloca %struct.poly8x16x3_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.poly8x16x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly8x16x3_t, %struct.poly8x16x3_t* [[B]], i32 0, i32 0 @@ -1472,7 +1472,7 @@ poly8x16_t test_vqtbx3q_p8(poly8x16_t a, poly8x16x3_t b, uint8x16_t c) { return vqtbx3q_p8(a, b, c); } -// CHECK-LABEL: define <16 x i8> @test_vqtbx4q_p8(<16 x i8> %a, [4 x <16 x i8>] %b.coerce, <16 x i8> %c) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vqtbx4q_p8(<16 x i8> %a, [4 x <16 x i8>] %b.coerce, <16 x i8> %c) #1 { // CHECK: [[__P1_I:%.*]] = alloca %struct.poly8x16x4_t, align 16 // CHECK: [[B:%.*]] = alloca %struct.poly8x16x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly8x16x4_t, %struct.poly8x16x4_t* [[B]], i32 0, i32 0 diff --git a/clang/test/CodeGen/aarch64-neon-vcombine.c b/clang/test/CodeGen/aarch64-neon-vcombine.c index f27017404dc6..03a7ce919215 100644 --- a/clang/test/CodeGen/aarch64-neon-vcombine.c +++ b/clang/test/CodeGen/aarch64-neon-vcombine.c @@ -4,98 +4,98 @@ #include <arm_neon.h> -// CHECK-LABEL: define <16 x i8> @test_vcombine_s8(<8 x i8> %low, <8 x i8> %high) #0 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vcombine_s8(<8 x i8> %low, <8 x i8> %high) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <8 x i8> %low, <8 x i8> %high, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15> // CHECK: ret <16 x i8> [[SHUFFLE_I]] int8x16_t test_vcombine_s8(int8x8_t low, int8x8_t high) { return vcombine_s8(low, high); } -// CHECK-LABEL: define <8 x i16> @test_vcombine_s16(<4 x i16> %low, <4 x i16> %high) #0 { +// CHECK-LABEL: define dso_local <8 x i16> @test_vcombine_s16(<4 x i16> %low, <4 x i16> %high) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <4 x i16> %low, <4 x i16> %high, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7> // CHECK: ret <8 x i16> [[SHUFFLE_I]] int16x8_t test_vcombine_s16(int16x4_t low, int16x4_t high) { return vcombine_s16(low, high); } -// CHECK-LABEL: define <4 x i32> @test_vcombine_s32(<2 x i32> %low, <2 x i32> %high) #0 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vcombine_s32(<2 x i32> %low, <2 x i32> %high) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <2 x i32> %low, <2 x i32> %high, <4 x i32> <i32 0, i32 1, i32 2, i32 3> // CHECK: ret <4 x i32> [[SHUFFLE_I]] int32x4_t test_vcombine_s32(int32x2_t low, int32x2_t high) { return vcombine_s32(low, high); } -// CHECK-LABEL: define <2 x i64> @test_vcombine_s64(<1 x i64> %low, <1 x i64> %high) #0 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vcombine_s64(<1 x i64> %low, <1 x i64> %high) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <1 x i64> %low, <1 x i64> %high, <2 x i32> <i32 0, i32 1> // CHECK: ret <2 x i64> [[SHUFFLE_I]] int64x2_t test_vcombine_s64(int64x1_t low, int64x1_t high) { return vcombine_s64(low, high); } -// CHECK-LABEL: define <16 x i8> @test_vcombine_u8(<8 x i8> %low, <8 x i8> %high) #0 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vcombine_u8(<8 x i8> %low, <8 x i8> %high) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <8 x i8> %low, <8 x i8> %high, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15> // CHECK: ret <16 x i8> [[SHUFFLE_I]] uint8x16_t test_vcombine_u8(uint8x8_t low, uint8x8_t high) { return vcombine_u8(low, high); } -// CHECK-LABEL: define <8 x i16> @test_vcombine_u16(<4 x i16> %low, <4 x i16> %high) #0 { +// CHECK-LABEL: define dso_local <8 x i16> @test_vcombine_u16(<4 x i16> %low, <4 x i16> %high) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <4 x i16> %low, <4 x i16> %high, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7> // CHECK: ret <8 x i16> [[SHUFFLE_I]] uint16x8_t test_vcombine_u16(uint16x4_t low, uint16x4_t high) { return vcombine_u16(low, high); } -// CHECK-LABEL: define <4 x i32> @test_vcombine_u32(<2 x i32> %low, <2 x i32> %high) #0 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vcombine_u32(<2 x i32> %low, <2 x i32> %high) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <2 x i32> %low, <2 x i32> %high, <4 x i32> <i32 0, i32 1, i32 2, i32 3> // CHECK: ret <4 x i32> [[SHUFFLE_I]] uint32x4_t test_vcombine_u32(uint32x2_t low, uint32x2_t high) { return vcombine_u32(low, high); } -// CHECK-LABEL: define <2 x i64> @test_vcombine_u64(<1 x i64> %low, <1 x i64> %high) #0 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vcombine_u64(<1 x i64> %low, <1 x i64> %high) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <1 x i64> %low, <1 x i64> %high, <2 x i32> <i32 0, i32 1> // CHECK: ret <2 x i64> [[SHUFFLE_I]] uint64x2_t test_vcombine_u64(uint64x1_t low, uint64x1_t high) { return vcombine_u64(low, high); } -// CHECK-LABEL: define <2 x i64> @test_vcombine_p64(<1 x i64> %low, <1 x i64> %high) #0 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vcombine_p64(<1 x i64> %low, <1 x i64> %high) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <1 x i64> %low, <1 x i64> %high, <2 x i32> <i32 0, i32 1> // CHECK: ret <2 x i64> [[SHUFFLE_I]] poly64x2_t test_vcombine_p64(poly64x1_t low, poly64x1_t high) { return vcombine_p64(low, high); } -// CHECK-LABEL: define <8 x half> @test_vcombine_f16(<4 x half> %low, <4 x half> %high) #0 { +// CHECK-LABEL: define dso_local <8 x half> @test_vcombine_f16(<4 x half> %low, <4 x half> %high) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <4 x half> %low, <4 x half> %high, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7> // CHECK: ret <8 x half> [[SHUFFLE_I]] float16x8_t test_vcombine_f16(float16x4_t low, float16x4_t high) { return vcombine_f16(low, high); } -// CHECK-LABEL: define <4 x float> @test_vcombine_f32(<2 x float> %low, <2 x float> %high) #0 { +// CHECK-LABEL: define dso_local <4 x float> @test_vcombine_f32(<2 x float> %low, <2 x float> %high) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <2 x float> %low, <2 x float> %high, <4 x i32> <i32 0, i32 1, i32 2, i32 3> // CHECK: ret <4 x float> [[SHUFFLE_I]] float32x4_t test_vcombine_f32(float32x2_t low, float32x2_t high) { return vcombine_f32(low, high); } -// CHECK-LABEL: define <16 x i8> @test_vcombine_p8(<8 x i8> %low, <8 x i8> %high) #0 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vcombine_p8(<8 x i8> %low, <8 x i8> %high) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <8 x i8> %low, <8 x i8> %high, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15> // CHECK: ret <16 x i8> [[SHUFFLE_I]] poly8x16_t test_vcombine_p8(poly8x8_t low, poly8x8_t high) { return vcombine_p8(low, high); } -// CHECK-LABEL: define <8 x i16> @test_vcombine_p16(<4 x i16> %low, <4 x i16> %high) #0 { +// CHECK-LABEL: define dso_local <8 x i16> @test_vcombine_p16(<4 x i16> %low, <4 x i16> %high) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <4 x i16> %low, <4 x i16> %high, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7> // CHECK: ret <8 x i16> [[SHUFFLE_I]] poly16x8_t test_vcombine_p16(poly16x4_t low, poly16x4_t high) { return vcombine_p16(low, high); } -// CHECK-LABEL: define <2 x double> @test_vcombine_f64(<1 x double> %low, <1 x double> %high) #0 { +// CHECK-LABEL: define dso_local <2 x double> @test_vcombine_f64(<1 x double> %low, <1 x double> %high) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <1 x double> %low, <1 x double> %high, <2 x i32> <i32 0, i32 1> // CHECK: ret <2 x double> [[SHUFFLE_I]] float64x2_t test_vcombine_f64(float64x1_t low, float64x1_t high) { diff --git a/clang/test/CodeGen/aarch64-neon-vget-hilo.c b/clang/test/CodeGen/aarch64-neon-vget-hilo.c index cc4d46dd69b3..16276e614604 100644 --- a/clang/test/CodeGen/aarch64-neon-vget-hilo.c +++ b/clang/test/CodeGen/aarch64-neon-vget-hilo.c @@ -5,196 +5,196 @@ #include <arm_neon.h> -// CHECK-LABEL: define <8 x i8> @test_vget_high_s8(<16 x i8> %a) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vget_high_s8(<16 x i8> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <16 x i8> %a, <16 x i8> %a, <8 x i32> <i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15> // CHECK: ret <8 x i8> [[SHUFFLE_I]] int8x8_t test_vget_high_s8(int8x16_t a) { return vget_high_s8(a); } -// CHECK-LABEL: define <4 x i16> @test_vget_high_s16(<8 x i16> %a) #0 { +// CHECK-LABEL: define dso_local <4 x i16> @test_vget_high_s16(<8 x i16> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <8 x i16> %a, <8 x i16> %a, <4 x i32> <i32 4, i32 5, i32 6, i32 7> // CHECK: ret <4 x i16> [[SHUFFLE_I]] int16x4_t test_vget_high_s16(int16x8_t a) { return vget_high_s16(a); } -// CHECK-LABEL: define <2 x i32> @test_vget_high_s32(<4 x i32> %a) #0 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vget_high_s32(<4 x i32> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <4 x i32> %a, <4 x i32> %a, <2 x i32> <i32 2, i32 3> // CHECK: ret <2 x i32> [[SHUFFLE_I]] int32x2_t test_vget_high_s32(int32x4_t a) { return vget_high_s32(a); } -// CHECK-LABEL: define <1 x i64> @test_vget_high_s64(<2 x i64> %a) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vget_high_s64(<2 x i64> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <2 x i64> %a, <2 x i64> %a, <1 x i32> <i32 1> // CHECK: ret <1 x i64> [[SHUFFLE_I]] int64x1_t test_vget_high_s64(int64x2_t a) { return vget_high_s64(a); } -// CHECK-LABEL: define <8 x i8> @test_vget_high_u8(<16 x i8> %a) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vget_high_u8(<16 x i8> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <16 x i8> %a, <16 x i8> %a, <8 x i32> <i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15> // CHECK: ret <8 x i8> [[SHUFFLE_I]] uint8x8_t test_vget_high_u8(uint8x16_t a) { return vget_high_u8(a); } -// CHECK-LABEL: define <4 x i16> @test_vget_high_u16(<8 x i16> %a) #0 { +// CHECK-LABEL: define dso_local <4 x i16> @test_vget_high_u16(<8 x i16> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <8 x i16> %a, <8 x i16> %a, <4 x i32> <i32 4, i32 5, i32 6, i32 7> // CHECK: ret <4 x i16> [[SHUFFLE_I]] uint16x4_t test_vget_high_u16(uint16x8_t a) { return vget_high_u16(a); } -// CHECK-LABEL: define <2 x i32> @test_vget_high_u32(<4 x i32> %a) #0 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vget_high_u32(<4 x i32> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <4 x i32> %a, <4 x i32> %a, <2 x i32> <i32 2, i32 3> // CHECK: ret <2 x i32> [[SHUFFLE_I]] uint32x2_t test_vget_high_u32(uint32x4_t a) { return vget_high_u32(a); } -// CHECK-LABEL: define <1 x i64> @test_vget_high_u64(<2 x i64> %a) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vget_high_u64(<2 x i64> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <2 x i64> %a, <2 x i64> %a, <1 x i32> <i32 1> // CHECK: ret <1 x i64> [[SHUFFLE_I]] uint64x1_t test_vget_high_u64(uint64x2_t a) { return vget_high_u64(a); } -// CHECK-LABEL: define <1 x i64> @test_vget_high_p64(<2 x i64> %a) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vget_high_p64(<2 x i64> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <2 x i64> %a, <2 x i64> %a, <1 x i32> <i32 1> // CHECK: ret <1 x i64> [[SHUFFLE_I]] poly64x1_t test_vget_high_p64(poly64x2_t a) { return vget_high_p64(a); } -// CHECK-LABEL: define <4 x half> @test_vget_high_f16(<8 x half> %a) #0 { +// CHECK-LABEL: define dso_local <4 x half> @test_vget_high_f16(<8 x half> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <8 x half> %a, <8 x half> %a, <4 x i32> <i32 4, i32 5, i32 6, i32 7> // CHECK: ret <4 x half> [[SHUFFLE_I]] float16x4_t test_vget_high_f16(float16x8_t a) { return vget_high_f16(a); } -// CHECK-LABEL: define <2 x float> @test_vget_high_f32(<4 x float> %a) #0 { +// CHECK-LABEL: define dso_local <2 x float> @test_vget_high_f32(<4 x float> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <4 x float> %a, <4 x float> %a, <2 x i32> <i32 2, i32 3> // CHECK: ret <2 x float> [[SHUFFLE_I]] float32x2_t test_vget_high_f32(float32x4_t a) { return vget_high_f32(a); } -// CHECK-LABEL: define <8 x i8> @test_vget_high_p8(<16 x i8> %a) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vget_high_p8(<16 x i8> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <16 x i8> %a, <16 x i8> %a, <8 x i32> <i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15> // CHECK: ret <8 x i8> [[SHUFFLE_I]] poly8x8_t test_vget_high_p8(poly8x16_t a) { return vget_high_p8(a); } -// CHECK-LABEL: define <4 x i16> @test_vget_high_p16(<8 x i16> %a) #0 { +// CHECK-LABEL: define dso_local <4 x i16> @test_vget_high_p16(<8 x i16> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <8 x i16> %a, <8 x i16> %a, <4 x i32> <i32 4, i32 5, i32 6, i32 7> // CHECK: ret <4 x i16> [[SHUFFLE_I]] poly16x4_t test_vget_high_p16(poly16x8_t a) { return vget_high_p16(a); } -// CHECK-LABEL: define <1 x double> @test_vget_high_f64(<2 x double> %a) #0 { +// CHECK-LABEL: define dso_local <1 x double> @test_vget_high_f64(<2 x double> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <2 x double> %a, <2 x double> %a, <1 x i32> <i32 1> // CHECK: ret <1 x double> [[SHUFFLE_I]] float64x1_t test_vget_high_f64(float64x2_t a) { return vget_high_f64(a); } -// CHECK-LABEL: define <8 x i8> @test_vget_low_s8(<16 x i8> %a) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vget_low_s8(<16 x i8> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <16 x i8> %a, <16 x i8> %a, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7> // CHECK: ret <8 x i8> [[SHUFFLE_I]] int8x8_t test_vget_low_s8(int8x16_t a) { return vget_low_s8(a); } -// CHECK-LABEL: define <4 x i16> @test_vget_low_s16(<8 x i16> %a) #0 { +// CHECK-LABEL: define dso_local <4 x i16> @test_vget_low_s16(<8 x i16> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <8 x i16> %a, <8 x i16> %a, <4 x i32> <i32 0, i32 1, i32 2, i32 3> // CHECK: ret <4 x i16> [[SHUFFLE_I]] int16x4_t test_vget_low_s16(int16x8_t a) { return vget_low_s16(a); } -// CHECK-LABEL: define <2 x i32> @test_vget_low_s32(<4 x i32> %a) #0 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vget_low_s32(<4 x i32> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <4 x i32> %a, <4 x i32> %a, <2 x i32> <i32 0, i32 1> // CHECK: ret <2 x i32> [[SHUFFLE_I]] int32x2_t test_vget_low_s32(int32x4_t a) { return vget_low_s32(a); } -// CHECK-LABEL: define <1 x i64> @test_vget_low_s64(<2 x i64> %a) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vget_low_s64(<2 x i64> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <2 x i64> %a, <2 x i64> %a, <1 x i32> zeroinitializer // CHECK: ret <1 x i64> [[SHUFFLE_I]] int64x1_t test_vget_low_s64(int64x2_t a) { return vget_low_s64(a); } -// CHECK-LABEL: define <8 x i8> @test_vget_low_u8(<16 x i8> %a) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vget_low_u8(<16 x i8> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <16 x i8> %a, <16 x i8> %a, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7> // CHECK: ret <8 x i8> [[SHUFFLE_I]] uint8x8_t test_vget_low_u8(uint8x16_t a) { return vget_low_u8(a); } -// CHECK-LABEL: define <4 x i16> @test_vget_low_u16(<8 x i16> %a) #0 { +// CHECK-LABEL: define dso_local <4 x i16> @test_vget_low_u16(<8 x i16> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <8 x i16> %a, <8 x i16> %a, <4 x i32> <i32 0, i32 1, i32 2, i32 3> // CHECK: ret <4 x i16> [[SHUFFLE_I]] uint16x4_t test_vget_low_u16(uint16x8_t a) { return vget_low_u16(a); } -// CHECK-LABEL: define <2 x i32> @test_vget_low_u32(<4 x i32> %a) #0 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vget_low_u32(<4 x i32> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <4 x i32> %a, <4 x i32> %a, <2 x i32> <i32 0, i32 1> // CHECK: ret <2 x i32> [[SHUFFLE_I]] uint32x2_t test_vget_low_u32(uint32x4_t a) { return vget_low_u32(a); } -// CHECK-LABEL: define <1 x i64> @test_vget_low_u64(<2 x i64> %a) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vget_low_u64(<2 x i64> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <2 x i64> %a, <2 x i64> %a, <1 x i32> zeroinitializer // CHECK: ret <1 x i64> [[SHUFFLE_I]] uint64x1_t test_vget_low_u64(uint64x2_t a) { return vget_low_u64(a); } -// CHECK-LABEL: define <1 x i64> @test_vget_low_p64(<2 x i64> %a) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vget_low_p64(<2 x i64> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <2 x i64> %a, <2 x i64> %a, <1 x i32> zeroinitializer // CHECK: ret <1 x i64> [[SHUFFLE_I]] poly64x1_t test_vget_low_p64(poly64x2_t a) { return vget_low_p64(a); } -// CHECK-LABEL: define <4 x half> @test_vget_low_f16(<8 x half> %a) #0 { +// CHECK-LABEL: define dso_local <4 x half> @test_vget_low_f16(<8 x half> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <8 x half> %a, <8 x half> %a, <4 x i32> <i32 0, i32 1, i32 2, i32 3> // CHECK: ret <4 x half> [[SHUFFLE_I]] float16x4_t test_vget_low_f16(float16x8_t a) { return vget_low_f16(a); } -// CHECK-LABEL: define <2 x float> @test_vget_low_f32(<4 x float> %a) #0 { +// CHECK-LABEL: define dso_local <2 x float> @test_vget_low_f32(<4 x float> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <4 x float> %a, <4 x float> %a, <2 x i32> <i32 0, i32 1> // CHECK: ret <2 x float> [[SHUFFLE_I]] float32x2_t test_vget_low_f32(float32x4_t a) { return vget_low_f32(a); } -// CHECK-LABEL: define <8 x i8> @test_vget_low_p8(<16 x i8> %a) #0 { +// CHECK-LABEL: define dso_local <8 x i8> @test_vget_low_p8(<16 x i8> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <16 x i8> %a, <16 x i8> %a, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7> // CHECK: ret <8 x i8> [[SHUFFLE_I]] poly8x8_t test_vget_low_p8(poly8x16_t a) { return vget_low_p8(a); } -// CHECK-LABEL: define <4 x i16> @test_vget_low_p16(<8 x i16> %a) #0 { +// CHECK-LABEL: define dso_local <4 x i16> @test_vget_low_p16(<8 x i16> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <8 x i16> %a, <8 x i16> %a, <4 x i32> <i32 0, i32 1, i32 2, i32 3> // CHECK: ret <4 x i16> [[SHUFFLE_I]] poly16x4_t test_vget_low_p16(poly16x8_t a) { return vget_low_p16(a); } -// CHECK-LABEL: define <1 x double> @test_vget_low_f64(<2 x double> %a) #0 { +// CHECK-LABEL: define dso_local <1 x double> @test_vget_low_f64(<2 x double> %a) #0 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <2 x double> %a, <2 x double> %a, <1 x i32> zeroinitializer // CHECK: ret <1 x double> [[SHUFFLE_I]] float64x1_t test_vget_low_f64(float64x2_t a) { diff --git a/clang/test/CodeGen/aarch64-poly128.c b/clang/test/CodeGen/aarch64-poly128.c index d139cfecb31e..55b3224008e7 100644 --- a/clang/test/CodeGen/aarch64-poly128.c +++ b/clang/test/CodeGen/aarch64-poly128.c @@ -12,7 +12,7 @@ #include <arm_neon.h> -// CHECK-LABEL: define void @test_vstrq_p128(i128* %ptr, i128 %val) #0 { +// CHECK-LABEL: define dso_local void @test_vstrq_p128(i128* %ptr, i128 %val) #0 { // CHECK: [[TMP0:%.*]] = bitcast i128* %ptr to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i128* // CHECK: store i128 %val, i128* [[TMP1]] @@ -22,7 +22,7 @@ void test_vstrq_p128(poly128_t * ptr, poly128_t val) { } -// CHECK-LABEL: define i128 @test_vldrq_p128(i128* %ptr) #0 { +// CHECK-LABEL: define dso_local i128 @test_vldrq_p128(i128* %ptr) #0 { // CHECK: [[TMP0:%.*]] = bitcast i128* %ptr to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i128* // CHECK: [[TMP2:%.*]] = load i128, i128* [[TMP1]] @@ -32,7 +32,7 @@ poly128_t test_vldrq_p128(poly128_t * ptr) { } -// CHECK-LABEL: define void @test_ld_st_p128(i128* %ptr) #0 { +// CHECK-LABEL: define dso_local void @test_ld_st_p128(i128* %ptr) #0 { // CHECK: [[TMP0:%.*]] = bitcast i128* %ptr to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i128* // CHECK: [[TMP2:%.*]] = load i128, i128* [[TMP1]] @@ -46,7 +46,7 @@ void test_ld_st_p128(poly128_t * ptr) { } -// CHECK-LABEL: define i128 @test_vmull_p64(i64 %a, i64 %b) #0 { +// CHECK-LABEL: define dso_local i128 @test_vmull_p64(i64 %a, i64 %b) #0 { // CHECK: [[VMULL_P64_I:%.*]] = call <16 x i8> @llvm.aarch64.neon.pmull64(i64 %a, i64 %b) #3 // CHECK: [[VMULL_P641_I:%.*]] = bitcast <16 x i8> [[VMULL_P64_I]] to i128 // CHECK: ret i128 [[VMULL_P641_I]] @@ -54,7 +54,7 @@ poly128_t test_vmull_p64(poly64_t a, poly64_t b) { return vmull_p64(a, b); } -// CHECK-LABEL: define i128 @test_vmull_high_p64(<2 x i64> %a, <2 x i64> %b) #1 { +// CHECK-LABEL: define dso_local i128 @test_vmull_high_p64(<2 x i64> %a, <2 x i64> %b) #1 { // CHECK: [[SHUFFLE_I_I:%.*]] = shufflevector <2 x i64> %a, <2 x i64> %a, <1 x i32> <i32 1> // CHECK: [[TMP0:%.*]] = bitcast <1 x i64> [[SHUFFLE_I_I]] to i64 // CHECK: [[SHUFFLE_I7_I:%.*]] = shufflevector <2 x i64> %b, <2 x i64> %b, <1 x i32> <i32 1> @@ -66,182 +66,182 @@ poly128_t test_vmull_high_p64(poly64x2_t a, poly64x2_t b) { return vmull_high_p64(a, b); } -// CHECK-LABEL: define i128 @test_vreinterpretq_p128_s8(<16 x i8> %a) #1 { +// CHECK-LABEL: define dso_local i128 @test_vreinterpretq_p128_s8(<16 x i8> %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast <16 x i8> %a to i128 // CHECK: ret i128 [[TMP0]] poly128_t test_vreinterpretq_p128_s8(int8x16_t a) { return vreinterpretq_p128_s8(a); } -// CHECK-LABEL: define i128 @test_vreinterpretq_p128_s16(<8 x i16> %a) #1 { +// CHECK-LABEL: define dso_local i128 @test_vreinterpretq_p128_s16(<8 x i16> %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast <8 x i16> %a to i128 // CHECK: ret i128 [[TMP0]] poly128_t test_vreinterpretq_p128_s16(int16x8_t a) { return vreinterpretq_p128_s16(a); } -// CHECK-LABEL: define i128 @test_vreinterpretq_p128_s32(<4 x i32> %a) #1 { +// CHECK-LABEL: define dso_local i128 @test_vreinterpretq_p128_s32(<4 x i32> %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast <4 x i32> %a to i128 // CHECK: ret i128 [[TMP0]] poly128_t test_vreinterpretq_p128_s32(int32x4_t a) { return vreinterpretq_p128_s32(a); } -// CHECK-LABEL: define i128 @test_vreinterpretq_p128_s64(<2 x i64> %a) #1 { +// CHECK-LABEL: define dso_local i128 @test_vreinterpretq_p128_s64(<2 x i64> %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast <2 x i64> %a to i128 // CHECK: ret i128 [[TMP0]] poly128_t test_vreinterpretq_p128_s64(int64x2_t a) { return vreinterpretq_p128_s64(a); } -// CHECK-LABEL: define i128 @test_vreinterpretq_p128_u8(<16 x i8> %a) #1 { +// CHECK-LABEL: define dso_local i128 @test_vreinterpretq_p128_u8(<16 x i8> %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast <16 x i8> %a to i128 // CHECK: ret i128 [[TMP0]] poly128_t test_vreinterpretq_p128_u8(uint8x16_t a) { return vreinterpretq_p128_u8(a); } -// CHECK-LABEL: define i128 @test_vreinterpretq_p128_u16(<8 x i16> %a) #1 { +// CHECK-LABEL: define dso_local i128 @test_vreinterpretq_p128_u16(<8 x i16> %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast <8 x i16> %a to i128 // CHECK: ret i128 [[TMP0]] poly128_t test_vreinterpretq_p128_u16(uint16x8_t a) { return vreinterpretq_p128_u16(a); } -// CHECK-LABEL: define i128 @test_vreinterpretq_p128_u32(<4 x i32> %a) #1 { +// CHECK-LABEL: define dso_local i128 @test_vreinterpretq_p128_u32(<4 x i32> %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast <4 x i32> %a to i128 // CHECK: ret i128 [[TMP0]] poly128_t test_vreinterpretq_p128_u32(uint32x4_t a) { return vreinterpretq_p128_u32(a); } -// CHECK-LABEL: define i128 @test_vreinterpretq_p128_u64(<2 x i64> %a) #1 { +// CHECK-LABEL: define dso_local i128 @test_vreinterpretq_p128_u64(<2 x i64> %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast <2 x i64> %a to i128 // CHECK: ret i128 [[TMP0]] poly128_t test_vreinterpretq_p128_u64(uint64x2_t a) { return vreinterpretq_p128_u64(a); } -// CHECK-LABEL: define i128 @test_vreinterpretq_p128_f32(<4 x float> %a) #1 { +// CHECK-LABEL: define dso_local i128 @test_vreinterpretq_p128_f32(<4 x float> %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast <4 x float> %a to i128 // CHECK: ret i128 [[TMP0]] poly128_t test_vreinterpretq_p128_f32(float32x4_t a) { return vreinterpretq_p128_f32(a); } -// CHECK-LABEL: define i128 @test_vreinterpretq_p128_f64(<2 x double> %a) #1 { +// CHECK-LABEL: define dso_local i128 @test_vreinterpretq_p128_f64(<2 x double> %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast <2 x double> %a to i128 // CHECK: ret i128 [[TMP0]] poly128_t test_vreinterpretq_p128_f64(float64x2_t a) { return vreinterpretq_p128_f64(a); } -// CHECK-LABEL: define i128 @test_vreinterpretq_p128_p8(<16 x i8> %a) #1 { +// CHECK-LABEL: define dso_local i128 @test_vreinterpretq_p128_p8(<16 x i8> %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast <16 x i8> %a to i128 // CHECK: ret i128 [[TMP0]] poly128_t test_vreinterpretq_p128_p8(poly8x16_t a) { return vreinterpretq_p128_p8(a); } -// CHECK-LABEL: define i128 @test_vreinterpretq_p128_p16(<8 x i16> %a) #1 { +// CHECK-LABEL: define dso_local i128 @test_vreinterpretq_p128_p16(<8 x i16> %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast <8 x i16> %a to i128 // CHECK: ret i128 [[TMP0]] poly128_t test_vreinterpretq_p128_p16(poly16x8_t a) { return vreinterpretq_p128_p16(a); } -// CHECK-LABEL: define i128 @test_vreinterpretq_p128_p64(<2 x i64> %a) #1 { +// CHECK-LABEL: define dso_local i128 @test_vreinterpretq_p128_p64(<2 x i64> %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast <2 x i64> %a to i128 // CHECK: ret i128 [[TMP0]] poly128_t test_vreinterpretq_p128_p64(poly64x2_t a) { return vreinterpretq_p128_p64(a); } -// CHECK-LABEL: define <16 x i8> @test_vreinterpretq_s8_p128(i128 %a) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vreinterpretq_s8_p128(i128 %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast i128 %a to <16 x i8> // CHECK: ret <16 x i8> [[TMP0]] int8x16_t test_vreinterpretq_s8_p128(poly128_t a) { return vreinterpretq_s8_p128(a); } -// CHECK-LABEL: define <8 x i16> @test_vreinterpretq_s16_p128(i128 %a) #1 { +// CHECK-LABEL: define dso_local <8 x i16> @test_vreinterpretq_s16_p128(i128 %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast i128 %a to <8 x i16> // CHECK: ret <8 x i16> [[TMP0]] int16x8_t test_vreinterpretq_s16_p128(poly128_t a) { return vreinterpretq_s16_p128(a); } -// CHECK-LABEL: define <4 x i32> @test_vreinterpretq_s32_p128(i128 %a) #1 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vreinterpretq_s32_p128(i128 %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast i128 %a to <4 x i32> // CHECK: ret <4 x i32> [[TMP0]] int32x4_t test_vreinterpretq_s32_p128(poly128_t a) { return vreinterpretq_s32_p128(a); } -// CHECK-LABEL: define <2 x i64> @test_vreinterpretq_s64_p128(i128 %a) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vreinterpretq_s64_p128(i128 %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast i128 %a to <2 x i64> // CHECK: ret <2 x i64> [[TMP0]] int64x2_t test_vreinterpretq_s64_p128(poly128_t a) { return vreinterpretq_s64_p128(a); } -// CHECK-LABEL: define <16 x i8> @test_vreinterpretq_u8_p128(i128 %a) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vreinterpretq_u8_p128(i128 %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast i128 %a to <16 x i8> // CHECK: ret <16 x i8> [[TMP0]] uint8x16_t test_vreinterpretq_u8_p128(poly128_t a) { return vreinterpretq_u8_p128(a); } -// CHECK-LABEL: define <8 x i16> @test_vreinterpretq_u16_p128(i128 %a) #1 { +// CHECK-LABEL: define dso_local <8 x i16> @test_vreinterpretq_u16_p128(i128 %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast i128 %a to <8 x i16> // CHECK: ret <8 x i16> [[TMP0]] uint16x8_t test_vreinterpretq_u16_p128(poly128_t a) { return vreinterpretq_u16_p128(a); } -// CHECK-LABEL: define <4 x i32> @test_vreinterpretq_u32_p128(i128 %a) #1 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vreinterpretq_u32_p128(i128 %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast i128 %a to <4 x i32> // CHECK: ret <4 x i32> [[TMP0]] uint32x4_t test_vreinterpretq_u32_p128(poly128_t a) { return vreinterpretq_u32_p128(a); } -// CHECK-LABEL: define <2 x i64> @test_vreinterpretq_u64_p128(i128 %a) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vreinterpretq_u64_p128(i128 %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast i128 %a to <2 x i64> // CHECK: ret <2 x i64> [[TMP0]] uint64x2_t test_vreinterpretq_u64_p128(poly128_t a) { return vreinterpretq_u64_p128(a); } -// CHECK-LABEL: define <4 x float> @test_vreinterpretq_f32_p128(i128 %a) #1 { +// CHECK-LABEL: define dso_local <4 x float> @test_vreinterpretq_f32_p128(i128 %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast i128 %a to <4 x float> // CHECK: ret <4 x float> [[TMP0]] float32x4_t test_vreinterpretq_f32_p128(poly128_t a) { return vreinterpretq_f32_p128(a); } -// CHECK-LABEL: define <2 x double> @test_vreinterpretq_f64_p128(i128 %a) #1 { +// CHECK-LABEL: define dso_local <2 x double> @test_vreinterpretq_f64_p128(i128 %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast i128 %a to <2 x double> // CHECK: ret <2 x double> [[TMP0]] float64x2_t test_vreinterpretq_f64_p128(poly128_t a) { return vreinterpretq_f64_p128(a); } -// CHECK-LABEL: define <16 x i8> @test_vreinterpretq_p8_p128(i128 %a) #1 { +// CHECK-LABEL: define dso_local <16 x i8> @test_vreinterpretq_p8_p128(i128 %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast i128 %a to <16 x i8> // CHECK: ret <16 x i8> [[TMP0]] poly8x16_t test_vreinterpretq_p8_p128(poly128_t a) { return vreinterpretq_p8_p128(a); } -// CHECK-LABEL: define <8 x i16> @test_vreinterpretq_p16_p128(i128 %a) #1 { +// CHECK-LABEL: define dso_local <8 x i16> @test_vreinterpretq_p16_p128(i128 %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast i128 %a to <8 x i16> // CHECK: ret <8 x i16> [[TMP0]] poly16x8_t test_vreinterpretq_p16_p128(poly128_t a) { return vreinterpretq_p16_p128(a); } -// CHECK-LABEL: define <2 x i64> @test_vreinterpretq_p64_p128(i128 %a) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vreinterpretq_p64_p128(i128 %a) #1 { // CHECK: [[TMP0:%.*]] = bitcast i128 %a to <2 x i64> // CHECK: ret <2 x i64> [[TMP0]] poly64x2_t test_vreinterpretq_p64_p128(poly128_t a) { diff --git a/clang/test/CodeGen/aarch64-poly64.c b/clang/test/CodeGen/aarch64-poly64.c index 8c4ef23bb7e1..c5f5b3af5597 100644 --- a/clang/test/CodeGen/aarch64-poly64.c +++ b/clang/test/CodeGen/aarch64-poly64.c @@ -6,7 +6,7 @@ #include <arm_neon.h> -// CHECK-LABEL: define <1 x i64> @test_vceq_p64(<1 x i64> %a, <1 x i64> %b) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vceq_p64(<1 x i64> %a, <1 x i64> %b) #0 { // CHECK: [[CMP_I:%.*]] = icmp eq <1 x i64> %a, %b // CHECK: [[SEXT_I:%.*]] = sext <1 x i1> [[CMP_I]] to <1 x i64> // CHECK: ret <1 x i64> [[SEXT_I]] @@ -14,7 +14,7 @@ uint64x1_t test_vceq_p64(poly64x1_t a, poly64x1_t b) { return vceq_p64(a, b); } -// CHECK-LABEL: define <2 x i64> @test_vceqq_p64(<2 x i64> %a, <2 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vceqq_p64(<2 x i64> %a, <2 x i64> %b) #1 { // CHECK: [[CMP_I:%.*]] = icmp eq <2 x i64> %a, %b // CHECK: [[SEXT_I:%.*]] = sext <2 x i1> [[CMP_I]] to <2 x i64> // CHECK: ret <2 x i64> [[SEXT_I]] @@ -22,7 +22,7 @@ uint64x2_t test_vceqq_p64(poly64x2_t a, poly64x2_t b) { return vceqq_p64(a, b); } -// CHECK-LABEL: define <1 x i64> @test_vtst_p64(<1 x i64> %a, <1 x i64> %b) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vtst_p64(<1 x i64> %a, <1 x i64> %b) #0 { // CHECK: [[TMP4:%.*]] = and <1 x i64> %a, %b // CHECK: [[TMP5:%.*]] = icmp ne <1 x i64> [[TMP4]], zeroinitializer // CHECK: [[VTST_I:%.*]] = sext <1 x i1> [[TMP5]] to <1 x i64> @@ -31,7 +31,7 @@ uint64x1_t test_vtst_p64(poly64x1_t a, poly64x1_t b) { return vtst_p64(a, b); } -// CHECK-LABEL: define <2 x i64> @test_vtstq_p64(<2 x i64> %a, <2 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vtstq_p64(<2 x i64> %a, <2 x i64> %b) #1 { // CHECK: [[TMP4:%.*]] = and <2 x i64> %a, %b // CHECK: [[TMP5:%.*]] = icmp ne <2 x i64> [[TMP4]], zeroinitializer // CHECK: [[VTST_I:%.*]] = sext <2 x i1> [[TMP5]] to <2 x i64> @@ -40,7 +40,7 @@ uint64x2_t test_vtstq_p64(poly64x2_t a, poly64x2_t b) { return vtstq_p64(a, b); } -// CHECK-LABEL: define <1 x i64> @test_vbsl_p64(<1 x i64> %a, <1 x i64> %b, <1 x i64> %c) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vbsl_p64(<1 x i64> %a, <1 x i64> %b, <1 x i64> %c) #0 { // CHECK: [[VBSL3_I:%.*]] = and <1 x i64> %a, %b // CHECK: [[TMP3:%.*]] = xor <1 x i64> %a, <i64 -1> // CHECK: [[VBSL4_I:%.*]] = and <1 x i64> [[TMP3]], %c @@ -50,7 +50,7 @@ poly64x1_t test_vbsl_p64(poly64x1_t a, poly64x1_t b, poly64x1_t c) { return vbsl_p64(a, b, c); } -// CHECK-LABEL: define <2 x i64> @test_vbslq_p64(<2 x i64> %a, <2 x i64> %b, <2 x i64> %c) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vbslq_p64(<2 x i64> %a, <2 x i64> %b, <2 x i64> %c) #1 { // CHECK: [[VBSL3_I:%.*]] = and <2 x i64> %a, %b // CHECK: [[TMP3:%.*]] = xor <2 x i64> %a, <i64 -1, i64 -1> // CHECK: [[VBSL4_I:%.*]] = and <2 x i64> [[TMP3]], %c @@ -60,35 +60,35 @@ poly64x2_t test_vbslq_p64(poly64x2_t a, poly64x2_t b, poly64x2_t c) { return vbslq_p64(a, b, c); } -// CHECK-LABEL: define i64 @test_vget_lane_p64(<1 x i64> %v) #0 { +// CHECK-LABEL: define dso_local i64 @test_vget_lane_p64(<1 x i64> %v) #0 { // CHECK: [[VGET_LANE:%.*]] = extractelement <1 x i64> %v, i32 0 // CHECK: ret i64 [[VGET_LANE]] poly64_t test_vget_lane_p64(poly64x1_t v) { return vget_lane_p64(v, 0); } -// CHECK-LABEL: define i64 @test_vgetq_lane_p64(<2 x i64> %v) #1 { +// CHECK-LABEL: define dso_local i64 @test_vgetq_lane_p64(<2 x i64> %v) #1 { // CHECK: [[VGETQ_LANE:%.*]] = extractelement <2 x i64> %v, i32 1 // CHECK: ret i64 [[VGETQ_LANE]] poly64_t test_vgetq_lane_p64(poly64x2_t v) { return vgetq_lane_p64(v, 1); } -// CHECK-LABEL: define <1 x i64> @test_vset_lane_p64(i64 %a, <1 x i64> %v) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vset_lane_p64(i64 %a, <1 x i64> %v) #0 { // CHECK: [[VSET_LANE:%.*]] = insertelement <1 x i64> %v, i64 %a, i32 0 // CHECK: ret <1 x i64> [[VSET_LANE]] poly64x1_t test_vset_lane_p64(poly64_t a, poly64x1_t v) { return vset_lane_p64(a, v, 0); } -// CHECK-LABEL: define <2 x i64> @test_vsetq_lane_p64(i64 %a, <2 x i64> %v) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vsetq_lane_p64(i64 %a, <2 x i64> %v) #1 { // CHECK: [[VSET_LANE:%.*]] = insertelement <2 x i64> %v, i64 %a, i32 1 // CHECK: ret <2 x i64> [[VSET_LANE]] poly64x2_t test_vsetq_lane_p64(poly64_t a, poly64x2_t v) { return vsetq_lane_p64(a, v, 1); } -// CHECK-LABEL: define <1 x i64> @test_vcopy_lane_p64(<1 x i64> %a, <1 x i64> %b) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vcopy_lane_p64(<1 x i64> %a, <1 x i64> %b) #0 { // CHECK: [[VGET_LANE:%.*]] = extractelement <1 x i64> %b, i32 0 // CHECK: [[VSET_LANE:%.*]] = insertelement <1 x i64> %a, i64 [[VGET_LANE]], i32 0 // CHECK: ret <1 x i64> [[VSET_LANE]] @@ -97,7 +97,7 @@ poly64x1_t test_vcopy_lane_p64(poly64x1_t a, poly64x1_t b) { } -// CHECK-LABEL: define <2 x i64> @test_vcopyq_lane_p64(<2 x i64> %a, <1 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vcopyq_lane_p64(<2 x i64> %a, <1 x i64> %b) #1 { // CHECK: [[VGET_LANE:%.*]] = extractelement <1 x i64> %b, i32 0 // CHECK: [[VSET_LANE:%.*]] = insertelement <2 x i64> %a, i64 [[VGET_LANE]], i32 1 // CHECK: ret <2 x i64> [[VSET_LANE]] @@ -105,7 +105,7 @@ poly64x2_t test_vcopyq_lane_p64(poly64x2_t a, poly64x1_t b) { return vcopyq_lane_p64(a, 1, b, 0); } -// CHECK-LABEL: define <2 x i64> @test_vcopyq_laneq_p64(<2 x i64> %a, <2 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vcopyq_laneq_p64(<2 x i64> %a, <2 x i64> %b) #1 { // CHECK: [[VGETQ_LANE:%.*]] = extractelement <2 x i64> %b, i32 1 // CHECK: [[VSET_LANE:%.*]] = insertelement <2 x i64> %a, i64 [[VGETQ_LANE]], i32 1 // CHECK: ret <2 x i64> [[VSET_LANE]] @@ -113,20 +113,20 @@ poly64x2_t test_vcopyq_laneq_p64(poly64x2_t a, poly64x2_t b) { return vcopyq_laneq_p64(a, 1, b, 1); } -// CHECK-LABEL: define <1 x i64> @test_vcreate_p64(i64 %a) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vcreate_p64(i64 %a) #0 { // CHECK: [[TMP0:%.*]] = bitcast i64 %a to <1 x i64> // CHECK: ret <1 x i64> [[TMP0]] poly64x1_t test_vcreate_p64(uint64_t a) { return vcreate_p64(a); } -// CHECK-LABEL: define <1 x i64> @test_vdup_n_p64(i64 %a) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vdup_n_p64(i64 %a) #0 { // CHECK: [[VECINIT_I:%.*]] = insertelement <1 x i64> undef, i64 %a, i32 0 // CHECK: ret <1 x i64> [[VECINIT_I]] poly64x1_t test_vdup_n_p64(poly64_t a) { return vdup_n_p64(a); } -// CHECK-LABEL: define <2 x i64> @test_vdupq_n_p64(i64 %a) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vdupq_n_p64(i64 %a) #1 { // CHECK: [[VECINIT_I:%.*]] = insertelement <2 x i64> undef, i64 %a, i32 0 // CHECK: [[VECINIT1_I:%.*]] = insertelement <2 x i64> [[VECINIT_I]], i64 %a, i32 1 // CHECK: ret <2 x i64> [[VECINIT1_I]] @@ -134,14 +134,14 @@ poly64x2_t test_vdupq_n_p64(poly64_t a) { return vdupq_n_p64(a); } -// CHECK-LABEL: define <1 x i64> @test_vmov_n_p64(i64 %a) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vmov_n_p64(i64 %a) #0 { // CHECK: [[VECINIT_I:%.*]] = insertelement <1 x i64> undef, i64 %a, i32 0 // CHECK: ret <1 x i64> [[VECINIT_I]] poly64x1_t test_vmov_n_p64(poly64_t a) { return vmov_n_p64(a); } -// CHECK-LABEL: define <2 x i64> @test_vmovq_n_p64(i64 %a) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vmovq_n_p64(i64 %a) #1 { // CHECK: [[VECINIT_I:%.*]] = insertelement <2 x i64> undef, i64 %a, i32 0 // CHECK: [[VECINIT1_I:%.*]] = insertelement <2 x i64> [[VECINIT_I]], i64 %a, i32 1 // CHECK: ret <2 x i64> [[VECINIT1_I]] @@ -149,35 +149,35 @@ poly64x2_t test_vmovq_n_p64(poly64_t a) { return vmovq_n_p64(a); } -// CHECK-LABEL: define <1 x i64> @test_vdup_lane_p64(<1 x i64> %vec) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vdup_lane_p64(<1 x i64> %vec) #0 { // CHECK: [[SHUFFLE:%.*]] = shufflevector <1 x i64> %vec, <1 x i64> %vec, <1 x i32> zeroinitializer // CHECK: ret <1 x i64> [[SHUFFLE]] poly64x1_t test_vdup_lane_p64(poly64x1_t vec) { return vdup_lane_p64(vec, 0); } -// CHECK-LABEL: define <2 x i64> @test_vdupq_lane_p64(<1 x i64> %vec) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vdupq_lane_p64(<1 x i64> %vec) #1 { // CHECK: [[SHUFFLE:%.*]] = shufflevector <1 x i64> %vec, <1 x i64> %vec, <2 x i32> zeroinitializer // CHECK: ret <2 x i64> [[SHUFFLE]] poly64x2_t test_vdupq_lane_p64(poly64x1_t vec) { return vdupq_lane_p64(vec, 0); } -// CHECK-LABEL: define <2 x i64> @test_vdupq_laneq_p64(<2 x i64> %vec) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vdupq_laneq_p64(<2 x i64> %vec) #1 { // CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x i64> %vec, <2 x i64> %vec, <2 x i32> <i32 1, i32 1> // CHECK: ret <2 x i64> [[SHUFFLE]] poly64x2_t test_vdupq_laneq_p64(poly64x2_t vec) { return vdupq_laneq_p64(vec, 1); } -// CHECK-LABEL: define <2 x i64> @test_vcombine_p64(<1 x i64> %low, <1 x i64> %high) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vcombine_p64(<1 x i64> %low, <1 x i64> %high) #1 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <1 x i64> %low, <1 x i64> %high, <2 x i32> <i32 0, i32 1> // CHECK: ret <2 x i64> [[SHUFFLE_I]] poly64x2_t test_vcombine_p64(poly64x1_t low, poly64x1_t high) { return vcombine_p64(low, high); } -// CHECK-LABEL: define <1 x i64> @test_vld1_p64(i64* %ptr) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vld1_p64(i64* %ptr) #0 { // CHECK: [[TMP0:%.*]] = bitcast i64* %ptr to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to <1 x i64>* // CHECK: [[TMP2:%.*]] = load <1 x i64>, <1 x i64>* [[TMP1]] @@ -186,7 +186,7 @@ poly64x1_t test_vld1_p64(poly64_t const * ptr) { return vld1_p64(ptr); } -// CHECK-LABEL: define <2 x i64> @test_vld1q_p64(i64* %ptr) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vld1q_p64(i64* %ptr) #1 { // CHECK: [[TMP0:%.*]] = bitcast i64* %ptr to i8* // CHECK: [[TMP1:%.*]] = bitcast i8* [[TMP0]] to <2 x i64>* // CHECK: [[TMP2:%.*]] = load <2 x i64>, <2 x i64>* [[TMP1]] @@ -195,7 +195,7 @@ poly64x2_t test_vld1q_p64(poly64_t const * ptr) { return vld1q_p64(ptr); } -// CHECK-LABEL: define void @test_vst1_p64(i64* %ptr, <1 x i64> %val) #0 { +// CHECK-LABEL: define dso_local void @test_vst1_p64(i64* %ptr, <1 x i64> %val) #0 { // CHECK: [[TMP0:%.*]] = bitcast i64* %ptr to i8* // CHECK: [[TMP1:%.*]] = bitcast <1 x i64> %val to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast i8* [[TMP0]] to <1 x i64>* @@ -206,7 +206,7 @@ void test_vst1_p64(poly64_t * ptr, poly64x1_t val) { return vst1_p64(ptr, val); } -// CHECK-LABEL: define void @test_vst1q_p64(i64* %ptr, <2 x i64> %val) #1 { +// CHECK-LABEL: define dso_local void @test_vst1q_p64(i64* %ptr, <2 x i64> %val) #1 { // CHECK: [[TMP0:%.*]] = bitcast i64* %ptr to i8* // CHECK: [[TMP1:%.*]] = bitcast <2 x i64> %val to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast i8* [[TMP0]] to <2 x i64>* @@ -217,7 +217,7 @@ void test_vst1q_p64(poly64_t * ptr, poly64x2_t val) { return vst1q_p64(ptr, val); } -// CHECK-LABEL: define %struct.poly64x1x2_t @test_vld2_p64(i64* %ptr) #2 { +// CHECK-LABEL: define dso_local %struct.poly64x1x2_t @test_vld2_p64(i64* %ptr) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly64x1x2_t, align 8 // CHECK: [[__RET:%.*]] = alloca %struct.poly64x1x2_t, align 8 // CHECK: [[TMP0:%.*]] = bitcast %struct.poly64x1x2_t* [[__RET]] to i8* @@ -235,7 +235,7 @@ poly64x1x2_t test_vld2_p64(poly64_t const * ptr) { return vld2_p64(ptr); } -// CHECK-LABEL: define %struct.poly64x2x2_t @test_vld2q_p64(i64* %ptr) #2 { +// CHECK-LABEL: define dso_local %struct.poly64x2x2_t @test_vld2q_p64(i64* %ptr) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly64x2x2_t, align 16 // CHECK: [[__RET:%.*]] = alloca %struct.poly64x2x2_t, align 16 // CHECK: [[TMP0:%.*]] = bitcast %struct.poly64x2x2_t* [[__RET]] to i8* @@ -253,7 +253,7 @@ poly64x2x2_t test_vld2q_p64(poly64_t const * ptr) { return vld2q_p64(ptr); } -// CHECK-LABEL: define %struct.poly64x1x3_t @test_vld3_p64(i64* %ptr) #2 { +// CHECK-LABEL: define dso_local %struct.poly64x1x3_t @test_vld3_p64(i64* %ptr) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly64x1x3_t, align 8 // CHECK: [[__RET:%.*]] = alloca %struct.poly64x1x3_t, align 8 // CHECK: [[TMP0:%.*]] = bitcast %struct.poly64x1x3_t* [[__RET]] to i8* @@ -271,7 +271,7 @@ poly64x1x3_t test_vld3_p64(poly64_t const * ptr) { return vld3_p64(ptr); } -// CHECK-LABEL: define %struct.poly64x2x3_t @test_vld3q_p64(i64* %ptr) #2 { +// CHECK-LABEL: define dso_local %struct.poly64x2x3_t @test_vld3q_p64(i64* %ptr) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly64x2x3_t, align 16 // CHECK: [[__RET:%.*]] = alloca %struct.poly64x2x3_t, align 16 // CHECK: [[TMP0:%.*]] = bitcast %struct.poly64x2x3_t* [[__RET]] to i8* @@ -289,7 +289,7 @@ poly64x2x3_t test_vld3q_p64(poly64_t const * ptr) { return vld3q_p64(ptr); } -// CHECK-LABEL: define %struct.poly64x1x4_t @test_vld4_p64(i64* %ptr) #2 { +// CHECK-LABEL: define dso_local %struct.poly64x1x4_t @test_vld4_p64(i64* %ptr) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly64x1x4_t, align 8 // CHECK: [[__RET:%.*]] = alloca %struct.poly64x1x4_t, align 8 // CHECK: [[TMP0:%.*]] = bitcast %struct.poly64x1x4_t* [[__RET]] to i8* @@ -307,7 +307,7 @@ poly64x1x4_t test_vld4_p64(poly64_t const * ptr) { return vld4_p64(ptr); } -// CHECK-LABEL: define %struct.poly64x2x4_t @test_vld4q_p64(i64* %ptr) #2 { +// CHECK-LABEL: define dso_local %struct.poly64x2x4_t @test_vld4q_p64(i64* %ptr) #2 { // CHECK: [[RETVAL:%.*]] = alloca %struct.poly64x2x4_t, align 16 // CHECK: [[__RET:%.*]] = alloca %struct.poly64x2x4_t, align 16 // CHECK: [[TMP0:%.*]] = bitcast %struct.poly64x2x4_t* [[__RET]] to i8* @@ -325,7 +325,7 @@ poly64x2x4_t test_vld4q_p64(poly64_t const * ptr) { return vld4q_p64(ptr); } -// CHECK-LABEL: define void @test_vst2_p64(i64* %ptr, [2 x <1 x i64>] %val.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2_p64(i64* %ptr, [2 x <1 x i64>] %val.coerce) #2 { // CHECK: [[VAL:%.*]] = alloca %struct.poly64x1x2_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.poly64x1x2_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly64x1x2_t, %struct.poly64x1x2_t* [[VAL]], i32 0, i32 0 @@ -350,7 +350,7 @@ void test_vst2_p64(poly64_t * ptr, poly64x1x2_t val) { return vst2_p64(ptr, val); } -// CHECK-LABEL: define void @test_vst2q_p64(i64* %ptr, [2 x <2 x i64>] %val.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst2q_p64(i64* %ptr, [2 x <2 x i64>] %val.coerce) #2 { // CHECK: [[VAL:%.*]] = alloca %struct.poly64x2x2_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.poly64x2x2_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly64x2x2_t, %struct.poly64x2x2_t* [[VAL]], i32 0, i32 0 @@ -375,7 +375,7 @@ void test_vst2q_p64(poly64_t * ptr, poly64x2x2_t val) { return vst2q_p64(ptr, val); } -// CHECK-LABEL: define void @test_vst3_p64(i64* %ptr, [3 x <1 x i64>] %val.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3_p64(i64* %ptr, [3 x <1 x i64>] %val.coerce) #2 { // CHECK: [[VAL:%.*]] = alloca %struct.poly64x1x3_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.poly64x1x3_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly64x1x3_t, %struct.poly64x1x3_t* [[VAL]], i32 0, i32 0 @@ -405,7 +405,7 @@ void test_vst3_p64(poly64_t * ptr, poly64x1x3_t val) { return vst3_p64(ptr, val); } -// CHECK-LABEL: define void @test_vst3q_p64(i64* %ptr, [3 x <2 x i64>] %val.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst3q_p64(i64* %ptr, [3 x <2 x i64>] %val.coerce) #2 { // CHECK: [[VAL:%.*]] = alloca %struct.poly64x2x3_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.poly64x2x3_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly64x2x3_t, %struct.poly64x2x3_t* [[VAL]], i32 0, i32 0 @@ -435,7 +435,7 @@ void test_vst3q_p64(poly64_t * ptr, poly64x2x3_t val) { return vst3q_p64(ptr, val); } -// CHECK-LABEL: define void @test_vst4_p64(i64* %ptr, [4 x <1 x i64>] %val.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4_p64(i64* %ptr, [4 x <1 x i64>] %val.coerce) #2 { // CHECK: [[VAL:%.*]] = alloca %struct.poly64x1x4_t, align 8 // CHECK: [[__S1:%.*]] = alloca %struct.poly64x1x4_t, align 8 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly64x1x4_t, %struct.poly64x1x4_t* [[VAL]], i32 0, i32 0 @@ -470,7 +470,7 @@ void test_vst4_p64(poly64_t * ptr, poly64x1x4_t val) { return vst4_p64(ptr, val); } -// CHECK-LABEL: define void @test_vst4q_p64(i64* %ptr, [4 x <2 x i64>] %val.coerce) #2 { +// CHECK-LABEL: define dso_local void @test_vst4q_p64(i64* %ptr, [4 x <2 x i64>] %val.coerce) #2 { // CHECK: [[VAL:%.*]] = alloca %struct.poly64x2x4_t, align 16 // CHECK: [[__S1:%.*]] = alloca %struct.poly64x2x4_t, align 16 // CHECK: [[COERCE_DIVE:%.*]] = getelementptr inbounds %struct.poly64x2x4_t, %struct.poly64x2x4_t* [[VAL]], i32 0, i32 0 @@ -505,7 +505,7 @@ void test_vst4q_p64(poly64_t * ptr, poly64x2x4_t val) { return vst4q_p64(ptr, val); } -// CHECK-LABEL: define <1 x i64> @test_vext_p64(<1 x i64> %a, <1 x i64> %b) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vext_p64(<1 x i64> %a, <1 x i64> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast <1 x i64> %a to <8 x i8> // CHECK: [[TMP1:%.*]] = bitcast <1 x i64> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <8 x i8> [[TMP0]] to <1 x i64> @@ -517,7 +517,7 @@ poly64x1_t test_vext_p64(poly64x1_t a, poly64x1_t b) { } -// CHECK-LABEL: define <2 x i64> @test_vextq_p64(<2 x i64> %a, <2 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vextq_p64(<2 x i64> %a, <2 x i64> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast <2 x i64> %a to <16 x i8> // CHECK: [[TMP1:%.*]] = bitcast <2 x i64> %b to <16 x i8> // CHECK: [[TMP2:%.*]] = bitcast <16 x i8> [[TMP0]] to <2 x i64> @@ -528,49 +528,49 @@ poly64x2_t test_vextq_p64(poly64x2_t a, poly64x2_t b) { return vextq_p64(a, b, 1); } -// CHECK-LABEL: define <2 x i64> @test_vzip1q_p64(<2 x i64> %a, <2 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vzip1q_p64(<2 x i64> %a, <2 x i64> %b) #1 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> <i32 0, i32 2> // CHECK: ret <2 x i64> [[SHUFFLE_I]] poly64x2_t test_vzip1q_p64(poly64x2_t a, poly64x2_t b) { return vzip1q_p64(a, b); } -// CHECK-LABEL: define <2 x i64> @test_vzip2q_p64(<2 x i64> %a, <2 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vzip2q_p64(<2 x i64> %a, <2 x i64> %b) #1 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> <i32 1, i32 3> // CHECK: ret <2 x i64> [[SHUFFLE_I]] poly64x2_t test_vzip2q_p64(poly64x2_t a, poly64x2_t b) { return vzip2q_u64(a, b); } -// CHECK-LABEL: define <2 x i64> @test_vuzp1q_p64(<2 x i64> %a, <2 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vuzp1q_p64(<2 x i64> %a, <2 x i64> %b) #1 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> <i32 0, i32 2> // CHECK: ret <2 x i64> [[SHUFFLE_I]] poly64x2_t test_vuzp1q_p64(poly64x2_t a, poly64x2_t b) { return vuzp1q_p64(a, b); } -// CHECK-LABEL: define <2 x i64> @test_vuzp2q_p64(<2 x i64> %a, <2 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vuzp2q_p64(<2 x i64> %a, <2 x i64> %b) #1 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> <i32 1, i32 3> // CHECK: ret <2 x i64> [[SHUFFLE_I]] poly64x2_t test_vuzp2q_p64(poly64x2_t a, poly64x2_t b) { return vuzp2q_u64(a, b); } -// CHECK-LABEL: define <2 x i64> @test_vtrn1q_p64(<2 x i64> %a, <2 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vtrn1q_p64(<2 x i64> %a, <2 x i64> %b) #1 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> <i32 0, i32 2> // CHECK: ret <2 x i64> [[SHUFFLE_I]] poly64x2_t test_vtrn1q_p64(poly64x2_t a, poly64x2_t b) { return vtrn1q_p64(a, b); } -// CHECK-LABEL: define <2 x i64> @test_vtrn2q_p64(<2 x i64> %a, <2 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vtrn2q_p64(<2 x i64> %a, <2 x i64> %b) #1 { // CHECK: [[SHUFFLE_I:%.*]] = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> <i32 1, i32 3> // CHECK: ret <2 x i64> [[SHUFFLE_I]] poly64x2_t test_vtrn2q_p64(poly64x2_t a, poly64x2_t b) { return vtrn2q_u64(a, b); } -// CHECK-LABEL: define <1 x i64> @test_vsri_n_p64(<1 x i64> %a, <1 x i64> %b) #0 { +// CHECK-LABEL: define dso_local <1 x i64> @test_vsri_n_p64(<1 x i64> %a, <1 x i64> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast <1 x i64> %a to <8 x i8> // CHECK: [[TMP1:%.*]] = bitcast <1 x i64> %b to <8 x i8> // CHECK: [[VSRI_N:%.*]] = bitcast <8 x i8> [[TMP0]] to <1 x i64> @@ -581,7 +581,7 @@ poly64x1_t test_vsri_n_p64(poly64x1_t a, poly64x1_t b) { return vsri_n_p64(a, b, 33); } -// CHECK-LABEL: define <2 x i64> @test_vsriq_n_p64(<2 x i64> %a, <2 x i64> %b) #1 { +// CHECK-LABEL: define dso_local <2 x i64> @test_vsriq_n_p64(<2 x i64> %a, <2 x i64> %b) #1 { // CHECK: [[TMP0:%.*]] = bitcast <2 x i64> %a to <16 x i8> // CHECK: [[TMP1:%.*]] = bitcast <2 x i64> %b to <16 x i8> // CHECK: [[VSRI_N:%.*]] = bitcast <16 x i8> [[TMP0]] to <2 x i64> diff --git a/clang/test/CodeGen/aarch64-tme.cpp b/clang/test/CodeGen/aarch64-tme.cpp index 0462631ff194..48e3ac7b18ab 100644 --- a/clang/test/CodeGen/aarch64-tme.cpp +++ b/clang/test/CodeGen/aarch64-tme.cpp @@ -36,7 +36,7 @@ void test_tme_funcs() { #ifdef __ARM_FEATURE_TME extern "C" void arm_feature_tme_defined() {} #endif -// CHECK: define void @arm_feature_tme_defined() +// CHECK: define dso_local void @arm_feature_tme_defined() // CHECK: attributes #1 = { nounwind } diff --git a/clang/test/CodeGen/aarch64-varargs.c b/clang/test/CodeGen/aarch64-varargs.c index c213f5b9375b..f6c4c55745d7 100644 --- a/clang/test/CodeGen/aarch64-varargs.c +++ b/clang/test/CodeGen/aarch64-varargs.c @@ -9,7 +9,7 @@ va_list the_list; int simple_int(void) { -// CHECK-LABEL: define i32 @simple_int +// CHECK-LABEL: define dso_local i32 @simple_int return va_arg(the_list, int); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -45,7 +45,7 @@ int simple_int(void) { } __int128 aligned_int(void) { -// CHECK-LABEL: define i128 @aligned_int +// CHECK-LABEL: define dso_local i128 @aligned_int return va_arg(the_list, __int128); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -87,7 +87,7 @@ struct bigstruct { }; struct bigstruct simple_indirect(void) { -// CHECK-LABEL: define void @simple_indirect +// CHECK-LABEL: define dso_local void @simple_indirect return va_arg(the_list, struct bigstruct); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -125,7 +125,7 @@ struct aligned_bigstruct { }; struct aligned_bigstruct simple_aligned_indirect(void) { -// CHECK-LABEL: define void @simple_aligned_indirect +// CHECK-LABEL: define dso_local void @simple_aligned_indirect return va_arg(the_list, struct aligned_bigstruct); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -156,7 +156,7 @@ struct aligned_bigstruct simple_aligned_indirect(void) { } double simple_double(void) { -// CHECK-LABEL: define double @simple_double +// CHECK-LABEL: define dso_local double @simple_double return va_arg(the_list, double); // CHECK: [[VR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 4) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[VR_OFFS]], 0 @@ -194,7 +194,7 @@ struct hfa { }; struct hfa simple_hfa(void) { -// CHECK-LABEL: define %struct.hfa @simple_hfa +// CHECK-LABEL: define dso_local %struct.hfa @simple_hfa return va_arg(the_list, struct hfa); // CHECK: [[VR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 4) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[VR_OFFS]], 0 @@ -241,7 +241,7 @@ struct hfa simple_hfa(void) { typedef int underaligned_int __attribute__((packed,aligned(2))); underaligned_int underaligned_int_test() { -// CHECK-LABEL: define i32 @underaligned_int_test() +// CHECK-LABEL: define dso_local i32 @underaligned_int_test() return va_arg(the_list, underaligned_int); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -278,7 +278,7 @@ underaligned_int underaligned_int_test() { typedef int overaligned_int __attribute__((aligned(32))); overaligned_int overaligned_int_test() { -// CHECK-LABEL: define i32 @overaligned_int_test() +// CHECK-LABEL: define dso_local i32 @overaligned_int_test() return va_arg(the_list, overaligned_int); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -315,7 +315,7 @@ overaligned_int overaligned_int_test() { typedef long long underaligned_long_long __attribute__((packed,aligned(2))); underaligned_long_long underaligned_long_long_test() { -// CHECK-LABEL: define i64 @underaligned_long_long_test() +// CHECK-LABEL: define dso_local i64 @underaligned_long_long_test() return va_arg(the_list, underaligned_long_long); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -348,7 +348,7 @@ underaligned_long_long underaligned_long_long_test() { typedef long long overaligned_long_long __attribute__((aligned(32))); overaligned_long_long overaligned_long_long_test() { -// CHECK-LABEL: define i64 @overaligned_long_long_test() +// CHECK-LABEL: define dso_local i64 @overaligned_long_long_test() return va_arg(the_list, overaligned_long_long); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -381,7 +381,7 @@ overaligned_long_long overaligned_long_long_test() { typedef __int128 underaligned_int128 __attribute__((packed,aligned(2))); underaligned_int128 underaligned_int128_test() { -// CHECK-LABEL: define i128 @underaligned_int128_test() +// CHECK-LABEL: define dso_local i128 @underaligned_int128_test() return va_arg(the_list, underaligned_int128); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -420,7 +420,7 @@ underaligned_int128 underaligned_int128_test() { typedef __int128 overaligned_int128 __attribute__((aligned(32))); overaligned_int128 overaligned_int128_test() { -// CHECK-LABEL: define i128 @overaligned_int128_test() +// CHECK-LABEL: define dso_local i128 @overaligned_int128_test() return va_arg(the_list, overaligned_int128); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -473,7 +473,7 @@ typedef struct __attribute__((packed,aligned(2))) { int val; } underaligned_int_struct; underaligned_int_struct underaligned_int_struct_test() { -// CHECK-LABEL: define i64 @underaligned_int_struct_test() +// CHECK-LABEL: define dso_local i64 @underaligned_int_struct_test() return va_arg(the_list, underaligned_int_struct); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -506,7 +506,7 @@ typedef struct __attribute__((aligned(16))) { int val; } overaligned_int_struct; overaligned_int_struct overaligned_int_struct_test() { -// CHECK-LABEL: define i128 @overaligned_int_struct_test() +// CHECK-LABEL: define dso_local i128 @overaligned_int_struct_test() return va_arg(the_list, overaligned_int_struct); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -539,7 +539,7 @@ typedef struct __attribute__((packed,aligned(2))) { long long val; } underaligned_long_long_struct; underaligned_long_long_struct underaligned_long_long_struct_test() { -// CHECK-LABEL: define i64 @underaligned_long_long_struct_test() +// CHECK-LABEL: define dso_local i64 @underaligned_long_long_struct_test() return va_arg(the_list, underaligned_long_long_struct); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -572,7 +572,7 @@ typedef struct __attribute__((aligned(16))) { long long val; } overaligned_long_long_struct; overaligned_long_long_struct overaligned_long_long_struct_test() { -// CHECK-LABEL: define i128 @overaligned_long_long_struct_test() +// CHECK-LABEL: define dso_local i128 @overaligned_long_long_struct_test() return va_arg(the_list, overaligned_long_long_struct); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -605,7 +605,7 @@ typedef struct __attribute__((packed,aligned(2))) { __int128 val; } underaligned_int128_struct; underaligned_int128_struct underaligned_int128_struct_test() { -// CHECK-LABEL: define [2 x i64] @underaligned_int128_struct_test() +// CHECK-LABEL: define dso_local [2 x i64] @underaligned_int128_struct_test() return va_arg(the_list, underaligned_int128_struct); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -639,7 +639,7 @@ typedef struct __attribute__((aligned(32))) { __int128 val; } overaligned_int128_struct; overaligned_int128_struct overaligned_int128_struct_test() { -// CHECK-LABEL: define void @overaligned_int128_struct_test(%struct.overaligned_int128_struct* noalias sret %agg.result) +// CHECK-LABEL: define dso_local void @overaligned_int128_struct_test(%struct.overaligned_int128_struct* noalias sret %agg.result) return va_arg(the_list, overaligned_int128_struct); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -675,7 +675,7 @@ typedef struct { int val __attribute__((packed,aligned(2))); } underaligned_int_struct_member; underaligned_int_struct_member underaligned_int_struct_member_test() { -// CHECK-LABEL: define i64 @underaligned_int_struct_member_test() +// CHECK-LABEL: define dso_local i64 @underaligned_int_struct_member_test() return va_arg(the_list, underaligned_int_struct_member); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -708,7 +708,7 @@ typedef struct { int val __attribute__((aligned(16))); } overaligned_int_struct_member; overaligned_int_struct_member overaligned_int_struct_member_test() { -// CHECK-LABEL: define i128 @overaligned_int_struct_member_test() +// CHECK-LABEL: define dso_local i128 @overaligned_int_struct_member_test() return va_arg(the_list, overaligned_int_struct_member); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -747,7 +747,7 @@ typedef struct { long long val __attribute__((packed,aligned(2))); } underaligned_long_long_struct_member; underaligned_long_long_struct_member underaligned_long_long_struct_member_test() { -// CHECK-LABEL: define i64 @underaligned_long_long_struct_member_test() +// CHECK-LABEL: define dso_local i64 @underaligned_long_long_struct_member_test() return va_arg(the_list, underaligned_long_long_struct_member); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -780,7 +780,7 @@ typedef struct { long long val __attribute__((aligned(16))); } overaligned_long_long_struct_member; overaligned_long_long_struct_member overaligned_long_long_struct_member_test() { -// CHECK-LABEL: define i128 @overaligned_long_long_struct_member_test() +// CHECK-LABEL: define dso_local i128 @overaligned_long_long_struct_member_test() return va_arg(the_list, overaligned_long_long_struct_member); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -819,7 +819,7 @@ typedef struct { __int128 val __attribute__((packed,aligned(2))); } underaligned_int128_struct_member; underaligned_int128_struct_member underaligned_int128_struct_member_test() { -// CHECK-LABEL: define [2 x i64] @underaligned_int128_struct_member_test() +// CHECK-LABEL: define dso_local [2 x i64] @underaligned_int128_struct_member_test() return va_arg(the_list, underaligned_int128_struct_member); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -853,7 +853,7 @@ typedef struct { __int128 val __attribute__((aligned(32))); } overaligned_int128_struct_member; overaligned_int128_struct_member overaligned_int128_struct_member_test() { -// CHECK-LABEL: define void @overaligned_int128_struct_member_test(%struct.overaligned_int128_struct_member* noalias sret %agg.result) +// CHECK-LABEL: define dso_local void @overaligned_int128_struct_member_test(%struct.overaligned_int128_struct_member* noalias sret %agg.result) return va_arg(the_list, overaligned_int128_struct_member); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -883,7 +883,7 @@ overaligned_int128_struct_member overaligned_int128_struct_member_test() { } void check_start(int n, ...) { -// CHECK-LABEL: define void @check_start(i32 %n, ...) +// CHECK-LABEL: define dso_local void @check_start(i32 %n, ...) va_list the_list; va_start(the_list, n); diff --git a/clang/test/CodeGen/aarch64-vpcs.c b/clang/test/CodeGen/aarch64-vpcs.c index 7e4f50cb87ba..bb74afeed4a7 100644 --- a/clang/test/CodeGen/aarch64-vpcs.c +++ b/clang/test/CodeGen/aarch64-vpcs.c @@ -4,8 +4,8 @@ void __attribute__((aarch64_vector_pcs)) f(int *); // expected-warning {{'aarch64_vector_pcs' calling convention is not supported for this target}} -// CHECKC: define void @g( -// CHECKCXX: define void @_Z1gPi( +// CHECKC: define dso_local void @g( +// CHECKCXX: define dso_local void @_Z1gPi( void g(int *a) { // CHECKC: call aarch64_vector_pcs void @f( @@ -17,7 +17,7 @@ void g(int *a) { // CHECKCXX: declare aarch64_vector_pcs void @_Z1fPi void __attribute__((aarch64_vector_pcs)) h(int *a){ // expected-warning {{'aarch64_vector_pcs' calling convention is not supported for this target}} -// CHECKC: define aarch64_vector_pcs void @h( -// CHECKCXX: define aarch64_vector_pcs void @_Z1hPi( +// CHECKC: define dso_local aarch64_vector_pcs void @h( +// CHECKCXX: define dso_local aarch64_vector_pcs void @_Z1hPi( f(a); } diff --git a/clang/test/CodeGen/address-space.c b/clang/test/CodeGen/address-space.c index a76d2e743e6e..2f34177be1ca 100644 --- a/clang/test/CodeGen/address-space.c +++ b/clang/test/CodeGen/address-space.c @@ -1,20 +1,20 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm < %s | FileCheck -enable-var-scope -check-prefixes=CHECK,X86 %s // RUN: %clang_cc1 -triple amdgcn -emit-llvm < %s | FileCheck -enable-var-scope -check-prefixes=CHECK,AMDGCN %s -// CHECK: @foo = common addrspace(1) global +// CHECK: @foo = common {{(dso_local )?}}addrspace(1) global int foo __attribute__((address_space(1))); -// CHECK: @ban = common addrspace(1) global +// CHECK: @ban = common {{(dso_local )?}}addrspace(1) global int ban[10] __attribute__((address_space(1))); -// CHECK: @a = common global +// CHECK: @a = common {{(dso_local )?}}global int a __attribute__((address_space(0))); -// CHECK-LABEL: define i32 @test1() +// CHECK-LABEL: define {{(dso_local )?}}i32 @test1() // CHECK: load i32, i32 addrspace(1)* @foo int test1() { return foo; } -// CHECK-LABEL: define i32 @test2(i32 %i) +// CHECK-LABEL: define {{(dso_local )?}}i32 @test2(i32 %i) // CHECK: load i32, i32 addrspace(1)* // CHECK-NEXT: ret i32 int test2(int i) { return ban[i]; } @@ -22,7 +22,7 @@ int test2(int i) { return ban[i]; } // Both A and B point into addrspace(2). __attribute__((address_space(2))) int *A, *B; -// CHECK-LABEL: define void @test3() +// CHECK-LABEL: define {{(dso_local )?}}void @test3() // X86: load i32 addrspace(2)*, i32 addrspace(2)** @B // AMDGCN: load i32 addrspace(2)*, i32 addrspace(2)** addrspacecast (i32 addrspace(2)* addrspace(1)* @B to i32 addrspace(2)**) // CHECK: load i32, i32 addrspace(2)* @@ -38,7 +38,7 @@ typedef struct { float aData[1]; } MyStruct; -// CHECK-LABEL: define void @test4( +// CHECK-LABEL: define {{(dso_local )?}}void @test4( // CHECK: call void @llvm.memcpy.p0i8.p2i8 // CHECK: call void @llvm.memcpy.p2i8.p0i8 void test4(MyStruct __attribute__((address_space(2))) *pPtr) { diff --git a/clang/test/CodeGen/alias.c b/clang/test/CodeGen/alias.c index f5bdf3c0587e..a15a337fb87d 100644 --- a/clang/test/CodeGen/alias.c +++ b/clang/test/CodeGen/alias.c @@ -5,10 +5,10 @@ // RUN: %clang_cc1 -triple aarch64-linux-gnu -emit-llvm -o - %s | FileCheck -check-prefix=CHECKGLOBALS %s int g0; -// CHECKBASIC-DAG: @g0 = common global i32 0 +// CHECKBASIC-DAG: @g0 = common dso_local global i32 0 // CHECKASM-DAG: .comm g0,4,4 __thread int TL_WITH_ALIAS; -// CHECKBASIC-DAG: @TL_WITH_ALIAS = thread_local global i32 0, align 4 +// CHECKBASIC-DAG: @TL_WITH_ALIAS = dso_local thread_local global i32 0, align 4 // CHECKASM-DAG: .globl TL_WITH_ALIAS // CHECKASM-DAG: .size TL_WITH_ALIAS, 4 static int bar1 = 42; @@ -18,24 +18,24 @@ static int bar1 = 42; // PR24379: alias variable expected to have same size as aliasee even when types differ const int wacom_usb_ids[] = {1, 1, 2, 3, 5, 8, 13, 0}; -// CHECKBASIC-DAG: @wacom_usb_ids = constant [8 x i32] [i32 1, i32 1, i32 2, i32 3, i32 5, i32 8, i32 13, i32 0], align 4 +// CHECKBASIC-DAG: @wacom_usb_ids = dso_local constant [8 x i32] [i32 1, i32 1, i32 2, i32 3, i32 5, i32 8, i32 13, i32 0], align 4 // CHECKASM-DAG: .globl wacom_usb_ids // CHECKASM-DAG: .size wacom_usb_ids, 32 extern const int __mod_usb_device_table __attribute__ ((alias("wacom_usb_ids"))); -// CHECKBASIC-DAG: @__mod_usb_device_table = alias i32, getelementptr inbounds ([8 x i32], [8 x i32]* @wacom_usb_ids, i32 0, i32 0) +// CHECKBASIC-DAG: @__mod_usb_device_table = dso_local alias i32, getelementptr inbounds ([8 x i32], [8 x i32]* @wacom_usb_ids, i32 0, i32 0) // CHECKASM-DAG: .globl __mod_usb_device_table // CHECKASM-DAG: .set __mod_usb_device_table, wacom_usb_ids // CHECKASM-NOT: .size __mod_usb_device_table extern int g1; extern int g1 __attribute((alias("g0"))); -// CHECKBASIC-DAG: @g1 = alias i32, i32* @g0 +// CHECKBASIC-DAG: @g1 = dso_local alias i32, i32* @g0 // CHECKASM-DAG: .globl g1 // CHECKASM-DAG: .set g1, g0 // CHECKASM-NOT: .size g1 extern __thread int __libc_errno __attribute__ ((alias ("TL_WITH_ALIAS"))); -// CHECKBASIC-DAG: @__libc_errno = thread_local alias i32, i32* @TL_WITH_ALIAS +// CHECKBASIC-DAG: @__libc_errno = dso_local thread_local alias i32, i32* @TL_WITH_ALIAS // CHECKASM-DAG: .globl __libc_errno // CHECKASM-DAG: .set __libc_errno, TL_WITH_ALIAS // CHECKASM-NOT: .size __libc_errno @@ -43,11 +43,11 @@ extern __thread int __libc_errno __attribute__ ((alias ("TL_WITH_ALIAS"))); void f0(void) { } extern void f1(void); extern void f1(void) __attribute((alias("f0"))); -// CHECKBASIC-DAG: @f1 = alias void (), void ()* @f0 -// CHECKBASIC-DAG: @test8_foo = weak alias void (...), bitcast (void ()* @test8_bar to void (...)*) -// CHECKBASIC-DAG: @test8_zed = alias void (...), bitcast (void ()* @test8_bar to void (...)*) -// CHECKBASIC-DAG: @test9_zed = alias void (), void ()* @test9_bar -// CHECKBASIC: define void @f0() [[NUW:#[0-9]+]] { +// CHECKBASIC-DAG: @f1 = dso_local alias void (), void ()* @f0 +// CHECKBASIC-DAG: @test8_foo = weak dso_local alias void (...), bitcast (void ()* @test8_bar to void (...)*) +// CHECKBASIC-DAG: @test8_zed = dso_local alias void (...), bitcast (void ()* @test8_bar to void (...)*) +// CHECKBASIC-DAG: @test9_zed = dso_local alias void (), void ()* @test9_bar +// CHECKBASIC: define dso_local void @f0() [[NUW:#[0-9]+]] { // Make sure that aliases cause referenced values to be emitted. // PR3200 @@ -66,15 +66,15 @@ static int inner(int a) { return 0; } static int inner_weak(int a) { return 0; } extern __typeof(inner) inner_a __attribute__((alias("inner"))); static __typeof(inner_weak) inner_weak_a __attribute__((weakref, alias("inner_weak"))); -// CHECKCC: @inner_a = alias i32 (i32), i32 (i32)* @inner +// CHECKCC: @inner_a = dso_local alias i32 (i32), i32 (i32)* @inner // CHECKCC: define internal arm_aapcs_vfpcc i32 @inner(i32 %a) [[NUW:#[0-9]+]] { int outer(int a) { return inner(a); } -// CHECKCC: define arm_aapcs_vfpcc i32 @outer(i32 %a) [[NUW]] { +// CHECKCC: define dso_local arm_aapcs_vfpcc i32 @outer(i32 %a) [[NUW]] { // CHECKCC: call arm_aapcs_vfpcc i32 @inner(i32 %{{.*}}) int outer_weak(int a) { return inner_weak_a(a); } -// CHECKCC: define arm_aapcs_vfpcc i32 @outer_weak(i32 %a) [[NUW]] { +// CHECKCC: define dso_local arm_aapcs_vfpcc i32 @outer_weak(i32 %a) [[NUW]] { // CHECKCC: call arm_aapcs_vfpcc i32 @inner_weak(i32 %{{.*}}) // CHECKCC: define internal arm_aapcs_vfpcc i32 @inner_weak(i32 %a) [[NUW]] { @@ -101,6 +101,6 @@ void test11(void) {} static void test11_foo(void) __attribute__((alias("test11"))); // Test that gnu_inline+alias work. -// CHECKGLOBALS: @test12_alias = alias void (), void ()* @test12 +// CHECKGLOBALS: @test12_alias = dso_local alias void (), void ()* @test12 void test12(void) {} inline void test12_alias(void) __attribute__((gnu_inline, alias("test12"))); diff --git a/clang/test/CodeGen/align-systemz.c b/clang/test/CodeGen/align-systemz.c index eaa1de64d344..5484b8358a7b 100644 --- a/clang/test/CodeGen/align-systemz.c +++ b/clang/test/CodeGen/align-systemz.c @@ -7,10 +7,10 @@ struct test { }; char c; -// CHECK-DAG: @c = common global i8 0, align 2 +// CHECK-DAG: @c = common dso_local global i8 0, align 2 struct test s; -// CHECK-DAG: @s = common global %struct.test zeroinitializer, align 2 +// CHECK-DAG: @s = common dso_local global %struct.test zeroinitializer, align 2 extern char ec; // CHECK-DAG: @ec = external global i8, align 2 diff --git a/clang/test/CodeGen/align_value.cpp b/clang/test/CodeGen/align_value.cpp index 1601e3dcc570..5ecd44a27609 100644 --- a/clang/test/CodeGen/align_value.cpp +++ b/clang/test/CodeGen/align_value.cpp @@ -4,7 +4,7 @@ typedef double * __attribute__((align_value(64))) aligned_double; void foo(aligned_double x, double * y __attribute__((align_value(32))), double & z __attribute__((align_value(128)))) { }; -// CHECK: define void @_Z3fooPdS_Rd(double* align 64 %x, double* align 32 %y, double* align 128 dereferenceable(8) %z) +// CHECK: define dso_local void @_Z3fooPdS_Rd(double* align 64 %x, double* align 32 %y, double* align 128 dereferenceable(8) %z) struct ad_struct { aligned_double a; diff --git a/clang/test/CodeGen/alignment.c b/clang/test/CodeGen/alignment.c index c9f58136e38a..57b4b6cf511c 100644 --- a/clang/test/CodeGen/alignment.c +++ b/clang/test/CodeGen/alignment.c @@ -7,7 +7,7 @@ union {int a[4]; __attribute((aligned(16))) float b[4];} b; // CHECK: @b = {{.*}}zeroinitializer, align 16 long long int test5[1024]; -// CHECK-DAG: @test5 = common global [1024 x i64] zeroinitializer, align 8 +// CHECK-DAG: @test5 = common dso_local global [1024 x i64] zeroinitializer, align 8 // PR5279 - Reduced alignment on typedef. typedef int myint __attribute__((aligned(1))); diff --git a/clang/test/CodeGen/alloc-align-attr.c b/clang/test/CodeGen/alloc-align-attr.c index 6294450d0444..1d19220c5b50 100644 --- a/clang/test/CodeGen/alloc-align-attr.c +++ b/clang/test/CodeGen/alloc-align-attr.c @@ -4,7 +4,7 @@ __INT32_TYPE__*m1(__INT32_TYPE__ i) __attribute__((alloc_align(1))); // Condition where parameter to m1 is not size_t. __INT32_TYPE__ test1(__INT32_TYPE__ a) { -// CHECK: define i32 @test1 +// CHECK: define dso_local i32 @test1 return *m1(a); // CHECK: call i32* @m1(i32 [[PARAM1:%[^\)]+]]) // CHECK: [[ALIGNCAST1:%.+]] = zext i32 [[PARAM1]] to i64 @@ -16,7 +16,7 @@ __INT32_TYPE__ test1(__INT32_TYPE__ a) { } // Condition where test2 param needs casting. __INT32_TYPE__ test2(__SIZE_TYPE__ a) { -// CHECK: define i32 @test2 +// CHECK: define dso_local i32 @test2 return *m1(a); // CHECK: [[CONV2:%.+]] = trunc i64 %{{.+}} to i32 // CHECK: call i32* @m1(i32 [[CONV2]]) @@ -31,7 +31,7 @@ __INT32_TYPE__ *m2(__SIZE_TYPE__ i) __attribute__((alloc_align(1))); // test3 param needs casting, but 'm2' is correct. __INT32_TYPE__ test3(__INT32_TYPE__ a) { -// CHECK: define i32 @test3 +// CHECK: define dso_local i32 @test3 return *m2(a); // CHECK: [[CONV3:%.+]] = sext i32 %{{.+}} to i64 // CHECK: call i32* @m2(i64 [[CONV3]]) @@ -44,7 +44,7 @@ __INT32_TYPE__ test3(__INT32_TYPE__ a) { // Every type matches, canonical example. __INT32_TYPE__ test4(__SIZE_TYPE__ a) { -// CHECK: define i32 @test4 +// CHECK: define dso_local i32 @test4 return *m2(a); // CHECK: call i32* @m2(i64 [[PARAM4:%[^\)]+]]) // CHECK: [[MASK4:%.+]] = sub i64 [[PARAM4]], 1 @@ -61,7 +61,7 @@ struct MultiArgs { __INT64_TYPE__ a, b;}; // Truncation to i64 is permissible, since alignments of greater than 2^64 are insane. __INT32_TYPE__ *m3(struct Empty s, __int128_t i) __attribute__((alloc_align(2))); __INT32_TYPE__ test5(__int128_t a) { -// CHECK: define i32 @test5 +// CHECK: define dso_local i32 @test5 struct Empty e; return *m3(e, a); // CHECK: call i32* @m3(i64 %{{.*}}, i64 %{{.*}}) @@ -75,7 +75,7 @@ __INT32_TYPE__ test5(__int128_t a) { // Struct parameter takes up 2 parameters, 'i' takes up 2. __INT32_TYPE__ *m4(struct MultiArgs s, __int128_t i) __attribute__((alloc_align(2))); __INT32_TYPE__ test6(__int128_t a) { -// CHECK: define i32 @test6 +// CHECK: define dso_local i32 @test6 struct MultiArgs e; return *m4(e, a); // CHECK: call i32* @m4(i64 %{{.*}}, i64 %{{.*}}, i64 %{{.*}}) diff --git a/clang/test/CodeGen/altivec.c b/clang/test/CodeGen/altivec.c index a4d38fa23b75..79bec48d0032 100644 --- a/clang/test/CodeGen/altivec.c +++ b/clang/test/CodeGen/altivec.c @@ -2,16 +2,16 @@ // Check initialization -vector int test0 = (vector int)(1); // CHECK: @test0 = global <4 x i32> <i32 1, i32 1, i32 1, i32 1> -vector float test1 = (vector float)(1.0); // CHECK: @test1 = global <4 x float> <float 1.000000e+{{0+}}, float 1.000000e+{{0+}}, float 1.000000e+{{0+}}, float 1.000000e+{{0+}}> +vector int test0 = (vector int)(1); // CHECK: @test0 = dso_local global <4 x i32> <i32 1, i32 1, i32 1, i32 1> +vector float test1 = (vector float)(1.0); // CHECK: @test1 = dso_local global <4 x float> <float 1.000000e+{{0+}}, float 1.000000e+{{0+}}, float 1.000000e+{{0+}}, float 1.000000e+{{0+}}> -// CHECK: @v1 = global <16 x i8> <i8 0, i8 0, i8 0, i8 1, i8 0, i8 0, i8 0, i8 2, i8 0, i8 0, i8 0, i8 3, i8 0, i8 0, i8 0, i8 4> +// CHECK: @v1 = dso_local global <16 x i8> <i8 0, i8 0, i8 0, i8 1, i8 0, i8 0, i8 0, i8 2, i8 0, i8 0, i8 0, i8 3, i8 0, i8 0, i8 0, i8 4> vector char v1 = (vector char)((vector int)(1, 2, 3, 4)); -// CHECK: @v2 = global <16 x i8> <i8 63, i8 -128, i8 0, i8 0, i8 64, i8 0, i8 0, i8 0, i8 64, i8 64, i8 0, i8 0, i8 64, i8 -128, i8 0, i8 0> +// CHECK: @v2 = dso_local global <16 x i8> <i8 63, i8 -128, i8 0, i8 0, i8 64, i8 0, i8 0, i8 0, i8 64, i8 64, i8 0, i8 0, i8 64, i8 -128, i8 0, i8 0> vector char v2 = (vector char)((vector float)(1.0f, 2.0f, 3.0f, 4.0f)); -// CHECK: @v3 = global <16 x i8> <i8 0, i8 0, i8 0, i8 97, i8 0, i8 0, i8 0, i8 98, i8 0, i8 0, i8 0, i8 99, i8 0, i8 0, i8 0, i8 100> +// CHECK: @v3 = dso_local global <16 x i8> <i8 0, i8 0, i8 0, i8 97, i8 0, i8 0, i8 0, i8 98, i8 0, i8 0, i8 0, i8 99, i8 0, i8 0, i8 0, i8 100> vector char v3 = (vector char)((vector int)('a', 'b', 'c', 'd')); -// CHECK: @v4 = global <4 x i32> <i32 16909060, i32 0, i32 0, i32 0> +// CHECK: @v4 = dso_local global <4 x i32> <i32 16909060, i32 0, i32 0, i32 0> vector int v4 = (vector char){1, 2, 3, 4}; void test2() diff --git a/clang/test/CodeGen/arc/arguments.c b/clang/test/CodeGen/arc/arguments.c index fdc6037da730..ac5f9bce4864 100644 --- a/clang/test/CodeGen/arc/arguments.c +++ b/clang/test/CodeGen/arc/arguments.c @@ -3,26 +3,26 @@ // Basic argument tests for ARC. -// CHECK: define void @f0(i32 inreg %i, i32 inreg %j, i64 inreg %k) +// CHECK: define dso_local void @f0(i32 inreg %i, i32 inreg %j, i64 inreg %k) void f0(int i, long j, long long k) {} typedef struct { int aa; int bb; } s1; -// CHECK: define void @f1(i32 inreg %i.coerce0, i32 inreg %i.coerce1) +// CHECK: define dso_local void @f1(i32 inreg %i.coerce0, i32 inreg %i.coerce1) void f1(s1 i) {} typedef struct { char aa; char bb; char cc; char dd; } cs1; -// CHECK: define void @cf1(i32 inreg %i.coerce) +// CHECK: define dso_local void @cf1(i32 inreg %i.coerce) void cf1(cs1 i) {} typedef struct { int cc; } s2; -// CHECK: define void @f2(%struct.s2* noalias sret %agg.result) +// CHECK: define dso_local void @f2(%struct.s2* noalias sret %agg.result) s2 f2() { s2 foo; return foo; @@ -32,19 +32,19 @@ typedef struct { int cc; int dd; } s3; -// CHECK: define void @f3(%struct.s3* noalias sret %agg.result) +// CHECK: define dso_local void @f3(%struct.s3* noalias sret %agg.result) s3 f3() { s3 foo; return foo; } -// CHECK: define void @f4(i64 inreg %i) +// CHECK: define dso_local void @f4(i64 inreg %i) void f4(long long i) {} -// CHECK: define void @f5(i8 inreg signext %a, i16 inreg signext %b) +// CHECK: define dso_local void @f5(i8 inreg signext %a, i16 inreg signext %b) void f5(signed char a, short b) {} -// CHECK: define void @f6(i8 inreg zeroext %a, i16 inreg zeroext %b) +// CHECK: define dso_local void @f6(i8 inreg zeroext %a, i16 inreg zeroext %b) void f6(unsigned char a, unsigned short b) {} enum my_enum { @@ -53,14 +53,14 @@ enum my_enum { ENUM3, }; // Enums should be treated as the underlying i32. -// CHECK: define void @f7(i32 inreg %a) +// CHECK: define dso_local void @f7(i32 inreg %a) void f7(enum my_enum a) {} enum my_big_enum { ENUM4 = 0xFFFFFFFFFFFFFFFF, }; // Big enums should be treated as the underlying i64. -// CHECK: define void @f8(i64 inreg %a) +// CHECK: define dso_local void @f8(i64 inreg %a) void f8(enum my_big_enum a) {} union simple_union { @@ -68,7 +68,7 @@ union simple_union { char b; }; // Unions should be passed inreg. -// CHECK: define void @f9(i32 inreg %s.coerce) +// CHECK: define dso_local void @f9(i32 inreg %s.coerce) void f9(union simple_union s) {} typedef struct { @@ -77,35 +77,35 @@ typedef struct { int b8 : 8; } bitfield1; // Bitfields should be passed inreg. -// CHECK: define void @f10(i32 inreg %bf1.coerce) +// CHECK: define dso_local void @f10(i32 inreg %bf1.coerce) void f10(bitfield1 bf1) {} -// CHECK: define inreg { float, float } @cplx1(float inreg %r) +// CHECK: define dso_local inreg { float, float } @cplx1(float inreg %r) _Complex float cplx1(float r) { return r + 2.0fi; } -// CHECK: define inreg { double, double } @cplx2(double inreg %r) +// CHECK: define dso_local inreg { double, double } @cplx2(double inreg %r) _Complex double cplx2(double r) { return r + 2.0i; } -// CHECK: define inreg { i32, i32 } @cplx3(i32 inreg %r) +// CHECK: define dso_local inreg { i32, i32 } @cplx3(i32 inreg %r) _Complex int cplx3(int r) { return r + 2i; } -// CHECK: define inreg { i64, i64 } @cplx4(i64 inreg %r) +// CHECK: define dso_local inreg { i64, i64 } @cplx4(i64 inreg %r) _Complex long long cplx4(long long r) { return r + 2i; } -// CHECK: define inreg { i8, i8 } @cplx6(i8 inreg signext %r) +// CHECK: define dso_local inreg { i8, i8 } @cplx6(i8 inreg signext %r) _Complex signed char cplx6(signed char r) { return r + 2i; } -// CHECK: define inreg { i16, i16 } @cplx7(i16 inreg signext %r) +// CHECK: define dso_local inreg { i16, i16 } @cplx7(i16 inreg signext %r) _Complex short cplx7(short r) { return r + 2i; } @@ -120,16 +120,16 @@ typedef struct { // Use 16-byte struct 2 times, gets 8 registers. void st2(s16 a, s16 b) {} -// CHECK: define void @st2(i32 inreg %a.coerce0, i32 inreg %a.coerce1, i32 inreg %a.coerce2, i32 inreg %a.coerce3, i32 inreg %b.coerce0, i32 inreg %b.coerce1, i32 inreg %b.coerce2, i32 inreg %b.coerce3) +// CHECK: define dso_local void @st2(i32 inreg %a.coerce0, i32 inreg %a.coerce1, i32 inreg %a.coerce2, i32 inreg %a.coerce3, i32 inreg %b.coerce0, i32 inreg %b.coerce1, i32 inreg %b.coerce2, i32 inreg %b.coerce3) // Use 8-byte struct 3 times, gets 8 registers, 1 byval struct argument. void st3(s16 a, s16 b, s16 c) {} -// CHECK: define void @st3(i32 inreg %a.coerce0, i32 inreg %a.coerce1, i32 inreg %a.coerce2, i32 inreg %a.coerce3, i32 inreg %b.coerce0, i32 inreg %b.coerce1, i32 inreg %b.coerce2, i32 inreg %b.coerce3, { i32, i32, i32, i32 } %c.coerce) +// CHECK: define dso_local void @st3(i32 inreg %a.coerce0, i32 inreg %a.coerce1, i32 inreg %a.coerce2, i32 inreg %a.coerce3, i32 inreg %b.coerce0, i32 inreg %b.coerce1, i32 inreg %b.coerce2, i32 inreg %b.coerce3, { i32, i32, i32, i32 } %c.coerce) // 1 sret + 1 i32 + 2*(i32 coerce) + 4*(i32 coerce) + 1 byval s16 st4(int x, s8 a, s16 b, s16 c) { return b; } -// CHECK: define void @st4(%struct.s16* noalias sret %agg.result, i32 inreg %x, i32 inreg %a.coerce0, i32 inreg %a.coerce1, i32 inreg %b.coerce0, i32 inreg %b.coerce1, i32 inreg %b.coerce2, i32 inreg %b.coerce3, { i32, i32, i32, i32 } %c.coerce) +// CHECK: define dso_local void @st4(%struct.s16* noalias sret %agg.result, i32 inreg %x, i32 inreg %a.coerce0, i32 inreg %a.coerce1, i32 inreg %b.coerce0, i32 inreg %b.coerce1, i32 inreg %b.coerce2, i32 inreg %b.coerce3, { i32, i32, i32, i32 } %c.coerce) // 1 sret + 2*(i32 coerce) + 4*(i32 coerce) + 4*(i32 coerce) s16 st5(s8 a, s16 b, s16 c) { return b; } -// CHECK: define void @st5(%struct.s16* noalias sret %agg.result, i32 inreg %a.coerce0, i32 inreg %a.coerce1, i32 inreg %b.coerce0, i32 inreg %b.coerce1, i32 inreg %b.coerce2, i32 inreg %b.coerce3, { i32, i32, i32, i32 } %c.coerce) +// CHECK: define dso_local void @st5(%struct.s16* noalias sret %agg.result, i32 inreg %a.coerce0, i32 inreg %a.coerce1, i32 inreg %b.coerce0, i32 inreg %b.coerce1, i32 inreg %b.coerce2, i32 inreg %b.coerce3, { i32, i32, i32, i32 } %c.coerce) diff --git a/clang/test/CodeGen/arc/struct-align.c b/clang/test/CodeGen/arc/struct-align.c index 2aa7e7fc47ee..70b701426887 100644 --- a/clang/test/CodeGen/arc/struct-align.c +++ b/clang/test/CodeGen/arc/struct-align.c @@ -8,7 +8,7 @@ typedef struct { double bb; } s1; -// CHECK: define i32 @f1 +// CHECK: define dso_local i32 @f1 // CHECK: ret i32 12 int f1() { return sizeof(s1); @@ -18,7 +18,7 @@ typedef struct { int aa; long long bb; } s2; -// CHECK: define i32 @f2 +// CHECK: define dso_local i32 @f2 // CHECK: ret i32 12 int f2() { return sizeof(s2); diff --git a/clang/test/CodeGen/arm-aapcs-vfp.c b/clang/test/CodeGen/arm-aapcs-vfp.c index 69581fcab247..4f6fb0165f5d 100644 --- a/clang/test/CodeGen/arm-aapcs-vfp.c +++ b/clang/test/CodeGen/arm-aapcs-vfp.c @@ -114,7 +114,7 @@ void test_neon(struct neon_struct arg) { neon_callee(arg); } -// CHECK-LABEL: define arm_aapcs_vfpcc void @f33(%struct.s33* byval(%struct.s33) align 4 %s) +// CHECK-LABEL: define dso_local arm_aapcs_vfpcc void @f33(%struct.s33* byval(%struct.s33) align 4 %s) struct s33 { char buf[32*32]; }; void f33(struct s33 s) { } diff --git a/clang/test/CodeGen/arm-cc.c b/clang/test/CodeGen/arm-cc.c index b506834d1506..96c274e1c574 100644 --- a/clang/test/CodeGen/arm-cc.c +++ b/clang/test/CodeGen/arm-cc.c @@ -12,11 +12,11 @@ // DARWIN-APCS: call void @g // DARWIN-AAPCS-LABEL: define arm_aapcscc void @f() // DARWIN-AAPCS: call arm_aapcscc void @g -// LINUX-APCS-LABEL: define arm_apcscc void @f() +// LINUX-APCS-LABEL: define dso_local arm_apcscc void @f() // LINUX-APCS: call arm_apcscc void @g -// LINUX-AAPCS-LABEL: define void @f() +// LINUX-AAPCS-LABEL: define dso_local void @f() // LINUX-AAPCS: call void @g -// BAREMETAL-AAPCS_VFP-LABEL: define void @f() +// BAREMETAL-AAPCS_VFP-LABEL: define dso_local void @f() // BAREMETAL-AAPCS_VFP: call void @g // BAREMETAL-AAPCS_VFP: declare void @g() void g(void); diff --git a/clang/test/CodeGen/arm-float-helpers.c b/clang/test/CodeGen/arm-float-helpers.c index b2e65805cc7c..abe9274a0252 100644 --- a/clang/test/CodeGen/arm-float-helpers.c +++ b/clang/test/CodeGen/arm-float-helpers.c @@ -32,192 +32,192 @@ // other runtime functions such as the _Complex helper routines are not covered. float fadd(float a, float b) { return a + b; } -// CHECK-LABEL: define float @fadd(float %a, float %b) +// CHECK-LABEL: define dso_local float @fadd(float %a, float %b) // CHECK-NOT: __aeabi_fadd // CHECK: %add = fadd float {{.*}}, {{.*}} float fdiv(float a, float b) { return a / b; } -// CHECK-LABEL: define float @fdiv(float %a, float %b) +// CHECK-LABEL: define dso_local float @fdiv(float %a, float %b) // CHECK-NOT: __aeabi_fdiv // CHECK: %div = fdiv float {{.*}}, {{.*}} float fmul(float a, float b) { return a * b; } -// CHECK-LABEL: define float @fmul(float %a, float %b) +// CHECK-LABEL: define dso_local float @fmul(float %a, float %b) // CHECK-NOT: __aeabi_fmul // CHECK: %mul = fmul float {{.*}}, {{.*}} float fsub(float a, float b) { return a - b; } -// CHECK-LABEL: define float @fsub(float %a, float %b) +// CHECK-LABEL: define dso_local float @fsub(float %a, float %b) // CHECK-NOT: __aeabi_fsub // CHECK: %sub = fsub float {{.*}}, {{.*}} int fcmpeq(float a, float b) { return a == b; } -// CHECK-LABEL: define i32 @fcmpeq(float %a, float %b) +// CHECK-LABEL: define dso_local i32 @fcmpeq(float %a, float %b) // CHECK-NOT: __aeabi_fcmpeq // CHECK: %cmp = fcmp oeq float {{.*}}, {{.*}} int fcmplt(float a, float b) { return a < b; } -// CHECK-LABEL: define i32 @fcmplt(float %a, float %b) +// CHECK-LABEL: define dso_local i32 @fcmplt(float %a, float %b) // CHECK-NOT: __aeabi_fcmplt // CHECK: %cmp = fcmp olt float {{.*}}, {{.*}} int fcmple(float a, float b) { return a <= b; } -// CHECK-LABEL: define i32 @fcmple(float %a, float %b) +// CHECK-LABEL: define dso_local i32 @fcmple(float %a, float %b) // CHECK-NOT: __aeabi_fcmple // CHECK: %cmp = fcmp ole float {{.*}}, {{.*}} int fcmpge(float a, float b) { return a >= b; } -// CHECK-LABEL: define i32 @fcmpge(float %a, float %b) +// CHECK-LABEL: define dso_local i32 @fcmpge(float %a, float %b) // CHECK-NOT: __aeabi_fcmpge // CHECK: %cmp = fcmp oge float {{.*}}, {{.*}} int fcmpgt(float a, float b) { return a > b; } -// CHECK-LABEL: define i32 @fcmpgt(float %a, float %b) +// CHECK-LABEL: define dso_local i32 @fcmpgt(float %a, float %b) // CHECK-NOT: __aeabi_fcmpgt // CHECK: %cmp = fcmp ogt float {{.*}}, {{.*}} int fcmpun(float a, float b) { return __builtin_isunordered(a, b); } -// CHECK-LABEL: define i32 @fcmpun(float %a, float %b) +// CHECK-LABEL: define dso_local i32 @fcmpun(float %a, float %b) // CHECK-NOT: __aeabi_fcmpun // CHECK: %cmp = fcmp uno float {{.*}}, {{.*}} double dadd(double a, double b) { return a + b; } -// CHECK-LABEL: define double @dadd(double %a, double %b) +// CHECK-LABEL: define dso_local double @dadd(double %a, double %b) // CHECK-NOT: __aeabi_dadd // CHECK: %add = fadd double {{.*}}, {{.*}} double ddiv(double a, double b) { return a / b; } -// CHECK-LABEL: define double @ddiv(double %a, double %b) +// CHECK-LABEL: define dso_local double @ddiv(double %a, double %b) // CHECK-NOT: __aeabi_ddiv // CHECK: %div = fdiv double {{.*}}, {{.*}} double dmul(double a, double b) { return a * b; } -// CHECK-LABEL: define double @dmul(double %a, double %b) +// CHECK-LABEL: define dso_local double @dmul(double %a, double %b) // CHECK-NOT: __aeabi_dmul // CHECK: %mul = fmul double {{.*}}, {{.*}} double dsub(double a, double b) { return a - b; } -// CHECK-LABEL: define double @dsub(double %a, double %b) +// CHECK-LABEL: define dso_local double @dsub(double %a, double %b) // CHECK-NOT: __aeabi_dsub // CHECK: %sub = fsub double {{.*}}, {{.*}} int dcmpeq(double a, double b) { return a == b; } -// CHECK-LABEL: define i32 @dcmpeq(double %a, double %b) +// CHECK-LABEL: define dso_local i32 @dcmpeq(double %a, double %b) // CHECK-NOT: __aeabi_dcmpeq // CHECK: %cmp = fcmp oeq double {{.*}}, {{.*}} int dcmplt(double a, double b) { return a < b; } -// CHECK-LABEL: define i32 @dcmplt(double %a, double %b) +// CHECK-LABEL: define dso_local i32 @dcmplt(double %a, double %b) // CHECK-NOT: __aeabi_dcmplt // CHECK: %cmp = fcmp olt double {{.*}}, {{.*}} int dcmple(double a, double b) { return a <= b; } -// CHECK-LABEL: define i32 @dcmple(double %a, double %b) +// CHECK-LABEL: define dso_local i32 @dcmple(double %a, double %b) // CHECK-NOT: __aeabi_dcmple // CHECK: %cmp = fcmp ole double {{.*}}, {{.*}} int dcmpge(double a, double b) { return a >= b; } -// CHECK-LABEL: define i32 @dcmpge(double %a, double %b) +// CHECK-LABEL: define dso_local i32 @dcmpge(double %a, double %b) // CHECK-NOT: __aeabi_dcmpge // CHECK: %cmp = fcmp oge double {{.*}}, {{.*}} int dcmpgt(double a, double b) { return a > b; } -// CHECK-LABEL: define i32 @dcmpgt(double %a, double %b) +// CHECK-LABEL: define dso_local i32 @dcmpgt(double %a, double %b) // CHECK-NOT: __aeabi_dcmpgt // CHECK: %cmp = fcmp ogt double {{.*}}, {{.*}} int dcmpun(double a, double b) { return __builtin_isunordered(a, b); } -// CHECK-LABEL: define i32 @dcmpun(double %a, double %b) +// CHECK-LABEL: define dso_local i32 @dcmpun(double %a, double %b) // CHECK-NOT: __aeabi_dcmpun // CHECK: %cmp = fcmp uno double {{.*}}, {{.*}} int d2iz(double a) { return (int)a; } -// CHECK-LABEL: define i32 @d2iz(double %a) +// CHECK-LABEL: define dso_local i32 @d2iz(double %a) // CHECK-NOT: __aeabi_d2iz // CHECK: %conv = fptosi double {{.*}} to i32 unsigned int d2uiz(double a) { return (unsigned int)a; } -// CHECK-LABEL: define i32 @d2uiz(double %a) +// CHECK-LABEL: define dso_local i32 @d2uiz(double %a) // CHECK-NOT: __aeabi_d2uiz // CHECK: %conv = fptoui double {{.*}} to i32 long long d2lz(double a) { return (long long)a; } -// CHECK-LABEL: define i64 @d2lz(double %a) +// CHECK-LABEL: define dso_local i64 @d2lz(double %a) // CHECK-NOT: __aeabi_d2lz // CHECK: %conv = fptosi double {{.*}} to i64 unsigned long long d2ulz(double a) { return (unsigned long long)a; } -// CHECK-LABEL: define i64 @d2ulz(double %a) +// CHECK-LABEL: define dso_local i64 @d2ulz(double %a) // CHECK-NOT: __aeabi_d2ulz // CHECK: %conv = fptoui double {{.*}} to i64 int f2iz(float a) { return (int)a; } -// CHECK-LABEL: define i32 @f2iz(float %a) +// CHECK-LABEL: define dso_local i32 @f2iz(float %a) // CHECK-NOT: __aeabi_f2iz // CHECK: %conv = fptosi float {{.*}} to i32 unsigned int f2uiz(float a) { return (unsigned int)a; } -// CHECK-LABEL: define i32 @f2uiz(float %a) +// CHECK-LABEL: define dso_local i32 @f2uiz(float %a) // CHECK-NOT: __aeabi_f2uiz // CHECK: %conv = fptoui float {{.*}} to i32 long long f2lz(float a) { return (long long)a; } -// CHECK-LABEL: define i64 @f2lz(float %a) +// CHECK-LABEL: define dso_local i64 @f2lz(float %a) // CHECK-NOT: __aeabi_f2lz // CHECK: %conv = fptosi float {{.*}} to i64 unsigned long long f2ulz(float a) { return (unsigned long long)a; } -// CHECK-LABEL: define i64 @f2ulz(float %a) +// CHECK-LABEL: define dso_local i64 @f2ulz(float %a) // CHECK-NOT: __aeabi_f2ulz // CHECK: %conv = fptoui float {{.*}} to i64 float d2f(double a) { return (float)a; } -// CHECK-LABEL: define float @d2f(double %a) +// CHECK-LABEL: define dso_local float @d2f(double %a) // CHECK-NOT: __aeabi_d2f // CHECK: %conv = fptrunc double {{.*}} to float double f2d(float a) { return (double)a; } -// CHECK-LABEL: define double @f2d(float %a) +// CHECK-LABEL: define dso_local double @f2d(float %a) // CHECK-NOT: __aeabi_f2d // CHECK: %conv = fpext float {{.*}} to double double i2d(int a) { return (double)a; } -// CHECK-LABEL: define double @i2d(i32 %a) +// CHECK-LABEL: define dso_local double @i2d(i32 %a) // CHECK-NOT: __aeabi_i2d // CHECK: %conv = sitofp i32 {{.*}} to double double ui2d(unsigned int a) { return (double)a; } -// CHECK-LABEL: define double @ui2d(i32 %a) +// CHECK-LABEL: define dso_local double @ui2d(i32 %a) // CHECK-NOT: __aeabi_ui2d // CHECK: %conv = uitofp i32 {{.*}} to double double l2d(long long a) { return (double)a; } -// CHECK-LABEL: define double @l2d(i64 %a) +// CHECK-LABEL: define dso_local double @l2d(i64 %a) // CHECK-NOT: __aeabi_l2d // CHECK: %conv = sitofp i64 {{.*}} to double double ul2d(unsigned long long a) { return (unsigned long long)a; } -// CHECK-LABEL: define double @ul2d(i64 %a) +// CHECK-LABEL: define dso_local double @ul2d(i64 %a) // CHECK-NOT: __aeabi_ul2d // CHECK: %conv = uitofp i64 {{.*}} to double float i2f(int a) { return (int)a; } -// CHECK-LABEL: define float @i2f(i32 %a) +// CHECK-LABEL: define dso_local float @i2f(i32 %a) // CHECK-NOT: __aeabi_i2f // CHECK: %conv = sitofp i32 {{.*}} to float float ui2f(unsigned int a) { return (unsigned int)a; } -// CHECK-LABEL: define float @ui2f(i32 %a) +// CHECK-LABEL: define dso_local float @ui2f(i32 %a) // CHECK-NOT: __aeabi_ui2f // CHECK: %conv = uitofp i32 {{.*}} to float float l2f(long long a) { return (long long)a; } -// CHECK-LABEL: define float @l2f(i64 %a) +// CHECK-LABEL: define dso_local float @l2f(i64 %a) // CHECK-NOT: __aeabi_l2f // CHECK: %conv = sitofp i64 {{.*}} to float float ul2f(unsigned long long a) { return (unsigned long long)a; } -// CHECK-LABEL: define float @ul2f(i64 %a) +// CHECK-LABEL: define dso_local float @ul2f(i64 %a) // CHECK-NOT: __aeabi_ul2f // CHECK: %conv = uitofp i64 {{.*}} to float diff --git a/clang/test/CodeGen/arm-fp16-arguments.c b/clang/test/CodeGen/arm-fp16-arguments.c index 34dc1a1cbf6a..aec1fb289bad 100644 --- a/clang/test/CodeGen/arm-fp16-arguments.c +++ b/clang/test/CodeGen/arm-fp16-arguments.c @@ -5,19 +5,19 @@ __fp16 g; void t1(__fp16 a) { g = a; } -// SOFT: define void @t1(i32 [[PARAM:%.*]]) +// SOFT: define dso_local void @t1(i32 [[PARAM:%.*]]) // SOFT: [[TRUNC:%.*]] = trunc i32 [[PARAM]] to i16 -// HARD: define arm_aapcs_vfpcc void @t1(float [[PARAM:%.*]]) +// HARD: define dso_local arm_aapcs_vfpcc void @t1(float [[PARAM:%.*]]) // HARD: [[BITCAST:%.*]] = bitcast float [[PARAM]] to i32 // HARD: [[TRUNC:%.*]] = trunc i32 [[BITCAST]] to i16 // CHECK: store i16 [[TRUNC]], i16* bitcast (half* @g to i16*) -// NATIVE: define void @t1(half [[PARAM:%.*]]) +// NATIVE: define dso_local void @t1(half [[PARAM:%.*]]) // NATIVE: store half [[PARAM]], half* @g __fp16 t2() { return g; } -// SOFT: define i32 @t2() -// HARD: define arm_aapcs_vfpcc float @t2() -// NATIVE: define half @t2() +// SOFT: define dso_local i32 @t2() +// HARD: define dso_local arm_aapcs_vfpcc float @t2() +// NATIVE: define dso_local half @t2() // CHECK: [[LOAD:%.*]] = load i16, i16* bitcast (half* @g to i16*) // CHECK: [[ZEXT:%.*]] = zext i16 [[LOAD]] to i32 // SOFT: ret i32 [[ZEXT]] @@ -29,19 +29,19 @@ __fp16 t2() { return g; } _Float16 h; void t3(_Float16 a) { h = a; } -// SOFT: define void @t3(i32 [[PARAM:%.*]]) +// SOFT: define dso_local void @t3(i32 [[PARAM:%.*]]) // SOFT: [[TRUNC:%.*]] = trunc i32 [[PARAM]] to i16 -// HARD: define arm_aapcs_vfpcc void @t3(float [[PARAM:%.*]]) +// HARD: define dso_local arm_aapcs_vfpcc void @t3(float [[PARAM:%.*]]) // HARD: [[BITCAST:%.*]] = bitcast float [[PARAM]] to i32 // HARD: [[TRUNC:%.*]] = trunc i32 [[BITCAST]] to i16 // CHECK: store i16 [[TRUNC]], i16* bitcast (half* @h to i16*) -// NATIVE: define void @t3(half [[PARAM:%.*]]) +// NATIVE: define dso_local void @t3(half [[PARAM:%.*]]) // NATIVE: store half [[PARAM]], half* @h _Float16 t4() { return h; } -// SOFT: define i32 @t4() -// HARD: define arm_aapcs_vfpcc float @t4() -// NATIVE: define half @t4() +// SOFT: define dso_local i32 @t4() +// HARD: define dso_local arm_aapcs_vfpcc float @t4() +// NATIVE: define dso_local half @t4() // CHECK: [[LOAD:%.*]] = load i16, i16* bitcast (half* @h to i16*) // CHECK: [[ZEXT:%.*]] = zext i16 [[LOAD]] to i32 // SOFT: ret i32 [[ZEXT]] diff --git a/clang/test/CodeGen/arm-homogenous.c b/clang/test/CodeGen/arm-homogenous.c index 42a9bc1c1643..b2fd95be09e7 100644 --- a/clang/test/CodeGen/arm-homogenous.c +++ b/clang/test/CodeGen/arm-homogenous.c @@ -223,7 +223,7 @@ struct_of_double_and_long_double g_dld; struct_of_double_and_long_double test_struct_of_double_and_long_double(void) { return g_dld; } -// CHECK: define arm_aapcs_vfpcc %struct.struct_of_double_and_long_double @test_struct_of_double_and_long_double() +// CHECK: define dso_local arm_aapcs_vfpcc %struct.struct_of_double_and_long_double @test_struct_of_double_and_long_double() // FIXME: Tests necessary: // - Vectors diff --git a/clang/test/CodeGen/arm-neon-directed-rounding.c b/clang/test/CodeGen/arm-neon-directed-rounding.c index 5119f9dbf413..3b049280e667 100644 --- a/clang/test/CodeGen/arm-neon-directed-rounding.c +++ b/clang/test/CodeGen/arm-neon-directed-rounding.c @@ -7,7 +7,7 @@ #include <arm_neon.h> -// CHECK-LABEL: define <2 x float> @test_vrnda_f32(<2 x float> %a) +// CHECK-LABEL: define dso_local <2 x float> @test_vrnda_f32(<2 x float> %a) // CHECK-A32: [[VRNDA_V1_I:%.*]] = call <2 x float> @llvm.arm.neon.vrinta.v2f32(<2 x float> %a) // CHECK-A64: [[VRNDA_V1_I:%.*]] = call <2 x float> @llvm.round.v2f32(<2 x float> %a) // CHECK: ret <2 x float> [[VRNDA_V1_I]] @@ -15,7 +15,7 @@ float32x2_t test_vrnda_f32(float32x2_t a) { return vrnda_f32(a); } -// CHECK-LABEL: define <4 x float> @test_vrndaq_f32(<4 x float> %a) +// CHECK-LABEL: define dso_local <4 x float> @test_vrndaq_f32(<4 x float> %a) // CHECK-A32: [[VRNDAQ_V1_I:%.*]] = call <4 x float> @llvm.arm.neon.vrinta.v4f32(<4 x float> %a) // CHECK-A64: [[VRNDAQ_V1_I:%.*]] = call <4 x float> @llvm.round.v4f32(<4 x float> %a) // CHECK: ret <4 x float> [[VRNDAQ_V1_I]] @@ -23,7 +23,7 @@ float32x4_t test_vrndaq_f32(float32x4_t a) { return vrndaq_f32(a); } -// CHECK-LABEL: define <2 x float> @test_vrndm_f32(<2 x float> %a) +// CHECK-LABEL: define dso_local <2 x float> @test_vrndm_f32(<2 x float> %a) // CHECK-A32: [[VRNDM_V1_I:%.*]] = call <2 x float> @llvm.arm.neon.vrintm.v2f32(<2 x float> %a) // CHECK-A64: [[VRNDM_V1_I:%.*]] = call <2 x float> @llvm.floor.v2f32(<2 x float> %a) // CHECK: ret <2 x float> [[VRNDM_V1_I]] @@ -31,7 +31,7 @@ float32x2_t test_vrndm_f32(float32x2_t a) { return vrndm_f32(a); } -// CHECK-LABEL: define <4 x float> @test_vrndmq_f32(<4 x float> %a) +// CHECK-LABEL: define dso_local <4 x float> @test_vrndmq_f32(<4 x float> %a) // CHECK-A32: [[VRNDMQ_V1_I:%.*]] = call <4 x float> @llvm.arm.neon.vrintm.v4f32(<4 x float> %a) // CHECK-A64: [[VRNDMQ_V1_I:%.*]] = call <4 x float> @llvm.floor.v4f32(<4 x float> %a) // CHECK: ret <4 x float> [[VRNDMQ_V1_I]] @@ -39,7 +39,7 @@ float32x4_t test_vrndmq_f32(float32x4_t a) { return vrndmq_f32(a); } -// CHECK-LABEL: define <2 x float> @test_vrndn_f32(<2 x float> %a) +// CHECK-LABEL: define dso_local <2 x float> @test_vrndn_f32(<2 x float> %a) // CHECK-A32: [[VRNDN_V1_I:%.*]] = call <2 x float> @llvm.arm.neon.vrintn.v2f32(<2 x float> %a) // CHECK-A64: [[VRNDN_V1_I:%.*]] = call <2 x float> @llvm.aarch64.neon.frintn.v2f32(<2 x float> %a) // CHECK: ret <2 x float> [[VRNDN_V1_I]] @@ -47,7 +47,7 @@ float32x2_t test_vrndn_f32(float32x2_t a) { return vrndn_f32(a); } -// CHECK-LABEL: define <4 x float> @test_vrndnq_f32(<4 x float> %a) +// CHECK-LABEL: define dso_local <4 x float> @test_vrndnq_f32(<4 x float> %a) // CHECK-A32: [[VRNDNQ_V1_I:%.*]] = call <4 x float> @llvm.arm.neon.vrintn.v4f32(<4 x float> %a) // CHECK-A64: [[VRNDNQ_V1_I:%.*]] = call <4 x float> @llvm.aarch64.neon.frintn.v4f32(<4 x float> %a) // CHECK: ret <4 x float> [[VRNDNQ_V1_I]] @@ -55,7 +55,7 @@ float32x4_t test_vrndnq_f32(float32x4_t a) { return vrndnq_f32(a); } -// CHECK-LABEL: define <2 x float> @test_vrndp_f32(<2 x float> %a) +// CHECK-LABEL: define dso_local <2 x float> @test_vrndp_f32(<2 x float> %a) // CHECK-A32: [[VRNDP_V1_I:%.*]] = call <2 x float> @llvm.arm.neon.vrintp.v2f32(<2 x float> %a) // CHECK-A64: [[VRNDP_V1_I:%.*]] = call <2 x float> @llvm.ceil.v2f32(<2 x float> %a) // CHECK: ret <2 x float> [[VRNDP_V1_I]] @@ -63,7 +63,7 @@ float32x2_t test_vrndp_f32(float32x2_t a) { return vrndp_f32(a); } -// CHECK-LABEL: define <4 x float> @test_vrndpq_f32(<4 x float> %a) +// CHECK-LABEL: define dso_local <4 x float> @test_vrndpq_f32(<4 x float> %a) // CHECK-A32: [[VRNDPQ_V1_I:%.*]] = call <4 x float> @llvm.arm.neon.vrintp.v4f32(<4 x float> %a) // CHECK-A64: [[VRNDPQ_V1_I:%.*]] = call <4 x float> @llvm.ceil.v4f32(<4 x float> %a) // CHECK: ret <4 x float> [[VRNDPQ_V1_I]] @@ -71,7 +71,7 @@ float32x4_t test_vrndpq_f32(float32x4_t a) { return vrndpq_f32(a); } -// CHECK-LABEL: define <2 x float> @test_vrndx_f32(<2 x float> %a) +// CHECK-LABEL: define dso_local <2 x float> @test_vrndx_f32(<2 x float> %a) // CHECK-A32: [[VRNDX_V1_I:%.*]] = call <2 x float> @llvm.arm.neon.vrintx.v2f32(<2 x float> %a) // CHECK-A64: [[VRNDX_V1_I:%.*]] = call <2 x float> @llvm.rint.v2f32(<2 x float> %a) // CHECK: ret <2 x float> [[VRNDX_V1_I]] @@ -79,7 +79,7 @@ float32x2_t test_vrndx_f32(float32x2_t a) { return vrndx_f32(a); } -// CHECK-LABEL: define <4 x float> @test_vrndxq_f32(<4 x float> %a) +// CHECK-LABEL: define dso_local <4 x float> @test_vrndxq_f32(<4 x float> %a) // CHECK-A32: [[VRNDXQ_V1_I:%.*]] = call <4 x float> @llvm.arm.neon.vrintx.v4f32(<4 x float> %a) // CHECK-A64: [[VRNDXQ_V1_I:%.*]] = call <4 x float> @llvm.rint.v4f32(<4 x float> %a) // CHECK: ret <4 x float> [[VRNDXQ_V1_I]] @@ -87,7 +87,7 @@ float32x4_t test_vrndxq_f32(float32x4_t a) { return vrndxq_f32(a); } -// CHECK-LABEL: define <2 x float> @test_vrnd_f32(<2 x float> %a) +// CHECK-LABEL: define dso_local <2 x float> @test_vrnd_f32(<2 x float> %a) // CHECK-A32: [[VRND_V1_I:%.*]] = call <2 x float> @llvm.arm.neon.vrintz.v2f32(<2 x float> %a) // CHECK-A64: [[VRND_V1_I:%.*]] = call <2 x float> @llvm.trunc.v2f32(<2 x float> %a) // CHECK: ret <2 x float> [[VRND_V1_I]] @@ -95,7 +95,7 @@ float32x2_t test_vrnd_f32(float32x2_t a) { return vrnd_f32(a); } -// CHECK-LABEL: define <4 x float> @test_vrndq_f32(<4 x float> %a) +// CHECK-LABEL: define dso_local <4 x float> @test_vrndq_f32(<4 x float> %a) // CHECK-A32: [[VRNDQ_V1_I:%.*]] = call <4 x float> @llvm.arm.neon.vrintz.v4f32(<4 x float> %a) // CHECK-A64: [[VRNDQ_V1_I:%.*]] = call <4 x float> @llvm.trunc.v4f32(<4 x float> %a) // CHECK: ret <4 x float> [[VRNDQ_V1_I]] @@ -103,7 +103,7 @@ float32x4_t test_vrndq_f32(float32x4_t a) { return vrndq_f32(a); } -// CHECK-LABEL: define float @test_vrndns_f32(float %a) +// CHECK-LABEL: define dso_local float @test_vrndns_f32(float %a) // CHECK-A32: [[VRNDN_I:%.*]] = call float @llvm.arm.neon.vrintn.f32(float %a) // CHECK-A64: [[VRNDN_I:%.*]] = call float @llvm.aarch64.neon.frintn.f32(float %a) // CHECK: ret float [[VRNDN_I]] @@ -111,7 +111,7 @@ float32_t test_vrndns_f32(float32_t a) { return vrndns_f32(a); } -// CHECK-LABEL: define <2 x float> @test_vrndi_f32(<2 x float> %a) +// CHECK-LABEL: define dso_local <2 x float> @test_vrndi_f32(<2 x float> %a) // CHECK: [[TMP0:%.*]] = bitcast <2 x float> %a to <8 x i8> // CHECK: [[VRNDI1_I:%.*]] = call <2 x float> @llvm.nearbyint.v2f32(<2 x float> %a) // CHECK: ret <2 x float> [[VRNDI1_I]] @@ -119,7 +119,7 @@ float32x2_t test_vrndi_f32(float32x2_t a) { return vrndi_f32(a); } -// CHECK-LABEL: define <4 x float> @test_vrndiq_f32(<4 x float> %a) +// CHECK-LABEL: define dso_local <4 x float> @test_vrndiq_f32(<4 x float> %a) // CHECK: [[TMP0:%.*]] = bitcast <4 x float> %a to <16 x i8> // CHECK: [[VRNDI1_I:%.*]] = call <4 x float> @llvm.nearbyint.v4f32(<4 x float> %a) // CHECK: ret <4 x float> [[VRNDI1_I]] diff --git a/clang/test/CodeGen/arm-neon-dot-product.c b/clang/test/CodeGen/arm-neon-dot-product.c index 34acd02c61c6..9ac280c69168 100644 --- a/clang/test/CodeGen/arm-neon-dot-product.c +++ b/clang/test/CodeGen/arm-neon-dot-product.c @@ -8,35 +8,35 @@ #include <arm_neon.h> uint32x2_t test_vdot_u32(uint32x2_t a, uint8x8_t b, uint8x8_t c) { -// CHECK-LABEL: define <2 x i32> @test_vdot_u32(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) +// CHECK-LABEL: define dso_local <2 x i32> @test_vdot_u32(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) // CHECK: [[RESULT:%.*]] = call <2 x i32> @llvm.arm.neon.udot.v2i32.v8i8(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) // CHECK: ret <2 x i32> [[RESULT]] return vdot_u32(a, b, c); } uint32x4_t test_vdotq_u32(uint32x4_t a, uint8x16_t b, uint8x16_t c) { -// CHECK-LABEL: define <4 x i32> @test_vdotq_u32(<4 x i32> %a, <16 x i8> %b, <16 x i8> %c) +// CHECK-LABEL: define dso_local <4 x i32> @test_vdotq_u32(<4 x i32> %a, <16 x i8> %b, <16 x i8> %c) // CHECK: [[RESULT:%.*]] = call <4 x i32> @llvm.arm.neon.udot.v4i32.v16i8(<4 x i32> %a, <16 x i8> %b, <16 x i8> %c) // CHECK: ret <4 x i32> [[RESULT]] return vdotq_u32(a, b, c); } int32x2_t test_vdot_s32(int32x2_t a, int8x8_t b, int8x8_t c) { -// CHECK-LABEL: define <2 x i32> @test_vdot_s32(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) +// CHECK-LABEL: define dso_local <2 x i32> @test_vdot_s32(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) // CHECK: [[RESULT:%.*]] = call <2 x i32> @llvm.arm.neon.sdot.v2i32.v8i8(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) // CHECK: ret <2 x i32> [[RESULT]] return vdot_s32(a, b, c); } int32x4_t test_vdotq_s32(int32x4_t a, int8x16_t b, int8x16_t c) { -// CHECK-LABEL: define <4 x i32> @test_vdotq_s32(<4 x i32> %a, <16 x i8> %b, <16 x i8> %c) +// CHECK-LABEL: define dso_local <4 x i32> @test_vdotq_s32(<4 x i32> %a, <16 x i8> %b, <16 x i8> %c) // CHECK: [[RESULT:%.*]] = call <4 x i32> @llvm.arm.neon.sdot.v4i32.v16i8(<4 x i32> %a, <16 x i8> %b, <16 x i8> %c) // CHECK: ret <4 x i32> [[RESULT]] return vdotq_s32(a, b, c); } uint32x2_t test_vdot_lane_u32(uint32x2_t a, uint8x8_t b, uint8x8_t c) { -// CHECK-LABEL: define <2 x i32> @test_vdot_lane_u32(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) +// CHECK-LABEL: define dso_local <2 x i32> @test_vdot_lane_u32(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) // CHECK: [[CAST1:%.*]] = bitcast <8 x i8> %c to <2 x i32> // CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x i32> [[CAST1]], <2 x i32> undef, <2 x i32> <i32 1, i32 1> // CHECK: [[CAST2:%.*]] = bitcast <2 x i32> [[SHUFFLE]] to <8 x i8> @@ -46,7 +46,7 @@ uint32x2_t test_vdot_lane_u32(uint32x2_t a, uint8x8_t b, uint8x8_t c) { } uint32x4_t test_vdotq_lane_u32(uint32x4_t a, uint8x16_t b, uint8x8_t c) { -// CHECK-LABEL: define <4 x i32> @test_vdotq_lane_u32(<4 x i32> %a, <16 x i8> %b, <8 x i8> %c) +// CHECK-LABEL: define dso_local <4 x i32> @test_vdotq_lane_u32(<4 x i32> %a, <16 x i8> %b, <8 x i8> %c) // CHECK: [[CAST1:%.*]] = bitcast <8 x i8> %c to <2 x i32> // CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x i32> [[CAST1]], <2 x i32> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> // CHECK: [[CAST2:%.*]] = bitcast <4 x i32> [[SHUFFLE]] to <16 x i8> @@ -56,7 +56,7 @@ uint32x4_t test_vdotq_lane_u32(uint32x4_t a, uint8x16_t b, uint8x8_t c) { } int32x2_t test_vdot_lane_s32(int32x2_t a, int8x8_t b, int8x8_t c) { -// CHECK-LABEL: define <2 x i32> @test_vdot_lane_s32(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) +// CHECK-LABEL: define dso_local <2 x i32> @test_vdot_lane_s32(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) // CHECK: [[CAST1:%.*]] = bitcast <8 x i8> %c to <2 x i32> // CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x i32> [[CAST1]], <2 x i32> undef, <2 x i32> <i32 1, i32 1> // CHECK: [[CAST2:%.*]] = bitcast <2 x i32> [[SHUFFLE]] to <8 x i8> @@ -66,7 +66,7 @@ int32x2_t test_vdot_lane_s32(int32x2_t a, int8x8_t b, int8x8_t c) { } int32x4_t test_vdotq_lane_s32(int32x4_t a, int8x16_t b, int8x8_t c) { -// CHECK-LABEL: define <4 x i32> @test_vdotq_lane_s32(<4 x i32> %a, <16 x i8> %b, <8 x i8> %c) +// CHECK-LABEL: define dso_local <4 x i32> @test_vdotq_lane_s32(<4 x i32> %a, <16 x i8> %b, <8 x i8> %c) // CHECK: [[CAST1:%.*]] = bitcast <8 x i8> %c to <2 x i32> // CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x i32> [[CAST1]], <2 x i32> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> // CHECK: [[CAST2:%.*]] = bitcast <4 x i32> [[SHUFFLE]] to <16 x i8> diff --git a/clang/test/CodeGen/arm-neon-fma.c b/clang/test/CodeGen/arm-neon-fma.c index 0d85c6b7567a..d204eedee32c 100644 --- a/clang/test/CodeGen/arm-neon-fma.c +++ b/clang/test/CodeGen/arm-neon-fma.c @@ -7,21 +7,21 @@ #include <arm_neon.h> -// CHECK-LABEL: define <2 x float> @test_fma_order(<2 x float> %accum, <2 x float> %lhs, <2 x float> %rhs) #0 { +// CHECK-LABEL: define dso_local <2 x float> @test_fma_order(<2 x float> %accum, <2 x float> %lhs, <2 x float> %rhs) #0 { // CHECK: [[TMP6:%.*]] = call <2 x float> @llvm.fma.v2f32(<2 x float> %lhs, <2 x float> %rhs, <2 x float> %accum) #3 // CHECK: ret <2 x float> [[TMP6]] float32x2_t test_fma_order(float32x2_t accum, float32x2_t lhs, float32x2_t rhs) { return vfma_f32(accum, lhs, rhs); } -// CHECK-LABEL: define <4 x float> @test_fmaq_order(<4 x float> %accum, <4 x float> %lhs, <4 x float> %rhs) #1 { +// CHECK-LABEL: define dso_local <4 x float> @test_fmaq_order(<4 x float> %accum, <4 x float> %lhs, <4 x float> %rhs) #1 { // CHECK: [[TMP6:%.*]] = call <4 x float> @llvm.fma.v4f32(<4 x float> %lhs, <4 x float> %rhs, <4 x float> %accum) #3 // CHECK: ret <4 x float> [[TMP6]] float32x4_t test_fmaq_order(float32x4_t accum, float32x4_t lhs, float32x4_t rhs) { return vfmaq_f32(accum, lhs, rhs); } -// CHECK-LABEL: define <2 x float> @test_vfma_n_f32(<2 x float> %a, <2 x float> %b, float %n) #0 { +// CHECK-LABEL: define dso_local <2 x float> @test_vfma_n_f32(<2 x float> %a, <2 x float> %b, float %n) #0 { // CHECK: [[VECINIT_I:%.*]] = insertelement <2 x float> undef, float %n, i32 0 // CHECK: [[VECINIT1_I:%.*]] = insertelement <2 x float> [[VECINIT_I]], float %n, i32 1 // CHECK: [[TMP1:%.*]] = bitcast <2 x float> %b to <8 x i8> @@ -32,7 +32,7 @@ float32x2_t test_vfma_n_f32(float32x2_t a, float32x2_t b, float32_t n) { return vfma_n_f32(a, b, n); } -// CHECK-LABEL: define <4 x float> @test_vfmaq_n_f32(<4 x float> %a, <4 x float> %b, float %n) #1 { +// CHECK-LABEL: define dso_local <4 x float> @test_vfmaq_n_f32(<4 x float> %a, <4 x float> %b, float %n) #1 { // CHECK: [[VECINIT_I:%.*]] = insertelement <4 x float> undef, float %n, i32 0 // CHECK: [[VECINIT1_I:%.*]] = insertelement <4 x float> [[VECINIT_I]], float %n, i32 1 // CHECK: [[VECINIT2_I:%.*]] = insertelement <4 x float> [[VECINIT1_I]], float %n, i32 2 diff --git a/clang/test/CodeGen/arm-neon-numeric-maxmin.c b/clang/test/CodeGen/arm-neon-numeric-maxmin.c index e844de7c81c3..d773a0dd0284 100644 --- a/clang/test/CodeGen/arm-neon-numeric-maxmin.c +++ b/clang/test/CodeGen/arm-neon-numeric-maxmin.c @@ -2,28 +2,28 @@ #include <arm_neon.h> -// CHECK-LABEL: define <2 x float> @test_vmaxnm_f32(<2 x float> %a, <2 x float> %b) #0 { +// CHECK-LABEL: define dso_local <2 x float> @test_vmaxnm_f32(<2 x float> %a, <2 x float> %b) #0 { // CHECK: [[VMAXNM_V2_I:%.*]] = call <2 x float> @llvm.arm.neon.vmaxnm.v2f32(<2 x float> %a, <2 x float> %b) #3 // CHECK: ret <2 x float> [[VMAXNM_V2_I]] float32x2_t test_vmaxnm_f32(float32x2_t a, float32x2_t b) { return vmaxnm_f32(a, b); } -// CHECK-LABEL: define <4 x float> @test_vmaxnmq_f32(<4 x float> %a, <4 x float> %b) #1 { +// CHECK-LABEL: define dso_local <4 x float> @test_vmaxnmq_f32(<4 x float> %a, <4 x float> %b) #1 { // CHECK: [[VMAXNMQ_V2_I:%.*]] = call <4 x float> @llvm.arm.neon.vmaxnm.v4f32(<4 x float> %a, <4 x float> %b) #3 // CHECK: ret <4 x float> [[VMAXNMQ_V2_I]] float32x4_t test_vmaxnmq_f32(float32x4_t a, float32x4_t b) { return vmaxnmq_f32(a, b); } -// CHECK-LABEL: define <2 x float> @test_vminnm_f32(<2 x float> %a, <2 x float> %b) #0 { +// CHECK-LABEL: define dso_local <2 x float> @test_vminnm_f32(<2 x float> %a, <2 x float> %b) #0 { // CHECK: [[VMINNM_V2_I:%.*]] = call <2 x float> @llvm.arm.neon.vminnm.v2f32(<2 x float> %a, <2 x float> %b) #3 // CHECK: ret <2 x float> [[VMINNM_V2_I]] float32x2_t test_vminnm_f32(float32x2_t a, float32x2_t b) { return vminnm_f32(a, b); } -// CHECK-LABEL: define <4 x float> @test_vminnmq_f32(<4 x float> %a, <4 x float> %b) #1 { +// CHECK-LABEL: define dso_local <4 x float> @test_vminnmq_f32(<4 x float> %a, <4 x float> %b) #1 { // CHECK: [[VMINNMQ_V2_I:%.*]] = call <4 x float> @llvm.arm.neon.vminnm.v4f32(<4 x float> %a, <4 x float> %b) #3 // CHECK: ret <4 x float> [[VMINNMQ_V2_I]] float32x4_t test_vminnmq_f32(float32x4_t a, float32x4_t b) { diff --git a/clang/test/CodeGen/arm-neon-vcvtX.c b/clang/test/CodeGen/arm-neon-vcvtX.c index 627c455d21e6..4160ddaa4c20 100644 --- a/clang/test/CodeGen/arm-neon-vcvtX.c +++ b/clang/test/CodeGen/arm-neon-vcvtX.c @@ -2,112 +2,112 @@ #include <arm_neon.h> -// CHECK-LABEL: define <2 x i32> @test_vcvta_s32_f32(<2 x float> %a) #0 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vcvta_s32_f32(<2 x float> %a) #0 { // CHECK: [[VCVTA_S32_V1_I:%.*]] = call <2 x i32> @llvm.arm.neon.vcvtas.v2i32.v2f32(<2 x float> %a) #3 // CHECK: ret <2 x i32> [[VCVTA_S32_V1_I]] int32x2_t test_vcvta_s32_f32(float32x2_t a) { return vcvta_s32_f32(a); } -// CHECK-LABEL: define <2 x i32> @test_vcvta_u32_f32(<2 x float> %a) #0 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vcvta_u32_f32(<2 x float> %a) #0 { // CHECK: [[VCVTA_U32_V1_I:%.*]] = call <2 x i32> @llvm.arm.neon.vcvtau.v2i32.v2f32(<2 x float> %a) #3 // CHECK: ret <2 x i32> [[VCVTA_U32_V1_I]] uint32x2_t test_vcvta_u32_f32(float32x2_t a) { return vcvta_u32_f32(a); } -// CHECK-LABEL: define <4 x i32> @test_vcvtaq_s32_f32(<4 x float> %a) #1 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vcvtaq_s32_f32(<4 x float> %a) #1 { // CHECK: [[VCVTAQ_S32_V1_I:%.*]] = call <4 x i32> @llvm.arm.neon.vcvtas.v4i32.v4f32(<4 x float> %a) #3 // CHECK: ret <4 x i32> [[VCVTAQ_S32_V1_I]] int32x4_t test_vcvtaq_s32_f32(float32x4_t a) { return vcvtaq_s32_f32(a); } -// CHECK-LABEL: define <4 x i32> @test_vcvtaq_u32_f32(<4 x float> %a) #1 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vcvtaq_u32_f32(<4 x float> %a) #1 { // CHECK: [[VCVTAQ_U32_V1_I:%.*]] = call <4 x i32> @llvm.arm.neon.vcvtau.v4i32.v4f32(<4 x float> %a) #3 // CHECK: ret <4 x i32> [[VCVTAQ_U32_V1_I]] uint32x4_t test_vcvtaq_u32_f32(float32x4_t a) { return vcvtaq_u32_f32(a); } -// CHECK-LABEL: define <2 x i32> @test_vcvtn_s32_f32(<2 x float> %a) #0 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vcvtn_s32_f32(<2 x float> %a) #0 { // CHECK: [[VCVTN_S32_V1_I:%.*]] = call <2 x i32> @llvm.arm.neon.vcvtns.v2i32.v2f32(<2 x float> %a) #3 // CHECK: ret <2 x i32> [[VCVTN_S32_V1_I]] int32x2_t test_vcvtn_s32_f32(float32x2_t a) { return vcvtn_s32_f32(a); } -// CHECK-LABEL: define <2 x i32> @test_vcvtn_u32_f32(<2 x float> %a) #0 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vcvtn_u32_f32(<2 x float> %a) #0 { // CHECK: [[VCVTN_U32_V1_I:%.*]] = call <2 x i32> @llvm.arm.neon.vcvtnu.v2i32.v2f32(<2 x float> %a) #3 // CHECK: ret <2 x i32> [[VCVTN_U32_V1_I]] uint32x2_t test_vcvtn_u32_f32(float32x2_t a) { return vcvtn_u32_f32(a); } -// CHECK-LABEL: define <4 x i32> @test_vcvtnq_s32_f32(<4 x float> %a) #1 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vcvtnq_s32_f32(<4 x float> %a) #1 { // CHECK: [[VCVTNQ_S32_V1_I:%.*]] = call <4 x i32> @llvm.arm.neon.vcvtns.v4i32.v4f32(<4 x float> %a) #3 // CHECK: ret <4 x i32> [[VCVTNQ_S32_V1_I]] int32x4_t test_vcvtnq_s32_f32(float32x4_t a) { return vcvtnq_s32_f32(a); } -// CHECK-LABEL: define <4 x i32> @test_vcvtnq_u32_f32(<4 x float> %a) #1 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vcvtnq_u32_f32(<4 x float> %a) #1 { // CHECK: [[VCVTNQ_U32_V1_I:%.*]] = call <4 x i32> @llvm.arm.neon.vcvtnu.v4i32.v4f32(<4 x float> %a) #3 // CHECK: ret <4 x i32> [[VCVTNQ_U32_V1_I]] uint32x4_t test_vcvtnq_u32_f32(float32x4_t a) { return vcvtnq_u32_f32(a); } -// CHECK-LABEL: define <2 x i32> @test_vcvtp_s32_f32(<2 x float> %a) #0 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vcvtp_s32_f32(<2 x float> %a) #0 { // CHECK: [[VCVTP_S32_V1_I:%.*]] = call <2 x i32> @llvm.arm.neon.vcvtps.v2i32.v2f32(<2 x float> %a) #3 // CHECK: ret <2 x i32> [[VCVTP_S32_V1_I]] int32x2_t test_vcvtp_s32_f32(float32x2_t a) { return vcvtp_s32_f32(a); } -// CHECK-LABEL: define <2 x i32> @test_vcvtp_u32_f32(<2 x float> %a) #0 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vcvtp_u32_f32(<2 x float> %a) #0 { // CHECK: [[VCVTP_U32_V1_I:%.*]] = call <2 x i32> @llvm.arm.neon.vcvtpu.v2i32.v2f32(<2 x float> %a) #3 // CHECK: ret <2 x i32> [[VCVTP_U32_V1_I]] uint32x2_t test_vcvtp_u32_f32(float32x2_t a) { return vcvtp_u32_f32(a); } -// CHECK-LABEL: define <4 x i32> @test_vcvtpq_s32_f32(<4 x float> %a) #1 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vcvtpq_s32_f32(<4 x float> %a) #1 { // CHECK: [[VCVTPQ_S32_V1_I:%.*]] = call <4 x i32> @llvm.arm.neon.vcvtps.v4i32.v4f32(<4 x float> %a) #3 // CHECK: ret <4 x i32> [[VCVTPQ_S32_V1_I]] int32x4_t test_vcvtpq_s32_f32(float32x4_t a) { return vcvtpq_s32_f32(a); } -// CHECK-LABEL: define <4 x i32> @test_vcvtpq_u32_f32(<4 x float> %a) #1 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vcvtpq_u32_f32(<4 x float> %a) #1 { // CHECK: [[VCVTPQ_U32_V1_I:%.*]] = call <4 x i32> @llvm.arm.neon.vcvtpu.v4i32.v4f32(<4 x float> %a) #3 // CHECK: ret <4 x i32> [[VCVTPQ_U32_V1_I]] uint32x4_t test_vcvtpq_u32_f32(float32x4_t a) { return vcvtpq_u32_f32(a); } -// CHECK-LABEL: define <2 x i32> @test_vcvtm_s32_f32(<2 x float> %a) #0 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vcvtm_s32_f32(<2 x float> %a) #0 { // CHECK: [[VCVTM_S32_V1_I:%.*]] = call <2 x i32> @llvm.arm.neon.vcvtms.v2i32.v2f32(<2 x float> %a) #3 // CHECK: ret <2 x i32> [[VCVTM_S32_V1_I]] int32x2_t test_vcvtm_s32_f32(float32x2_t a) { return vcvtm_s32_f32(a); } -// CHECK-LABEL: define <2 x i32> @test_vcvtm_u32_f32(<2 x float> %a) #0 { +// CHECK-LABEL: define dso_local <2 x i32> @test_vcvtm_u32_f32(<2 x float> %a) #0 { // CHECK: [[VCVTM_U32_V1_I:%.*]] = call <2 x i32> @llvm.arm.neon.vcvtmu.v2i32.v2f32(<2 x float> %a) #3 // CHECK: ret <2 x i32> [[VCVTM_U32_V1_I]] uint32x2_t test_vcvtm_u32_f32(float32x2_t a) { return vcvtm_u32_f32(a); } -// CHECK-LABEL: define <4 x i32> @test_vcvtmq_s32_f32(<4 x float> %a) #1 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vcvtmq_s32_f32(<4 x float> %a) #1 { // CHECK: [[VCVTMQ_S32_V1_I:%.*]] = call <4 x i32> @llvm.arm.neon.vcvtms.v4i32.v4f32(<4 x float> %a) #3 // CHECK: ret <4 x i32> [[VCVTMQ_S32_V1_I]] int32x4_t test_vcvtmq_s32_f32(float32x4_t a) { return vcvtmq_s32_f32(a); } -// CHECK-LABEL: define <4 x i32> @test_vcvtmq_u32_f32(<4 x float> %a) #1 { +// CHECK-LABEL: define dso_local <4 x i32> @test_vcvtmq_u32_f32(<4 x float> %a) #1 { // CHECK: [[VCVTMQ_U32_V1_I:%.*]] = call <4 x i32> @llvm.arm.neon.vcvtmu.v4i32.v4f32(<4 x float> %a) #3 // CHECK: ret <4 x i32> [[VCVTMQ_U32_V1_I]] uint32x4_t test_vcvtmq_u32_f32(float32x4_t a) { diff --git a/clang/test/CodeGen/arm-pcs.c b/clang/test/CodeGen/arm-pcs.c index 269f01e77de1..d6ca0b579ce2 100644 --- a/clang/test/CodeGen/arm-pcs.c +++ b/clang/test/CodeGen/arm-pcs.c @@ -6,7 +6,7 @@ typedef int __attribute__((pcs("aapcs-vfp"))) (*aapcs_vfp_fn)(void); aapcs_fn bar; int foo(aapcs_vfp_fn baz) { -// CHECK-LABEL: define i32 @foo +// CHECK-LABEL: define dso_local i32 @foo // CHECK: call arm_aapcscc // CHECK: call arm_aapcs_vfpcc return bar() + baz(); diff --git a/clang/test/CodeGen/arm-varargs.c b/clang/test/CodeGen/arm-varargs.c index 1f5c07ef57da..26ac3e84747c 100644 --- a/clang/test/CodeGen/arm-varargs.c +++ b/clang/test/CodeGen/arm-varargs.c @@ -9,7 +9,7 @@ va_list the_list; int simple_int(void) { -// CHECK-LABEL: define i32 @simple_int +// CHECK-LABEL: define dso_local i32 @simple_int return va_arg(the_list, int); // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4 // CHECK: [[NEXT:%[a-z0-9._]+]] = getelementptr inbounds i8, i8* [[CUR]], i32 4 @@ -24,7 +24,7 @@ struct bigstruct { }; struct bigstruct simple_struct(void) { -// CHECK-LABEL: define void @simple_struct(%struct.bigstruct* noalias sret %agg.result) +// CHECK-LABEL: define dso_local void @simple_struct(%struct.bigstruct* noalias sret %agg.result) return va_arg(the_list, struct bigstruct); // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4 // CHECK: [[NEXT:%[a-z0-9._]+]] = getelementptr inbounds i8, i8* [[CUR]], i32 40 @@ -42,7 +42,7 @@ struct aligned_bigstruct { }; struct aligned_bigstruct simple_aligned_struct(void) { -// CHECK-LABEL: define void @simple_aligned_struct(%struct.aligned_bigstruct* noalias sret %agg.result) +// CHECK-LABEL: define dso_local void @simple_aligned_struct(%struct.aligned_bigstruct* noalias sret %agg.result) return va_arg(the_list, struct aligned_bigstruct); // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4 // CHECK: [[CUR_INT:%[a-z0-9._]+]] = ptrtoint i8* [[CUR]] to i32 @@ -59,7 +59,7 @@ struct aligned_bigstruct simple_aligned_struct(void) { } double simple_double(void) { -// CHECK-LABEL: define double @simple_double +// CHECK-LABEL: define dso_local double @simple_double return va_arg(the_list, double); // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4 // CHECK: [[CUR_INT:%[a-z0-9._]+]] = ptrtoint i8* [[CUR]] to i32 @@ -78,7 +78,7 @@ struct hfa { }; struct hfa simple_hfa(void) { -// CHECK-LABEL: define void @simple_hfa(%struct.hfa* noalias sret %agg.result) +// CHECK-LABEL: define dso_local void @simple_hfa(%struct.hfa* noalias sret %agg.result) return va_arg(the_list, struct hfa); // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4 // CHECK: [[NEXT:%[a-z0-9._]+]] = getelementptr inbounds i8, i8* [[CUR]], i32 8 @@ -96,7 +96,7 @@ struct hfa simple_hfa(void) { typedef int underaligned_int __attribute__((packed,aligned(2))); underaligned_int underaligned_int_test() { -// CHECK-LABEL: define i32 @underaligned_int_test() +// CHECK-LABEL: define dso_local i32 @underaligned_int_test() return va_arg(the_list, underaligned_int); // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4 // CHECK: [[NEXT:%[a-z0-9._]+]] = getelementptr inbounds i8, i8* [[CUR]], i32 4 @@ -108,7 +108,7 @@ underaligned_int underaligned_int_test() { typedef int overaligned_int __attribute__((aligned(32))); overaligned_int overaligned_int_test() { -// CHECK-LABEL: define i32 @overaligned_int_test() +// CHECK-LABEL: define dso_local i32 @overaligned_int_test() return va_arg(the_list, overaligned_int); // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4 // CHECK: [[NEXT:%[a-z0-9._]+]] = getelementptr inbounds i8, i8* [[CUR]], i32 4 @@ -120,7 +120,7 @@ overaligned_int overaligned_int_test() { typedef long long underaligned_long_long __attribute__((packed,aligned(2))); underaligned_long_long underaligned_long_long_test() { -// CHECK-LABEL: define i64 @underaligned_long_long_test() +// CHECK-LABEL: define dso_local i64 @underaligned_long_long_test() return va_arg(the_list, underaligned_long_long); // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4 // CHECK: [[CUR_INT:%[a-z0-9._]+]] = ptrtoint i8* [[CUR]] to i32 @@ -136,7 +136,7 @@ underaligned_long_long underaligned_long_long_test() { typedef long long overaligned_long_long __attribute__((aligned(32))); overaligned_long_long overaligned_long_long_test() { -// CHECK-LABEL: define i64 @overaligned_long_long_test() +// CHECK-LABEL: define dso_local i64 @overaligned_long_long_test() return va_arg(the_list, overaligned_long_long); // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4 // CHECK: [[CUR_INT:%[a-z0-9._]+]] = ptrtoint i8* [[CUR]] to i32 @@ -166,7 +166,7 @@ typedef struct __attribute__((packed,aligned(2))) { int val; } underaligned_int_struct; underaligned_int_struct underaligned_int_struct_test() { -// CHECK-LABEL: define i32 @underaligned_int_struct_test() +// CHECK-LABEL: define dso_local i32 @underaligned_int_struct_test() return va_arg(the_list, underaligned_int_struct); // CHECK: [[RETVAL:%[a-z0-9._]+]] = alloca %struct.underaligned_int_struct, align 2 // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4 @@ -185,7 +185,7 @@ typedef struct __attribute__((aligned(16))) { int val; } overaligned_int_struct; overaligned_int_struct overaligned_int_struct_test() { -// CHECK-LABEL: define void @overaligned_int_struct_test(%struct.overaligned_int_struct* noalias sret %agg.result) +// CHECK-LABEL: define dso_local void @overaligned_int_struct_test(%struct.overaligned_int_struct* noalias sret %agg.result) return va_arg(the_list, overaligned_int_struct); // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4 // CHECK: [[NEXT:%[a-z0-9._]+]] = getelementptr inbounds i8, i8* [[CUR]], i32 16 @@ -201,7 +201,7 @@ typedef struct __attribute__((packed,aligned(2))) { long long val; } underaligned_long_long_struct; underaligned_long_long_struct underaligned_long_long_struct_test() { -// CHECK-LABEL: define void @underaligned_long_long_struct_test(%struct.underaligned_long_long_struct* noalias sret %agg.result) +// CHECK-LABEL: define dso_local void @underaligned_long_long_struct_test(%struct.underaligned_long_long_struct* noalias sret %agg.result) return va_arg(the_list, underaligned_long_long_struct); // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4 // CHECK: [[NEXT:%[a-z0-9._]+]] = getelementptr inbounds i8, i8* [[CUR]], i32 8 @@ -217,7 +217,7 @@ typedef struct __attribute__((aligned(16))) { long long val; } overaligned_long_long_struct; overaligned_long_long_struct overaligned_long_long_struct_test() { -// CHECK-LABEL: define void @overaligned_long_long_struct_test(%struct.overaligned_long_long_struct* noalias sret %agg.result) +// CHECK-LABEL: define dso_local void @overaligned_long_long_struct_test(%struct.overaligned_long_long_struct* noalias sret %agg.result) return va_arg(the_list, overaligned_long_long_struct); // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4 // CHECK: [[CUR_INT:%[a-z0-9._]+]] = ptrtoint i8* [[CUR]] to i32 @@ -240,7 +240,7 @@ typedef struct { int val __attribute__((packed,aligned(2))); } underaligned_int_struct_member; underaligned_int_struct_member underaligned_int_struct_member_test() { -// CHECK-LABEL: define i32 @underaligned_int_struct_member_test() +// CHECK-LABEL: define dso_local i32 @underaligned_int_struct_member_test() return va_arg(the_list, underaligned_int_struct_member); // CHECK: [[RETVAL:%[a-z0-9._]+]] = alloca %struct.underaligned_int_struct_member, align 2 // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4 @@ -259,7 +259,7 @@ typedef struct { int val __attribute__((aligned(16))); } overaligned_int_struct_member; overaligned_int_struct_member overaligned_int_struct_member_test() { -// CHECK-LABEL: define void @overaligned_int_struct_member_test(%struct.overaligned_int_struct_member* noalias sret %agg.result) +// CHECK-LABEL: define dso_local void @overaligned_int_struct_member_test(%struct.overaligned_int_struct_member* noalias sret %agg.result) return va_arg(the_list, overaligned_int_struct_member); // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4 // CHECK: [[CUR_INT:%[a-z0-9._]+]] = ptrtoint i8* [[CUR]] to i32 @@ -279,7 +279,7 @@ typedef struct { long long val __attribute__((packed,aligned(2))); } underaligned_long_long_struct_member; underaligned_long_long_struct_member underaligned_long_long_struct_member_test() { -// CHECK-LABEL: define void @underaligned_long_long_struct_member_test(%struct.underaligned_long_long_struct_member* noalias sret %agg.result) +// CHECK-LABEL: define dso_local void @underaligned_long_long_struct_member_test(%struct.underaligned_long_long_struct_member* noalias sret %agg.result) return va_arg(the_list, underaligned_long_long_struct_member); // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4 // CHECK: [[NEXT:%[a-z0-9._]+]] = getelementptr inbounds i8, i8* [[CUR]], i32 8 @@ -295,7 +295,7 @@ typedef struct { long long val __attribute__((aligned(16))); } overaligned_long_long_struct_member; overaligned_long_long_struct_member overaligned_long_long_struct_member_test() { -// CHECK-LABEL: define void @overaligned_long_long_struct_member_test(%struct.overaligned_long_long_struct_member* noalias sret %agg.result) +// CHECK-LABEL: define dso_local void @overaligned_long_long_struct_member_test(%struct.overaligned_long_long_struct_member* noalias sret %agg.result) return va_arg(the_list, overaligned_long_long_struct_member); // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4 // CHECK: [[CUR_INT:%[a-z0-9._]+]] = ptrtoint i8* [[CUR]] to i32 @@ -312,7 +312,7 @@ overaligned_long_long_struct_member overaligned_long_long_struct_member_test() { } void check_start(int n, ...) { -// CHECK-LABEL: define void @check_start(i32 %n, ...) +// CHECK-LABEL: define dso_local void @check_start(i32 %n, ...) va_list the_list; va_start(the_list, n); diff --git a/clang/test/CodeGen/arm-vfp16-arguments.c b/clang/test/CodeGen/arm-vfp16-arguments.c index 32f1bb7b2a77..5d553b082479 100644 --- a/clang/test/CodeGen/arm-vfp16-arguments.c +++ b/clang/test/CodeGen/arm-vfp16-arguments.c @@ -19,58 +19,58 @@ float16x4_t g4; float16x8_t g8; void st4(float16x4_t a) { g4 = a; } -// CHECK-SOFT: define void @st4(<2 x i32> %a.coerce) +// CHECK-SOFT: define dso_local void @st4(<2 x i32> %a.coerce) // CHECK-SOFT: store <2 x i32> %a.coerce, <2 x i32>* bitcast (<4 x half>* @g4 to <2 x i32>*) // -// CHECK-HARD: define arm_aapcs_vfpcc void @st4(<2 x i32> %a.coerce) +// CHECK-HARD: define dso_local arm_aapcs_vfpcc void @st4(<2 x i32> %a.coerce) // CHECK-HARD: store <2 x i32> %a.coerce, <2 x i32>* bitcast (<4 x half>* @g4 to <2 x i32>*) // -// CHECK-FULL: define arm_aapcs_vfpcc void @st4(<4 x half> %a) +// CHECK-FULL: define dso_local arm_aapcs_vfpcc void @st4(<4 x half> %a) // CHECK-FULL: store <4 x half> %a, <4 x half>* @g4 float16x4_t ld4(void) { return g4; } -// CHECK-SOFT: define <2 x i32> @ld4() +// CHECK-SOFT: define dso_local <2 x i32> @ld4() // CHECK-SOFT: %0 = load <2 x i32>, <2 x i32>* bitcast (<4 x half>* @g4 to <2 x i32>*) // CHECK-SOFT: ret <2 x i32> %0 // -// CHECK-HARD: define arm_aapcs_vfpcc <2 x i32> @ld4() +// CHECK-HARD: define dso_local arm_aapcs_vfpcc <2 x i32> @ld4() // CHECK-HARD: %0 = load <2 x i32>, <2 x i32>* bitcast (<4 x half>* @g4 to <2 x i32>*) // CHECK-HARD: ret <2 x i32> %0 // -// CHECK-FULL: define arm_aapcs_vfpcc <4 x half> @ld4() +// CHECK-FULL: define dso_local arm_aapcs_vfpcc <4 x half> @ld4() // CHECK-FULL: %0 = load <4 x half>, <4 x half>* @g4 // CHECK-FULL: ret <4 x half> %0 void st8(float16x8_t a) { g8 = a; } -// CHECK-SOFT: define void @st8(<4 x i32> %a.coerce) +// CHECK-SOFT: define dso_local void @st8(<4 x i32> %a.coerce) // CHECK-SOFT: store <4 x i32> %a.coerce, <4 x i32>* bitcast (<8 x half>* @g8 to <4 x i32>*) // -// CHECK-HARD: define arm_aapcs_vfpcc void @st8(<4 x i32> %a.coerce) +// CHECK-HARD: define dso_local arm_aapcs_vfpcc void @st8(<4 x i32> %a.coerce) // CHECK-HARD: store <4 x i32> %a.coerce, <4 x i32>* bitcast (<8 x half>* @g8 to <4 x i32>*) // -// CHECK-FULL: define arm_aapcs_vfpcc void @st8(<8 x half> %a) +// CHECK-FULL: define dso_local arm_aapcs_vfpcc void @st8(<8 x half> %a) // CHECK-FULL: store <8 x half> %a, <8 x half>* @g8 float16x8_t ld8(void) { return g8; } -// CHECK-SOFT: define <4 x i32> @ld8() +// CHECK-SOFT: define dso_local <4 x i32> @ld8() // CHECK-SOFT: %0 = load <4 x i32>, <4 x i32>* bitcast (<8 x half>* @g8 to <4 x i32>*) // CHECK-SOFT: ret <4 x i32> %0 // -// CHECK-HARD: define arm_aapcs_vfpcc <4 x i32> @ld8() +// CHECK-HARD: define dso_local arm_aapcs_vfpcc <4 x i32> @ld8() // CHECK-HARD: %0 = load <4 x i32>, <4 x i32>* bitcast (<8 x half>* @g8 to <4 x i32>*) // CHECK-HARD: ret <4 x i32> %0 // -// CHECK-FULL: define arm_aapcs_vfpcc <8 x half> @ld8() +// CHECK-FULL: define dso_local arm_aapcs_vfpcc <8 x half> @ld8() // CHECK-FULL: %0 = load <8 x half>, <8 x half>* @g8 // CHECK-FULL: ret <8 x half> %0 void test_hfa(hfa_t a) {} -// CHECK-SOFT: define void @test_hfa([2 x i64] %a.coerce) -// CHECK-HARD: define arm_aapcs_vfpcc void @test_hfa([2 x <2 x i32>] %a.coerce) -// CHECK-FULL: define arm_aapcs_vfpcc void @test_hfa(%struct.hfa_t %a.coerce) +// CHECK-SOFT: define dso_local void @test_hfa([2 x i64] %a.coerce) +// CHECK-HARD: define dso_local arm_aapcs_vfpcc void @test_hfa([2 x <2 x i32>] %a.coerce) +// CHECK-FULL: define dso_local arm_aapcs_vfpcc void @test_hfa(%struct.hfa_t %a.coerce) hfa_t ghfa; hfa_t test_ret_hfa(void) { return ghfa; } -// CHECK-SOFT: define void @test_ret_hfa(%struct.hfa_t* noalias nocapture sret %agg.result) -// CHECK-HARD: define arm_aapcs_vfpcc [2 x <2 x i32>] @test_ret_hfa() -// CHECK-FULL: define arm_aapcs_vfpcc %struct.hfa_t @test_ret_hfa() +// CHECK-SOFT: define dso_local void @test_ret_hfa(%struct.hfa_t* noalias nocapture sret %agg.result) +// CHECK-HARD: define dso_local arm_aapcs_vfpcc [2 x <2 x i32>] @test_ret_hfa() +// CHECK-FULL: define dso_local arm_aapcs_vfpcc %struct.hfa_t @test_ret_hfa() diff --git a/clang/test/CodeGen/arm-vfp16-arguments2.cpp b/clang/test/CodeGen/arm-vfp16-arguments2.cpp index e436a5ecd6ab..3da52ab3fa52 100644 --- a/clang/test/CodeGen/arm-vfp16-arguments2.cpp +++ b/clang/test/CodeGen/arm-vfp16-arguments2.cpp @@ -37,27 +37,27 @@ struct S5 : B1 { B1 M[1]; }; -// CHECK-SOFT: define void @_Z2f12S1(%struct.S1* noalias nocapture sret %agg.result, [2 x i64] %s1.coerce) -// CHECK-HARD: define arm_aapcs_vfpcc [2 x <2 x i32>] @_Z2f12S1([2 x <2 x i32>] returned %s1.coerce) -// CHECK-FULL: define arm_aapcs_vfpcc %struct.S1 @_Z2f12S1(%struct.S1 returned %s1.coerce) +// CHECK-SOFT: define dso_local void @_Z2f12S1(%struct.S1* noalias nocapture sret %agg.result, [2 x i64] %s1.coerce) +// CHECK-HARD: define dso_local arm_aapcs_vfpcc [2 x <2 x i32>] @_Z2f12S1([2 x <2 x i32>] returned %s1.coerce) +// CHECK-FULL: define dso_local arm_aapcs_vfpcc %struct.S1 @_Z2f12S1(%struct.S1 returned %s1.coerce) struct S1 f1(struct S1 s1) { return s1; } -// CHECK-SOFT: define void @_Z2f22S2(%struct.S2* noalias nocapture sret %agg.result, [4 x i32] %s2.coerce) -// CHECK-HARD: define arm_aapcs_vfpcc [2 x <2 x i32>] @_Z2f22S2([2 x <2 x i32>] returned %s2.coerce) -// CHECK-FULL: define arm_aapcs_vfpcc %struct.S2 @_Z2f22S2(%struct.S2 returned %s2.coerce) +// CHECK-SOFT: define dso_local void @_Z2f22S2(%struct.S2* noalias nocapture sret %agg.result, [4 x i32] %s2.coerce) +// CHECK-HARD: define dso_local arm_aapcs_vfpcc [2 x <2 x i32>] @_Z2f22S2([2 x <2 x i32>] returned %s2.coerce) +// CHECK-FULL: define dso_local arm_aapcs_vfpcc %struct.S2 @_Z2f22S2(%struct.S2 returned %s2.coerce) struct S2 f2(struct S2 s2) { return s2; } -// CHECK-SOFT: define void @_Z2f32S3(%struct.S3* noalias nocapture sret %agg.result, [2 x i64] %s3.coerce) -// CHECK-HARD: define arm_aapcs_vfpcc [2 x <2 x i32>] @_Z2f32S3([2 x <2 x i32>] returned %s3.coerce) -// CHECK-FULL: define arm_aapcs_vfpcc %struct.S3 @_Z2f32S3(%struct.S3 returned %s3.coerce) +// CHECK-SOFT: define dso_local void @_Z2f32S3(%struct.S3* noalias nocapture sret %agg.result, [2 x i64] %s3.coerce) +// CHECK-HARD: define dso_local arm_aapcs_vfpcc [2 x <2 x i32>] @_Z2f32S3([2 x <2 x i32>] returned %s3.coerce) +// CHECK-FULL: define dso_local arm_aapcs_vfpcc %struct.S3 @_Z2f32S3(%struct.S3 returned %s3.coerce) struct S3 f3(struct S3 s3) { return s3; } -// CHECK-SOFT: define void @_Z2f42S4(%struct.S4* noalias nocapture sret %agg.result, [2 x i64] %s4.coerce) -// CHECK-HARD: define arm_aapcs_vfpcc [2 x <2 x i32>] @_Z2f42S4([2 x <2 x i32>] returned %s4.coerce) -// CHECK-FULL: define arm_aapcs_vfpcc %struct.S4 @_Z2f42S4(%struct.S4 returned %s4.coerce) +// CHECK-SOFT: define dso_local void @_Z2f42S4(%struct.S4* noalias nocapture sret %agg.result, [2 x i64] %s4.coerce) +// CHECK-HARD: define dso_local arm_aapcs_vfpcc [2 x <2 x i32>] @_Z2f42S4([2 x <2 x i32>] returned %s4.coerce) +// CHECK-FULL: define dso_local arm_aapcs_vfpcc %struct.S4 @_Z2f42S4(%struct.S4 returned %s4.coerce) struct S4 f4(struct S4 s4) { return s4; } -// CHECK-SOFT: define void @_Z2f52S5(%struct.S5* noalias nocapture sret %agg.result, [2 x i64] %s5.coerce) -// CHECK-HARD: define arm_aapcs_vfpcc %struct.S5 @_Z2f52S5(%struct.S5 returned %s5.coerce) -// CHECK-FULL: define arm_aapcs_vfpcc %struct.S5 @_Z2f52S5(%struct.S5 returned %s5.coerce) +// CHECK-SOFT: define dso_local void @_Z2f52S5(%struct.S5* noalias nocapture sret %agg.result, [2 x i64] %s5.coerce) +// CHECK-HARD: define dso_local arm_aapcs_vfpcc %struct.S5 @_Z2f52S5(%struct.S5 returned %s5.coerce) +// CHECK-FULL: define dso_local arm_aapcs_vfpcc %struct.S5 @_Z2f52S5(%struct.S5 returned %s5.coerce) struct S5 f5(struct S5 s5) { return s5; } diff --git a/clang/test/CodeGen/arm64-aapcs-arguments.c b/clang/test/CodeGen/arm64-aapcs-arguments.c index ab302d407041..d7475ed717da 100644 --- a/clang/test/CodeGen/arm64-aapcs-arguments.c +++ b/clang/test/CodeGen/arm64-aapcs-arguments.c @@ -37,15 +37,15 @@ void test4(BigHFA v0_v2, BigHFA v3_v5, BigHFA sp, double sp48, BigHFA sp64) { // It's the job of the argument *consumer* to perform the required sign & zero // extensions under AAPCS. There shouldn't be -// CHECK: define i8 @test5(i8 %a, i16 %b) +// CHECK: define dso_local i8 @test5(i8 %a, i16 %b) unsigned char test5(unsigned char a, signed short b) { } // __fp16 can be used as a function argument or return type (ACLE 2.0) -// CHECK: define half @test_half(half %{{.*}}) +// CHECK: define dso_local half @test_half(half %{{.*}}) __fp16 test_half(__fp16 A) { } // __fp16 is a base type for homogeneous floating-point aggregates for AArch64 (but not 32-bit ARM). -// CHECK: define %struct.HFA_half @test_half_hfa([4 x half] %{{.*}}) +// CHECK: define dso_local %struct.HFA_half @test_half_hfa([4 x half] %{{.*}}) struct HFA_half { __fp16 a[4]; }; struct HFA_half test_half_hfa(struct HFA_half A) { } diff --git a/clang/test/CodeGen/arm64-mte.c b/clang/test/CodeGen/arm64-mte.c index 675c37ee4ed4..627d41da0592 100644 --- a/clang/test/CodeGen/arm64-mte.c +++ b/clang/test/CodeGen/arm64-mte.c @@ -3,7 +3,7 @@ #include <stddef.h> #include <arm_acle.h> -// CHECK-LABEL: define i32* @create_tag1 +// CHECK-LABEL: define dso_local i32* @create_tag1 int *create_tag1(int *a, unsigned b) { // CHECK: [[T0:%[0-9]+]] = bitcast i32* %a to i8* // CHECK: [[T1:%[0-9]+]] = zext i32 %b to i64 @@ -12,7 +12,7 @@ int *create_tag1(int *a, unsigned b) { return __arm_mte_create_random_tag(a,b); } -// CHECK-LABEL: define i16* @create_tag2 +// CHECK-LABEL: define dso_local i16* @create_tag2 short *create_tag2(short *a, unsigned b) { // CHECK: [[T0:%[0-9]+]] = bitcast i16* %a to i8* // CHECK: [[T1:%[0-9]+]] = zext i32 %b to i64 @@ -21,7 +21,7 @@ short *create_tag2(short *a, unsigned b) { return __arm_mte_create_random_tag(a,b); } -// CHECK-LABEL: define i8* @create_tag3 +// CHECK-LABEL: define dso_local i8* @create_tag3 char *create_tag3(char *a, unsigned b) { // CHECK: [[T1:%[0-9]+]] = zext i32 %b to i64 // CHECK: [[T2:%[0-9]+]] = tail call i8* @llvm.aarch64.irg(i8* %a, i64 [[T1]]) @@ -29,13 +29,13 @@ char *create_tag3(char *a, unsigned b) { return __arm_mte_create_random_tag(a,b); } -// CHECK-LABEL: define i8* @increment_tag1 +// CHECK-LABEL: define dso_local i8* @increment_tag1 char *increment_tag1(char *a) { // CHECK: call i8* @llvm.aarch64.addg(i8* %a, i64 3) return __arm_mte_increment_tag(a,3); } -// CHECK-LABEL: define i16* @increment_tag2 +// CHECK-LABEL: define dso_local i16* @increment_tag2 short *increment_tag2(short *a) { // CHECK: [[T0:%[0-9]+]] = bitcast i16* %a to i8* // CHECK: [[T1:%[0-9]+]] = tail call i8* @llvm.aarch64.addg(i8* [[T0]], i64 3) @@ -43,7 +43,7 @@ short *increment_tag2(short *a) { return __arm_mte_increment_tag(a,3); } -// CHECK-LABEL: define i32 @exclude_tag +// CHECK-LABEL: define dso_local i32 @exclude_tag unsigned exclude_tag(int *a, unsigned m) { // CHECK: [[T0:%[0-9]+]] = zext i32 %m to i64 // CHECK: [[T1:%[0-9]+]] = bitcast i32* %a to i8* @@ -52,7 +52,7 @@ unsigned exclude_tag(int *a, unsigned m) { return __arm_mte_exclude_tag(a, m); } -// CHECK-LABEL: define i32* @get_tag1 +// CHECK-LABEL: define dso_local i32* @get_tag1 int *get_tag1(int *a) { // CHECK: [[T0:%[0-9]+]] = bitcast i32* %a to i8* // CHECK: [[T1:%[0-9]+]] = tail call i8* @llvm.aarch64.ldg(i8* [[T0]], i8* [[T0]]) @@ -60,7 +60,7 @@ int *get_tag1(int *a) { return __arm_mte_get_tag(a); } -// CHECK-LABEL: define i16* @get_tag2 +// CHECK-LABEL: define dso_local i16* @get_tag2 short *get_tag2(short *a) { // CHECK: [[T0:%[0-9]+]] = bitcast i16* %a to i8* // CHECK: [[T1:%[0-9]+]] = tail call i8* @llvm.aarch64.ldg(i8* [[T0]], i8* [[T0]]) @@ -68,14 +68,14 @@ short *get_tag2(short *a) { return __arm_mte_get_tag(a); } -// CHECK-LABEL: define void @set_tag1 +// CHECK-LABEL: define dso_local void @set_tag1 void set_tag1(int *a) { // CHECK: [[T0:%[0-9]+]] = bitcast i32* %a to i8* // CHECK: tail call void @llvm.aarch64.stg(i8* [[T0]], i8* [[T0]]) __arm_mte_set_tag(a); } -// CHECK-LABEL: define i64 @subtract_pointers +// CHECK-LABEL: define dso_local i64 @subtract_pointers ptrdiff_t subtract_pointers(int *a, int *b) { // CHECK: [[T0:%[0-9]+]] = bitcast i32* %a to i8* // CHECK: [[T1:%[0-9]+]] = bitcast i32* %b to i8* @@ -84,7 +84,7 @@ ptrdiff_t subtract_pointers(int *a, int *b) { return __arm_mte_ptrdiff(a, b); } -// CHECK-LABEL: define i64 @subtract_pointers_null_1 +// CHECK-LABEL: define dso_local i64 @subtract_pointers_null_1 ptrdiff_t subtract_pointers_null_1(int *a) { // CHECK: [[T0:%[0-9]+]] = bitcast i32* %a to i8* // CHECK: [[T1:%[0-9]+]] = tail call i64 @llvm.aarch64.subp(i8* [[T0]], i8* null) @@ -92,7 +92,7 @@ ptrdiff_t subtract_pointers_null_1(int *a) { return __arm_mte_ptrdiff(a, NULL); } -// CHECK-LABEL: define i64 @subtract_pointers_null_2 +// CHECK-LABEL: define dso_local i64 @subtract_pointers_null_2 ptrdiff_t subtract_pointers_null_2(int *a) { // CHECK: [[T0:%[0-9]+]] = bitcast i32* %a to i8* // CHECK: [[T1:%[0-9]+]] = tail call i64 @llvm.aarch64.subp(i8* null, i8* [[T0]]) @@ -101,7 +101,7 @@ ptrdiff_t subtract_pointers_null_2(int *a) { } // Check arithmetic promotion on return type -// CHECK-LABEL: define i32 @subtract_pointers4 +// CHECK-LABEL: define dso_local i32 @subtract_pointers4 int subtract_pointers4(void* a, void *b) { // CHECK: [[T0:%[0-9]+]] = tail call i64 @llvm.aarch64.subp(i8* %a, i8* %b) // CHECK-NEXT: %cmp = icmp slt i64 [[T0]], 1 diff --git a/clang/test/CodeGen/arm_function_epilog.cpp b/clang/test/CodeGen/arm_function_epilog.cpp index 00895078b1f8..9b37bcd858df 100644 --- a/clang/test/CodeGen/arm_function_epilog.cpp +++ b/clang/test/CodeGen/arm_function_epilog.cpp @@ -7,7 +7,7 @@ struct Vec2 { }; }; -// CHECK: define arm_aapcs_vfpcc %struct.Vec2 @_Z7getVec2v() +// CHECK: define dso_local arm_aapcs_vfpcc %struct.Vec2 @_Z7getVec2v() // CHECK: ret %struct.Vec2 Vec2 getVec2() { Vec2 out; diff --git a/clang/test/CodeGen/asm-label.c b/clang/test/CodeGen/asm-label.c index c06f11fd2d24..0632880bef45 100644 --- a/clang/test/CodeGen/asm-label.c +++ b/clang/test/CodeGen/asm-label.c @@ -11,7 +11,7 @@ int *test(void) { } // LINUX: @bar = internal global i32 0 -// LINUX: @foo = common global i32 0 +// LINUX: @foo = common dso_local global i32 0 // LINUX: declare i8* @alias(i32) // DARWIN: @"\01bar" = internal global i32 0 diff --git a/clang/test/CodeGen/assign.c b/clang/test/CodeGen/assign.c index b2702f096601..85c9235793d4 100644 --- a/clang/test/CodeGen/assign.c +++ b/clang/test/CodeGen/assign.c @@ -2,7 +2,7 @@ // Check that we don't generate unnecessary reloads. // -// CHECK-LABEL: define void @f0() +// CHECK-LABEL: define dso_local void @f0() // CHECK: [[x_0:%.*]] = alloca i32, align 4 // CHECK-NEXT: [[y_0:%.*]] = alloca i32, align 4 // CHECK-NEXT: store i32 1, i32* [[x_0]] @@ -18,7 +18,7 @@ void f0() { // This used to test that we generate reloads for volatile access, // but that does not appear to be correct behavior for C. // -// CHECK-LABEL: define void @f1() +// CHECK-LABEL: define dso_local void @f1() // CHECK: [[x_1:%.*]] = alloca i32, align 4 // CHECK-NEXT: [[y_1:%.*]] = alloca i32, align 4 // CHECK-NEXT: store volatile i32 1, i32* [[x_1]] diff --git a/clang/test/CodeGen/atomics-inlining.c b/clang/test/CodeGen/atomics-inlining.c index 7ba3f7f59b7b..0562f6f6d3aa 100644 --- a/clang/test/CodeGen/atomics-inlining.c +++ b/clang/test/CodeGen/atomics-inlining.c @@ -48,7 +48,7 @@ void test1(void) { // ARM: call{{.*}} void @__atomic_load(i32 100, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a2, i32 0, i32 0) // ARM: call{{.*}} void @__atomic_store(i32 100, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a2, i32 0, i32 0) -// PPC32-LABEL: define void @test1 +// PPC32-LABEL: define dso_local void @test1 // PPC32: = load atomic i8, i8* @c1 seq_cst // PPC32: store atomic i8 {{.*}}, i8* @c1 seq_cst // PPC32: = load atomic i16, i16* @s1 seq_cst @@ -60,7 +60,7 @@ void test1(void) { // PPC32: call void @__atomic_load(i32 100, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a2, i32 0, i32 0) // PPC32: call void @__atomic_store(i32 100, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a2, i32 0, i32 0) -// PPC64-LABEL: define void @test1 +// PPC64-LABEL: define dso_local void @test1 // PPC64: = load atomic i8, i8* @c1 seq_cst // PPC64: store atomic i8 {{.*}}, i8* @c1 seq_cst // PPC64: = load atomic i16, i16* @s1 seq_cst @@ -72,7 +72,7 @@ void test1(void) { // PPC64: call void @__atomic_load(i64 100, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a2, i32 0, i32 0) // PPC64: call void @__atomic_store(i64 100, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a2, i32 0, i32 0) -// MIPS32-LABEL: define void @test1 +// MIPS32-LABEL: define dso_local void @test1 // MIPS32: = load atomic i8, i8* @c1 seq_cst // MIPS32: store atomic i8 {{.*}}, i8* @c1 seq_cst // MIPS32: = load atomic i16, i16* @s1 seq_cst @@ -84,7 +84,7 @@ void test1(void) { // MIPS32: call void @__atomic_load(i32 signext 100, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a2, i32 0, i32 0) // MIPS32: call void @__atomic_store(i32 signext 100, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a2, i32 0, i32 0) -// MIPS64-LABEL: define void @test1 +// MIPS64-LABEL: define dso_local void @test1 // MIPS64: = load atomic i8, i8* @c1 seq_cst // MIPS64: store atomic i8 {{.*}}, i8* @c1 seq_cst // MIPS64: = load atomic i16, i16* @s1 seq_cst @@ -96,7 +96,7 @@ void test1(void) { // MIPS64: call void @__atomic_load(i64 zeroext 100, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a1, i32 0, i32 0) // MIPS64: call void @__atomic_store(i64 zeroext 100, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8], [100 x i8]* @a2, i32 0, i32 0) -// SPARC-LABEL: define void @test1 +// SPARC-LABEL: define dso_local void @test1 // SPARC: = load atomic i8, i8* @c1 seq_cst // SPARC: store atomic i8 {{.*}}, i8* @c1 seq_cst // SPARC: = load atomic i16, i16* @s1 seq_cst diff --git a/clang/test/CodeGen/attr-msp430.c b/clang/test/CodeGen/attr-msp430.c index e8b6d0d0fa3e..edbac8c96fac 100644 --- a/clang/test/CodeGen/attr-msp430.c +++ b/clang/test/CodeGen/attr-msp430.c @@ -4,7 +4,7 @@ __attribute__((interrupt(1))) void foo(void) {} // CHECK: @llvm.used // CHECK-SAME: @foo -// CHECK: define msp430_intrcc void @foo() #0 +// CHECK: define dso_local msp430_intrcc void @foo() #0 // CHECK: attributes #0 // CHECK-SAME: noinline // CHECK-SAME: "interrupt"="1" diff --git a/clang/test/CodeGen/attr-target-mv.c b/clang/test/CodeGen/attr-target-mv.c index c0c3de5f991a..5b60dcf464db 100644 --- a/clang/test/CodeGen/attr-target-mv.c +++ b/clang/test/CodeGen/attr-target-mv.c @@ -47,20 +47,20 @@ void bar5() { fwd_decl_avx(); } -// LINUX: @foo.ifunc = weak_odr ifunc i32 (), i32 ()* ()* @foo.resolver -// LINUX: @foo_inline.ifunc = weak_odr ifunc i32 (), i32 ()* ()* @foo_inline.resolver -// LINUX: @foo_decls.ifunc = weak_odr ifunc void (), void ()* ()* @foo_decls.resolver -// LINUX: @foo_multi.ifunc = weak_odr ifunc void (i32, double), void (i32, double)* ()* @foo_multi.resolver -// LINUX: @fwd_decl_default.ifunc = weak_odr ifunc i32 (), i32 ()* ()* @fwd_decl_default.resolver -// LINUX: @fwd_decl_avx.ifunc = weak_odr ifunc i32 (), i32 ()* ()* @fwd_decl_avx.resolver +// LINUX: @foo.ifunc = weak_odr dso_local ifunc i32 (), i32 ()* ()* @foo.resolver +// LINUX: @foo_inline.ifunc = weak_odr dso_local ifunc i32 (), i32 ()* ()* @foo_inline.resolver +// LINUX: @foo_decls.ifunc = weak_odr dso_local ifunc void (), void ()* ()* @foo_decls.resolver +// LINUX: @foo_multi.ifunc = weak_odr dso_local ifunc void (i32, double), void (i32, double)* ()* @foo_multi.resolver +// LINUX: @fwd_decl_default.ifunc = weak_odr dso_local ifunc i32 (), i32 ()* ()* @fwd_decl_default.resolver +// LINUX: @fwd_decl_avx.ifunc = weak_odr dso_local ifunc i32 (), i32 ()* ()* @fwd_decl_avx.resolver -// LINUX: define i32 @foo.sse4.2() +// LINUX: define dso_local i32 @foo.sse4.2() // LINUX: ret i32 0 -// LINUX: define i32 @foo.arch_ivybridge() +// LINUX: define dso_local i32 @foo.arch_ivybridge() // LINUX: ret i32 1 -// LINUX: define i32 @foo() +// LINUX: define dso_local i32 @foo() // LINUX: ret i32 2 -// LINUX: define i32 @bar() +// LINUX: define dso_local i32 @bar() // LINUX: call i32 @foo.ifunc() // WINDOWS: define dso_local i32 @foo.sse4.2() @@ -86,7 +86,7 @@ void bar5() { // WINDOWS: call i32 @foo.sse4.2 // WINDOWS: call i32 @foo -// LINUX: define i32 @bar2() +// LINUX: define dso_local i32 @bar2() // LINUX: call i32 @foo_inline.ifunc() // WINDOWS: define dso_local i32 @bar2() @@ -106,7 +106,7 @@ void bar5() { // WINDOWS: call i32 @foo_inline.sse4.2 // WINDOWS: call i32 @foo_inline -// LINUX: define void @bar3() +// LINUX: define dso_local void @bar3() // LINUX: call void @foo_decls.ifunc() // WINDOWS: define dso_local void @bar3() @@ -120,7 +120,7 @@ void bar5() { // WINDOWS: call void @foo_decls.sse4.2 // WINDOWS: call void @foo_decls -// LINUX: define void @bar4() +// LINUX: define dso_local void @bar4() // LINUX: call void @foo_multi.ifunc(i32 1, double 5.{{[0+e]*}}) // WINDOWS: define dso_local void @bar4() @@ -156,11 +156,11 @@ void bar5() { // WINDOWS: call void @foo_multi(i32 %0, double %1) // WINDOWS-NEXT: ret void -// LINUX: define i32 @fwd_decl_default() +// LINUX: define dso_local i32 @fwd_decl_default() // LINUX: ret i32 2 -// LINUX: define i32 @fwd_decl_avx.avx() +// LINUX: define dso_local i32 @fwd_decl_avx.avx() // LINUX: ret i32 2 -// LINUX: define i32 @fwd_decl_avx() +// LINUX: define dso_local i32 @fwd_decl_avx() // LINUX: ret i32 2 // WINDOWS: define dso_local i32 @fwd_decl_default() @@ -170,7 +170,7 @@ void bar5() { // WINDOWS: define dso_local i32 @fwd_decl_avx() // WINDOWS: ret i32 2 -// LINUX: define void @bar5() +// LINUX: define dso_local void @bar5() // LINUX: call i32 @fwd_decl_default.ifunc() // LINUX: call i32 @fwd_decl_avx.ifunc() @@ -197,7 +197,7 @@ void bar5() { // LINUX: declare i32 @foo.arch_sandybridge() // WINDOWS: declare dso_local i32 @foo.arch_sandybridge() -// LINUX: define linkonce i32 @foo_inline.sse4.2() +// LINUX: define linkonce dso_local i32 @foo_inline.sse4.2() // LINUX: ret i32 0 // WINDOWS: define linkonce_odr dso_local i32 @foo_inline.sse4.2() @@ -207,9 +207,9 @@ void bar5() { // WINDOWS: declare dso_local i32 @foo_inline.arch_sandybridge() -// LINUX: define linkonce i32 @foo_inline.arch_ivybridge() +// LINUX: define linkonce dso_local i32 @foo_inline.arch_ivybridge() // LINUX: ret i32 1 -// LINUX: define linkonce i32 @foo_inline() +// LINUX: define linkonce dso_local i32 @foo_inline() // LINUX: ret i32 2 // WINDOWS: define linkonce_odr dso_local i32 @foo_inline.arch_ivybridge() @@ -217,16 +217,16 @@ void bar5() { // WINDOWS: define linkonce_odr dso_local i32 @foo_inline() // WINDOWS: ret i32 2 -// LINUX: define linkonce void @foo_decls() -// LINUX: define linkonce void @foo_decls.sse4.2() +// LINUX: define linkonce dso_local void @foo_decls() +// LINUX: define linkonce dso_local void @foo_decls.sse4.2() // WINDOWS: define linkonce_odr dso_local void @foo_decls() // WINDOWS: define linkonce_odr dso_local void @foo_decls.sse4.2() -// LINUX: define linkonce void @foo_multi(i32 %{{[^,]+}}, double %{{[^\)]+}}) -// LINUX: define linkonce void @foo_multi.avx_sse4.2(i32 %{{[^,]+}}, double %{{[^\)]+}}) -// LINUX: define linkonce void @foo_multi.fma4_sse4.2(i32 %{{[^,]+}}, double %{{[^\)]+}}) -// LINUX: define linkonce void @foo_multi.arch_ivybridge_fma4_sse4.2(i32 %{{[^,]+}}, double %{{[^\)]+}}) +// LINUX: define linkonce dso_local void @foo_multi(i32 %{{[^,]+}}, double %{{[^\)]+}}) +// LINUX: define linkonce dso_local void @foo_multi.avx_sse4.2(i32 %{{[^,]+}}, double %{{[^\)]+}}) +// LINUX: define linkonce dso_local void @foo_multi.fma4_sse4.2(i32 %{{[^,]+}}, double %{{[^\)]+}}) +// LINUX: define linkonce dso_local void @foo_multi.arch_ivybridge_fma4_sse4.2(i32 %{{[^,]+}}, double %{{[^\)]+}}) // WINDOWS: define linkonce_odr dso_local void @foo_multi(i32 %{{[^,]+}}, double %{{[^\)]+}}) // WINDOWS: define linkonce_odr dso_local void @foo_multi.avx_sse4.2(i32 %{{[^,]+}}, double %{{[^\)]+}}) diff --git a/clang/test/CodeGen/attr-weakref.c b/clang/test/CodeGen/attr-weakref.c index 248860d5bcd3..cd0bf12b9340 100644 --- a/clang/test/CodeGen/attr-weakref.c +++ b/clang/test/CodeGen/attr-weakref.c @@ -8,7 +8,7 @@ void test1_h(void) { test1_g(); } -// CHECK-LABEL: define void @test2_f() +// CHECK-LABEL: define dso_local void @test2_f() void test2_f(void) {} static void test2_g(void) __attribute__((weakref("test2_f"))); void test2_h(void) { @@ -25,7 +25,7 @@ void test3_h(void) { test3_g(); } -// CHECK-LABEL: define void @test4_f() +// CHECK-LABEL: define dso_local void @test4_f() void test4_f(void); static void test4_g(void) __attribute__((weakref("test4_f"))); void test4_h(void) { diff --git a/clang/test/CodeGen/attr-weakref2.c b/clang/test/CodeGen/attr-weakref2.c index 99760635581d..19615300d9e7 100644 --- a/clang/test/CodeGen/attr-weakref2.c +++ b/clang/test/CodeGen/attr-weakref2.c @@ -8,7 +8,7 @@ int test1_h(void) { return test1_g; } -// CHECK: @test2_f = common global i32 0, align 4 +// CHECK: @test2_f = common dso_local global i32 0, align 4 int test2_f; static int test2_g __attribute__((weakref("test2_f"))); int test2_h(void) { @@ -25,7 +25,7 @@ int test3_h(void) { return test3_g; } -// CHECK: @test4_f = common global i32 0, align 4 +// CHECK: @test4_f = common dso_local global i32 0, align 4 extern int test4_f; static int test4_g __attribute__((weakref("test4_f"))); int test4_h(void) { diff --git a/clang/test/CodeGen/attr-x86-interrupt.c b/clang/test/CodeGen/attr-x86-interrupt.c index 700a57524dca..fc65db79bc63 100644 --- a/clang/test/CodeGen/attr-x86-interrupt.c +++ b/clang/test/CodeGen/attr-x86-interrupt.c @@ -13,13 +13,13 @@ typedef __UINT32_TYPE__ uword; __attribute__((interrupt)) void foo7(int *a, uword b) {} __attribute__((interrupt)) void foo8(int *a) {} // X86_64_LINUX: @llvm.used = appending global [2 x i8*] [i8* bitcast (void (i32*, i64)* @foo7 to i8*), i8* bitcast (void (i32*)* @foo8 to i8*)], section "llvm.metadata" -// X86_64_LINUX: define x86_intrcc void @foo7(i32* %{{.+}}, i64 %{{.+}}) -// X86_64_LINUX: define x86_intrcc void @foo8(i32* %{{.+}}) +// X86_64_LINUX: define dso_local x86_intrcc void @foo7(i32* %{{.+}}, i64 %{{.+}}) +// X86_64_LINUX: define dso_local x86_intrcc void @foo8(i32* %{{.+}}) // X86_64_LINUX: "disable-tail-calls"="true" // X86_64_LINUX-NOT: "disable-tail-calls"="false" // X86_LINUX: @llvm.used = appending global [2 x i8*] [i8* bitcast (void (i32*, i32)* @foo7 to i8*), i8* bitcast (void (i32*)* @foo8 to i8*)], section "llvm.metadata" -// X86_LINUX: define x86_intrcc void @foo7(i32* %{{.+}}, i32 %{{.+}}) -// X86_LINUX: define x86_intrcc void @foo8(i32* %{{.+}}) +// X86_LINUX: define dso_local x86_intrcc void @foo7(i32* %{{.+}}, i32 %{{.+}}) +// X86_LINUX: define dso_local x86_intrcc void @foo8(i32* %{{.+}}) // X86_LINUX: "disable-tail-calls"="true" // X86_LINUX-NOT: "disable-tail-calls"="false" // X86_64_WIN: @llvm.used = appending global [2 x i8*] [i8* bitcast (void (i32*, i64)* @foo7 to i8*), i8* bitcast (void (i32*)* @foo8 to i8*)], section "llvm.metadata" diff --git a/clang/test/CodeGen/attributes.c b/clang/test/CodeGen/attributes.c index 4be38b6367dc..649af24825b6 100644 --- a/clang/test/CodeGen/attributes.c +++ b/clang/test/CodeGen/attributes.c @@ -1,10 +1,10 @@ // RUN: %clang_cc1 -emit-llvm -fcf-protection=branch -triple i386-linux-gnu -o %t %s // RUN: FileCheck --input-file=%t %s -// CHECK: @t5 = weak global i32 2 +// CHECK: @t5 = weak dso_local global i32 2 int t5 __attribute__((weak)) = 2; -// CHECK: @t13 = global %struct.s0 zeroinitializer, section "SECT" +// CHECK: @t13 = dso_local global %struct.s0 zeroinitializer, section "SECT" struct s0 { int x; }; struct s0 t13 __attribute__((section("SECT"))) = { 0 }; @@ -13,7 +13,7 @@ void t14(void) { static int x __attribute__((section("SECT"))) = 0; } -// CHECK: @t18 = global i32 1, align 4 +// CHECK: @t18 = dso_local global i32 1, align 4 extern int t18 __attribute__((weak_import)); int t18 = 1; @@ -23,10 +23,10 @@ extern int t16 __attribute__((weak_import)); // CHECK: @t6 = common protected global i32 0 int t6 __attribute__((visibility("protected"))); -// CHECK: @t12 = global i32 0, section "SECT" +// CHECK: @t12 = dso_local global i32 0, section "SECT" int t12 __attribute__((section("SECT"))); -// CHECK: @t9 = weak alias void (...), bitcast (void ()* @__t8 to void (...)*) +// CHECK: @t9 = weak dso_local alias void (...), bitcast (void ()* @__t8 to void (...)*) void __t8() {} void t9() __attribute__((weak, alias("__t8"))); @@ -36,15 +36,15 @@ int t17() { return t15() + t16; } -// CHECK: define void @t1() [[NR:#[0-9]+]] { +// CHECK: define dso_local void @t1() [[NR:#[0-9]+]] { void t1() __attribute__((noreturn)); void t1() { while (1) {} } -// CHECK: define void @t2() [[NUW:#[0-9]+]] { +// CHECK: define dso_local void @t2() [[NUW:#[0-9]+]] { void t2() __attribute__((nothrow)); void t2() {} -// CHECK: define weak void @t3() [[NUW]] { +// CHECK: define weak dso_local void @t3() [[NUW]] { void t3() __attribute__((weak)); void t3() {} @@ -52,30 +52,30 @@ void t3() {} void t4() __attribute__((visibility("hidden"))); void t4() {} -// CHECK: define void @t7() [[NR]] { +// CHECK: define dso_local void @t7() [[NR]] { void t7() __attribute__((noreturn, nothrow)); void t7() { while (1) {} } -// CHECK: define void @t72() [[COLDDEF:#[0-9]+]] { +// CHECK: define dso_local void @t72() [[COLDDEF:#[0-9]+]] { void t71(void) __attribute__((cold)); void t72() __attribute__((cold)); void t72() { t71(); } // CHECK: call void @t71() [[COLDSITE:#[0-9]+]] // CHECK: declare void @t71() [[COLDDECL:#[0-9]+]] -// CHECK: define void @t10() [[NUW]] section "SECT" { +// CHECK: define dso_local void @t10() [[NUW]] section "SECT" { void t10(void) __attribute__((section("SECT"))); void t10(void) {} -// CHECK: define void @t11() [[NUW]] section "SECT" { +// CHECK: define dso_local void @t11() [[NUW]] section "SECT" { void __attribute__((section("SECT"))) t11(void) {} -// CHECK: define i32 @t19() [[NUW]] { +// CHECK: define dso_local i32 @t19() [[NUW]] { extern int t19(void) __attribute__((weak_import)); int t19(void) { return 10; } -// CHECK:define void @t20() [[NUW]] { +// CHECK:define dso_local void @t20() [[NUW]] { // CHECK: call void @abort() // CHECK-NEXT: unreachable void t20(void) { @@ -95,9 +95,9 @@ void t21(void) { void __attribute__((section(".foo"))) t22(void); void __attribute__((section(".bar"))) t22(void) {} -// CHECK: define void @t22() [[NUW]] section ".bar" +// CHECK: define dso_local void @t22() [[NUW]] section ".bar" -// CHECK: define void @t23() [[NOCF_CHECK_FUNC:#[0-9]+]] +// CHECK: define dso_local void @t23() [[NOCF_CHECK_FUNC:#[0-9]+]] void __attribute__((nocf_check)) t23(void) {} // CHECK: call void %{{[a-z0-9]+}}() [[NOCF_CHECK_CALL:#[0-9]+]] diff --git a/clang/test/CodeGen/avr-builtins.c b/clang/test/CodeGen/avr-builtins.c index 8fa983a78239..e894cab89831 100644 --- a/clang/test/CodeGen/avr-builtins.c +++ b/clang/test/CodeGen/avr-builtins.c @@ -8,99 +8,99 @@ unsigned char bitrev8(unsigned char data) { return __builtin_bitreverse8(data); } -// CHECK: define zeroext i8 @bitrev8 +// CHECK: define dso_local zeroext i8 @bitrev8 // CHECK: i8 @llvm.bitreverse.i8(i8 unsigned int bitrev16(unsigned int data) { return __builtin_bitreverse16(data); } -// CHECK: define i16 @bitrev16 +// CHECK: define dso_local i16 @bitrev16 // CHECK: i16 @llvm.bitreverse.i16(i16 unsigned long bitrev32(unsigned long data) { return __builtin_bitreverse32(data); } -// CHECK: define i32 @bitrev32 +// CHECK: define dso_local i32 @bitrev32 // CHECK: i32 @llvm.bitreverse.i32(i32 unsigned long long bitrev64(unsigned long long data) { return __builtin_bitreverse64(data); } -// CHECK: define i64 @bitrev64 +// CHECK: define dso_local i64 @bitrev64 // CHECK: i64 @llvm.bitreverse.i64(i64 unsigned char rotleft8(unsigned char x, unsigned char y) { return __builtin_rotateleft8(x, y); } -// CHECK: define zeroext i8 @rotleft8 +// CHECK: define dso_local zeroext i8 @rotleft8 // CHECK: i8 @llvm.fshl.i8(i8 unsigned int rotleft16(unsigned int x, unsigned int y) { return __builtin_rotateleft16(x, y); } -// CHECK: define i16 @rotleft16 +// CHECK: define dso_local i16 @rotleft16 // CHECK: i16 @llvm.fshl.i16(i16 unsigned long rotleft32(unsigned long x, unsigned long y) { return __builtin_rotateleft32(x, y); } -// CHECK: define i32 @rotleft32 +// CHECK: define dso_local i32 @rotleft32 // CHECK: i32 @llvm.fshl.i32(i32 unsigned long long rotleft64(unsigned long long x, unsigned long long y) { return __builtin_rotateleft64(x, y); } -// CHECK: define i64 @rotleft64 +// CHECK: define dso_local i64 @rotleft64 // CHECK: i64 @llvm.fshl.i64(i64 unsigned char rotright8(unsigned char x, unsigned char y) { return __builtin_rotateright8(x, y); } -// CHECK: define zeroext i8 @rotright8 +// CHECK: define dso_local zeroext i8 @rotright8 // CHECK: i8 @llvm.fshr.i8(i8 unsigned int rotright16(unsigned int x, unsigned int y) { return __builtin_rotateright16(x, y); } -// CHECK: define i16 @rotright16 +// CHECK: define dso_local i16 @rotright16 // CHECK: i16 @llvm.fshr.i16(i16 unsigned long rotright32(unsigned long x, unsigned long y) { return __builtin_rotateright32(x, y); } -// CHECK: define i32 @rotright32 +// CHECK: define dso_local i32 @rotright32 // CHECK: i32 @llvm.fshr.i32(i32 unsigned long long rotright64(unsigned long long x, unsigned long long y) { return __builtin_rotateright64(x, y); } -// CHECK: define i64 @rotright64 +// CHECK: define dso_local i64 @rotright64 // CHECK: i64 @llvm.fshr.i64(i64 unsigned int byteswap16(unsigned int x) { return __builtin_bswap16(x); } -// CHECK: define i16 @byteswap16 +// CHECK: define dso_local i16 @byteswap16 // CHECK: i16 @llvm.bswap.i16(i16 unsigned long byteswap32(unsigned long x) { return __builtin_bswap32(x); } -// CHECK: define i32 @byteswap32 +// CHECK: define dso_local i32 @byteswap32 // CHECK: i32 @llvm.bswap.i32(i32 unsigned long long byteswap64(unsigned long long x) { return __builtin_bswap64(x); } -// CHECK: define i64 @byteswap64 +// CHECK: define dso_local i64 @byteswap64 // CHECK: i64 @llvm.bswap.i64(i64 diff --git a/clang/test/CodeGen/avr/attributes/interrupt.c b/clang/test/CodeGen/avr/attributes/interrupt.c index adea84eb3a37..9410470b64e2 100644 --- a/clang/test/CodeGen/avr/attributes/interrupt.c +++ b/clang/test/CodeGen/avr/attributes/interrupt.c @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -triple avr-unknown-unknown -emit-llvm %s -o - | FileCheck %s -// CHECK: define void @foo(){{.*}}#0 +// CHECK: define dso_local void @foo(){{.*}}#0 __attribute__((interrupt)) void foo(void) { } // CHECK: attributes #0 = {{{.*interrupt.*}}} diff --git a/clang/test/CodeGen/avr/attributes/signal.c b/clang/test/CodeGen/avr/attributes/signal.c index 030cdc843fec..5fe23adbbc09 100644 --- a/clang/test/CodeGen/avr/attributes/signal.c +++ b/clang/test/CodeGen/avr/attributes/signal.c @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -triple avr-unknown-unknown -emit-llvm %s -o - | FileCheck %s -// CHECK: define void @foo(){{.*}}#0 +// CHECK: define dso_local void @foo(){{.*}}#0 __attribute__((signal)) void foo(void) { } // CHECK: attributes #0 = {{{.*signal.*}}} diff --git a/clang/test/CodeGen/bitfield-2.c b/clang/test/CodeGen/bitfield-2.c index 9d669575ecd1..2e89f4cdbff4 100644 --- a/clang/test/CodeGen/bitfield-2.c +++ b/clang/test/CodeGen/bitfield-2.c @@ -32,7 +32,7 @@ int f0_reload(struct s0 *a0) { return (a0->f0 += 1); } -// CHECK-OPT-LABEL: define i64 @test_0() +// CHECK-OPT-LABEL: define dso_local i64 @test_0() // CHECK-OPT: ret i64 1 // CHECK-OPT: } unsigned long long test_0() { @@ -78,7 +78,7 @@ int f1_reload(struct s1 *a0) { return (a0->f1 += 1234); } -// CHECK-OPT-LABEL: define i64 @test_1() +// CHECK-OPT-LABEL: define dso_local i64 @test_1() // CHECK-OPT: ret i64 210 // CHECK-OPT: } unsigned long long test_1() { @@ -120,7 +120,7 @@ int f2_reload(union u2 *a0) { return (a0->f0 += 1234); } -// CHECK-OPT-LABEL: define i64 @test_2() +// CHECK-OPT-LABEL: define dso_local i64 @test_2() // CHECK-OPT: ret i64 2 // CHECK-OPT: } unsigned long long test_2() { @@ -156,7 +156,7 @@ int f3_reload(struct s3 *a0) { return (a0->f0 += 1234); } -// CHECK-OPT-LABEL: define i64 @test_3() +// CHECK-OPT-LABEL: define dso_local i64 @test_3() // CHECK-OPT: ret i64 -559039940 // CHECK-OPT: } unsigned long long test_3() { @@ -190,7 +190,7 @@ int f4_reload(struct s4 *a0) { return (a0->f0 += 1234) ^ (a0->f1 += 5678); } -// CHECK-OPT-LABEL: define i64 @test_4() +// CHECK-OPT-LABEL: define dso_local i64 @test_4() // CHECK-OPT: ret i64 4860 // CHECK-OPT: } unsigned long long test_4() { @@ -222,7 +222,7 @@ int f5_reload(struct s5 *a0) { return (a0->f0 += 0xF) ^ (a0->f1 += 0xF) ^ (a0->f2 += 0xF); } -// CHECK-OPT-LABEL: define i64 @test_5() +// CHECK-OPT-LABEL: define dso_local i64 @test_5() // CHECK-OPT: ret i64 2 // CHECK-OPT: } unsigned long long test_5() { @@ -252,7 +252,7 @@ int f6_reload(struct s6 *a0) { return (a0->f0 += 0xF); } -// CHECK-OPT-LABEL: define zeroext i1 @test_6() +// CHECK-OPT-LABEL: define dso_local zeroext i1 @test_6() // CHECK-OPT: ret i1 true // CHECK-OPT: } _Bool test_6() { @@ -310,7 +310,7 @@ int f8_reload(struct s8 *a0) { return (a0->f0 += 0xFD) ^ (a0->f2 += 0xFD) ^ (a0->f3 += 0xFD); } -// CHECK-OPT-LABEL: define i32 @test_8() +// CHECK-OPT-LABEL: define dso_local i32 @test_8() // CHECK-OPT: ret i32 -3 // CHECK-OPT: } unsigned test_8() { diff --git a/clang/test/CodeGen/blocks.c b/clang/test/CodeGen/blocks.c index fd348c98f65f..9c45b993abe4 100644 --- a/clang/test/CodeGen/blocks.c +++ b/clang/test/CodeGen/blocks.c @@ -77,7 +77,7 @@ void f3() { // The bool can fill in between the header and the long long. // Add the appropriate amount of padding between them. void f4_helper(long long (^)(void)); -// CHECK-LABEL: define void @f4() +// CHECK-LABEL: define dso_local void @f4() void f4(void) { _Bool b = 0; long long ll = 0; @@ -92,7 +92,7 @@ struct F5 { char buffer[32] __attribute((aligned)); }; void f5_helper(void (^)(struct F5 *)); -// CHECK-LABEL: define void @f5() +// CHECK-LABEL: define dso_local void @f5() void f5(void) { struct F5 value; // CHECK: alloca <{ i8*, i32, i32, i8*, {{%.*}}*, [12 x i8], [[F5:%.*]] }>, align 16 @@ -117,7 +117,7 @@ void testConstCaptureInCopyAndDestroyHelpers() { __block int i; (^ { i = x; })(); } -// CHECK-LABEL: define void @testConstCaptureInCopyAndDestroyHelpers( +// CHECK-LABEL: define dso_local void @testConstCaptureInCopyAndDestroyHelpers( // CHECK: %[[BLOCK_DESCRIPTOR:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>* %{{.*}}, i32 0, i32 4 // CHECK: store %[[STRUCT_BLOCK_DESCRIPTOR]]* bitcast ({ i32, i32, i8*, i8*, i8*, i8* }* @[[BLOCK_DESCRIPTOR_TMP21]] to %[[STRUCT_BLOCK_DESCRIPTOR]]*), %[[STRUCT_BLOCK_DESCRIPTOR]]** %[[BLOCK_DESCRIPTOR]], align 4 diff --git a/clang/test/CodeGen/bool-convert.c b/clang/test/CodeGen/bool-convert.c index 344fb6bb994a..1041d5d2ecfe 100644 --- a/clang/test/CodeGen/bool-convert.c +++ b/clang/test/CodeGen/bool-convert.c @@ -2,19 +2,19 @@ // All of these should uses the memory representation of _Bool // CHECK-LABEL: %struct.teststruct1 = type { i8, i8 } -// CHECK-LABEL: @test1 = common global %struct.teststruct1 +// CHECK-LABEL: @test1 = common dso_local global %struct.teststruct1 struct teststruct1 {_Bool a, b;} test1; -// CHECK-LABEL: @test2 = common global i8* null +// CHECK-LABEL: @test2 = common dso_local global i8* null _Bool* test2; -// CHECK-LABEL: @test3 = common global [10 x i8] +// CHECK-LABEL: @test3 = common dso_local global [10 x i8] _Bool test3[10]; -// CHECK-LABEL: @test4 = common global [0 x i8]* null +// CHECK-LABEL: @test4 = common dso_local global [0 x i8]* null _Bool (*test4)[]; -// CHECK-LABEL: define void @f(i32 %x) +// CHECK-LABEL: define dso_local void @f(i32 %x) void f(int x) { // CHECK: alloca i8, align 1 _Bool test5; diff --git a/clang/test/CodeGen/bool-init.c b/clang/test/CodeGen/bool-init.c index 09b4a87e63dc..a08c6931264a 100644 --- a/clang/test/CodeGen/bool-init.c +++ b/clang/test/CodeGen/bool-init.c @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-pc-linux -emit-llvm < %s | FileCheck %s // Check that the type of this global isn't i1 -// CHECK: @test = global i8 1 +// CHECK: @test = dso_local global i8 1 _Bool test = &test; diff --git a/clang/test/CodeGen/bool_test.c b/clang/test/CodeGen/bool_test.c index 84c775cba4fb..0e3e797001c1 100644 --- a/clang/test/CodeGen/bool_test.c +++ b/clang/test/CodeGen/bool_test.c @@ -2,13 +2,13 @@ // RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu -emit-llvm -o - %s -O2 -disable-llvm-passes | FileCheck %s int boolsize = sizeof(_Bool); -// CHECK: boolsize = global i32 1, align 4 +// CHECK: boolsize = dso_local global i32 1, align 4 void f(_Bool *x, _Bool *y) { *x = *y; } -// CHECK-LABEL: define void @f( +// CHECK-LABEL: define dso_local void @f( // CHECK: [[FROMMEM:%.*]] = load i8, i8* % // CHECK: [[BOOLVAL:%.*]] = trunc i8 [[FROMMEM]] to i1 // CHECK: [[TOMEM:%.*]] = zext i1 [[BOOLVAL]] to i8 diff --git a/clang/test/CodeGen/builtin-align.c b/clang/test/CodeGen/builtin-align.c index 8fb51822164d..afedaf5e81fc 100644 --- a/clang/test/CodeGen/builtin-align.c +++ b/clang/test/CodeGen/builtin-align.c @@ -34,19 +34,19 @@ /// Check that constant initializers work and are correct _Bool aligned_true = __builtin_is_aligned(1024, 512); -// CHECK: @aligned_true = global i8 1, align 1 +// CHECK: @aligned_true = dso_local global i8 1, align 1 _Bool aligned_false = __builtin_is_aligned(123, 512); -// CHECK: @aligned_false = global i8 0, align 1 +// CHECK: @aligned_false = dso_local global i8 0, align 1 int down_1 = __builtin_align_down(1023, 32); -// CHECK: @down_1 = global i32 992, align 4 +// CHECK: @down_1 = dso_local global i32 992, align 4 int down_2 = __builtin_align_down(256, 32); -// CHECK: @down_2 = global i32 256, align 4 +// CHECK: @down_2 = dso_local global i32 256, align 4 int up_1 = __builtin_align_up(1023, 32); -// CHECK: @up_1 = global i32 1024, align 4 +// CHECK: @up_1 = dso_local global i32 1024, align 4 int up_2 = __builtin_align_up(256, 32); -// CHECK: @up_2 = global i32 256, align 4 +// CHECK: @up_2 = dso_local global i32 256, align 4 /// Capture the IR type here to use in the remaining FileCheck captures: // CHECK: define {{[^@]+}}@get_type() #0 diff --git a/clang/test/CodeGen/builtin-constant-p.c b/clang/test/CodeGen/builtin-constant-p.c index 7965dbe93f9a..0cc3aadf2c1e 100644 --- a/clang/test/CodeGen/builtin-constant-p.c +++ b/clang/test/CodeGen/builtin-constant-p.c @@ -48,7 +48,7 @@ inline char test4_i(const char *x) { } int test4() { - // CHECK: define i32 @test4 + // CHECK: define dso_local i32 @test4 // CHECK: ret i32 0 return __builtin_constant_p(test4_i(test3_c)); } @@ -144,7 +144,7 @@ void test14() { } int test15_f(); -// CHECK-LABEL: define void @test15 +// CHECK-LABEL: define dso_local void @test15 // CHECK-NOT: call {{.*}}test15_f void test15() { int a, b; diff --git a/clang/test/CodeGen/builtin-expect.c b/clang/test/CodeGen/builtin-expect.c index d0dce9b4b92b..603a941a536b 100644 --- a/clang/test/CodeGen/builtin-expect.c +++ b/clang/test/CodeGen/builtin-expect.c @@ -5,7 +5,7 @@ // If optimizations are on, generate the correct expect and preserve other necessary operations. int expect_taken(int x) { -// ALL-LABEL: define i32 @expect_taken +// ALL-LABEL: define dso_local i32 @expect_taken // O1: call i64 @llvm.expect.i64(i64 {{%.*}}, i64 1) // O0-NOT: @llvm.expect @@ -16,7 +16,7 @@ int expect_taken(int x) { int expect_not_taken(int x) { -// ALL-LABEL: define i32 @expect_not_taken +// ALL-LABEL: define dso_local i32 @expect_not_taken // O1: call i64 @llvm.expect.i64(i64 {{%.*}}, i64 0) // O0-NOT: @llvm.expect @@ -31,7 +31,7 @@ int y(void); void foo(); void expect_value_side_effects() { -// ALL-LABEL: define void @expect_value_side_effects() +// ALL-LABEL: define dso_local void @expect_value_side_effects() // ALL: [[CALL:%.*]] = call i32 @y // O1: [[SEXT:%.*]] = sext i32 [[CALL]] to i64 // O1: call i64 @llvm.expect.i64(i64 {{%.*}}, i64 [[SEXT]]) @@ -49,7 +49,7 @@ void isigprocmask(void); long bar(); int main() { -// ALL-LABEL: define i32 @main() +// ALL-LABEL: define dso_local i32 @main() // ALL: call void @isigprocmask() // ALL: [[CALL:%.*]] = call i64 (...) @bar() // O1: call i64 @llvm.expect.i64(i64 0, i64 [[CALL]]) @@ -60,7 +60,7 @@ int main() { int switch_cond(int x) { -// ALL-LABEL: define i32 @switch_cond +// ALL-LABEL: define dso_local i32 @switch_cond // O1: call i64 @llvm.expect.i64(i64 {{%.*}}, i64 5) // O0-NOT: @llvm.expect @@ -79,7 +79,7 @@ int switch_cond(int x) { } int variable_expected(int stuff) { -// ALL-LABEL: define i32 @variable_expected( +// ALL-LABEL: define dso_local i32 @variable_expected( // O1: call i64 @llvm.expect.i64(i64 {{%.*}}, i64 {{%.*}}) // O0-NOT: @llvm.expect diff --git a/clang/test/CodeGen/builtin-ms-noop.cpp b/clang/test/CodeGen/builtin-ms-noop.cpp index 76c6c139d000..bfb20462081f 100644 --- a/clang/test/CodeGen/builtin-ms-noop.cpp +++ b/clang/test/CodeGen/builtin-ms-noop.cpp @@ -5,7 +5,7 @@ struct A { }; extern "C" int f() { -// CHECK: define i32 @f() +// CHECK: define dso_local i32 @f() // CHECK-NOT: call void @_ZN1AD1Ev // CHECK: ret i32 0 return __noop(A()); @@ -13,18 +13,18 @@ extern "C" int f() { extern "C" int g() { return __noop; -// CHECK: define i32 @g() +// CHECK: define dso_local i32 @g() // CHECK: ret i32 0 } extern "C" int h() { return (__noop); -// CHECK: define i32 @h() +// CHECK: define dso_local i32 @h() // CHECK: ret i32 0 } extern "C" int i() { return __noop + 1; -// CHECK: define i32 @i() +// CHECK: define dso_local i32 @i() // CHECK: ret i32 1 } diff --git a/clang/test/CodeGen/builtin-unpredictable.c b/clang/test/CodeGen/builtin-unpredictable.c index bdd62e972b05..7cd78a5eeded 100644 --- a/clang/test/CodeGen/builtin-unpredictable.c +++ b/clang/test/CodeGen/builtin-unpredictable.c @@ -12,7 +12,7 @@ extern "C" { void foo(); void branch(int x) { -// CHECK-LABEL: define void @branch( +// CHECK-LABEL: define dso_local void @branch( // CHECK-NOT: builtin_unpredictable // CHECK: !unpredictable [[METADATA:.+]] diff --git a/clang/test/CodeGen/builtins-arm.c b/clang/test/CodeGen/builtins-arm.c index f3c4ecaeee90..7296e884cf4a 100644 --- a/clang/test/CodeGen/builtins-arm.c +++ b/clang/test/CodeGen/builtins-arm.c @@ -102,121 +102,121 @@ void prefetch(int i) { } void ldc(const void *i) { - // CHECK: define void @ldc(i8* %i) + // CHECK: define dso_local void @ldc(i8* %i) // CHECK: call void @llvm.arm.ldc(i32 1, i32 2, i8* %i) // CHECK-NEXT: ret void __builtin_arm_ldc(1, 2, i); } void ldcl(const void *i) { - // CHECK: define void @ldcl(i8* %i) + // CHECK: define dso_local void @ldcl(i8* %i) // CHECK: call void @llvm.arm.ldcl(i32 1, i32 2, i8* %i) // CHECK-NEXT: ret void __builtin_arm_ldcl(1, 2, i); } void ldc2(const void *i) { - // CHECK: define void @ldc2(i8* %i) + // CHECK: define dso_local void @ldc2(i8* %i) // CHECK: call void @llvm.arm.ldc2(i32 1, i32 2, i8* %i) // CHECK-NEXT: ret void __builtin_arm_ldc2(1, 2, i); } void ldc2l(const void *i) { - // CHECK: define void @ldc2l(i8* %i) + // CHECK: define dso_local void @ldc2l(i8* %i) // CHECK: call void @llvm.arm.ldc2l(i32 1, i32 2, i8* %i) // CHECK-NEXT: ret void __builtin_arm_ldc2l(1, 2, i); } void stc(void *i) { - // CHECK: define void @stc(i8* %i) + // CHECK: define dso_local void @stc(i8* %i) // CHECK: call void @llvm.arm.stc(i32 1, i32 2, i8* %i) // CHECK-NEXT: ret void __builtin_arm_stc(1, 2, i); } void stcl(void *i) { - // CHECK: define void @stcl(i8* %i) + // CHECK: define dso_local void @stcl(i8* %i) // CHECK: call void @llvm.arm.stcl(i32 1, i32 2, i8* %i) // CHECK-NEXT: ret void __builtin_arm_stcl(1, 2, i); } void stc2(void *i) { - // CHECK: define void @stc2(i8* %i) + // CHECK: define dso_local void @stc2(i8* %i) // CHECK: call void @llvm.arm.stc2(i32 1, i32 2, i8* %i) // CHECK-NEXT: ret void __builtin_arm_stc2(1, 2, i); } void stc2l(void *i) { - // CHECK: define void @stc2l(i8* %i) + // CHECK: define dso_local void @stc2l(i8* %i) // CHECK: call void @llvm.arm.stc2l(i32 1, i32 2, i8* %i) // CHECK-NEXT: ret void __builtin_arm_stc2l(1, 2, i); } void cdp() { - // CHECK: define void @cdp() + // CHECK: define dso_local void @cdp() // CHECK: call void @llvm.arm.cdp(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6) // CHECK-NEXT: ret void __builtin_arm_cdp(1, 2, 3, 4, 5, 6); } void cdp2() { - // CHECK: define void @cdp2() + // CHECK: define dso_local void @cdp2() // CHECK: call void @llvm.arm.cdp2(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6) // CHECK-NEXT: ret void __builtin_arm_cdp2(1, 2, 3, 4, 5, 6); } unsigned mrc() { - // CHECK: define i32 @mrc() + // CHECK: define dso_local i32 @mrc() // CHECK: [[R:%.*]] = call i32 @llvm.arm.mrc(i32 15, i32 0, i32 13, i32 0, i32 3) // CHECK-NEXT: ret i32 [[R]] return __builtin_arm_mrc(15, 0, 13, 0, 3); } unsigned mrc2() { - // CHECK: define i32 @mrc2() + // CHECK: define dso_local i32 @mrc2() // CHECK: [[R:%.*]] = call i32 @llvm.arm.mrc2(i32 15, i32 0, i32 13, i32 0, i32 3) // CHECK-NEXT: ret i32 [[R]] return __builtin_arm_mrc2(15, 0, 13, 0, 3); } void mcr(unsigned a) { - // CHECK: define void @mcr(i32 [[A:%.*]]) + // CHECK: define dso_local void @mcr(i32 [[A:%.*]]) // CHECK: call void @llvm.arm.mcr(i32 15, i32 0, i32 [[A]], i32 13, i32 0, i32 3) __builtin_arm_mcr(15, 0, a, 13, 0, 3); } void mcr2(unsigned a) { - // CHECK: define void @mcr2(i32 [[A:%.*]]) + // CHECK: define dso_local void @mcr2(i32 [[A:%.*]]) // CHECK: call void @llvm.arm.mcr2(i32 15, i32 0, i32 [[A]], i32 13, i32 0, i32 3) __builtin_arm_mcr2(15, 0, a, 13, 0, 3); } void mcrr(uint64_t a) { - // CHECK: define void @mcrr(i64 %{{.*}}) + // CHECK: define dso_local void @mcrr(i64 %{{.*}}) // CHECK: call void @llvm.arm.mcrr(i32 15, i32 0, i32 %{{[0-9]+}}, i32 %{{[0-9]+}}, i32 0) __builtin_arm_mcrr(15, 0, a, 0); } void mcrr2(uint64_t a) { - // CHECK: define void @mcrr2(i64 %{{.*}}) + // CHECK: define dso_local void @mcrr2(i64 %{{.*}}) // CHECK: call void @llvm.arm.mcrr2(i32 15, i32 0, i32 %{{[0-9]+}}, i32 %{{[0-9]+}}, i32 0) __builtin_arm_mcrr2(15, 0, a, 0); } uint64_t mrrc() { - // CHECK: define i64 @mrrc() + // CHECK: define dso_local i64 @mrrc() // CHECK: call { i32, i32 } @llvm.arm.mrrc(i32 15, i32 0, i32 0) return __builtin_arm_mrrc(15, 0, 0); } uint64_t mrrc2() { - // CHECK: define i64 @mrrc2() + // CHECK: define dso_local i64 @mrrc2() // CHECK: call { i32, i32 } @llvm.arm.mrrc2(i32 15, i32 0, i32 0) return __builtin_arm_mrrc2(15, 0, 0); } diff --git a/clang/test/CodeGen/builtins-ppc-altivec.c b/clang/test/CodeGen/builtins-ppc-altivec.c index d53011b37d41..2082cc174820 100644 --- a/clang/test/CodeGen/builtins-ppc-altivec.c +++ b/clang/test/CodeGen/builtins-ppc-altivec.c @@ -56,7 +56,7 @@ int res_i; int res_ui; int res_f; -// CHECK-LABEL: define void @test1 +// CHECK-LABEL: define dso_local void @test1 void test1() { /* vec_abs */ @@ -907,7 +907,7 @@ void test1() { } -// CHECK-LABEL: define void @test2 +// CHECK-LABEL: define dso_local void @test2 void test2() { /* vec_avg */ res_vsc = vec_avg(vsc, vsc); @@ -1063,7 +1063,7 @@ void test2() { // CHECK-LE: @llvm.ppc.altivec.vcmpgefp } -// CHECK-LABEL: define void @test5 +// CHECK-LABEL: define dso_local void @test5 void test5() { /* vec_cmpgt */ @@ -1153,7 +1153,7 @@ void test5() { // CHECK-LE: @llvm.ppc.altivec.vcmpgefp } -// CHECK-LABEL: define void @test6 +// CHECK-LABEL: define dso_local void @test6 void test6() { /* vec_cmplt */ res_vbc = vec_cmplt(vsc, vsc); @@ -9034,7 +9034,7 @@ void test6() { } /* ------------------------------ Relational Operators ------------------------------ */ -// CHECK-LABEL: define void @test7 +// CHECK-LABEL: define dso_local void @test7 void test7() { vector signed char vsc1 = (vector signed char)(-1); vector signed char vsc2 = (vector signed char)(-2); @@ -9221,8 +9221,8 @@ void test7() { /* ------------------------------ optional ---------------------------------- */ void test8() { -// CHECK-LABEL: define void @test8 -// CHECK-LE-LABEL: define void @test8 +// CHECK-LABEL: define dso_local void @test8 +// CHECK-LE-LABEL: define dso_local void @test8 res_vbc = vec_reve(vbc); // CHECK: shufflevector <16 x i8> %{{[0-9]+}}, <16 x i8> %{{[0-9]+}}, <16 x i32> <i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0> // CHECK-LE: shufflevector <16 x i8> %{{[0-9]+}}, <16 x i8> %{{[0-9]+}}, <16 x i32> <i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0> @@ -9352,8 +9352,8 @@ void test8() { /* ------------------------------ vec_xl ------------------------------------ */ void test9() { - // CHECK-LABEL: define void @test9 - // CHECK-LE-LABEL: define void @test9 + // CHECK-LABEL: define dso_local void @test9 + // CHECK-LE-LABEL: define dso_local void @test9 res_vsc = vec_xl(param_sll, ¶m_sc); // CHECK: load <16 x i8>, <16 x i8>* %{{[0-9]+}}, align 1 // CHECK-LE: load <16 x i8>, <16 x i8>* %{{[0-9]+}}, align 1 @@ -9385,8 +9385,8 @@ void test9() { /* ------------------------------ vec_xst ----------------------------------- */ void test10() { - // CHECK-LABEL: define void @test10 - // CHECK-LE-LABEL: define void @test10 + // CHECK-LABEL: define dso_local void @test10 + // CHECK-LE-LABEL: define dso_local void @test10 vec_xst(vsc, param_sll, ¶m_sc); // CHECK: store <16 x i8> %{{[0-9]+}}, <16 x i8>* %{{[0-9]+}}, align 1 // CHECK-LE: store <16 x i8> %{{[0-9]+}}, <16 x i8>* %{{[0-9]+}}, align 1 @@ -9418,8 +9418,8 @@ void test10() { /* ----------------------------- vec_xl_be ---------------------------------- */ void test11() { - // CHECK-LABEL: define void @test11 - // CHECK-LE-LABEL: define void @test11 + // CHECK-LABEL: define dso_local void @test11 + // CHECK-LE-LABEL: define dso_local void @test11 res_vsc = vec_xl_be(param_sll, ¶m_sc); // CHECK: load <16 x i8>, <16 x i8>* %{{[0-9]+}}, align 1 // CHECK-LE: call <2 x double> @llvm.ppc.vsx.lxvd2x.be(i8* %{{[0-9]+}}) @@ -9455,8 +9455,8 @@ void test11() { /* ----------------------------- vec_xst_be --------------------------------- */ void test12() { - // CHECK-LABEL: define void @test12 - // CHECK-LE-LABEL: define void @test12 + // CHECK-LABEL: define dso_local void @test12 + // CHECK-LE-LABEL: define dso_local void @test12 vec_xst_be(vsc, param_sll, ¶m_sc); // CHECK: store <16 x i8> %{{[0-9]+}}, <16 x i8>* %{{[0-9]+}}, align 1 // CHECK-LE: shufflevector <16 x i8> %{{[0-9]+}}, <16 x i8> %{{[0-9]+}}, <16 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0, i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8> diff --git a/clang/test/CodeGen/builtins-ppc-crypto.c b/clang/test/CodeGen/builtins-ppc-crypto.c index 04f06f4d67db..1a6d82b47acc 100644 --- a/clang/test/CodeGen/builtins-ppc-crypto.c +++ b/clang/test/CodeGen/builtins-ppc-crypto.c @@ -24,7 +24,7 @@ #define D_INIT2 { 0x7172737475767778, \ 0x797A7B7C7D7E7F70 }; -// CHECK-LABEL: define <16 x i8> @test_vpmsumb +// CHECK-LABEL: define dso_local <16 x i8> @test_vpmsumb vector unsigned char test_vpmsumb(void) { vector unsigned char a = B_INIT1 @@ -33,7 +33,7 @@ vector unsigned char test_vpmsumb(void) // CHECK: @llvm.ppc.altivec.crypto.vpmsumb } -// CHECK-LABEL: define <8 x i16> @test_vpmsumh +// CHECK-LABEL: define dso_local <8 x i16> @test_vpmsumh vector unsigned short test_vpmsumh(void) { vector unsigned short a = H_INIT1 @@ -42,7 +42,7 @@ vector unsigned short test_vpmsumh(void) // CHECK: @llvm.ppc.altivec.crypto.vpmsumh } -// CHECK-LABEL: define <4 x i32> @test_vpmsumw +// CHECK-LABEL: define dso_local <4 x i32> @test_vpmsumw vector unsigned int test_vpmsumw(void) { vector unsigned int a = W_INIT1 @@ -51,7 +51,7 @@ vector unsigned int test_vpmsumw(void) // CHECK: @llvm.ppc.altivec.crypto.vpmsumw } -// CHECK-LABEL: define <2 x i64> @test_vpmsumd +// CHECK-LABEL: define dso_local <2 x i64> @test_vpmsumd vector unsigned long long test_vpmsumd(void) { vector unsigned long long a = D_INIT1 @@ -60,7 +60,7 @@ vector unsigned long long test_vpmsumd(void) // CHECK: @llvm.ppc.altivec.crypto.vpmsumd } -// CHECK-LABEL: define <2 x i64> @test_vsbox +// CHECK-LABEL: define dso_local <2 x i64> @test_vsbox vector unsigned long long test_vsbox(void) { vector unsigned long long a = D_INIT1 @@ -68,7 +68,7 @@ vector unsigned long long test_vsbox(void) // CHECK: @llvm.ppc.altivec.crypto.vsbox } -// CHECK-LABEL: define <16 x i8> @test_vpermxorb +// CHECK-LABEL: define dso_local <16 x i8> @test_vpermxorb vector unsigned char test_vpermxorb(void) { vector unsigned char a = B_INIT1 @@ -78,7 +78,7 @@ vector unsigned char test_vpermxorb(void) // CHECK: @llvm.ppc.altivec.crypto.vpermxor } -// CHECK-LABEL: define <8 x i16> @test_vpermxorh +// CHECK-LABEL: define dso_local <8 x i16> @test_vpermxorh vector unsigned short test_vpermxorh(void) { vector unsigned short a = H_INIT1 @@ -88,7 +88,7 @@ vector unsigned short test_vpermxorh(void) // CHECK: @llvm.ppc.altivec.crypto.vpermxor } -// CHECK-LABEL: define <4 x i32> @test_vpermxorw +// CHECK-LABEL: define dso_local <4 x i32> @test_vpermxorw vector unsigned int test_vpermxorw(void) { vector unsigned int a = W_INIT1 @@ -98,7 +98,7 @@ vector unsigned int test_vpermxorw(void) // CHECK: @llvm.ppc.altivec.crypto.vpermxor } -// CHECK-LABEL: define <2 x i64> @test_vpermxord +// CHECK-LABEL: define dso_local <2 x i64> @test_vpermxord vector unsigned long long test_vpermxord(void) { vector unsigned long long a = D_INIT1 @@ -132,7 +132,7 @@ vector unsigned char test_vpermxoruc(vector unsigned char a, // CHECK: @llvm.ppc.altivec.crypto.vpermxor } -// CHECK-LABEL: define <2 x i64> @test_vcipher +// CHECK-LABEL: define dso_local <2 x i64> @test_vcipher vector unsigned long long test_vcipher(void) { vector unsigned long long a = D_INIT1 @@ -141,7 +141,7 @@ vector unsigned long long test_vcipher(void) // CHECK: @llvm.ppc.altivec.crypto.vcipher } -// CHECK-LABEL: define <2 x i64> @test_vcipherlast +// CHECK-LABEL: define dso_local <2 x i64> @test_vcipherlast vector unsigned long long test_vcipherlast(void) { vector unsigned long long a = D_INIT1 @@ -159,7 +159,7 @@ vector unsigned long long test_vncipher(void) // CHECK: @llvm.ppc.altivec.crypto.vncipher } -// CHECK-LABEL: define <2 x i64> @test_vncipherlast +// CHECK-LABEL: define dso_local <2 x i64> @test_vncipherlast vector unsigned long long test_vncipherlast(void) { vector unsigned long long a = D_INIT1 @@ -168,7 +168,7 @@ vector unsigned long long test_vncipherlast(void) // CHECK: @llvm.ppc.altivec.crypto.vncipherlast } -// CHECK-LABEL: define <4 x i32> @test_vshasigmaw +// CHECK-LABEL: define dso_local <4 x i32> @test_vshasigmaw vector unsigned int test_vshasigmaw(void) { vector unsigned int a = W_INIT1 @@ -176,7 +176,7 @@ vector unsigned int test_vshasigmaw(void) // CHECK: @llvm.ppc.altivec.crypto.vshasigmaw } -// CHECK-LABEL: define <2 x i64> @test_vshasigmad +// CHECK-LABEL: define dso_local <2 x i64> @test_vshasigmad vector unsigned long long test_vshasigmad(void) { vector unsigned long long a = D_INIT2 @@ -186,7 +186,7 @@ vector unsigned long long test_vshasigmad(void) // Test cases for the builtins the way they are exposed to // users through altivec.h -// CHECK-LABEL: define <16 x i8> @test_vpmsumb_e +// CHECK-LABEL: define dso_local <16 x i8> @test_vpmsumb_e vector unsigned char test_vpmsumb_e(void) { vector unsigned char a = B_INIT1 @@ -195,7 +195,7 @@ vector unsigned char test_vpmsumb_e(void) // CHECK: @llvm.ppc.altivec.crypto.vpmsumb } -// CHECK-LABEL: define <8 x i16> @test_vpmsumh_e +// CHECK-LABEL: define dso_local <8 x i16> @test_vpmsumh_e vector unsigned short test_vpmsumh_e(void) { vector unsigned short a = H_INIT1 @@ -204,7 +204,7 @@ vector unsigned short test_vpmsumh_e(void) // CHECK: @llvm.ppc.altivec.crypto.vpmsumh } -// CHECK-LABEL: define <4 x i32> @test_vpmsumw_e +// CHECK-LABEL: define dso_local <4 x i32> @test_vpmsumw_e vector unsigned int test_vpmsumw_e(void) { vector unsigned int a = W_INIT1 @@ -213,7 +213,7 @@ vector unsigned int test_vpmsumw_e(void) // CHECK: @llvm.ppc.altivec.crypto.vpmsumw } -// CHECK-LABEL: define <2 x i64> @test_vpmsumd_e +// CHECK-LABEL: define dso_local <2 x i64> @test_vpmsumd_e vector unsigned long long test_vpmsumd_e(void) { vector unsigned long long a = D_INIT1 @@ -222,7 +222,7 @@ vector unsigned long long test_vpmsumd_e(void) // CHECK: @llvm.ppc.altivec.crypto.vpmsumd } -// CHECK-LABEL: define <2 x i64> @test_vsbox_e +// CHECK-LABEL: define dso_local <2 x i64> @test_vsbox_e vector unsigned long long test_vsbox_e(void) { vector unsigned long long a = D_INIT1 @@ -230,7 +230,7 @@ vector unsigned long long test_vsbox_e(void) // CHECK: @llvm.ppc.altivec.crypto.vsbox } -// CHECK-LABEL: define <16 x i8> @test_vpermxorb_e +// CHECK-LABEL: define dso_local <16 x i8> @test_vpermxorb_e vector unsigned char test_vpermxorb_e(void) { vector unsigned char a = B_INIT1 @@ -240,7 +240,7 @@ vector unsigned char test_vpermxorb_e(void) // CHECK: @llvm.ppc.altivec.crypto.vpermxor } -// CHECK-LABEL: define <8 x i16> @test_vpermxorh_e +// CHECK-LABEL: define dso_local <8 x i16> @test_vpermxorh_e vector unsigned short test_vpermxorh_e(void) { vector unsigned short a = H_INIT1 @@ -250,7 +250,7 @@ vector unsigned short test_vpermxorh_e(void) // CHECK: @llvm.ppc.altivec.crypto.vpermxor } -// CHECK-LABEL: define <4 x i32> @test_vpermxorw_e +// CHECK-LABEL: define dso_local <4 x i32> @test_vpermxorw_e vector unsigned int test_vpermxorw_e(void) { vector unsigned int a = W_INIT1 @@ -260,7 +260,7 @@ vector unsigned int test_vpermxorw_e(void) // CHECK: @llvm.ppc.altivec.crypto.vpermxor } -// CHECK-LABEL: define <2 x i64> @test_vpermxord_e +// CHECK-LABEL: define dso_local <2 x i64> @test_vpermxord_e vector unsigned long long test_vpermxord_e(void) { vector unsigned long long a = D_INIT1 @@ -270,7 +270,7 @@ vector unsigned long long test_vpermxord_e(void) // CHECK: @llvm.ppc.altivec.crypto.vpermxor } -// CHECK-LABEL: define <2 x i64> @test_vcipher_e +// CHECK-LABEL: define dso_local <2 x i64> @test_vcipher_e vector unsigned long long test_vcipher_e(void) { vector unsigned long long a = D_INIT1 @@ -279,7 +279,7 @@ vector unsigned long long test_vcipher_e(void) // CHECK: @llvm.ppc.altivec.crypto.vcipher } -// CHECK-LABEL: define <2 x i64> @test_vcipherlast_e +// CHECK-LABEL: define dso_local <2 x i64> @test_vcipherlast_e vector unsigned long long test_vcipherlast_e(void) { vector unsigned long long a = D_INIT1 @@ -288,7 +288,7 @@ vector unsigned long long test_vcipherlast_e(void) // CHECK: @llvm.ppc.altivec.crypto.vcipherlast } -// CHECK-LABEL: define <2 x i64> @test_vncipher_e +// CHECK-LABEL: define dso_local <2 x i64> @test_vncipher_e vector unsigned long long test_vncipher_e(void) { vector unsigned long long a = D_INIT1 @@ -297,7 +297,7 @@ vector unsigned long long test_vncipher_e(void) // CHECK: @llvm.ppc.altivec.crypto.vncipher } -// CHECK-LABEL: define <2 x i64> @test_vncipherlast_e +// CHECK-LABEL: define dso_local <2 x i64> @test_vncipherlast_e vector unsigned long long test_vncipherlast_e(void) { vector unsigned long long a = D_INIT1 @@ -306,7 +306,7 @@ vector unsigned long long test_vncipherlast_e(void) // CHECK: @llvm.ppc.altivec.crypto.vncipherlast } -// CHECK-LABEL: define <4 x i32> @test_vshasigmaw_e +// CHECK-LABEL: define dso_local <4 x i32> @test_vshasigmaw_e vector unsigned int test_vshasigmaw_e(void) { vector unsigned int a = W_INIT1 @@ -314,7 +314,7 @@ vector unsigned int test_vshasigmaw_e(void) // CHECK: @llvm.ppc.altivec.crypto.vshasigmaw } -// CHECK-LABEL: define <2 x i64> @test_vshasigmad_e +// CHECK-LABEL: define dso_local <2 x i64> @test_vshasigmad_e vector unsigned long long test_vshasigmad_e(void) { vector unsigned long long a = D_INIT2 diff --git a/clang/test/CodeGen/builtins-ppc-htm.c b/clang/test/CodeGen/builtins-ppc-htm.c index d7e7a9148e0f..68c7f8e7a494 100644 --- a/clang/test/CodeGen/builtins-ppc-htm.c +++ b/clang/test/CodeGen/builtins-ppc-htm.c @@ -2,7 +2,7 @@ // RUN: %clang_cc1 -target-feature +altivec -target-feature +htm -triple powerpc64-unknown-unknown -emit-llvm %s -o - | FileCheck %s void test1(long int *r, int code, long int *a, long int *b) { -// CHECK-LABEL: define void @test1 +// CHECK-LABEL: define dso_local void @test1 r[0] = __builtin_tbegin (0); // CHECK: @llvm.ppc.tbegin diff --git a/clang/test/CodeGen/builtins-ppc-p7.c b/clang/test/CodeGen/builtins-ppc-p7.c index 237a58fb84da..225af0141faf 100644 --- a/clang/test/CodeGen/builtins-ppc-p7.c +++ b/clang/test/CodeGen/builtins-ppc-p7.c @@ -5,7 +5,7 @@ // RUN: %clang_cc1 -triple powerpc64le-unknown-unknown -target-cpu pwr8 \ // RUN: -emit-llvm %s -o - | FileCheck %s -// CHECK-LABEL: define signext i32 @test_divwe +// CHECK-LABEL: define dso_local signext i32 @test_divwe int test_divwe(void) { int a = 74; @@ -14,7 +14,7 @@ int test_divwe(void) // CHECK: @llvm.ppc.divwe } -// CHECK-LABEL: define zeroext i32 @test_divweu +// CHECK-LABEL: define dso_local zeroext i32 @test_divweu unsigned int test_divweu(void) { unsigned int a = 74; @@ -23,7 +23,7 @@ unsigned int test_divweu(void) // CHECK: @llvm.ppc.divweu } -// CHECK-LABEL: define i64 @test_divde +// CHECK-LABEL: define dso_local i64 @test_divde long long test_divde(void) { long long a = 74LL; @@ -32,7 +32,7 @@ long long test_divde(void) // CHECK: @llvm.ppc.divde } -// CHECK-LABEL: define i64 @test_divdeu +// CHECK-LABEL: define dso_local i64 @test_divdeu unsigned long long test_divdeu(void) { unsigned long long a = 74ULL; @@ -41,7 +41,7 @@ unsigned long long test_divdeu(void) // CHECK: @llvm.ppc.divdeu } -// CHECK-LABEL: define i64 @test_bpermd +// CHECK-LABEL: define dso_local i64 @test_bpermd long long test_bpermd(void) { long long a = 74LL; diff --git a/clang/test/CodeGen/builtins-ppc-p8vector.c b/clang/test/CodeGen/builtins-ppc-p8vector.c index d494e463105e..583c1090dd73 100644 --- a/clang/test/CodeGen/builtins-ppc-p8vector.c +++ b/clang/test/CodeGen/builtins-ppc-p8vector.c @@ -64,7 +64,7 @@ vector unsigned __int128 res_vux; vector float res_vf; vector double res_vd; -// CHECK-LABEL: define void @test1 +// CHECK-LABEL: define dso_local void @test1 void test1() { /* vec_abs */ diff --git a/clang/test/CodeGen/builtins-ppc-quadword.c b/clang/test/CodeGen/builtins-ppc-quadword.c index 868fb183a623..67005e3bfa9b 100644 --- a/clang/test/CodeGen/builtins-ppc-quadword.c +++ b/clang/test/CodeGen/builtins-ppc-quadword.c @@ -27,7 +27,7 @@ vector signed __int128 res_vlll; vector unsigned __int128 res_vulll; -// CHECK-LABEL: define void @test1 +// CHECK-LABEL: define dso_local void @test1 void test1() { /* vec_add */ diff --git a/clang/test/CodeGen/builtins-ppc-vsx.c b/clang/test/CodeGen/builtins-ppc-vsx.c index a19e75518a8d..bcc8199aa472 100644 --- a/clang/test/CodeGen/builtins-ppc-vsx.c +++ b/clang/test/CodeGen/builtins-ppc-vsx.c @@ -64,8 +64,8 @@ unsigned int res_aui[4]; void dummy() { } void test1() { -// CHECK-LABEL: define void @test1 -// CHECK-LE-LABEL: define void @test1 +// CHECK-LABEL: define dso_local void @test1 +// CHECK-LE-LABEL: define dso_local void @test1 res_vf = vec_abs(vf); // CHECK: call <4 x float> @llvm.fabs.v4f32(<4 x float> %{{[0-9]*}}) diff --git a/clang/test/CodeGen/builtins-ppc.c b/clang/test/CodeGen/builtins-ppc.c index 1ff1b811c1a0..36731d20f444 100644 --- a/clang/test/CodeGen/builtins-ppc.c +++ b/clang/test/CodeGen/builtins-ppc.c @@ -8,7 +8,7 @@ void test_eh_return_data_regno() res = __builtin_eh_return_data_regno(1); // CHECK: store volatile i32 4 } -// CHECK-LABEL: define i64 @test_builtin_ppc_get_timebase +// CHECK-LABEL: define dso_local i64 @test_builtin_ppc_get_timebase long long test_builtin_ppc_get_timebase() { // CHECK: call i64 @llvm.readcyclecounter() return __builtin_ppc_get_timebase(); diff --git a/clang/test/CodeGen/c11atomics.c b/clang/test/CodeGen/c11atomics.c index cf251738be55..778932989375 100644 --- a/clang/test/CodeGen/c11atomics.c +++ b/clang/test/CodeGen/c11atomics.c @@ -25,10 +25,10 @@ struct elem { // CHECK-DAG: %struct.elem = type { %struct.ptr } struct ptr object; -// CHECK-DAG: @object = common global %struct.ptr zeroinitializer +// CHECK-DAG: @object = common dso_local global %struct.ptr zeroinitializer -// CHECK-DAG: @testStructGlobal = global {{.*}} { i16 1, i16 2, i16 3, i16 4 } -// CHECK-DAG: @testPromotedStructGlobal = global {{.*}} { %{{.*}} { i16 1, i16 2, i16 3 }, [2 x i8] zeroinitializer } +// CHECK-DAG: @testStructGlobal = dso_local global {{.*}} { i16 1, i16 2, i16 3, i16 4 } +// CHECK-DAG: @testPromotedStructGlobal = dso_local global {{.*}} { %{{.*}} { i16 1, i16 2, i16 3 }, [2 x i8] zeroinitializer } typedef int __attribute__((vector_size(16))) vector; @@ -154,7 +154,7 @@ void testandeq(void) s &= 42; } -// CHECK-LABEL: define arm_aapcscc void @testFloat(float* +// CHECK-LABEL: define dso_local arm_aapcscc void @testFloat(float* void testFloat(_Atomic(float) *fp) { // CHECK: [[FP:%.*]] = alloca float* // CHECK-NEXT: [[X:%.*]] = alloca float @@ -189,7 +189,7 @@ void testFloat(_Atomic(float) *fp) { // CHECK-NEXT: ret void } -// CHECK: define arm_aapcscc void @testComplexFloat([[CF:{ float, float }]]* +// CHECK: define dso_local arm_aapcscc void @testComplexFloat([[CF:{ float, float }]]* void testComplexFloat(_Atomic(_Complex float) *fp) { // CHECK: [[FP:%.*]] = alloca [[CF]]*, align 4 // CHECK-NEXT: [[X:%.*]] = alloca [[CF]], align 8 @@ -244,7 +244,7 @@ void testComplexFloat(_Atomic(_Complex float) *fp) { typedef struct { short x, y, z, w; } S; _Atomic S testStructGlobal = (S){1, 2, 3, 4}; -// CHECK: define arm_aapcscc void @testStruct([[S:.*]]* +// CHECK: define dso_local arm_aapcscc void @testStruct([[S:.*]]* void testStruct(_Atomic(S) *fp) { // CHECK: [[FP:%.*]] = alloca [[S]]*, align 4 // CHECK-NEXT: [[X:%.*]] = alloca [[S]], align 8 @@ -293,7 +293,7 @@ void testStruct(_Atomic(S) *fp) { typedef struct { short x, y, z; } PS; _Atomic PS testPromotedStructGlobal = (PS){1, 2, 3}; -// CHECK: define arm_aapcscc void @testPromotedStruct([[APS:.*]]* +// CHECK: define dso_local arm_aapcscc void @testPromotedStruct([[APS:.*]]* void testPromotedStruct(_Atomic(PS) *fp) { // CHECK: [[FP:%.*]] = alloca [[APS]]*, align 4 // CHECK-NEXT: [[X:%.*]] = alloca [[APS]], align 8 diff --git a/clang/test/CodeGen/catch-alignment-assumption-attribute-align_value-on-lvalue.cpp b/clang/test/CodeGen/catch-alignment-assumption-attribute-align_value-on-lvalue.cpp index 96d264190bec..de71164f5671 100644 --- a/clang/test/CodeGen/catch-alignment-assumption-attribute-align_value-on-lvalue.cpp +++ b/clang/test/CodeGen/catch-alignment-assumption-attribute-align_value-on-lvalue.cpp @@ -14,7 +14,7 @@ struct ac_struct { // CHECK-SANITIZE-ANYRECOVER: @[[LINE_100_ALIGNMENT_ASSUMPTION:.*]] = {{.*}}, i32 100, i32 13 }, {{.*}}* @[[ALIGNED_CHAR]] } char **load_from_ac_struct(struct ac_struct *x) { - // CHECK: define i8** @{{.*}}(%[[STRUCT_AC_STRUCT]]* %[[X:.*]]) + // CHECK: define dso_local i8** @{{.*}}(%[[STRUCT_AC_STRUCT]]* %[[X:.*]]) // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-NEXT: %[[STRUCT_AC_STRUCT_ADDR:.*]] = alloca %[[STRUCT_AC_STRUCT]]*, align 8 // CHECK-NEXT: store %[[STRUCT_AC_STRUCT]]* %[[X]], %[[STRUCT_AC_STRUCT]]** %[[STRUCT_AC_STRUCT_ADDR]], align 8 diff --git a/clang/test/CodeGen/catch-alignment-assumption-attribute-align_value-on-paramvar.cpp b/clang/test/CodeGen/catch-alignment-assumption-attribute-align_value-on-paramvar.cpp index 0e3fa750c66c..761bccc447f8 100644 --- a/clang/test/CodeGen/catch-alignment-assumption-attribute-align_value-on-paramvar.cpp +++ b/clang/test/CodeGen/catch-alignment-assumption-attribute-align_value-on-paramvar.cpp @@ -7,8 +7,8 @@ // CHECK-SANITIZE-ANYRECOVER: @[[LINE_100_ALIGNMENT_ASSUMPTION:.*]] = {{.*}}, i32 100, i32 10 }, {{.*}}* @[[CHAR]] } char **passthrough(__attribute__((align_value(0x80000000))) char **x) { - // CHECK-NOSANITIZE: define i8** @{{.*}}(i8** align 536870912 %[[X:.*]]) - // CHECK-SANITIZE: define i8** @{{.*}}(i8** %[[X:.*]]) + // CHECK-NOSANITIZE: define dso_local i8** @{{.*}}(i8** align 536870912 %[[X:.*]]) + // CHECK-SANITIZE: define dso_local i8** @{{.*}}(i8** %[[X:.*]]) // CHECK-NEXT: [[entry:.*]]: // CHECK-NEXT: %[[X_ADDR:.*]] = alloca i8**, align 8 // CHECK-NEXT: store i8** %[[X]], i8*** %[[X_ADDR]], align 8 diff --git a/clang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function-variable.cpp b/clang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function-variable.cpp index 591eaa0e1313..41934f172e65 100644 --- a/clang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function-variable.cpp +++ b/clang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function-variable.cpp @@ -8,7 +8,7 @@ char **__attribute__((alloc_align(2))) passthrough(char **x, unsigned long alignment) { - // CHECK: define i8** @[[PASSTHROUGH:.*]](i8** %[[X:.*]], i64 %[[ALIGNMENT:.*]]) + // CHECK: define dso_local i8** @[[PASSTHROUGH:.*]](i8** %[[X:.*]], i64 %[[ALIGNMENT:.*]]) // CHECK-NEXT: entry: // CHECK-NEXT: %[[X_ADDR:.*]] = alloca i8**, align 8 // CHECK-NEXT: %[[ALIGNMENT_ADDR:.*]] = alloca i64, align 8 @@ -21,7 +21,7 @@ passthrough(char **x, unsigned long alignment) { } char **caller(char **x, unsigned long alignment) { - // CHECK: define i8** @{{.*}}(i8** %[[X:.*]], i64 %[[ALIGNMENT:.*]]) + // CHECK: define dso_local i8** @{{.*}}(i8** %[[X:.*]], i64 %[[ALIGNMENT:.*]]) // CHECK-NEXT: entry: // CHECK-NEXT: %[[X_ADDR:.*]] = alloca i8**, align 8 // CHECK-NEXT: %[[ALIGNMENT_ADDR:.*]] = alloca i64, align 8 diff --git a/clang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function.cpp b/clang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function.cpp index a41357933f91..a1306accec40 100644 --- a/clang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function.cpp +++ b/clang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function.cpp @@ -8,7 +8,7 @@ char **__attribute__((alloc_align(2))) passthrough(char **x, unsigned long alignment) { - // CHECK: define i8** @[[PASSTHROUGH:.*]](i8** %[[X:.*]], i64 %[[ALIGNMENT:.*]]) + // CHECK: define dso_local i8** @[[PASSTHROUGH:.*]](i8** %[[X:.*]], i64 %[[ALIGNMENT:.*]]) // CHECK-NEXT: entry: // CHECK-NEXT: %[[X_ADDR:.*]] = alloca i8**, align 8 // CHECK-NEXT: %[[ALIGNMENT_ADDR:.*]] = alloca i64, align 8 @@ -21,7 +21,7 @@ passthrough(char **x, unsigned long alignment) { } char **caller(char **x) { - // CHECK: define i8** @{{.*}}(i8** %[[X:.*]]) + // CHECK: define dso_local i8** @{{.*}}(i8** %[[X:.*]]) // CHECK-NEXT: entry: // CHECK-NEXT: %[[X_ADDR:.*]] = alloca i8**, align 8 // CHECK-NEXT: store i8** %[[X]], i8*** %[[X_ADDR]], align 8 diff --git a/clang/test/CodeGen/catch-alignment-assumption-attribute-assume_aligned-on-function-two-params.cpp b/clang/test/CodeGen/catch-alignment-assumption-attribute-assume_aligned-on-function-two-params.cpp index e78667ce16e0..e805233e8ead 100644 --- a/clang/test/CodeGen/catch-alignment-assumption-attribute-assume_aligned-on-function-two-params.cpp +++ b/clang/test/CodeGen/catch-alignment-assumption-attribute-assume_aligned-on-function-two-params.cpp @@ -7,7 +7,7 @@ // CHECK-SANITIZE-ANYRECOVER: @[[LINE_100_ALIGNMENT_ASSUMPTION:.*]] = {{.*}}, i32 100, i32 10 }, {{.*}}* @[[CHAR]] } char **__attribute__((assume_aligned(0x80000000, 42))) passthrough(char **x) { - // CHECK: define i8** @[[PASSTHROUGH:.*]](i8** %[[X:.*]]) + // CHECK: define dso_local i8** @[[PASSTHROUGH:.*]](i8** %[[X:.*]]) // CHECK-NEXT: entry: // CHECK-NEXT: %[[X_ADDR:.*]] = alloca i8**, align 8 // CHECK-NEXT: store i8** %[[X]], i8*** %[[X_ADDR]], align 8 @@ -18,7 +18,7 @@ char **__attribute__((assume_aligned(0x80000000, 42))) passthrough(char **x) { } char **caller(char **x) { - // CHECK: define i8** @{{.*}}(i8** %[[X:.*]]) + // CHECK: define dso_local i8** @{{.*}}(i8** %[[X:.*]]) // CHECK-NEXT: entry: // CHECK-NEXT: %[[X_ADDR:.*]] = alloca i8**, align 8 // CHECK-NEXT: store i8** %[[X]], i8*** %[[X_ADDR]], align 8 diff --git a/clang/test/CodeGen/catch-alignment-assumption-attribute-assume_aligned-on-function.cpp b/clang/test/CodeGen/catch-alignment-assumption-attribute-assume_aligned-on-function.cpp index f750bbd77d42..57dcb4c55d51 100644 --- a/clang/test/CodeGen/catch-alignment-assumption-attribute-assume_aligned-on-function.cpp +++ b/clang/test/CodeGen/catch-alignment-assumption-attribute-assume_aligned-on-function.cpp @@ -7,7 +7,7 @@ // CHECK-SANITIZE-ANYRECOVER: @[[LINE_100_ALIGNMENT_ASSUMPTION:.*]] = {{.*}}, i32 100, i32 10 }, {{.*}}* @[[CHAR]] } char **__attribute__((assume_aligned(128))) passthrough(char **x) { - // CHECK: define i8** @[[PASSTHROUGH:.*]](i8** %[[X:.*]]) + // CHECK: define dso_local i8** @[[PASSTHROUGH:.*]](i8** %[[X:.*]]) // CHECK-NEXT: entry: // CHECK-NEXT: %[[X_ADDR:.*]] = alloca i8**, align 8 // CHECK-NEXT: store i8** %[[X]], i8*** %[[X_ADDR]], align 8 @@ -18,7 +18,7 @@ char **__attribute__((assume_aligned(128))) passthrough(char **x) { } char **caller(char **x) { - // CHECK: define i8** @{{.*}}(i8** %[[X]]) + // CHECK: define dso_local i8** @{{.*}}(i8** %[[X]]) // CHECK-NEXT: entry: // CHECK-NEXT: %[[X_ADDR]] = alloca i8**, align 8 // CHECK-NEXT: store i8** %[[X]], i8*** %[[X_ADDR]], align 8 diff --git a/clang/test/CodeGen/catch-alignment-assumption-builtin_assume_aligned-three-params-variable.cpp b/clang/test/CodeGen/catch-alignment-assumption-builtin_assume_aligned-three-params-variable.cpp index 4306e322f5fb..b7c514b8aacf 100644 --- a/clang/test/CodeGen/catch-alignment-assumption-builtin_assume_aligned-three-params-variable.cpp +++ b/clang/test/CodeGen/catch-alignment-assumption-builtin_assume_aligned-three-params-variable.cpp @@ -7,7 +7,7 @@ // CHECK-SANITIZE-ANYRECOVER: @[[LINE_100_ALIGNMENT_ASSUMPTION:.*]] = {{.*}}, i32 100, i32 35 }, {{.*}}* @[[CHAR]] } void *caller(char **x, unsigned long offset) { - // CHECK: define i8* @{{.*}}(i8** %[[X:.*]], i64 %[[OFFSET:.*]]) + // CHECK: define dso_local i8* @{{.*}}(i8** %[[X:.*]], i64 %[[OFFSET:.*]]) // CHECK-NEXT: entry: // CHECK-NEXT: %[[X_ADDR:.*]] = alloca i8**, align 8 // CHECK-NEXT: %[[OFFSET_ADDR:.*]] = alloca i64, align 8 diff --git a/clang/test/CodeGen/catch-alignment-assumption-builtin_assume_aligned-three-params.cpp b/clang/test/CodeGen/catch-alignment-assumption-builtin_assume_aligned-three-params.cpp index 27f53e92bed8..2fe4a84c1a94 100644 --- a/clang/test/CodeGen/catch-alignment-assumption-builtin_assume_aligned-three-params.cpp +++ b/clang/test/CodeGen/catch-alignment-assumption-builtin_assume_aligned-three-params.cpp @@ -7,7 +7,7 @@ // CHECK-SANITIZE-ANYRECOVER: @[[LINE_100_ALIGNMENT_ASSUMPTION:.*]] = {{.*}}, i32 100, i32 35 }, {{.*}}* @[[CHAR]] } void *caller(char **x) { - // CHECK: define i8* @{{.*}}(i8** %[[X:.*]]) + // CHECK: define dso_local i8* @{{.*}}(i8** %[[X:.*]]) // CHECK-NEXT: entry: // CHECK-NEXT: %[[X_ADDR:.*]] = alloca i8**, align 8 // CHECK-NEXT: store i8** %[[X]], i8*** %[[X_ADDR]], align 8 diff --git a/clang/test/CodeGen/catch-alignment-assumption-builtin_assume_aligned-two-params.cpp b/clang/test/CodeGen/catch-alignment-assumption-builtin_assume_aligned-two-params.cpp index 5412270f3761..a2d2a2cad70a 100644 --- a/clang/test/CodeGen/catch-alignment-assumption-builtin_assume_aligned-two-params.cpp +++ b/clang/test/CodeGen/catch-alignment-assumption-builtin_assume_aligned-two-params.cpp @@ -7,7 +7,7 @@ // CHECK-SANITIZE-ANYRECOVER: @[[LINE_100_ALIGNMENT_ASSUMPTION:.*]] = {{.*}}, i32 100, i32 35 }, {{.*}}* @[[CHAR]] } void *caller(char **x) { - // CHECK: define i8* @{{.*}}(i8** %[[X:.*]]) + // CHECK: define dso_local i8* @{{.*}}(i8** %[[X:.*]]) // CHECK-NEXT: entry: // CHECK-NEXT: %[[X_ADDR:.*]] = alloca i8**, align 8 // CHECK-NEXT: store i8** %[[X]], i8*** %[[X_ADDR]], align 8 diff --git a/clang/test/CodeGen/catch-alignment-assumption-openmp.cpp b/clang/test/CodeGen/catch-alignment-assumption-openmp.cpp index 6d75ee0858da..d7b1af8ab527 100644 --- a/clang/test/CodeGen/catch-alignment-assumption-openmp.cpp +++ b/clang/test/CodeGen/catch-alignment-assumption-openmp.cpp @@ -7,7 +7,7 @@ // CHECK-SANITIZE-ANYRECOVER: @[[LINE_100_ALIGNMENT_ASSUMPTION:.*]] = {{.*}}, i32 100, i32 30 }, {{.*}}* @[[CHAR]] } void func(char *data) { - // CHECK: define void @{{.*}}(i8* %[[DATA:.*]]) + // CHECK: define dso_local void @{{.*}}(i8* %[[DATA:.*]]) // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-NEXT: %[[DATA_ADDR:.*]] = alloca i8*, align 8 // CHECK: store i8* %[[DATA]], i8** %[[DATA_ADDR]], align 8 diff --git a/clang/test/CodeGen/catch-nullptr-and-nonzero-offset-in-offsetof-idiom.c b/clang/test/CodeGen/catch-nullptr-and-nonzero-offset-in-offsetof-idiom.c index 09d644a85983..36995184c90f 100644 --- a/clang/test/CodeGen/catch-nullptr-and-nonzero-offset-in-offsetof-idiom.c +++ b/clang/test/CodeGen/catch-nullptr-and-nonzero-offset-in-offsetof-idiom.c @@ -14,7 +14,7 @@ struct S { int x, y; }; -// CHECK-LABEL: define i64 @{{.*}}get_offset_of_y_naively{{.*}}( +// CHECK-LABEL: define dso_local i64 @{{.*}}get_offset_of_y_naively{{.*}}( uintptr_t get_offset_of_y_naively() { // CHECK: [[ENTRY:.*]]: // CHECK-NEXT: ret i64 ptrtoint (i32* getelementptr (i32, i32* null, i32 1) to i64) @@ -22,7 +22,7 @@ uintptr_t get_offset_of_y_naively() { return ((uintptr_t)(&(((struct S *)0)->y))); } -// CHECK-LABEL: define i64 @{{.*}}get_offset_of_y_via_builtin{{.*}}( +// CHECK-LABEL: define dso_local i64 @{{.*}}get_offset_of_y_via_builtin{{.*}}( uintptr_t get_offset_of_y_via_builtin() { // CHECK: [[ENTRY:.*]]: // CHECK-NEXT: ret i64 4 diff --git a/clang/test/CodeGen/catch-nullptr-and-nonzero-offset-when-nullptr-is-defined.c b/clang/test/CodeGen/catch-nullptr-and-nonzero-offset-when-nullptr-is-defined.c index 3f1e2250d346..f8db72fd0591 100644 --- a/clang/test/CodeGen/catch-nullptr-and-nonzero-offset-when-nullptr-is-defined.c +++ b/clang/test/CodeGen/catch-nullptr-and-nonzero-offset-when-nullptr-is-defined.c @@ -25,7 +25,7 @@ extern "C" { #endif char *add_unsigned(char *base, unsigned long offset) { - // CHECK: define i8* @add_unsigned(i8* %[[BASE:.*]], i64 %[[OFFSET:.*]]) + // CHECK: define dso_local i8* @add_unsigned(i8* %[[BASE:.*]], i64 %[[OFFSET:.*]]) // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-NEXT: %[[BASE_ADDR:.*]] = alloca i8*, align 8 // CHECK-NEXT: %[[OFFSET_ADDR:.*]] = alloca i64, align 8 diff --git a/clang/test/CodeGen/catch-nullptr-and-nonzero-offset.c b/clang/test/CodeGen/catch-nullptr-and-nonzero-offset.c index 60283e76dde7..fe6ca3445b1c 100644 --- a/clang/test/CodeGen/catch-nullptr-and-nonzero-offset.c +++ b/clang/test/CodeGen/catch-nullptr-and-nonzero-offset.c @@ -41,7 +41,7 @@ extern "C" { #endif char *var_var(char *base, unsigned long offset) { - // CHECK: define i8* @var_var(i8* %[[BASE:.*]], i64 %[[OFFSET:.*]]) + // CHECK: define dso_local i8* @var_var(i8* %[[BASE:.*]], i64 %[[OFFSET:.*]]) // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-NEXT: %[[BASE_ADDR:.*]] = alloca i8*, align 8 // CHECK-NEXT: %[[OFFSET_ADDR:.*]] = alloca i64, align 8 @@ -76,7 +76,7 @@ char *var_var(char *base, unsigned long offset) { } char *var_zero(char *base) { - // CHECK: define i8* @var_zero(i8* %[[BASE:.*]]) + // CHECK: define dso_local i8* @var_zero(i8* %[[BASE:.*]]) // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-NEXT: %[[BASE_ADDR:.*]] = alloca i8*, align 8 // CHECK-NEXT: store i8* %[[BASE]], i8** %[[BASE_ADDR]], align 8 @@ -103,7 +103,7 @@ char *var_zero(char *base) { } char *var_one(char *base) { - // CHECK: define i8* @var_one(i8* %[[BASE:.*]]) + // CHECK: define dso_local i8* @var_one(i8* %[[BASE:.*]]) // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-NEXT: %[[BASE_ADDR:.*]] = alloca i8*, align 8 // CHECK-NEXT: store i8* %[[BASE]], i8** %[[BASE_ADDR]], align 8 @@ -131,7 +131,7 @@ char *var_one(char *base) { } char *var_allones(char *base) { - // CHECK: define i8* @var_allones(i8* %[[BASE:.*]]) + // CHECK: define dso_local i8* @var_allones(i8* %[[BASE:.*]]) // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-NEXT: %[[BASE_ADDR:.*]] = alloca i8*, align 8 // CHECK-NEXT: store i8* %[[BASE]], i8** %[[BASE_ADDR]], align 8 @@ -161,7 +161,7 @@ char *var_allones(char *base) { //------------------------------------------------------------------------------ char *nullptr_var(unsigned long offset) { - // CHECK: define i8* @nullptr_var(i64 %[[OFFSET:.*]]) + // CHECK: define dso_local i8* @nullptr_var(i64 %[[OFFSET:.*]]) // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-NEXT: %[[OFFSET_ADDR:.*]] = alloca i64, align 8 // CHECK-NEXT: store i64 %[[OFFSET]], i64* %[[OFFSET_ADDR]], align 8 @@ -192,7 +192,7 @@ char *nullptr_var(unsigned long offset) { } char *nullptr_zero() { - // CHECK: define i8* @nullptr_zero() + // CHECK: define dso_local i8* @nullptr_zero() // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-SANITIZE-C-NEXT: br i1 false, label %[[CONT:.*]], label %[[HANDLER_POINTER_OVERFLOW:[^,]+]],{{.*}} !nosanitize // CHECK-SANITIZE-C: [[HANDLER_POINTER_OVERFLOW]]: @@ -209,7 +209,7 @@ char *nullptr_zero() { } char *nullptr_one_BAD() { - // CHECK: define i8* @nullptr_one_BAD() + // CHECK: define dso_local i8* @nullptr_one_BAD() // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-SANITIZE-C-NEXT: br i1 false, label %[[CONT:.*]], label %[[HANDLER_POINTER_OVERFLOW:[^,]+]],{{.*}} !nosanitize // CHECK-SANITIZE-CPP-NEXT: br i1 icmp eq (i64 ptrtoint (i8* getelementptr inbounds (i8, i8* null, i64 1) to i64), i64 0), label %[[CONT:.*]], label %[[HANDLER_POINTER_OVERFLOW:[^,]+]],{{.*}} !nosanitize @@ -227,7 +227,7 @@ char *nullptr_one_BAD() { } char *nullptr_allones_BAD() { - // CHECK: define i8* @nullptr_allones_BAD() + // CHECK: define dso_local i8* @nullptr_allones_BAD() // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-SANITIZE-C-NEXT: br i1 false, label %[[CONT:.*]], label %[[HANDLER_POINTER_OVERFLOW:[^,]+]],{{.*}} !nosanitize // CHECK-SANITIZE-CPP-NEXT: br i1 icmp eq (i64 mul (i64 ptrtoint (i8* getelementptr (i8, i8* null, i32 1) to i64), i64 -1), i64 0), label %[[CONT:.*]], label %[[HANDLER_POINTER_OVERFLOW:[^,]+]],{{.*}} !nosanitize @@ -247,7 +247,7 @@ char *nullptr_allones_BAD() { //------------------------------------------------------------------------------ char *one_var(unsigned long offset) { - // CHECK: define i8* @one_var(i64 %[[OFFSET:.*]]) + // CHECK: define dso_local i8* @one_var(i64 %[[OFFSET:.*]]) // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-NEXT: %[[OFFSET_ADDR:.*]] = alloca i64, align 8 // CHECK-NEXT: store i64 %[[OFFSET]], i64* %[[OFFSET_ADDR]], align 8 @@ -278,7 +278,7 @@ char *one_var(unsigned long offset) { } char *one_zero() { - // CHECK: define i8* @one_zero() + // CHECK: define dso_local i8* @one_zero() // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-SANITIZE-C-NEXT: br i1 icmp ne (i8* inttoptr (i64 1 to i8*), i8* null), label %[[CONT:.*]], label %[[HANDLER_POINTER_OVERFLOW:[^,]+]],{{.*}} !nosanitize // CHECK-SANITIZE-C: [[HANDLER_POINTER_OVERFLOW]]: @@ -295,7 +295,7 @@ char *one_zero() { } char *one_one_OK() { - // CHECK: define i8* @one_one_OK() + // CHECK: define dso_local i8* @one_one_OK() // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-SANITIZE-C-NEXT: br i1 and (i1 icmp ne (i8* inttoptr (i64 1 to i8*), i8* null), i1 icmp ne (i64 add (i64 sub (i64 ptrtoint (i8* getelementptr inbounds (i8, i8* inttoptr (i64 1 to i8*), i64 1) to i64), i64 1), i64 1), i64 0)), label %[[CONT:.*]], label %[[HANDLER_POINTER_OVERFLOW:[^,]+]],{{.*}} !nosanitize // CHECK-SANITIZE-CPP-NEXT: br i1 xor (i1 icmp eq (i8* inttoptr (i64 1 to i8*), i8* null), i1 icmp ne (i64 add (i64 sub (i64 ptrtoint (i8* getelementptr inbounds (i8, i8* inttoptr (i64 1 to i8*), i64 1) to i64), i64 1), i64 1), i64 0)), label %[[CONT:.*]], label %[[HANDLER_POINTER_OVERFLOW:[^,]+]],{{.*}} !nosanitize @@ -313,7 +313,7 @@ char *one_one_OK() { } char *one_allones_BAD() { - // CHECK: define i8* @one_allones_BAD() + // CHECK: define dso_local i8* @one_allones_BAD() // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-SANITIZE-C-NEXT: br i1 and (i1 icmp ne (i8* inttoptr (i64 1 to i8*), i8* null), i1 icmp ne (i64 add (i64 sub (i64 ptrtoint (i8* getelementptr inbounds (i8, i8* inttoptr (i64 1 to i8*), i64 -1) to i64), i64 1), i64 1), i64 0)), label %[[CONT:.*]], label %[[HANDLER_POINTER_OVERFLOW:[^,]+]],{{.*}} !nosanitize // CHECK-SANITIZE-CPP-NEXT: br i1 xor (i1 icmp eq (i8* inttoptr (i64 1 to i8*), i8* null), i1 icmp ne (i64 add (i64 sub (i64 ptrtoint (i8* getelementptr inbounds (i8, i8* inttoptr (i64 1 to i8*), i64 -1) to i64), i64 1), i64 1), i64 0)), label %[[CONT:.*]], label %[[HANDLER_POINTER_OVERFLOW:[^,]+]],{{.*}} !nosanitize @@ -333,7 +333,7 @@ char *one_allones_BAD() { //------------------------------------------------------------------------------ char *allones_var(unsigned long offset) { - // CHECK: define i8* @allones_var(i64 %[[OFFSET:.*]]) + // CHECK: define dso_local i8* @allones_var(i64 %[[OFFSET:.*]]) // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-NEXT: %[[OFFSET_ADDR:.*]] = alloca i64, align 8 // CHECK-NEXT: store i64 %[[OFFSET]], i64* %[[OFFSET_ADDR]], align 8 @@ -364,7 +364,7 @@ char *allones_var(unsigned long offset) { } char *allones_zero_OK() { - // CHECK: define i8* @allones_zero_OK() + // CHECK: define dso_local i8* @allones_zero_OK() // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-SANITIZE-C-NEXT: br i1 icmp ne (i8* inttoptr (i64 -1 to i8*), i8* null), label %[[CONT:.*]], label %[[HANDLER_POINTER_OVERFLOW:[^,]+]],{{.*}} !nosanitize // CHECK-SANITIZE-C: [[HANDLER_POINTER_OVERFLOW]]: @@ -381,7 +381,7 @@ char *allones_zero_OK() { } char *allones_one_BAD() { - // CHECK: define i8* @allones_one_BAD() + // CHECK: define dso_local i8* @allones_one_BAD() // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-SANITIZE-C-NEXT: br i1 and (i1 icmp ne (i8* inttoptr (i64 -1 to i8*), i8* null), i1 icmp ne (i64 add (i64 sub (i64 ptrtoint (i8* getelementptr inbounds (i8, i8* inttoptr (i64 -1 to i8*), i64 1) to i64), i64 -1), i64 -1), i64 0)), label %[[CONT:.*]], label %[[HANDLER_POINTER_OVERFLOW:[^,]+]],{{.*}} !nosanitize // CHECK-SANITIZE-CPP-NEXT: br i1 xor (i1 icmp eq (i8* inttoptr (i64 -1 to i8*), i8* null), i1 icmp ne (i64 add (i64 sub (i64 ptrtoint (i8* getelementptr inbounds (i8, i8* inttoptr (i64 -1 to i8*), i64 1) to i64), i64 -1), i64 -1), i64 0)), label %[[CONT:.*]], label %[[HANDLER_POINTER_OVERFLOW:[^,]+]],{{.*}} !nosanitize @@ -399,7 +399,7 @@ char *allones_one_BAD() { } char *allones_allones_OK() { - // CHECK: define i8* @allones_allones_OK() + // CHECK: define dso_local i8* @allones_allones_OK() // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-SANITIZE-C-NEXT: br i1 and (i1 icmp ne (i8* inttoptr (i64 -1 to i8*), i8* null), i1 icmp ne (i64 add (i64 sub (i64 ptrtoint (i8* getelementptr inbounds (i8, i8* inttoptr (i64 -1 to i8*), i64 -1) to i64), i64 -1), i64 -1), i64 0)), label %[[CONT:.*]], label %[[HANDLER_POINTER_OVERFLOW:[^,]+]],{{.*}} !nosanitize // CHECK-SANITIZE-CPP-NEXT: br i1 xor (i1 icmp eq (i8* inttoptr (i64 -1 to i8*), i8* null), i1 icmp ne (i64 add (i64 sub (i64 ptrtoint (i8* getelementptr inbounds (i8, i8* inttoptr (i64 -1 to i8*), i64 -1) to i64), i64 -1), i64 -1), i64 0)), label %[[CONT:.*]], label %[[HANDLER_POINTER_OVERFLOW:[^,]+]],{{.*}} !nosanitize diff --git a/clang/test/CodeGen/catch-pointer-overflow-volatile.c b/clang/test/CodeGen/catch-pointer-overflow-volatile.c index 138a3b660f5e..771d90a54f8f 100644 --- a/clang/test/CodeGen/catch-pointer-overflow-volatile.c +++ b/clang/test/CodeGen/catch-pointer-overflow-volatile.c @@ -15,7 +15,7 @@ extern "C" { #endif char *volatile_ptr(char *volatile base, unsigned long offset) { - // CHECK: define i8* @volatile_ptr(i8* %[[BASE:.*]], i64 %[[OFFSET:.*]]) + // CHECK: define dso_local i8* @volatile_ptr(i8* %[[BASE:.*]], i64 %[[OFFSET:.*]]) // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-NEXT: %[[BASE_ADDR:.*]] = alloca i8*, align 8 // CHECK-NEXT: %[[OFFSET_ADDR:.*]] = alloca i64, align 8 diff --git a/clang/test/CodeGen/catch-pointer-overflow.c b/clang/test/CodeGen/catch-pointer-overflow.c index 19115e91ff17..dd880d83028b 100644 --- a/clang/test/CodeGen/catch-pointer-overflow.c +++ b/clang/test/CodeGen/catch-pointer-overflow.c @@ -22,7 +22,7 @@ extern "C" { #endif char *add_unsigned(char *base, unsigned long offset) { - // CHECK: define i8* @add_unsigned(i8* %[[BASE:.*]], i64 %[[OFFSET:.*]]) + // CHECK: define dso_local i8* @add_unsigned(i8* %[[BASE:.*]], i64 %[[OFFSET:.*]]) // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-NEXT: %[[BASE_ADDR:.*]] = alloca i8*, align 8 // CHECK-NEXT: %[[OFFSET_ADDR:.*]] = alloca i64, align 8 @@ -57,7 +57,7 @@ char *add_unsigned(char *base, unsigned long offset) { } char *sub_unsigned(char *base, unsigned long offset) { - // CHECK: define i8* @sub_unsigned(i8* %[[BASE:.*]], i64 %[[OFFSET:.*]]) + // CHECK: define dso_local i8* @sub_unsigned(i8* %[[BASE:.*]], i64 %[[OFFSET:.*]]) // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-NEXT: %[[BASE_ADDR:.*]] = alloca i8*, align 8 // CHECK-NEXT: %[[OFFSET_ADDR:.*]] = alloca i64, align 8 @@ -93,7 +93,7 @@ char *sub_unsigned(char *base, unsigned long offset) { } char *add_signed(char *base, signed long offset) { - // CHECK: define i8* @add_signed(i8* %[[BASE:.*]], i64 %[[OFFSET:.*]]) + // CHECK: define dso_local i8* @add_signed(i8* %[[BASE:.*]], i64 %[[OFFSET:.*]]) // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-NEXT: %[[BASE_ADDR:.*]] = alloca i8*, align 8 // CHECK-NEXT: %[[OFFSET_ADDR:.*]] = alloca i64, align 8 @@ -131,7 +131,7 @@ char *add_signed(char *base, signed long offset) { } char *sub_signed(char *base, signed long offset) { - // CHECK: define i8* @sub_signed(i8* %[[BASE:.*]], i64 %[[OFFSET:.*]]) + // CHECK: define dso_local i8* @sub_signed(i8* %[[BASE:.*]], i64 %[[OFFSET:.*]]) // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-NEXT: %[[BASE_ADDR:.*]] = alloca i8*, align 8 // CHECK-NEXT: %[[OFFSET_ADDR:.*]] = alloca i64, align 8 @@ -170,7 +170,7 @@ char *sub_signed(char *base, signed long offset) { } char *postinc(char *base) { - // CHECK: define i8* @postinc(i8* %[[BASE:.*]]) + // CHECK: define dso_local i8* @postinc(i8* %[[BASE:.*]]) // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-NEXT: %[[BASE_ADDR:.*]] = alloca i8*, align 8 // CHECK-NEXT: store i8* %[[BASE]], i8** %[[BASE_ADDR]], align 8 @@ -200,7 +200,7 @@ char *postinc(char *base) { } char *postdec(char *base) { - // CHECK: define i8* @postdec(i8* %[[BASE:.*]]) + // CHECK: define dso_local i8* @postdec(i8* %[[BASE:.*]]) // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-NEXT: %[[BASE_ADDR:.*]] = alloca i8*, align 8 // CHECK-NEXT: store i8* %[[BASE]], i8** %[[BASE_ADDR]], align 8 @@ -230,7 +230,7 @@ char *postdec(char *base) { } char *preinc(char *base) { - // CHECK: define i8* @preinc(i8* %[[BASE:.*]]) + // CHECK: define dso_local i8* @preinc(i8* %[[BASE:.*]]) // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-NEXT: %[[BASE_ADDR:.*]] = alloca i8*, align 8 // CHECK-NEXT: store i8* %[[BASE]], i8** %[[BASE_ADDR]], align 8 @@ -260,7 +260,7 @@ char *preinc(char *base) { } char *predec(char *base) { - // CHECK: define i8* @predec(i8* %[[BASE:.*]]) + // CHECK: define dso_local i8* @predec(i8* %[[BASE:.*]]) // CHECK-NEXT: [[ENTRY:.*]]: // CHECK-NEXT: %[[BASE_ADDR:.*]] = alloca i8*, align 8 // CHECK-NEXT: store i8* %[[BASE]], i8** %[[BASE_ADDR]], align 8 diff --git a/clang/test/CodeGen/cfi-icall-canonical-jump-tables.c b/clang/test/CodeGen/cfi-icall-canonical-jump-tables.c index cf7ca42781e6..5d6a3be648da 100644 --- a/clang/test/CodeGen/cfi-icall-canonical-jump-tables.c +++ b/clang/test/CodeGen/cfi-icall-canonical-jump-tables.c @@ -3,7 +3,7 @@ void ext(void); -// CHECK: define void @f({{.*}} [[ATTR1:#[0-9]+]] +// CHECK: define dso_local void @f({{.*}} [[ATTR1:#[0-9]+]] void f() { ext(); } @@ -11,7 +11,7 @@ void f() { // NOCANON: declare !type {{.*}} @ext() // CANON: declare void @ext() -// CHECK: define void @g({{.*}} [[ATTR2:#[0-9]+]] +// CHECK: define dso_local void @g({{.*}} [[ATTR2:#[0-9]+]] __attribute__((cfi_canonical_jump_table)) void g() {} // CHECK: [[ATTR1]] = { diff --git a/clang/test/CodeGen/cfi-icall-cross-dso2.c b/clang/test/CodeGen/cfi-icall-cross-dso2.c index acc72a7ee766..1f5b6b011b81 100644 --- a/clang/test/CodeGen/cfi-icall-cross-dso2.c +++ b/clang/test/CodeGen/cfi-icall-cross-dso2.c @@ -2,7 +2,7 @@ // RUN: -fsanitize=cfi-icall -fsanitize-cfi-cross-dso \ // RUN: -emit-llvm -o - %s | FileCheck %s -// CHECK: define void @f() {{.*}} !type !{{.*}} !type !{{.*}} +// CHECK: define dso_local void @f() {{.*}} !type !{{.*}} !type !{{.*}} void f(void); void (*pf)(void) = f; void f(void) { } diff --git a/clang/test/CodeGen/cfi-icall-generalize.c b/clang/test/CodeGen/cfi-icall-generalize.c index c7c7b30a7a21..2ef20b2d7576 100644 --- a/clang/test/CodeGen/cfi-icall-generalize.c +++ b/clang/test/CodeGen/cfi-icall-generalize.c @@ -4,7 +4,7 @@ // Test that const char* is generalized to const void* and that const char** is // generalized to void* -// CHECK: define i32** @f({{.*}} !type [[TYPE:![0-9]+]] !type [[TYPE_GENERALIZED:![0-9]+]] +// CHECK: define dso_local i32** @f({{.*}} !type [[TYPE:![0-9]+]] !type [[TYPE_GENERALIZED:![0-9]+]] int** f(const char *a, const char **b) { return (int**)0; } diff --git a/clang/test/CodeGen/cfstring-elf-cfbuild-x86_64.c b/clang/test/CodeGen/cfstring-elf-cfbuild-x86_64.c index 8b90d7c0c1d8..513521cefdc2 100644 --- a/clang/test/CodeGen/cfstring-elf-cfbuild-x86_64.c +++ b/clang/test/CodeGen/cfstring-elf-cfbuild-x86_64.c @@ -30,7 +30,7 @@ const CFStringRef string = (CFStringRef)__builtin___CFStringMakeConstantString(" // CHECK-CF-IN-CF-DECL: @__CFConstantStringClassReference = external global [0 x i32] -// CHECK-CF-IN-CF-DEFN: @__CFConstantStringClassReference = common global [32 x i64] zeroinitializer, align 16 -// CHECK-CF: @__CFConstantStringClassReference = common global [1 x i64] zeroinitializer, align 8 +// CHECK-CF-IN-CF-DEFN: @__CFConstantStringClassReference = common dso_local global [32 x i64] zeroinitializer, align 16 +// CHECK-CF: @__CFConstantStringClassReference = common dso_local global [1 x i64] zeroinitializer, align 8 // CHECK-CF-EXTERN: @__CFConstantStringClassReference = external global [0 x i32] // CHECK-CF-EXTERN: @.str = private unnamed_addr constant [7 x i8] c"string\00", section ".rodata", align 1 diff --git a/clang/test/CodeGen/clang-sections-attribute.c b/clang/test/CodeGen/clang-sections-attribute.c index 7223d7d97a7a..645f29f1be27 100644 --- a/clang/test/CodeGen/clang-sections-attribute.c +++ b/clang/test/CodeGen/clang-sections-attribute.c @@ -58,14 +58,14 @@ __attribute__((section(".int_zvar_attr"), used)) static int int_zvar; #pragma clang section bss="" -// CHECK: @ext_const = constant i32 1, section ".ext_const_attr", align 4{{$}} +// CHECK: @ext_const = dso_local constant i32 1, section ".ext_const_attr", align 4{{$}} // CHECK: @int_const = internal constant i32 1, section ".int_const_attr", align 4{{$}} -// CHECK: @ext_var = global i32 1, section ".ext_var_attr", align 4{{$}} +// CHECK: @ext_var = dso_local global i32 1, section ".ext_var_attr", align 4{{$}} // CHECK: @int_var = internal global i32 1, section ".int_var_attr", align 4{{$}} -// CHECK: @ext_zvar = global i32 0, section ".ext_zvar_attr", align 4{{$}} +// CHECK: @ext_zvar = dso_local global i32 0, section ".ext_zvar_attr", align 4{{$}} // CHECK: @int_zvar = internal global i32 0, section ".int_zvar_attr", align 4{{$}} -// CHECK: define void @ext_fun() #0 section ".ext_fun_attr" -// CHECK: define void @ext_fun2() #0 section ".ext_fun2_attr" +// CHECK: define dso_local void @ext_fun() #0 section ".ext_fun_attr" +// CHECK: define dso_local void @ext_fun2() #0 section ".ext_fun2_attr" // CHECK: define internal void @int_fun() #0 section ".int_fun_attr" // CHECK: define internal void @int_fun2() #0 section ".int_fun2_attr" // diff --git a/clang/test/CodeGen/cleanup-destslot-simple.c b/clang/test/CodeGen/cleanup-destslot-simple.c index f571c6ab0e9e..48f8069f997b 100644 --- a/clang/test/CodeGen/cleanup-destslot-simple.c +++ b/clang/test/CodeGen/cleanup-destslot-simple.c @@ -7,7 +7,7 @@ // There is no exception to handle here, lifetime.end is not a destructor, // so there is no need have cleanup dest slot related code -// CHECK-LABEL: define i32 @test +// CHECK-LABEL: define dso_local i32 @test int test() { int x = 3; int *volatile p = &x; diff --git a/clang/test/CodeGen/const-arithmetic.c b/clang/test/CodeGen/const-arithmetic.c index 564ed9b356e4..eab25c5823fe 100644 --- a/clang/test/CodeGen/const-arithmetic.c +++ b/clang/test/CodeGen/const-arithmetic.c @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s -// CHECK: @g1 = global [2 x i8*] [i8* getelementptr (i8, i8* getelementptr inbounds ([0 x %struct.anon], [0 x %struct.anon]* @g0, i32 0, i32 0, i32 0), i64 -2), i8* getelementptr (i8, i8* getelementptr inbounds ([0 x %struct.anon], [0 x %struct.anon]* @g0, i32 0, i32 0, i32 0), i64 -46)], align 16 -// CHECK: @g2 = global [2 x i8*] [i8* getelementptr (i8, i8* getelementptr inbounds ([0 x %struct.anon], [0 x %struct.anon]* @g0, i32 0, i32 0, i32 0), i64 -2), i8* getelementptr (i8, i8* getelementptr inbounds ([0 x %struct.anon], [0 x %struct.anon]* @g0, i32 0, i32 0, i32 0), i64 -46)], align 16 +// CHECK: @g1 = dso_local global [2 x i8*] [i8* getelementptr (i8, i8* getelementptr inbounds ([0 x %struct.anon], [0 x %struct.anon]* @g0, i32 0, i32 0, i32 0), i64 -2), i8* getelementptr (i8, i8* getelementptr inbounds ([0 x %struct.anon], [0 x %struct.anon]* @g0, i32 0, i32 0, i32 0), i64 -46)], align 16 +// CHECK: @g2 = dso_local global [2 x i8*] [i8* getelementptr (i8, i8* getelementptr inbounds ([0 x %struct.anon], [0 x %struct.anon]* @g0, i32 0, i32 0, i32 0), i64 -2), i8* getelementptr (i8, i8* getelementptr inbounds ([0 x %struct.anon], [0 x %struct.anon]* @g0, i32 0, i32 0, i32 0), i64 -46)], align 16 extern struct { unsigned char a, b; } g0[]; void *g1[] = {g0 + -1, g0 + -23 }; diff --git a/clang/test/CodeGen/const-init.c b/clang/test/CodeGen/const-init.c index 374aa00e6589..8ebdb5baf653 100644 --- a/clang/test/CodeGen/const-init.c +++ b/clang/test/CodeGen/const-init.c @@ -4,10 +4,10 @@ // Brace-enclosed string array initializers char a[] = { "asdf" }; -// CHECK: @a = global [5 x i8] c"asdf\00" +// CHECK: @a = dso_local global [5 x i8] c"asdf\00" char a2[2][5] = { "asdf" }; -// CHECK: @a2 = global [2 x [5 x i8]] {{\[}}[5 x i8] c"asdf\00", [5 x i8] zeroinitializer] +// CHECK: @a2 = dso_local global [2 x [5 x i8]] {{\[}}[5 x i8] c"asdf\00", [5 x i8] zeroinitializer] // Double-implicit-conversions of array/functions (not legal C, but // clang accepts it for gcc compat). @@ -26,40 +26,40 @@ union s2 { int g0 = (int)(&(((union s2 *) 0)->f0.f0) - 0); -// CHECK: @g1x = global { double, double } { double 1.000000e+00{{[0]*}}, double 0.000000e+00{{[0]*}} } +// CHECK: @g1x = dso_local global { double, double } { double 1.000000e+00{{[0]*}}, double 0.000000e+00{{[0]*}} } _Complex double g1x = 1.0f; -// CHECK: @g1y = global { double, double } { double 0.000000e+00{{[0]*}}, double 1.000000e+00{{[0]*}} } +// CHECK: @g1y = dso_local global { double, double } { double 0.000000e+00{{[0]*}}, double 1.000000e+00{{[0]*}} } _Complex double g1y = 1.0fi; -// CHECK: @g1 = global { i8, i8 } { i8 1, i8 10 } +// CHECK: @g1 = dso_local global { i8, i8 } { i8 1, i8 10 } _Complex char g1 = (char) 1 + (char) 10 * 1i; -// CHECK: @g2 = global { i32, i32 } { i32 1, i32 10 } +// CHECK: @g2 = dso_local global { i32, i32 } { i32 1, i32 10 } _Complex int g2 = 1 + 10i; -// CHECK: @g3 = global { float, float } { float 1.000000e+00{{[0]*}}, float 1.000000e+0{{[0]*}}1 } +// CHECK: @g3 = dso_local global { float, float } { float 1.000000e+00{{[0]*}}, float 1.000000e+0{{[0]*}}1 } _Complex float g3 = 1.0 + 10.0i; -// CHECK: @g4 = global { double, double } { double 1.000000e+00{{[0]*}}, double 1.000000e+0{{[0]*}}1 } +// CHECK: @g4 = dso_local global { double, double } { double 1.000000e+00{{[0]*}}, double 1.000000e+0{{[0]*}}1 } _Complex double g4 = 1.0 + 10.0i; -// CHECK: @g5 = global { i32, i32 } zeroinitializer +// CHECK: @g5 = dso_local global { i32, i32 } zeroinitializer _Complex int g5 = (2 + 3i) == (5 + 7i); -// CHECK: @g6 = global { double, double } { double -1.100000e+0{{[0]*}}1, double 2.900000e+0{{[0]*}}1 } +// CHECK: @g6 = dso_local global { double, double } { double -1.100000e+0{{[0]*}}1, double 2.900000e+0{{[0]*}}1 } _Complex double g6 = (2.0 + 3.0i) * (5.0 + 7.0i); -// CHECK: @g7 = global i32 1 +// CHECK: @g7 = dso_local global i32 1 int g7 = (2 + 3i) * (5 + 7i) == (-11 + 29i); -// CHECK: @g8 = global i32 1 +// CHECK: @g8 = dso_local global i32 1 int g8 = (2.0 + 3.0i) * (5.0 + 7.0i) == (-11.0 + 29.0i); -// CHECK: @g9 = global i32 0 +// CHECK: @g9 = dso_local global i32 0 int g9 = (2 + 3i) * (5 + 7i) != (-11 + 29i); -// CHECK: @g10 = global i32 0 +// CHECK: @g10 = dso_local global i32 0 int g10 = (2.0 + 3.0i) * (5.0 + 7.0i) != (-11.0 + 29.0i); // PR5108 -// CHECK: @gv1 = global %struct.anon <{ i32 0, i8 7 }>, align 1 +// CHECK: @gv1 = dso_local global %struct.anon <{ i32 0, i8 7 }>, align 1 struct { unsigned long a; unsigned long b:3; } __attribute__((__packed__)) gv1 = { .a = 0x0, .b = 7, }; // PR5118 -// CHECK: @gv2 = global %struct.anon.0 <{ i8 1, i8* null }>, align 1 +// CHECK: @gv2 = dso_local global %struct.anon.0 <{ i8 1, i8* null }>, align 1 struct { unsigned char a; char *b; @@ -72,11 +72,11 @@ long g11() { return l0; } -// CHECK: @g12 = global i32 ptrtoint (i8* @g12_tmp to i32) +// CHECK: @g12 = dso_local global i32 ptrtoint (i8* @g12_tmp to i32) static char g12_tmp; long g12 = (long) &g12_tmp; -// CHECK: @g13 = global [1 x %struct.g13_s0] [%struct.g13_s0 { i32 ptrtoint (i8* @g12_tmp to i32) }] +// CHECK: @g13 = dso_local global [1 x %struct.g13_s0] [%struct.g13_s0 { i32 ptrtoint (i8* @g12_tmp to i32) }] struct g13_s0 { long a; }; @@ -84,16 +84,16 @@ struct g13_s0 g13[] = { { (long) &g12_tmp } }; -// CHECK: @g14 = global i8* inttoptr (i32 100 to i8*) +// CHECK: @g14 = dso_local global i8* inttoptr (i32 100 to i8*) void *g14 = (void*) 100; -// CHECK: @g15 = global i32 -1 +// CHECK: @g15 = dso_local global i32 -1 int g15 = (int) (char) ((void*) 0 + 255); -// CHECK: @g16 = global i64 4294967295 +// CHECK: @g16 = dso_local global i64 4294967295 long long g16 = (long long) ((void*) 0xFFFFFFFF); -// CHECK: @g17 = global i32* @g15 +// CHECK: @g17 = dso_local global i32* @g15 int *g17 = (int *) ((long) &g15); // CHECK: @g18.p = internal global [1 x i32*] [i32* @g19] diff --git a/clang/test/CodeGen/decl-in-prototype.c b/clang/test/CodeGen/decl-in-prototype.c index 426adf4b765c..4b64f8946c82 100644 --- a/clang/test/CodeGen/decl-in-prototype.c +++ b/clang/test/CodeGen/decl-in-prototype.c @@ -2,13 +2,13 @@ const int AA = 5; -// CHECK-LABEL: define i32 @f1 +// CHECK-LABEL: define dso_local i32 @f1 int f1(enum {AA,BB} E) { // CHECK: ret i32 1 return BB; } -// CHECK-LABEL: define i32 @f2 +// CHECK-LABEL: define dso_local i32 @f2 int f2(enum {AA=7,BB} E) { // CHECK: ret i32 7 return AA; diff --git a/clang/test/CodeGen/default-address-space.c b/clang/test/CodeGen/default-address-space.c index 5450609e06bb..23fc0e91f127 100644 --- a/clang/test/CodeGen/default-address-space.c +++ b/clang/test/CodeGen/default-address-space.c @@ -1,27 +1,27 @@ // RUN: %clang_cc1 -triple amdgcn---amdgiz -emit-llvm < %s | FileCheck -check-prefixes=CHECK,COM %s -// CHECK-DAG: @foo = common addrspace(1) global i32 0 +// CHECK-DAG: @foo = common dso_local addrspace(1) global i32 0 int foo; -// CHECK-DAG: @ban = common addrspace(1) global [10 x i32] zeroinitializer +// CHECK-DAG: @ban = common dso_local addrspace(1) global [10 x i32] zeroinitializer int ban[10]; -// CHECK-DAG: @A = common addrspace(1) global i32* null -// CHECK-DAG: @B = common addrspace(1) global i32* null +// CHECK-DAG: @A = common dso_local addrspace(1) global i32* null +// CHECK-DAG: @B = common dso_local addrspace(1) global i32* null int *A; int *B; -// COM-LABEL: define i32 @test1() +// COM-LABEL: define dso_local i32 @test1() // CHECK: load i32, i32* addrspacecast{{[^@]+}} @foo int test1() { return foo; } -// COM-LABEL: define i32 @test2(i32 %i) +// COM-LABEL: define dso_local i32 @test2(i32 %i) // COM: %[[addr:.*]] = getelementptr // CHECK: load i32, i32* %[[addr]] // CHECK-NEXT: ret i32 int test2(int i) { return ban[i]; } -// COM-LABEL: define void @test3() +// COM-LABEL: define dso_local void @test3() // CHECK: load i32*, i32** addrspacecast{{.*}} @B // CHECK: load i32, i32* // CHECK: load i32*, i32** addrspacecast{{.*}} @A @@ -30,7 +30,7 @@ void test3() { *A = *B; } -// CHECK-LABEL: define void @test4(i32* %a) +// CHECK-LABEL: define dso_local void @test4(i32* %a) // CHECK: %[[alloca:.*]] = alloca i32*, align 8, addrspace(5) // CHECK: %[[a_addr:.*]] = addrspacecast{{.*}} %[[alloca]] to i32** // CHECK: store i32* %a, i32** %[[a_addr]] diff --git a/clang/test/CodeGen/default-function-attr.c b/clang/test/CodeGen/default-function-attr.c index 1c186e8e55b9..707635d1716e 100644 --- a/clang/test/CodeGen/default-function-attr.c +++ b/clang/test/CodeGen/default-function-attr.c @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -triple x86_64-unknown-linux -default-function-attr foo=bar -emit-llvm %s -o - | FileCheck %s -// CHECK: define void @foo() #[[X:[0-9]+]] +// CHECK: define dso_local void @foo() #[[X:[0-9]+]] void foo() {} // CHECK: attributes #[[X]] = {{.*}} "foo"="bar" diff --git a/clang/test/CodeGen/designated-initializers.c b/clang/test/CodeGen/designated-initializers.c index b29799dace20..d31f8f9ccc60 100644 --- a/clang/test/CodeGen/designated-initializers.c +++ b/clang/test/CodeGen/designated-initializers.c @@ -5,16 +5,16 @@ struct foo { int b; }; -// CHECK: @u = global %union.anon zeroinitializer +// CHECK: @u = dso_local global %union.anon zeroinitializer union { int i; float f; } u = { }; -// CHECK: @u2 = global { i32, [4 x i8] } { i32 0, [4 x i8] undef } +// CHECK: @u2 = dso_local global { i32, [4 x i8] } { i32 0, [4 x i8] undef } union { int i; double f; } u2 = { }; -// CHECK: @u3 = global %union.anon.1 zeroinitializer +// CHECK: @u3 = dso_local global %union.anon.1 zeroinitializer union { double f; int i; } u3 = { }; -// CHECK: @b = global [2 x i32] [i32 0, i32 22] +// CHECK: @b = dso_local global [2 x i32] [i32 0, i32 22] int b[2] = { [1] = 22 }; @@ -39,11 +39,11 @@ struct ds ds0 = { { { .a = 0 } } }; struct ds ds1 = { { .a = 1 } }; struct ds ds2 = { { .b = 1 } }; struct ds ds3 = { .a = 0 }; -// CHECK: @ds4 = global %struct.ds { %struct.anon.3 { %struct.anon zeroinitializer, i16 0, %struct.anon.2 { i16 1 } } } +// CHECK: @ds4 = dso_local global %struct.ds { %struct.anon.3 { %struct.anon zeroinitializer, i16 0, %struct.anon.2 { i16 1 } } } struct ds ds4 = { .c = 1 }; struct ds ds5 = { { { .a = 0 } }, .b = 1 }; struct ds ds6 = { { .a = 0, .b = 1 } }; -// CHECK: @ds7 = global %struct.ds { %struct.anon.3 { %struct.anon { i16 2 }, i16 3, %struct.anon.2 zeroinitializer } } +// CHECK: @ds7 = dso_local global %struct.ds { %struct.anon.3 { %struct.anon { i16 2 }, i16 3, %struct.anon.2 zeroinitializer } } struct ds ds7 = { { { .a = 1 @@ -139,7 +139,7 @@ union_16644_t union_16644_instance_4[2] = [1].b[1] = 4 }; -// CHECK: @lab = global { [4 x i8], i32 } { [4 x i8] undef, i32 123 } +// CHECK: @lab = dso_local global { [4 x i8], i32 } { [4 x i8] undef, i32 123 } struct leading_anon_bitfield { int : 32; int n; } lab = { .n = 123 }; // rdar://45691981 @@ -152,7 +152,7 @@ struct Derived { struct Base B; }; struct Derived D = {{}, .B.A = 42}; -// CHECK: @D = global %struct.Derived { %struct.Base { %struct.anon.4 { i32 42 } } }, align 4 +// CHECK: @D = dso_local global %struct.Derived { %struct.Base { %struct.anon.4 { i32 42 } } }, align 4 void test1(int argc, char **argv) { diff --git a/clang/test/CodeGen/dllexport-1.c b/clang/test/CodeGen/dllexport-1.c index 5860591c83c7..d72016e1d24a 100644 --- a/clang/test/CodeGen/dllexport-1.c +++ b/clang/test/CodeGen/dllexport-1.c @@ -4,13 +4,13 @@ // Export const variable. // CHECK-MSVC: @x = dso_local dllexport constant i32 3, align 4 -// CHECK-LNX: @x = constant i32 3, align 4 +// CHECK-LNX: @x = dso_local constant i32 3, align 4 // CHECK-MSVC: @z = dso_local constant i32 4, align 4 -// CHECK-LNX: @z = constant i32 4, align 4 +// CHECK-LNX: @z = dso_local constant i32 4, align 4 // CHECK-MSVC: @y = common dso_local dllexport global i32 0, align 4 -// CHECK-LNX: @y = common global i32 0, align 4 +// CHECK-LNX: @y = common dso_local global i32 0, align 4 __declspec(dllexport) int const x = 3; __declspec(dllexport) const int y; diff --git a/clang/test/CodeGen/dso-local-executable.c b/clang/test/CodeGen/dso-local-executable.c index 13e11158300f..9b924921c97a 100644 --- a/clang/test/CodeGen/dso-local-executable.c +++ b/clang/test/CodeGen/dso-local-executable.c @@ -91,10 +91,10 @@ // SHARED-DAG: @bar = external global i32 // SHARED-DAG: @weak_bar = extern_weak global i32 // SHARED-DAG: declare void @foo() -// SHARED-DAG: @baz = global i32 42 -// SHARED-DAG: define i32* @zed() +// SHARED-DAG: @baz = dso_local global i32 42 +// SHARED-DAG: define dso_local i32* @zed() // SHARED-DAG: @thread_var = external thread_local global i32 -// SHARED-DAG: @local_thread_var = thread_local global i32 42 +// SHARED-DAG: @local_thread_var = dso_local thread_local global i32 42 // PIE-NO-PLT-DAG: @import_var = external global i32 // PIE-NO-PLT-DAG: declare void @import_func() diff --git a/clang/test/CodeGen/enable_if.c b/clang/test/CodeGen/enable_if.c index 5e9f904fdd3f..6e9ccde9575d 100644 --- a/clang/test/CodeGen/enable_if.c +++ b/clang/test/CodeGen/enable_if.c @@ -6,7 +6,7 @@ void foo(int m) __attribute__((overloadable, enable_if(m > 0, ""))); void foo(int m) __attribute__((overloadable)); -// CHECK-LABEL: define void @test1 +// CHECK-LABEL: define dso_local void @test1 void test1() { // CHECK: store void (i32)* @_Z3fooi void (*p)(int) = foo; @@ -29,7 +29,7 @@ void test1() { void bar(int m) __attribute__((overloadable, enable_if(m > 0, ""))); void bar(int m) __attribute__((overloadable, enable_if(1, ""))); -// CHECK-LABEL: define void @test2 +// CHECK-LABEL: define dso_local void @test2 void test2() { // CHECK: store void (i32)* @_Z3barUa9enable_ifIXLi1EEEi void (*p)(int) = bar; @@ -52,7 +52,7 @@ void test2() { void baz(int m) __attribute__((overloadable, enable_if(1, ""))); void baz(int m) __attribute__((overloadable)); -// CHECK-LABEL: define void @test3 +// CHECK-LABEL: define dso_local void @test3 void test3() { // CHECK: store void (i32)* @_Z3bazUa9enable_ifIXLi1EEEi void (*p)(int) = baz; @@ -69,7 +69,7 @@ const int TRUEFACTS = 1; void qux(int m) __attribute__((overloadable, enable_if(1, ""), enable_if(TRUEFACTS, ""))); void qux(int m) __attribute__((overloadable, enable_if(1, ""))); -// CHECK-LABEL: define void @test4 +// CHECK-LABEL: define dso_local void @test4 void test4() { // CHECK: store void (i32)* @_Z3quxUa9enable_ifIXLi1EEXL_Z9TRUEFACTSEEEi void (*p)(int) = qux; @@ -84,7 +84,7 @@ void test4() { // There was a bug where, when enable_if was present, overload resolution // wouldn't pay attention to lower-priority attributes. // (N.B. `foo` with pass_object_size should always be preferred) -// CHECK-LABEL: define void @test5 +// CHECK-LABEL: define dso_local void @test5 void test5() { int foo(char *i) __attribute__((enable_if(1, ""), overloadable)); int foo(char *i __attribute__((pass_object_size(0)))) diff --git a/clang/test/CodeGen/exceptions.c b/clang/test/CodeGen/exceptions.c index 57b869196ba9..133cc3951c6e 100644 --- a/clang/test/CodeGen/exceptions.c +++ b/clang/test/CodeGen/exceptions.c @@ -6,7 +6,7 @@ void test1() { extern void test1_helper(void (^)(int)); // CHECK-LABEL: define void @test1() {{.*}} personality i8* bitcast (i32 (...)* @__gcc_personality_v0 to i8*) - // CHECK-ARM-LABEL: define arm_aapcscc void @test1() {{.*}} personality i8* bitcast (i32 (...)* @__gcc_personality_sj0 to i8*) + // CHECK-ARM-LABEL: define dso_local arm_aapcscc void @test1() {{.*}} personality i8* bitcast (i32 (...)* @__gcc_personality_sj0 to i8*) __block int x = 10; diff --git a/clang/test/CodeGen/exprs.c b/clang/test/CodeGen/exprs.c index 41b429cd3019..c063d15799c3 100644 --- a/clang/test/CodeGen/exprs.c +++ b/clang/test/CodeGen/exprs.c @@ -121,7 +121,7 @@ void f10() { } // rdar://7530813 -// CHECK-LABEL: define i32 @f11 +// CHECK-LABEL: define dso_local i32 @f11 int f11(long X) { int A[100]; return A[X]; @@ -135,14 +135,14 @@ int f11(long X) { int f12() { // PR3150 - // CHECK-LABEL: define i32 @f12 + // CHECK-LABEL: define dso_local i32 @f12 // CHECK: ret i32 1 return 1||1; } // Make sure negate of fp uses -0.0 for proper -0 handling. double f13(double X) { - // CHECK-LABEL: define double @f13 + // CHECK-LABEL: define dso_local double @f13 // CHECK: fneg double return -X; } @@ -152,7 +152,7 @@ void f14(struct s14 *a) { (void) &*a; } -// CHECK-LABEL: define void @f15 +// CHECK-LABEL: define dso_local void @f15 void f15() { extern void f15_start(void); f15_start(); @@ -169,7 +169,7 @@ void f15() { } // PR8967: this was crashing -// CHECK-LABEL: define void @f16() +// CHECK-LABEL: define dso_local void @f16() void f16() { __extension__({ goto lbl; }); lbl: @@ -177,7 +177,7 @@ void f16() { } // PR13704: negative increment in i128 is not preserved. -// CHECK-LABEL: define void @f17() +// CHECK-LABEL: define dso_local void @f17() void f17() { extern void extfunc(__int128); __int128 x = 2; @@ -194,14 +194,14 @@ int returns_int(void); void f18() { (strct)returns_int(); } -// CHECK-LABEL: define void @f18() +// CHECK-LABEL: define dso_local void @f18() // CHECK: call i32 @returns_int() // Ensure the right stmt is returned int f19() { return ({ 3;;4;; }); } -// CHECK-LABEL: define i32 @f19() +// CHECK-LABEL: define dso_local i32 @f19() // CHECK: [[T:%.*]] = alloca i32 // CHECK: store i32 4, i32* [[T]] // CHECK: [[L:%.*]] = load i32, i32* [[T]] diff --git a/clang/test/CodeGen/flatten.c b/clang/test/CodeGen/flatten.c index 410128a0bcde..1ee15d97ea92 100644 --- a/clang/test/CodeGen/flatten.c +++ b/clang/test/CodeGen/flatten.c @@ -11,7 +11,7 @@ void f(void) {} __attribute__((noinline)) void ni(void) {} __attribute__((flatten)) -// CHECK: define void @g() +// CHECK: define dso_local void @g() void g(void) { // CHECK-NOT: call {{.*}} @f f(); diff --git a/clang/test/CodeGen/flexible-array-init.c b/clang/test/CodeGen/flexible-array-init.c index d3079dce3ddc..4b45230bee93 100644 --- a/clang/test/CodeGen/flexible-array-init.c +++ b/clang/test/CodeGen/flexible-array-init.c @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck %s struct { int x; int y[]; } a = { 1, 7, 11 }; -// CHECK: @a = global { i32, [2 x i32] } { i32 1, [2 x i32] [i32 7, i32 11] } +// CHECK: @a = dso_local global { i32, [2 x i32] } { i32 1, [2 x i32] [i32 7, i32 11] } struct { int x; int y[]; } b = { 1, { 13, 15 } }; -// CHECK: @b = global { i32, [2 x i32] } { i32 1, [2 x i32] [i32 13, i32 15] } +// CHECK: @b = dso_local global { i32, [2 x i32] } { i32 1, [2 x i32] [i32 13, i32 15] } diff --git a/clang/test/CodeGen/fp16-ops.c b/clang/test/CodeGen/fp16-ops.c index f74552b85921..32146c9e51c3 100644 --- a/clang/test/CodeGen/fp16-ops.c +++ b/clang/test/CodeGen/fp16-ops.c @@ -20,7 +20,7 @@ volatile double d0; short s0; void foo(void) { - // CHECK-LABEL: define void @foo() + // CHECK-LABEL: define dso_local void @foo() // Check unary ops diff --git a/clang/test/CodeGen/function-attributes.c b/clang/test/CodeGen/function-attributes.c index 9174b8785d9e..fb02650e2683 100644 --- a/clang/test/CodeGen/function-attributes.c +++ b/clang/test/CodeGen/function-attributes.c @@ -1,14 +1,14 @@ // RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -disable-llvm-passes -Os -o - %s | FileCheck %s // RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -disable-llvm-passes -Os -std=c99 -o - %s | FileCheck %s // RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -disable-llvm-passes -Os -std=c99 -o - %s | FileCheck %s -// CHECK: define signext i8 @f0(i32 %x) [[NUW:#[0-9]+]] -// CHECK: define zeroext i8 @f1(i32 %x) [[NUW]] -// CHECK: define void @f2(i8 signext %x) [[NUW]] -// CHECK: define void @f3(i8 zeroext %x) [[NUW]] -// CHECK: define signext i16 @f4(i32 %x) [[NUW]] -// CHECK: define zeroext i16 @f5(i32 %x) [[NUW]] -// CHECK: define void @f6(i16 signext %x) [[NUW]] -// CHECK: define void @f7(i16 zeroext %x) [[NUW]] +// CHECK: define dso_local signext i8 @f0(i32 %x) [[NUW:#[0-9]+]] +// CHECK: define dso_local zeroext i8 @f1(i32 %x) [[NUW]] +// CHECK: define dso_local void @f2(i8 signext %x) [[NUW]] +// CHECK: define dso_local void @f3(i8 zeroext %x) [[NUW]] +// CHECK: define dso_local signext i16 @f4(i32 %x) [[NUW]] +// CHECK: define dso_local zeroext i16 @f5(i32 %x) [[NUW]] +// CHECK: define dso_local void @f6(i16 signext %x) [[NUW]] +// CHECK: define dso_local void @f7(i16 zeroext %x) [[NUW]] signed char f0(int x) { return x; } @@ -26,7 +26,7 @@ void f6(signed short x) { } void f7(unsigned short x) { } -// CHECK-LABEL: define void @f8() +// CHECK-LABEL: define dso_local void @f8() // CHECK: [[AI:#[0-9]+]] // CHECK: { void __attribute__((always_inline)) f8(void) { } @@ -57,27 +57,27 @@ int f12(int arg) { return arg ? 0 : f10_t(); } -// CHECK: define void @f13() [[NUW_OS_RN:#[0-9]+]] +// CHECK: define dso_local void @f13() [[NUW_OS_RN:#[0-9]+]] void f13(void) __attribute__((pure)) __attribute__((const)); void f13(void){} // <rdar://problem/7102668> [irgen] clang isn't setting the optsize bit on functions -// CHECK-LABEL: define void @f15 +// CHECK-LABEL: define dso_local void @f15 // CHECK: [[NUW]] // CHECK: { void f15(void) { } // PR5254 -// CHECK-LABEL: define void @f16 +// CHECK-LABEL: define dso_local void @f16 // CHECK: [[SR:#[0-9]+]] // CHECK: { void __attribute__((force_align_arg_pointer)) f16(void) { } // PR11038 -// CHECK-LABEL: define void @f18() +// CHECK-LABEL: define dso_local void @f18() // CHECK: [[RT:#[0-9]+]] // CHECK: { // CHECK: call void @f17() @@ -88,7 +88,7 @@ __attribute__ ((returns_twice)) void f18(void) { f17(); } -// CHECK-LABEL: define void @f19() +// CHECK-LABEL: define dso_local void @f19() // CHECK: { // CHECK: call i32 @setjmp(i32* null) // CHECK: [[RT_CALL]] @@ -99,7 +99,7 @@ void f19(void) { setjmp(0); } -// CHECK-LABEL: define void @f20() +// CHECK-LABEL: define dso_local void @f20() // CHECK: { // CHECK: call i32 @_setjmp(i32* null) // CHECK: [[RT_CALL]] diff --git a/clang/test/CodeGen/functions.c b/clang/test/CodeGen/functions.c index 55f2d5f35ce3..d3dee4ba2076 100644 --- a/clang/test/CodeGen/functions.c +++ b/clang/test/CodeGen/functions.c @@ -20,14 +20,14 @@ int a(int); int a() {return 1;} void f0() {} -// CHECK-LABEL: define void @f0() +// CHECK-LABEL: define dso_local void @f0() void f1(); void f2(void) { // CHECK: call void @f1() f1(1, 2, 3); } -// CHECK-LABEL: define void @f1() +// CHECK-LABEL: define dso_local void @f1() void f1() {} // CHECK: define {{.*}} @f3{{\(\)|\(.*sret.*\)}} @@ -44,7 +44,7 @@ static void f6(const float f, const float g) { } void f7(float f, float g) { f6(f, g); -// CHECK: define void @f7(float{{.*}}, float{{.*}}) +// CHECK: define dso_local void @f7(float{{.*}}, float{{.*}}) // CHECK: call void @f6(float{{.*}}, float{{.*}}) } @@ -54,7 +54,7 @@ void f8_callback(struct Incomplete); void f8_user(void (*callback)(struct Incomplete)); void f8_test() { f8_user(&f8_callback); -// CHECK-LABEL: define void @f8_test() +// CHECK-LABEL: define dso_local void @f8_test() // CHECK: call void @f8_user({{.*}}* bitcast (void ()* @f8_callback to {{.*}}*)) // CHECK: declare void @f8_user({{.*}}*) // CHECK: declare void @f8_callback() diff --git a/clang/test/CodeGen/global-decls.c b/clang/test/CodeGen/global-decls.c index 89e899f5baba..70011e34e27f 100644 --- a/clang/test/CodeGen/global-decls.c +++ b/clang/test/CodeGen/global-decls.c @@ -5,12 +5,12 @@ extern int g0_ext __attribute__((weak)); // RUN: grep 'declare extern_weak i32 @g1_ext()' %t extern int __attribute__((weak)) g1_ext (void); -// RUN: grep '@g0_common = weak global i32' %t +// RUN: grep '@g0_common = weak dso_local global i32' %t int g0_common __attribute__((weak)); -// RUN: grep '@g0_def = weak global i32' %t +// RUN: grep '@g0_def = weak dso_local global i32' %t int g0_def __attribute__((weak)) = 52; -// RUN: grep 'define weak i32 @g1_def()' %t +// RUN: grep 'define weak dso_local i32 @g1_def()' %t int __attribute__((weak)) g1_def (void) { return 0; } // Force _ext references diff --git a/clang/test/CodeGen/global-init.c b/clang/test/CodeGen/global-init.c index dab5a07d614f..308f2f2257c5 100644 --- a/clang/test/CodeGen/global-init.c +++ b/clang/test/CodeGen/global-init.c @@ -5,16 +5,16 @@ int a; int a = 242; -// CHECK: @a = global i32 242 +// CHECK: @a = dso_local global i32 242 // This should get normal weak linkage. int c __attribute__((weak))= 0; -// CHECK: @c = weak global i32 0 +// CHECK: @c = weak dso_local global i32 0 // Since this is marked const, it should get weak_odr linkage, since all // definitions have to be the same. -// CHECK: @d = weak_odr constant i32 0 +// CHECK: @d = weak_odr dso_local constant i32 0 const int d __attribute__((weak))= 0; // PR6168 "too many undefs" @@ -32,7 +32,7 @@ struct ManyFields FewInits = {1, 2}; // PR6766 -// CHECK: @l = global %struct.K { [6 x i32] [i32 102, i32 111, i32 111, i32 0, i32 0, i32 0], i32 1 } +// CHECK: @l = dso_local global %struct.K { [6 x i32] [i32 102, i32 111, i32 111, i32 0, i32 0, i32 0], i32 1 } typedef __WCHAR_TYPE__ wchar_t; struct K { wchar_t L[6]; @@ -40,7 +40,7 @@ struct K { } l = { { L"foo" }, 1 }; -// CHECK: @yuv_types = global [4 x [6 x i8]] {{\[}}[6 x i8] c"4:0:0\00", [6 x i8] c"4:2:0\00", [6 x i8] c"4:2:2\00", [6 x i8] c"4:4:4\00"] +// CHECK: @yuv_types = dso_local global [4 x [6 x i8]] {{\[}}[6 x i8] c"4:0:0\00", [6 x i8] c"4:2:0\00", [6 x i8] c"4:2:2\00", [6 x i8] c"4:4:4\00"] char yuv_types[4][6]= {"4:0:0","4:2:0","4:2:2","4:4:4"}; @@ -48,5 +48,5 @@ char yuv_types[4][6]= {"4:0:0","4:2:0","4:2:2","4:4:4"}; // This shouldn't be emitted as common because it has an explicit section. // rdar://7119244 -// CHECK: @b = global i32 0, section "foo" +// CHECK: @b = dso_local global i32 0, section "foo" int b __attribute__((section("foo"))); diff --git a/clang/test/CodeGen/iamcu-abi.c b/clang/test/CodeGen/iamcu-abi.c index 6bb73d20315c..7fa1bb866dc8 100644 --- a/clang/test/CodeGen/iamcu-abi.c +++ b/clang/test/CodeGen/iamcu-abi.c @@ -8,28 +8,28 @@ void fooll(long long *ll); void fooull(unsigned long long *ull); void foold(long double *ld); -// CHECK-LABEL: define void @testdouble() +// CHECK-LABEL: define dso_local void @testdouble() // CHECK: alloca double, align 4 void testdouble() { double d = 2.0; food(&d); } -// CHECK-LABEL: define void @testlonglong() +// CHECK-LABEL: define dso_local void @testlonglong() // CHECK: alloca i64, align 4 void testlonglong() { long long ll = 2; fooll(&ll); } -// CHECK-LABEL: define void @testunsignedlonglong() +// CHECK-LABEL: define dso_local void @testunsignedlonglong() // CHECK: alloca i64, align 4 void testunsignedlonglong() { unsigned long long ull = 2; fooull(&ull); } -// CHECK-LABEL: define void @testlongdouble() +// CHECK-LABEL: define dso_local void @testlongdouble() // CHECK: alloca double, align 4 void testlongdouble() { long double ld = 2.0; diff --git a/clang/test/CodeGen/ifunc.c b/clang/test/CodeGen/ifunc.c index a88bb1878f26..10816d9ca1f2 100644 --- a/clang/test/CodeGen/ifunc.c +++ b/clang/test/CodeGen/ifunc.c @@ -34,8 +34,8 @@ extern void goo(void) __attribute__ ((ifunc("goo_ifunc"))); void* goo_ifunc(void) { return 0; } -// CHECK: @foo = ifunc i32 (i32), bitcast (i32 (i32)* ()* @foo_ifunc to i32 (i32)*) -// CHECK: @goo = ifunc void (), bitcast (i8* ()* @goo_ifunc to void ()*) +// CHECK: @foo = dso_local ifunc i32 (i32), bitcast (i32 (i32)* ()* @foo_ifunc to i32 (i32)*) +// CHECK: @goo = dso_local ifunc void (), bitcast (i8* ()* @goo_ifunc to void ()*) // CHECK: call i32 @foo(i32 // CHECK: call void @goo() diff --git a/clang/test/CodeGen/init-memset.c b/clang/test/CodeGen/init-memset.c index f05c4f783fb9..387d4a899465 100644 --- a/clang/test/CodeGen/init-memset.c +++ b/clang/test/CodeGen/init-memset.c @@ -3,42 +3,42 @@ void use(void *); void test_small() { - // CHECK-LABEL: define void @test_small() + // CHECK-LABEL: define dso_local void @test_small() int a[] = {1, 2, 3, 4}; // CHECK: call void @llvm.memcpy.{{.*}} use(a); } void test_small_same() { - // CHECK-LABEL: define void @test_small_same() + // CHECK-LABEL: define dso_local void @test_small_same() char a[] = {'a', 'a', 'a', 'a'}; // CHECK: call void @llvm.memcpy.{{.*}} use(a); } void test_different() { - // CHECK-LABEL: define void @test_different() + // CHECK-LABEL: define dso_local void @test_different() int a[] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; // CHECK: call void @llvm.memcpy.{{.*}} use(a); } void test_all_zeros() { - // CHECK-LABEL: define void @test_all_zeros() + // CHECK-LABEL: define dso_local void @test_all_zeros() int a[16] = {}; // CHECK: call void @llvm.memset.{{.*}} use(a); } void test_all_a() { - // CHECK-LABEL: define void @test_all_a() + // CHECK-LABEL: define dso_local void @test_all_a() char a[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; // CHECK: call void @llvm.memcpy.{{.*}} use(a); } void test_most_zeros() { - // CHECK-LABEL: define void @test_most_zeros() + // CHECK-LABEL: define dso_local void @test_most_zeros() int a[16] = {0, 0, 1}; // CHECK: call void @llvm.memset.{{.*}} // CHECK: store i32 1 @@ -46,14 +46,14 @@ void test_most_zeros() { } void test_most_a() { - // CHECK-LABEL: define void @test_most_a() + // CHECK-LABEL: define dso_local void @test_most_a() char a[] = "aaaaazaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; // CHECK: call void @llvm.memcpy.{{.*}} use(a); } void test_pointers() { - // CHECK-LABEL: define void @test_pointers() + // CHECK-LABEL: define dso_local void @test_pointers() void *a[] = {&use, &use, &use, &use, &use, &use}; // CHECK: call void @llvm.memset.{{.*}} // CHECK: store i8* diff --git a/clang/test/CodeGen/init.c b/clang/test/CodeGen/init.c index 71aba39b1244..c230df050812 100644 --- a/clang/test/CodeGen/init.c +++ b/clang/test/CodeGen/init.c @@ -34,7 +34,7 @@ void f3() { } // Constants -// CHECK-DAG: @g3 = constant i32 10 +// CHECK-DAG: @g3 = dso_local constant i32 10 // CHECK-DAG: @f4.g4 = internal constant i32 12 const int g3 = 10; int f4() { @@ -62,7 +62,7 @@ void f6() { -// CHECK-DAG: @test7 = global{{.*}}{ i32 0, [4 x i8] c"bar\00" } +// CHECK-DAG: @test7 = dso_local global{{.*}}{ i32 0, [4 x i8] c"bar\00" } // PR8217 struct a7 { int b; @@ -72,27 +72,27 @@ struct a7 { struct a7 test7 = { .b = 0, .v = "bar" }; -// CHECK-DAG: @huge_array = global {{.*}} <{ i32 1, i32 0, i32 2, i32 0, i32 3, [999999995 x i32] zeroinitializer }> +// CHECK-DAG: @huge_array = dso_local global {{.*}} <{ i32 1, i32 0, i32 2, i32 0, i32 3, [999999995 x i32] zeroinitializer }> int huge_array[1000000000] = {1, 0, 2, 0, 3, 0, 0, 0}; -// CHECK-DAG: @huge_struct = global {{.*}} { i32 1, <{ i32, [999999999 x i32] }> <{ i32 2, [999999999 x i32] zeroinitializer }> } +// CHECK-DAG: @huge_struct = dso_local global {{.*}} { i32 1, <{ i32, [999999999 x i32] }> <{ i32 2, [999999999 x i32] zeroinitializer }> } struct Huge { int a; int arr[1000 * 1000 * 1000]; } huge_struct = {1, {2, 0, 0, 0}}; -// CHECK-DAG: @large_array_with_zeroes = constant <{ [21 x i8], [979 x i8] }> <{ [21 x i8] c"abc\01\02\03xyzzy\00\00\00\00\00\00\00\00\00q", [979 x i8] zeroinitializer }> +// CHECK-DAG: @large_array_with_zeroes = dso_local constant <{ [21 x i8], [979 x i8] }> <{ [21 x i8] c"abc\01\02\03xyzzy\00\00\00\00\00\00\00\00\00q", [979 x i8] zeroinitializer }> const char large_array_with_zeroes[1000] = { 'a', 'b', 'c', 1, 2, 3, 'x', 'y', 'z', 'z', 'y', [20] = 'q' }; char global; -// CHECK-DAG: @large_array_with_zeroes_2 = global <{ [10 x i8*], [90 x i8*] }> <{ [10 x i8*] [i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* @global], [90 x i8*] zeroinitializer }> +// CHECK-DAG: @large_array_with_zeroes_2 = dso_local global <{ [10 x i8*], [90 x i8*] }> <{ [10 x i8*] [i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* @global], [90 x i8*] zeroinitializer }> const void *large_array_with_zeroes_2[100] = { [9] = &global }; -// CHECK-DAG: @large_array_with_zeroes_3 = global <{ [10 x i8*], [990 x i8*] }> <{ [10 x i8*] [i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* @global], [990 x i8*] zeroinitializer }> +// CHECK-DAG: @large_array_with_zeroes_3 = dso_local global <{ [10 x i8*], [990 x i8*] }> <{ [10 x i8*] [i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* @global], [990 x i8*] zeroinitializer }> const void *large_array_with_zeroes_3[1000] = { [9] = &global }; diff --git a/clang/test/CodeGen/inline.c b/clang/test/CodeGen/inline.c index b511ece2813b..8fbd6e5d4e61 100644 --- a/clang/test/CodeGen/inline.c +++ b/clang/test/CodeGen/inline.c @@ -3,59 +3,59 @@ // RUN: echo "GNU89 tests:" // RUN: %clang_cc1 %s -triple i386-unknown-unknown -O1 -disable-llvm-passes -emit-llvm -o - -std=gnu89 | FileCheck %s --check-prefix=CHECK1 // RUN: %clang_cc1 %s -triple i386-unknown-unknown -fexperimental-new-pass-manager -O1 -disable-llvm-passes -emit-llvm -o - -std=gnu89 | FileCheck %s --check-prefix=CHECK1 -// CHECK1-LABEL: define i32 @foo() -// CHECK1-LABEL: define i32 @bar() -// CHECK1-LABEL: define void @unreferenced1() +// CHECK1-LABEL: define dso_local i32 @foo() +// CHECK1-LABEL: define dso_local i32 @bar() +// CHECK1-LABEL: define dso_local void @unreferenced1() // CHECK1-NOT: unreferenced2 -// CHECK1-LABEL: define void @gnu_inline() -// CHECK1-LABEL: define i32 @test1 -// CHECK1-LABEL: define i32 @test2 -// CHECK1-LABEL: define void @test3() +// CHECK1-LABEL: define dso_local void @gnu_inline() +// CHECK1-LABEL: define dso_local i32 @test1 +// CHECK1-LABEL: define dso_local i32 @test2 +// CHECK1-LABEL: define dso_local void @test3() // CHECK1-LABEL: define available_externally i32 @test4 // CHECK1-LABEL: define available_externally i32 @test5 -// CHECK1-LABEL: define i32 @test6 -// CHECK1-LABEL: define void @test7 -// CHECK1: define i{{..}} @strlcpy +// CHECK1-LABEL: define dso_local i32 @test6 +// CHECK1-LABEL: define dso_local void @test7 +// CHECK1: define dso_local i{{..}} @strlcpy // CHECK1-NOT: test9 -// CHECK1-LABEL: define void @testA -// CHECK1-LABEL: define void @testB -// CHECK1-LABEL: define void @testC +// CHECK1-LABEL: define dso_local void @testA +// CHECK1-LABEL: define dso_local void @testB +// CHECK1-LABEL: define dso_local void @testC // CHECK1-LABEL: define available_externally i32 @ei() // CHECK1-LABEL: define available_externally void @gnu_ei_inline() // RUN: echo "C99 tests:" // RUN: %clang_cc1 %s -triple i386-unknown-unknown -O1 -disable-llvm-passes -emit-llvm -o - -std=gnu99 | FileCheck %s --check-prefix=CHECK2 // RUN: %clang_cc1 %s -triple i386-unknown-unknown -fexperimental-new-pass-manager -O1 -disable-llvm-passes -emit-llvm -o - -std=gnu99 | FileCheck %s --check-prefix=CHECK2 -// CHECK2-LABEL: define i32 @ei() -// CHECK2-LABEL: define i32 @bar() +// CHECK2-LABEL: define dso_local i32 @ei() +// CHECK2-LABEL: define dso_local i32 @bar() // CHECK2-NOT: unreferenced1 -// CHECK2-LABEL: define void @unreferenced2() -// CHECK2-LABEL: define void @gnu_inline() -// CHECK2-LABEL: define i32 @test1 -// CHECK2-LABEL: define i32 @test2 -// CHECK2-LABEL: define void @test3 +// CHECK2-LABEL: define dso_local void @unreferenced2() +// CHECK2-LABEL: define dso_local void @gnu_inline() +// CHECK2-LABEL: define dso_local i32 @test1 +// CHECK2-LABEL: define dso_local i32 @test2 +// CHECK2-LABEL: define dso_local void @test3 // CHECK2-LABEL: define available_externally i32 @test4 // CHECK2-LABEL: define available_externally i32 @test5 -// CHECK2-LABEL: define i32 @test6 -// CHECK2-LABEL: define void @test7 +// CHECK2-LABEL: define dso_local i32 @test6 +// CHECK2-LABEL: define dso_local void @test7 // CHECK2: define available_externally i{{..}} @strlcpy -// CHECK2-LABEL: define void @test9 -// CHECK2-LABEL: define void @testA -// CHECK2-LABEL: define void @testB -// CHECK2-LABEL: define void @testC +// CHECK2-LABEL: define dso_local void @test9 +// CHECK2-LABEL: define dso_local void @testA +// CHECK2-LABEL: define dso_local void @testB +// CHECK2-LABEL: define dso_local void @testC // CHECK2-LABEL: define available_externally i32 @foo() // CHECK2-LABEL: define available_externally void @gnu_ei_inline() // RUN: echo "C++ tests:" // RUN: %clang_cc1 -x c++ %s -triple i386-unknown-unknown -O1 -disable-llvm-passes -emit-llvm -o - -std=c++98 | FileCheck %s --check-prefix=CHECK3 // RUN: %clang_cc1 -x c++ %s -triple i386-unknown-unknown -fexperimental-new-pass-manager -O1 -disable-llvm-passes -emit-llvm -o - -std=c++98 | FileCheck %s --check-prefix=CHECK3 -// CHECK3-LABEL: define i32 @_Z3barv() -// CHECK3-LABEL: define linkonce_odr i32 @_Z3foov() +// CHECK3-LABEL: define dso_local i32 @_Z3barv() +// CHECK3-LABEL: define linkonce_odr dso_local i32 @_Z3foov() // CHECK3-NOT: unreferenced // CHECK3-LABEL: define available_externally void @_Z10gnu_inlinev() // CHECK3-LABEL: define available_externally void @_Z13gnu_ei_inlinev() // CHECK3-NOT: @_Z5testCv -// CHECK3-LABEL: define linkonce_odr i32 @_Z2eiv() +// CHECK3-LABEL: define linkonce_odr dso_local i32 @_Z2eiv() // RUN: echo "MS C Mode tests:" // RUN: %clang_cc1 %s -triple i386-pc-win32 -O1 -disable-llvm-passes -emit-llvm -o - -std=c99 | FileCheck %s --check-prefix=CHECK4 diff --git a/clang/test/CodeGen/lanai-arguments.c b/clang/test/CodeGen/lanai-arguments.c index 9ce4ed98a78c..b46d04022c75 100644 --- a/clang/test/CodeGen/lanai-arguments.c +++ b/clang/test/CodeGen/lanai-arguments.c @@ -3,20 +3,20 @@ // Basic argument/attribute tests for Lanai. -// CHECK: define void @f0(i32 inreg %i, i32 inreg %j, i64 inreg %k) +// CHECK: define dso_local void @f0(i32 inreg %i, i32 inreg %j, i64 inreg %k) void f0(int i, long j, long long k) {} typedef struct { int aa; int bb; } s1; -// CHECK: define void @f1(i32 inreg %i.coerce0, i32 inreg %i.coerce1) +// CHECK: define dso_local void @f1(i32 inreg %i.coerce0, i32 inreg %i.coerce1) void f1(s1 i) {} typedef struct { int cc; } s2; -// CHECK: define void @f2(%struct.s2* noalias sret %agg.result) +// CHECK: define dso_local void @f2(%struct.s2* noalias sret %agg.result) s2 f2() { s2 foo; return foo; @@ -26,19 +26,19 @@ typedef struct { int cc; int dd; } s3; -// CHECK: define void @f3(%struct.s3* noalias sret %agg.result) +// CHECK: define dso_local void @f3(%struct.s3* noalias sret %agg.result) s3 f3() { s3 foo; return foo; } -// CHECK: define void @f4(i64 inreg %i) +// CHECK: define dso_local void @f4(i64 inreg %i) void f4(long long i) {} -// CHECK: define void @f5(i8 inreg %a, i16 inreg %b) +// CHECK: define dso_local void @f5(i8 inreg %a, i16 inreg %b) void f5(char a, short b) {} -// CHECK: define void @f6(i8 inreg %a, i16 inreg %b) +// CHECK: define dso_local void @f6(i8 inreg %a, i16 inreg %b) void f6(unsigned char a, unsigned short b) {} enum my_enum { @@ -47,14 +47,14 @@ enum my_enum { ENUM3, }; // Enums should be treated as the underlying i32. -// CHECK: define void @f7(i32 inreg %a) +// CHECK: define dso_local void @f7(i32 inreg %a) void f7(enum my_enum a) {} enum my_big_enum { ENUM4 = 0xFFFFFFFFFFFFFFFF, }; // Big enums should be treated as the underlying i64. -// CHECK: define void @f8(i64 inreg %a) +// CHECK: define dso_local void @f8(i64 inreg %a) void f8(enum my_big_enum a) {} union simple_union { @@ -62,7 +62,7 @@ union simple_union { char b; }; // Unions should be passed inreg. -// CHECK: define void @f9(i32 inreg %s.coerce) +// CHECK: define dso_local void @f9(i32 inreg %s.coerce) void f9(union simple_union s) {} typedef struct { @@ -71,5 +71,5 @@ typedef struct { int b8 : 8; } bitfield1; // Bitfields should be passed inreg. -// CHECK: define void @f10(i32 inreg %bf1.coerce) +// CHECK: define dso_local void @f10(i32 inreg %bf1.coerce) void f10(bitfield1 bf1) {} diff --git a/clang/test/CodeGen/le32-arguments.c b/clang/test/CodeGen/le32-arguments.c index 9e6908d7fc41..6922f08e834d 100644 --- a/clang/test/CodeGen/le32-arguments.c +++ b/clang/test/CodeGen/le32-arguments.c @@ -2,7 +2,7 @@ // Basic argument/attribute tests for le32/PNaCl -// CHECK-LABEL: define void @f0(i32 %i, i32 %j, double %k) +// CHECK-LABEL: define dso_local void @f0(i32 %i, i32 %j, double %k) void f0(int i, long j, double k) {} typedef struct { @@ -10,27 +10,27 @@ typedef struct { int bb; } s1; // Structs should be passed byval and not split up -// CHECK-LABEL: define void @f1(%struct.s1* byval(%struct.s1) align 4 %i) +// CHECK-LABEL: define dso_local void @f1(%struct.s1* byval(%struct.s1) align 4 %i) void f1(s1 i) {} typedef struct { int cc; } s2; // Structs should be returned sret and not simplified by the frontend -// CHECK-LABEL: define void @f2(%struct.s2* noalias sret %agg.result) +// CHECK-LABEL: define dso_local void @f2(%struct.s2* noalias sret %agg.result) s2 f2() { s2 foo; return foo; } -// CHECK-LABEL: define void @f3(i64 %i) +// CHECK-LABEL: define dso_local void @f3(i64 %i) void f3(long long i) {} // i8/i16 should be signext, i32 and higher should not -// CHECK-LABEL: define void @f4(i8 signext %a, i16 signext %b) +// CHECK-LABEL: define dso_local void @f4(i8 signext %a, i16 signext %b) void f4(char a, short b) {} -// CHECK-LABEL: define void @f5(i8 zeroext %a, i16 zeroext %b) +// CHECK-LABEL: define dso_local void @f5(i8 zeroext %a, i16 zeroext %b) void f5(unsigned char a, unsigned short b) {} @@ -40,7 +40,7 @@ enum my_enum { ENUM3, }; // Enums should be treated as the underlying i32 -// CHECK-LABEL: define void @f6(i32 %a) +// CHECK-LABEL: define dso_local void @f6(i32 %a) void f6(enum my_enum a) {} union simple_union { @@ -48,7 +48,7 @@ union simple_union { char b; }; // Unions should be passed as byval structs -// CHECK-LABEL: define void @f7(%union.simple_union* byval(%union.simple_union) align 4 %s) +// CHECK-LABEL: define dso_local void @f7(%union.simple_union* byval(%union.simple_union) align 4 %s) void f7(union simple_union s) {} typedef struct { @@ -57,5 +57,5 @@ typedef struct { int b8 : 8; } bitfield1; // Bitfields should be passed as byval structs -// CHECK-LABEL: define void @f8(%struct.bitfield1* byval(%struct.bitfield1) align 4 %bf1) +// CHECK-LABEL: define dso_local void @f8(%struct.bitfield1* byval(%struct.bitfield1) align 4 %bf1) void f8(bitfield1 bf1) {} diff --git a/clang/test/CodeGen/le32-libcall-pow.c b/clang/test/CodeGen/le32-libcall-pow.c index 1b8a7a33a562..a27ea1e82989 100644 --- a/clang/test/CodeGen/le32-libcall-pow.c +++ b/clang/test/CodeGen/le32-libcall-pow.c @@ -9,7 +9,7 @@ float powf(float, float); double pow(double, double); long double powl(long double, long double); -// CHECK-LABEL: define void @test_pow +// CHECK-LABEL: define dso_local void @test_pow void test_pow(float a0, double a1, long double a2) { // CHECK: call float @powf float l0 = powf(a0, a0); diff --git a/clang/test/CodeGen/le32-vaarg.c b/clang/test/CodeGen/le32-vaarg.c index 7e1dd8a27ae6..1a83d65c8e04 100644 --- a/clang/test/CodeGen/le32-vaarg.c +++ b/clang/test/CodeGen/le32-vaarg.c @@ -4,7 +4,7 @@ int get_int(va_list *args) { return va_arg(*args, int); } -// CHECK: define i32 @get_int +// CHECK: define dso_local i32 @get_int // CHECK: [[RESULT:%[a-z_0-9]+]] = va_arg {{.*}}, i32{{$}} // CHECK: store i32 [[RESULT]], i32* [[LOC:%[a-z_0-9]+]] // CHECK: [[RESULT2:%[a-z_0-9]+]] = load i32, i32* [[LOC]] @@ -19,7 +19,7 @@ struct Foo dest; void get_struct(va_list *args) { dest = va_arg(*args, struct Foo); } -// CHECK: define void @get_struct +// CHECK: define dso_local void @get_struct // CHECK: [[RESULT:%[a-z_0-9]+]] = va_arg {{.*}}, %struct.Foo{{$}} // CHECK: store %struct.Foo [[RESULT]], %struct.Foo* [[LOC:%[a-z_0-9]+]] // CHECK: [[LOC2:%[a-z_0-9]+]] = bitcast {{.*}} [[LOC]] to i8* @@ -28,5 +28,5 @@ void get_struct(va_list *args) { void skip_struct(va_list *args) { va_arg(*args, struct Foo); } -// CHECK: define void @skip_struct +// CHECK: define dso_local void @skip_struct // CHECK: va_arg {{.*}}, %struct.Foo{{$}} diff --git a/clang/test/CodeGen/libcalls.c b/clang/test/CodeGen/libcalls.c index 699dc78eac63..85b277507677 100644 --- a/clang/test/CodeGen/libcalls.c +++ b/clang/test/CodeGen/libcalls.c @@ -2,9 +2,9 @@ // RUN: %clang_cc1 -emit-llvm -o - %s -triple i386-unknown-unknown | FileCheck -check-prefix CHECK-NO %s // RUN: %clang_cc1 -menable-unsafe-fp-math -emit-llvm -o - %s -triple i386-unknown-unknown | FileCheck -check-prefix CHECK-FAST %s -// CHECK-YES-LABEL: define void @test_sqrt -// CHECK-NO-LABEL: define void @test_sqrt -// CHECK-FAST-LABEL: define void @test_sqrt +// CHECK-YES-LABEL: define dso_local void @test_sqrt +// CHECK-NO-LABEL: define dso_local void @test_sqrt +// CHECK-FAST-LABEL: define dso_local void @test_sqrt void test_sqrt(float a0, double a1, long double a2) { // CHECK-YES: call float @sqrtf // CHECK-NO: call float @llvm.sqrt.f32(float @@ -32,8 +32,8 @@ void test_sqrt(float a0, double a1, long double a2) { // CHECK-FAST: declare double @llvm.sqrt.f64(double) // CHECK-FAST: declare x86_fp80 @llvm.sqrt.f80(x86_fp80) -// CHECK-YES-LABEL: define void @test_pow -// CHECK-NO-LABEL: define void @test_pow +// CHECK-YES-LABEL: define dso_local void @test_pow +// CHECK-NO-LABEL: define dso_local void @test_pow void test_pow(float a0, double a1, long double a2) { // CHECK-YES: call float @powf // CHECK-NO: call float @llvm.pow.f32 @@ -55,8 +55,8 @@ void test_pow(float a0, double a1, long double a2) { // CHECK-NO: declare double @llvm.pow.f64(double, double) [[NUW_RNI]] // CHECK-NO: declare x86_fp80 @llvm.pow.f80(x86_fp80, x86_fp80) [[NUW_RNI]] -// CHECK-YES-LABEL: define void @test_fma -// CHECK-NO-LABEL: define void @test_fma +// CHECK-YES-LABEL: define dso_local void @test_fma +// CHECK-NO-LABEL: define dso_local void @test_fma void test_fma(float a0, double a1, long double a2) { // CHECK-YES: call float @fmaf // CHECK-NO: call float @llvm.fma.f32 diff --git a/clang/test/CodeGen/lifetime-debuginfo-1.c b/clang/test/CodeGen/lifetime-debuginfo-1.c index 10fd2c21644d..6f24d0825aa2 100644 --- a/clang/test/CodeGen/lifetime-debuginfo-1.c +++ b/clang/test/CodeGen/lifetime-debuginfo-1.c @@ -5,7 +5,7 @@ extern int x; -// CHECK-LABEL: define i32 @f +// CHECK-LABEL: define dso_local i32 @f int f() { int *p = &x; // CHECK: ret i32 %{{.*}}, !dbg [[DI:![0-9]*]] diff --git a/clang/test/CodeGen/lifetime-debuginfo-2.c b/clang/test/CodeGen/lifetime-debuginfo-2.c index a2e06519358f..52c95d564719 100644 --- a/clang/test/CodeGen/lifetime-debuginfo-2.c +++ b/clang/test/CodeGen/lifetime-debuginfo-2.c @@ -10,7 +10,7 @@ extern int f(int); extern int g(int); -// CHECK-LABEL: define i32 @test +// CHECK-LABEL: define dso_local i32 @test int test(int a, int b) { int res; diff --git a/clang/test/CodeGen/link-bitcode-file.c b/clang/test/CodeGen/link-bitcode-file.c index 7810fe1d2941..9151c515d291 100644 --- a/clang/test/CodeGen/link-bitcode-file.c +++ b/clang/test/CodeGen/link-bitcode-file.c @@ -26,14 +26,14 @@ int f(void) { int f2(void) { return 43; } #else -// CHECK-NO-BC-LABEL: define i32 @g +// CHECK-NO-BC-LABEL: define dso_local i32 @g // CHECK-NO-BC: ret i32 42 int g(void) { return f(); } -// CHECK-NO-BC-LABEL: define i32 @f -// CHECK-NO-BC2-LABEL: define i32 @f2 +// CHECK-NO-BC-LABEL: define dso_local i32 @f +// CHECK-NO-BC2-LABEL: define dso_local i32 @f2 #endif diff --git a/clang/test/CodeGen/long-call-attr.c b/clang/test/CodeGen/long-call-attr.c index 82433caf76fd..436137f9e85f 100644 --- a/clang/test/CodeGen/long-call-attr.c +++ b/clang/test/CodeGen/long-call-attr.c @@ -6,11 +6,11 @@ void __attribute__((short_call)) foo4 (void); void __attribute__((far)) foo2 (void) {} -// CHECK: define void @foo2() [[FAR:#[0-9]+]] +// CHECK: define dso_local void @foo2() [[FAR:#[0-9]+]] void __attribute__((near)) foo3 (void) { foo1(); foo4(); } -// CHECK: define void @foo3() [[NEAR:#[0-9]+]] +// CHECK: define dso_local void @foo3() [[NEAR:#[0-9]+]] // CHECK: declare void @foo1() [[LONGDECL:#[0-9]+]] // CHECK: declare void @foo4() [[SHORTDECL:#[0-9]+]] diff --git a/clang/test/CodeGen/long_double_fp128.cpp b/clang/test/CodeGen/long_double_fp128.cpp index dc30767455ad..990b62b59700 100644 --- a/clang/test/CodeGen/long_double_fp128.cpp +++ b/clang/test/CodeGen/long_double_fp128.cpp @@ -17,10 +17,10 @@ // Android's gcc and llvm use fp128 for long double. // NaCl uses double format for long double, but still has separate overloads. void test(long, float, double, long double, long double _Complex) { } -// A64: define void @_Z4testlfdgCg(i64 %0, float %1, double %2, fp128 %3, { fp128, fp128 }* -// G64: define void @_Z4testlfdeCe(i64 %0, float %1, double %2, x86_fp80 %3, { x86_fp80, x86_fp80 }* -// P64: define void @_Z4testlfdgCg(i64 %0, float %1, double %2, ppc_fp128 %3, ppc_fp128 {{.*}}, ppc_fp128 -// A32: define void @_Z4testlfdeCe(i32 %0, float %1, double %2, double %3, { double, double }* -// G32: define void @_Z4testlfdeCe(i32 %0, float %1, double %2, x86_fp80 %3, { x86_fp80, x86_fp80 }* -// P32: define void @_Z4testlfdgCg(i32 %0, float %1, double %2, ppc_fp128 %3, { ppc_fp128, ppc_fp128 }* -// N64: define void @_Z4testlfdeCe(i32 %0, float %1, double %2, double %3, double {{.*}}, double +// A64: define dso_local void @_Z4testlfdgCg(i64 %0, float %1, double %2, fp128 %3, { fp128, fp128 }* +// G64: define dso_local void @_Z4testlfdeCe(i64 %0, float %1, double %2, x86_fp80 %3, { x86_fp80, x86_fp80 }* +// P64: define dso_local void @_Z4testlfdgCg(i64 %0, float %1, double %2, ppc_fp128 %3, ppc_fp128 {{.*}}, ppc_fp128 +// A32: define dso_local void @_Z4testlfdeCe(i32 %0, float %1, double %2, double %3, { double, double }* +// G32: define dso_local void @_Z4testlfdeCe(i32 %0, float %1, double %2, x86_fp80 %3, { x86_fp80, x86_fp80 }* +// P32: define dso_local void @_Z4testlfdgCg(i32 %0, float %1, double %2, ppc_fp128 %3, { ppc_fp128, ppc_fp128 }* +// N64: define dso_local void @_Z4testlfdeCe(i32 %0, float %1, double %2, double %3, double {{.*}}, double diff --git a/clang/test/CodeGen/malign-double-x86-nacl.c b/clang/test/CodeGen/malign-double-x86-nacl.c index d67315582bc3..482df9fc67bd 100644 --- a/clang/test/CodeGen/malign-double-x86-nacl.c +++ b/clang/test/CodeGen/malign-double-x86-nacl.c @@ -5,7 +5,7 @@ int checksize[sizeof(long double) == 8 ? 1 : -1]; int checkalign[__alignof(long double) == 8 ? 1 : -1]; -// CHECK-LABEL: define void @s1(double %a) +// CHECK-LABEL: define dso_local void @s1(double %a) void s1(long double a) {} struct st_ld { @@ -18,7 +18,7 @@ int checkalign2[__alignof(struct st_ld) == 8 ? 1 : -1]; int checksize3[sizeof(double) == 8 ? 1 : -1]; int checkalign3[__alignof(double) == 8 ? 1 : -1]; -// CHECK-LABEL: define void @s2(double %a) +// CHECK-LABEL: define dso_local void @s2(double %a) void s2(double a) {} struct st_d { @@ -32,7 +32,7 @@ int checkalign4[__alignof(struct st_d) == 8 ? 1 : -1]; int checksize5[sizeof(long long) == 8 ? 1 : -1]; int checkalign5[__alignof(long long) == 8 ? 1 : -1]; -// CHECK-LABEL: define void @s3(i64 %a) +// CHECK-LABEL: define dso_local void @s3(i64 %a) void s3(long long a) {} struct st_ll { diff --git a/clang/test/CodeGen/malign-double.cpp b/clang/test/CodeGen/malign-double.cpp index 0cda4dc3687d..02fbef024afc 100644 --- a/clang/test/CodeGen/malign-double.cpp +++ b/clang/test/CodeGen/malign-double.cpp @@ -15,11 +15,11 @@ struct S1 { unsigned S1_align = __alignof(struct S1); unsigned S1_size = sizeof(struct S1); -// CHECK: @S1_align = global i32 1, align 4 -// CHECK: @S1_size = global i32 1, align 4 +// CHECK: @S1_align = dso_local global i32 1, align 4 +// CHECK: @S1_size = dso_local global i32 1, align 4 unsigned S1_c_offset = (unsigned) &((struct S1*) 0)->c; -// CHECK: @S1_c_offset = global i32 0, align 4 +// CHECK: @S1_c_offset = dso_local global i32 0, align 4 struct S2{ char c; @@ -30,17 +30,17 @@ struct S2{ unsigned S2_align = __alignof(struct S2); unsigned S2_size = sizeof(struct S2); -// CHECK: @S2_align = global i32 4, align 4 -// CHECK: @S2_size = global i32 8, align 4 +// CHECK: @S2_align = dso_local global i32 4, align 4 +// CHECK: @S2_size = dso_local global i32 8, align 4 unsigned S2_c_offset = (unsigned) &((struct S2*) 0)->c; unsigned S2_d_offset = (unsigned) &((struct S2*) 0)->d; unsigned S2_s_offset = (unsigned) &((struct S2*) 0)->s; unsigned S2_n_offset = (unsigned) &((struct S2*) 0)->n; -// CHECK: @S2_c_offset = global i32 0, align 4 -// CHECK: @S2_d_offset = global i32 1, align 4 -// CHECK: @S2_s_offset = global i32 2, align 4 -// CHECK: @S2_n_offset = global i32 4, align 4 +// CHECK: @S2_c_offset = dso_local global i32 0, align 4 +// CHECK: @S2_d_offset = dso_local global i32 1, align 4 +// CHECK: @S2_s_offset = dso_local global i32 2, align 4 +// CHECK: @S2_n_offset = dso_local global i32 4, align 4 struct S3 { char c; @@ -49,13 +49,13 @@ struct S3 { unsigned S3_align = __alignof(struct S3); unsigned S3_size = sizeof(struct S3); -// CHECK: @S3_align = global i32 2, align 4 -// CHECK: @S3_size = global i32 4, align 4 +// CHECK: @S3_align = dso_local global i32 2, align 4 +// CHECK: @S3_size = dso_local global i32 4, align 4 unsigned S3_c_offset = (unsigned) &((struct S3*) 0)->c; unsigned S3_s_offset = (unsigned) &((struct S3*) 0)->s; -// CHECK: @S3_c_offset = global i32 0, align 4 -// CHECK: @S3_s_offset = global i32 2, align 4 +// CHECK: @S3_c_offset = dso_local global i32 0, align 4 +// CHECK: @S3_s_offset = dso_local global i32 2, align 4 struct S4 { char c; @@ -65,19 +65,19 @@ struct S4 { unsigned S4_align = __alignof(struct S4); unsigned S4_size = sizeof(struct S4); -// CHECK-ON: @S4_align = global i32 8, align 4 -// CHECK-ON: @S4_size = global i32 24, align 4 -// CHECK-OFF: @S4_align = global i32 4, align 4 -// CHECK-OFF: @S4_size = global i32 16, align 4 +// CHECK-ON: @S4_align = dso_local global i32 8, align 4 +// CHECK-ON: @S4_size = dso_local global i32 24, align 4 +// CHECK-OFF: @S4_align = dso_local global i32 4, align 4 +// CHECK-OFF: @S4_size = dso_local global i32 16, align 4 unsigned S4_c_offset = (unsigned) &((struct S4*) 0)->c; unsigned S4_d_offset = (unsigned) &((struct S4*) 0)->d; unsigned S4_s_offset = (unsigned) &((struct S4*) 0)->s; -// CHECK: @S4_c_offset = global i32 0, align 4 -// CHECK-ON: @S4_d_offset = global i32 8, align 4 -// CHECK-ON: @S4_s_offset = global i32 16, align 4 -// CHECK-OFF: @S4_d_offset = global i32 4, align 4 -// CHECK-OFF: @S4_s_offset = global i32 12, align 4 +// CHECK: @S4_c_offset = dso_local global i32 0, align 4 +// CHECK-ON: @S4_d_offset = dso_local global i32 8, align 4 +// CHECK-ON: @S4_s_offset = dso_local global i32 16, align 4 +// CHECK-OFF: @S4_d_offset = dso_local global i32 4, align 4 +// CHECK-OFF: @S4_s_offset = dso_local global i32 12, align 4 union S5 { char c; @@ -87,15 +87,15 @@ union S5 { unsigned S5_align = __alignof(union S5); unsigned S5_size = sizeof(union S5); -// CHECK: @S5_align = global i32 4, align 4 -// CHECK: @S5_size = global i32 4, align 4 +// CHECK: @S5_align = dso_local global i32 4, align 4 +// CHECK: @S5_size = dso_local global i32 4, align 4 unsigned S5_c_offset = (unsigned) &((union S5*) 0)->c; unsigned S5_s_offset = (unsigned) &((union S5*) 0)->s; unsigned S5_j_offset = (unsigned) &((union S5*) 0)->j; -// CHECK: @S5_c_offset = global i32 0, align 4 -// CHECK: @S5_s_offset = global i32 0, align 4 -// CHECK: @S5_j_offset = global i32 0, align 4 +// CHECK: @S5_c_offset = dso_local global i32 0, align 4 +// CHECK: @S5_s_offset = dso_local global i32 0, align 4 +// CHECK: @S5_j_offset = dso_local global i32 0, align 4 union S6 { char c; @@ -104,12 +104,12 @@ union S6 { unsigned S6_align = __alignof(union S6); unsigned S6_size = sizeof(union S6); -// CHECK-ON: @S6_align = global i32 8, align 4 -// CHECK-ON: @S6_size = global i32 8, align 4 -// CHECK-OFF: @S6_align = global i32 4, align 4 -// CHECK-OFF: @S6_size = global i32 8, align 4 +// CHECK-ON: @S6_align = dso_local global i32 8, align 4 +// CHECK-ON: @S6_size = dso_local global i32 8, align 4 +// CHECK-OFF: @S6_align = dso_local global i32 4, align 4 +// CHECK-OFF: @S6_size = dso_local global i32 8, align 4 unsigned S6_c_offset = (unsigned) &((union S6*) 0)->c; unsigned S6_d_offset = (unsigned) &((union S6*) 0)->d; -// CHECK: @S6_c_offset = global i32 0, align 4 -// CHECK: @S6_d_offset = global i32 0, align 4 +// CHECK: @S6_c_offset = dso_local global i32 0, align 4 +// CHECK: @S6_d_offset = dso_local global i32 0, align 4 diff --git a/clang/test/CodeGen/mangle-windows.c b/clang/test/CodeGen/mangle-windows.c index 6dd14d95e00f..37f0fc502ae0 100644 --- a/clang/test/CodeGen/mangle-windows.c +++ b/clang/test/CodeGen/mangle-windows.c @@ -13,14 +13,14 @@ void __stdcall f1(void) {} // CHECK: define dso_local x86_stdcallcc void @"\01_f1@0" // X64: define dso_local void @f1( -// ELF32: define x86_stdcallcc void @"\01_f1@0" -// ELF64: define void @f1( +// ELF32: define dso_local x86_stdcallcc void @"\01_f1@0" +// ELF64: define dso_local void @f1( void __fastcall f2(void) {} // CHECK: define dso_local x86_fastcallcc void @"\01@f2@0" // X64: define dso_local void @f2( -// ELF32: define x86_fastcallcc void @"\01@f2@0" -// ELF64: define void @f2( +// ELF32: define dso_local x86_fastcallcc void @"\01@f2@0" +// ELF64: define dso_local void @f2( void __stdcall f3() {} // CHECK: define dso_local x86_stdcallcc void @"\01_f3@0" @@ -57,14 +57,14 @@ void f12(void) {} void __vectorcall v1(void) {} // CHECK: define dso_local x86_vectorcallcc void @"\01v1@@0"( // X64: define dso_local x86_vectorcallcc void @"\01v1@@0"( -// ELF32: define x86_vectorcallcc void @"\01v1@@0"( -// ELF64: define x86_vectorcallcc void @"\01v1@@0"( +// ELF32: define dso_local x86_vectorcallcc void @"\01v1@@0"( +// ELF64: define dso_local x86_vectorcallcc void @"\01v1@@0"( void __vectorcall v2(char a) {} // CHECK: define dso_local x86_vectorcallcc void @"\01v2@@4"( // X64: define dso_local x86_vectorcallcc void @"\01v2@@8"( -// ELF32: define x86_vectorcallcc void @"\01v2@@4"( -// ELF64: define x86_vectorcallcc void @"\01v2@@8"( +// ELF32: define dso_local x86_vectorcallcc void @"\01v2@@4"( +// ELF64: define dso_local x86_vectorcallcc void @"\01v2@@8"( void __vectorcall v3(short a) {} // CHECK: define dso_local x86_vectorcallcc void @"\01v3@@4"( diff --git a/clang/test/CodeGen/mbackchain.c b/clang/test/CodeGen/mbackchain.c index e7cfc3aec52b..529733d53d36 100644 --- a/clang/test/CodeGen/mbackchain.c +++ b/clang/test/CodeGen/mbackchain.c @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -mbackchain -triple s390x-linux -emit-llvm -o - %s | FileCheck %s -// CHECK: define void @foo() [[NUW:#[0-9]+]] +// CHECK: define dso_local void @foo() [[NUW:#[0-9]+]] void foo(void) { } diff --git a/clang/test/CodeGen/mcu-struct-return.c b/clang/test/CodeGen/mcu-struct-return.c index 353c963dadb0..cd46d7864602 100644 --- a/clang/test/CodeGen/mcu-struct-return.c +++ b/clang/test/CodeGen/mcu-struct-return.c @@ -41,12 +41,12 @@ union U3 foo3() { return u3; } struct S1 bar1() { return s1; } struct S2 bar2() { return s2; } struct S1 bar3(union U1 u) { return s1; } -// CHECK: define void @foo1() -// CHECK: define void @foo2([[UNION2_TYPE]]* noalias sret %{{.+}}) -// CHECK: define i32 @foo3() -// CHECK: define void @bar1() -// CHECK: define i32 @bar2() -// CHECK: define void @bar3() +// CHECK: define dso_local void @foo1() +// CHECK: define dso_local void @foo2([[UNION2_TYPE]]* noalias sret %{{.+}}) +// CHECK: define dso_local i32 @foo3() +// CHECK: define dso_local void @bar1() +// CHECK: define dso_local i32 @bar2() +// CHECK: define dso_local void @bar3() void run() { union U1 x1 = foo1(); diff --git a/clang/test/CodeGen/micromips-attr.c b/clang/test/CodeGen/micromips-attr.c index 96ba774afc0f..3fe666b58b21 100644 --- a/clang/test/CodeGen/micromips-attr.c +++ b/clang/test/CodeGen/micromips-attr.c @@ -2,11 +2,11 @@ void __attribute__((micromips)) foo (void) {} -// CHECK: define void @foo() [[MICROMIPS:#[0-9]+]] +// CHECK: define dso_local void @foo() [[MICROMIPS:#[0-9]+]] void __attribute__((nomicromips)) nofoo (void) {} -// CHECK: define void @nofoo() [[NOMICROMIPS:#[0-9]+]] +// CHECK: define dso_local void @nofoo() [[NOMICROMIPS:#[0-9]+]] // CHECK: attributes [[MICROMIPS]] = { noinline nounwind {{.*}} "micromips" {{.*}} } // CHECK: attributes [[NOMICROMIPS]] = { noinline nounwind {{.*}} "nomicromips" {{.*}} } diff --git a/clang/test/CodeGen/microsoft-call-conv.c b/clang/test/CodeGen/microsoft-call-conv.c index c24db1296f12..9ca41963d810 100644 --- a/clang/test/CodeGen/microsoft-call-conv.c +++ b/clang/test/CodeGen/microsoft-call-conv.c @@ -6,22 +6,22 @@ void __fastcall f1(void); void __stdcall f2(void); void __thiscall f3(void); void __fastcall f4(void) { -// CHECK-LABEL: define x86_fastcallcc void @f4() +// CHECK-LABEL: define dso_local x86_fastcallcc void @f4() f1(); // CHECK: call x86_fastcallcc void @f1() } void __stdcall f5(void) { -// CHECK-LABEL: define x86_stdcallcc void @f5() +// CHECK-LABEL: define dso_local x86_stdcallcc void @f5() f2(); // CHECK: call x86_stdcallcc void @f2() } void __thiscall f6(void) { -// CHECK-LABEL: define x86_thiscallcc void @f6() +// CHECK-LABEL: define dso_local x86_thiscallcc void @f6() f3(); // CHECK: call x86_thiscallcc void @f3() } void __vectorcall f61(void) { -// CHECK-LABEL: define x86_vectorcallcc void @f61() +// CHECK-LABEL: define dso_local x86_vectorcallcc void @f61() f3(); // CHECK: call x86_thiscallcc void @f3() } diff --git a/clang/test/CodeGen/mips-byval-arg.c b/clang/test/CodeGen/mips-byval-arg.c index 1e7f38915ccb..24293ab4303c 100644 --- a/clang/test/CodeGen/mips-byval-arg.c +++ b/clang/test/CodeGen/mips-byval-arg.c @@ -7,8 +7,8 @@ typedef struct { extern void foo2(S0); -// O32-LABEL: define void @foo1(i32 inreg %a0.coerce0, i32 inreg %a0.coerce1, i32 inreg %a0.coerce2) -// N64-LABEL: define void @foo1(i64 inreg %a0.coerce0, i32 inreg %a0.coerce1) +// O32-LABEL: define dso_local void @foo1(i32 inreg %a0.coerce0, i32 inreg %a0.coerce1, i32 inreg %a0.coerce2) +// N64-LABEL: define dso_local void @foo1(i64 inreg %a0.coerce0, i32 inreg %a0.coerce1) void foo1(S0 a0) { foo2(a0); diff --git a/clang/test/CodeGen/mips-interrupt-attr.c b/clang/test/CodeGen/mips-interrupt-attr.c index 0ef5dabd2657..5b07da704189 100644 --- a/clang/test/CodeGen/mips-interrupt-attr.c +++ b/clang/test/CodeGen/mips-interrupt-attr.c @@ -3,55 +3,55 @@ void __attribute__ ((interrupt("vector=sw0"))) isr_sw0 (void) { - // CHECK: define void @isr_sw0() [[SW0:#[0-9]+]] + // CHECK: define dso_local void @isr_sw0() [[SW0:#[0-9]+]] } void __attribute__ ((interrupt("vector=sw1"))) isr_sw1 (void) { - // CHECK: define void @isr_sw1() [[SW1:#[0-9]+]] + // CHECK: define dso_local void @isr_sw1() [[SW1:#[0-9]+]] } void __attribute__ ((interrupt("vector=hw0"))) isr_hw0 (void) { - // CHECK: define void @isr_hw0() [[HW0:#[0-9]+]] + // CHECK: define dso_local void @isr_hw0() [[HW0:#[0-9]+]] } void __attribute__ ((interrupt("vector=hw1"))) isr_hw1 (void) { - // CHECK: define void @isr_hw1() [[HW1:#[0-9]+]] + // CHECK: define dso_local void @isr_hw1() [[HW1:#[0-9]+]] } void __attribute__ ((interrupt("vector=hw2"))) isr_hw2 (void) { - // CHECK: define void @isr_hw2() [[HW2:#[0-9]+]] + // CHECK: define dso_local void @isr_hw2() [[HW2:#[0-9]+]] } void __attribute__ ((interrupt("vector=hw3"))) isr_hw3 (void) { - // CHECK: define void @isr_hw3() [[HW3:#[0-9]+]] + // CHECK: define dso_local void @isr_hw3() [[HW3:#[0-9]+]] } void __attribute__ ((interrupt("vector=hw4"))) isr_hw4 (void) { - // CHECK: define void @isr_hw4() [[HW4:#[0-9]+]] + // CHECK: define dso_local void @isr_hw4() [[HW4:#[0-9]+]] } void __attribute__ ((interrupt("vector=hw5"))) isr_hw5 (void) { - // CHECK: define void @isr_hw5() [[HW5:#[0-9]+]] + // CHECK: define dso_local void @isr_hw5() [[HW5:#[0-9]+]] } void __attribute__ ((interrupt)) isr_eic (void) { - // CHECK: define void @isr_eic() [[EIC:#[0-9]+]] + // CHECK: define dso_local void @isr_eic() [[EIC:#[0-9]+]] } // CHECK: attributes [[SW0]] = { {{.*}} "interrupt"="sw0" {{.*}} } // CHECK: attributes [[SW1]] = { {{.*}} "interrupt"="sw1" {{.*}} } diff --git a/clang/test/CodeGen/mips-transparent-union.c b/clang/test/CodeGen/mips-transparent-union.c index ad417dd9f5da..04d77c516807 100644 --- a/clang/test/CodeGen/mips-transparent-union.c +++ b/clang/test/CodeGen/mips-transparent-union.c @@ -21,7 +21,7 @@ void bar(void) { return foo(&data); } -// CHECK-LABEL: define void @bar() +// CHECK-LABEL: define dso_local void @bar() // CHECK: call void @foo(i8* %{{[0-9]+}}) // CHECK: declare void @foo(i8*) diff --git a/clang/test/CodeGen/mips-varargs.c b/clang/test/CodeGen/mips-varargs.c index 8f1a633b7df8..c4acaf699011 100644 --- a/clang/test/CodeGen/mips-varargs.c +++ b/clang/test/CodeGen/mips-varargs.c @@ -19,9 +19,9 @@ int test_i32(char *fmt, ...) { return v; } -// O32-LABEL: define i32 @test_i32(i8*{{.*}} %fmt, ...) -// N32-LABEL: define signext i32 @test_i32(i8*{{.*}} %fmt, ...) -// N64-LABEL: define signext i32 @test_i32(i8*{{.*}} %fmt, ...) +// O32-LABEL: define dso_local i32 @test_i32(i8*{{.*}} %fmt, ...) +// N32-LABEL: define dso_local signext i32 @test_i32(i8*{{.*}} %fmt, ...) +// N64-LABEL: define dso_local signext i32 @test_i32(i8*{{.*}} %fmt, ...) // // O32: %va = alloca i8*, align [[$PTRALIGN:4]] // N32: %va = alloca i8*, align [[$PTRALIGN:4]] @@ -63,7 +63,7 @@ long long test_i64(char *fmt, ...) { return v; } -// ALL-LABEL: define i64 @test_i64(i8*{{.*}} %fmt, ...) +// ALL-LABEL: define dso_local i64 @test_i64(i8*{{.*}} %fmt, ...) // // ALL: %va = alloca i8*, align [[$PTRALIGN]] // ALL: [[VA:%.+]] = bitcast i8** %va to i8* @@ -97,7 +97,7 @@ char *test_ptr(char *fmt, ...) { return v; } -// ALL-LABEL: define i8* @test_ptr(i8*{{.*}} %fmt, ...) +// ALL-LABEL: define dso_local i8* @test_ptr(i8*{{.*}} %fmt, ...) // // ALL: %va = alloca i8*, align [[$PTRALIGN]] // ALL: [[V:%.*]] = alloca i8*, align [[$PTRALIGN]] @@ -135,9 +135,9 @@ int test_v4i32(char *fmt, ...) { return v[0]; } -// O32-LABEL: define i32 @test_v4i32(i8*{{.*}} %fmt, ...) -// N32-LABEL: define signext i32 @test_v4i32(i8*{{.*}} %fmt, ...) -// N64-LABEL: define signext i32 @test_v4i32(i8*{{.*}} %fmt, ...) +// O32-LABEL: define dso_local i32 @test_v4i32(i8*{{.*}} %fmt, ...) +// N32-LABEL: define dso_local signext i32 @test_v4i32(i8*{{.*}} %fmt, ...) +// N64-LABEL: define dso_local signext i32 @test_v4i32(i8*{{.*}} %fmt, ...) // // ALL: %va = alloca i8*, align [[$PTRALIGN]] // ALL: [[V:%.+]] = alloca <4 x i32>, align 16 diff --git a/clang/test/CodeGen/mips-vector-arg.c b/clang/test/CodeGen/mips-vector-arg.c index a429924efcfc..8c5410ffd4ea 100644 --- a/clang/test/CodeGen/mips-vector-arg.c +++ b/clang/test/CodeGen/mips-vector-arg.c @@ -8,18 +8,18 @@ typedef float v4sf __attribute__ ((__vector_size__ (16))); typedef int v4i32 __attribute__ ((__vector_size__ (16))); -// O32: define void @test_v4sf(i32 inreg %a1.coerce0, i32 inreg %a1.coerce1, i32 inreg %a1.coerce2, i32 inreg %a1.coerce3, i32 signext %a2, i32 %0, i32 inreg %a3.coerce0, i32 inreg %a3.coerce1, i32 inreg %a3.coerce2, i32 inreg %a3.coerce3) local_unnamed_addr [[NUW:#[0-9]+]] +// O32: define dso_local void @test_v4sf(i32 inreg %a1.coerce0, i32 inreg %a1.coerce1, i32 inreg %a1.coerce2, i32 inreg %a1.coerce3, i32 signext %a2, i32 %0, i32 inreg %a3.coerce0, i32 inreg %a3.coerce1, i32 inreg %a3.coerce2, i32 inreg %a3.coerce3) local_unnamed_addr [[NUW:#[0-9]+]] // O32: declare i32 @test_v4sf_2(i32 inreg, i32 inreg, i32 inreg, i32 inreg, i32 signext, i32, i32 inreg, i32 inreg, i32 inreg, i32 inreg) -// N64: define void @test_v4sf(i64 inreg %a1.coerce0, i64 inreg %a1.coerce1, i32 signext %a2, i64 %0, i64 inreg %a3.coerce0, i64 inreg %a3.coerce1) local_unnamed_addr [[NUW:#[0-9]+]] +// N64: define dso_local void @test_v4sf(i64 inreg %a1.coerce0, i64 inreg %a1.coerce1, i32 signext %a2, i64 %0, i64 inreg %a3.coerce0, i64 inreg %a3.coerce1) local_unnamed_addr [[NUW:#[0-9]+]] // N64: declare signext i32 @test_v4sf_2(i64 inreg, i64 inreg, i32 signext, i64, i64 inreg, i64 inreg) extern test_v4sf_2(v4sf, int, v4sf); void test_v4sf(v4sf a1, int a2, v4sf a3) { test_v4sf_2(a3, a2, a1); } -// O32: define void @test_v4i32(i32 inreg %a1.coerce0, i32 inreg %a1.coerce1, i32 inreg %a1.coerce2, i32 inreg %a1.coerce3, i32 signext %a2, i32 %0, i32 inreg %a3.coerce0, i32 inreg %a3.coerce1, i32 inreg %a3.coerce2, i32 inreg %a3.coerce3) local_unnamed_addr [[NUW]] +// O32: define dso_local void @test_v4i32(i32 inreg %a1.coerce0, i32 inreg %a1.coerce1, i32 inreg %a1.coerce2, i32 inreg %a1.coerce3, i32 signext %a2, i32 %0, i32 inreg %a3.coerce0, i32 inreg %a3.coerce1, i32 inreg %a3.coerce2, i32 inreg %a3.coerce3) local_unnamed_addr [[NUW]] // O32: declare i32 @test_v4i32_2(i32 inreg, i32 inreg, i32 inreg, i32 inreg, i32 signext, i32, i32 inreg, i32 inreg, i32 inreg, i32 inreg) -// N64: define void @test_v4i32(i64 inreg %a1.coerce0, i64 inreg %a1.coerce1, i32 signext %a2, i64 %0, i64 inreg %a3.coerce0, i64 inreg %a3.coerce1) local_unnamed_addr [[NUW]] +// N64: define dso_local void @test_v4i32(i64 inreg %a1.coerce0, i64 inreg %a1.coerce1, i32 signext %a2, i64 %0, i64 inreg %a3.coerce0, i64 inreg %a3.coerce1) local_unnamed_addr [[NUW]] // N64: declare signext i32 @test_v4i32_2(i64 inreg, i64 inreg, i32 signext, i64, i64 inreg, i64 inreg) extern test_v4i32_2(v4i32, int, v4i32); void test_v4i32(v4i32 a1, int a2, v4i32 a3) { diff --git a/clang/test/CodeGen/mips-vector-return.c b/clang/test/CodeGen/mips-vector-return.c index dd3c400c0197..ea3d0f0ac2a7 100644 --- a/clang/test/CodeGen/mips-vector-return.c +++ b/clang/test/CodeGen/mips-vector-return.c @@ -9,13 +9,13 @@ typedef double v4df __attribute__ ((__vector_size__ (32))); typedef int v4i32 __attribute__ ((__vector_size__ (16))); // O32-LABEL: define dso_local void @test_v4sf(<4 x float>* noalias nocapture sret -// N64: define inreg { i64, i64 } @test_v4sf +// N64: define dso_local inreg { i64, i64 } @test_v4sf v4sf test_v4sf(float a) { return (v4sf){0.0f, a, 0.0f, 0.0f}; } // O32-LABEL: define dso_local void @test_v4df(<4 x double>* noalias nocapture sret -// N64-LABEL: define void @test_v4df(<4 x double>* noalias nocapture sret +// N64-LABEL: define dso_local void @test_v4df(<4 x double>* noalias nocapture sret v4df test_v4df(double a) { return (v4df){0.0, a, 0.0, 0.0}; } @@ -24,7 +24,7 @@ v4df test_v4df(double a) { // in integer registers. // // O32: define dso_local inreg { i32, i32, i32, i32 } @test_v4i32 -// N64: define inreg { i64, i64 } @test_v4i32 +// N64: define dso_local inreg { i64, i64 } @test_v4i32 v4i32 test_v4i32(int a) { return (v4i32){0, a, 0, 0}; } diff --git a/clang/test/CodeGen/mips-zero-sized-struct.c b/clang/test/CodeGen/mips-zero-sized-struct.c index 08ebf9df3e93..0b44b7a4e7f0 100644 --- a/clang/test/CodeGen/mips-zero-sized-struct.c +++ b/clang/test/CodeGen/mips-zero-sized-struct.c @@ -19,9 +19,9 @@ // RUN: %clang_cc1 -triple mipsisa64r6-unknown-linux-gnuabi64 -S -emit-llvm -o - %s | FileCheck -check-prefix=N64 %s // RUN: %clang_cc1 -triple mipsisa64r6el-unknown-linux-gnuabi64 -S -emit-llvm -o - %s | FileCheck -check-prefix=N64 %s -// O32: define void @fn28(%struct.T2* noalias sret %agg.result, i8 signext %arg0) -// N32: define void @fn28(i8 signext %arg0) -// N64: define void @fn28(i8 signext %arg0) +// O32: define dso_local void @fn28(%struct.T2* noalias sret %agg.result, i8 signext %arg0) +// N32: define dso_local void @fn28(i8 signext %arg0) +// N64: define dso_local void @fn28(i8 signext %arg0) typedef struct T2 { } T2; T2 T2_retval; diff --git a/clang/test/CodeGen/mips16-attr.c b/clang/test/CodeGen/mips16-attr.c index 128a1bdb8ebd..73395e5d8da5 100644 --- a/clang/test/CodeGen/mips16-attr.c +++ b/clang/test/CodeGen/mips16-attr.c @@ -3,13 +3,13 @@ void __attribute__((mips16)) foo (void) { } -// CHECK: define void @foo() [[MIPS16:#[0-9]+]] +// CHECK: define dso_local void @foo() [[MIPS16:#[0-9]+]] void __attribute__((nomips16)) nofoo (void) { } -// CHECK: define void @nofoo() [[NOMIPS16:#[0-9]+]] +// CHECK: define dso_local void @nofoo() [[NOMIPS16:#[0-9]+]] // CHECK: attributes [[MIPS16]] = { noinline nounwind {{.*}} "mips16" {{.*}} } diff --git a/clang/test/CodeGen/mips64-class-return.cpp b/clang/test/CodeGen/mips64-class-return.cpp index af2dd5cbec2f..3bdb63de70ef 100644 --- a/clang/test/CodeGen/mips64-class-return.cpp +++ b/clang/test/CodeGen/mips64-class-return.cpp @@ -24,22 +24,22 @@ extern D0 gd0; extern D1 gd1; extern D2 gd2; -// CHECK: define inreg { i64, i64 } @_Z4foo1v() +// CHECK: define dso_local inreg { i64, i64 } @_Z4foo1v() D0 foo1(void) { return gd0; } -// CHECK: define inreg { double, float } @_Z4foo2v() +// CHECK: define dso_local inreg { double, float } @_Z4foo2v() D1 foo2(void) { return gd1; } -// CHECK-LABEL: define void @_Z4foo32D2(i64 inreg %a0.coerce0, double inreg %a0.coerce1) +// CHECK-LABEL: define dso_local void @_Z4foo32D2(i64 inreg %a0.coerce0, double inreg %a0.coerce1) void foo3(D2 a0) { gd2 = a0; } -// CHECK-LABEL: define void @_Z4foo42D0(i64 inreg %a0.coerce0, i64 inreg %a0.coerce1) +// CHECK-LABEL: define dso_local void @_Z4foo42D0(i64 inreg %a0.coerce0, i64 inreg %a0.coerce1) void foo4(D0 a0) { gd0 = a0; } diff --git a/clang/test/CodeGen/mips64-padding-arg.c b/clang/test/CodeGen/mips64-padding-arg.c index a7c8f0ff6fdc..7f67bb5f6b2b 100644 --- a/clang/test/CodeGen/mips64-padding-arg.c +++ b/clang/test/CodeGen/mips64-padding-arg.c @@ -9,7 +9,7 @@ typedef struct { // Insert padding to ensure arguments of type S0 are aligned to 16-byte boundaries. -// N64-LABEL: define void @foo1(i32 signext %a0, i64 %0, double inreg %a1.coerce0, i64 inreg %a1.coerce1, i64 inreg %a1.coerce2, i64 inreg %a1.coerce3, double inreg %a2.coerce0, i64 inreg %a2.coerce1, i64 inreg %a2.coerce2, i64 inreg %a2.coerce3, i32 signext %b, i64 %1, double inreg %a3.coerce0, i64 inreg %a3.coerce1, i64 inreg %a3.coerce2, i64 inreg %a3.coerce3) +// N64-LABEL: define dso_local void @foo1(i32 signext %a0, i64 %0, double inreg %a1.coerce0, i64 inreg %a1.coerce1, i64 inreg %a1.coerce2, i64 inreg %a1.coerce3, double inreg %a2.coerce0, i64 inreg %a2.coerce1, i64 inreg %a2.coerce2, i64 inreg %a2.coerce3, i32 signext %b, i64 %1, double inreg %a3.coerce0, i64 inreg %a3.coerce1, i64 inreg %a3.coerce2, i64 inreg %a3.coerce3) // N64: tail call void @foo2(i32 signext 1, i32 signext 2, i32 signext %a0, i64 undef, double inreg %a1.coerce0, i64 inreg %a1.coerce1, i64 inreg %a1.coerce2, i64 inreg %a1.coerce3, double inreg %a2.coerce0, i64 inreg %a2.coerce1, i64 inreg %a2.coerce2, i64 inreg %a2.coerce3, i32 signext 3, i64 undef, double inreg %a3.coerce0, i64 inreg %a3.coerce1, i64 inreg %a3.coerce2, i64 inreg %a3.coerce3) // N64: declare void @foo2(i32 signext, i32 signext, i32 signext, i64, double inreg, i64 inreg, i64 inreg, i64 inreg, double inreg, i64 inreg, i64 inreg, i64 inreg, i32 signext, i64, double inreg, i64 inreg, i64 inreg, i64 inreg) @@ -21,7 +21,7 @@ void foo1(int a0, S0 a1, S0 a2, int b, S0 a3) { // Insert padding before long double argument. // -// N64-LABEL: define void @foo3(i32 signext %a0, i64 %0, fp128 %a1) +// N64-LABEL: define dso_local void @foo3(i32 signext %a0, i64 %0, fp128 %a1) // N64: tail call void @foo4(i32 signext 1, i32 signext 2, i32 signext %a0, i64 undef, fp128 %a1) // N64: declare void @foo4(i32 signext, i32 signext, i32 signext, i64, fp128) @@ -33,7 +33,7 @@ void foo3(int a0, long double a1) { // Insert padding after hidden argument. // -// N64-LABEL: define void @foo5(%struct.S0* noalias sret %agg.result, i64 %0, fp128 %a0) +// N64-LABEL: define dso_local void @foo5(%struct.S0* noalias sret %agg.result, i64 %0, fp128 %a0) // N64: call void @foo6(%struct.S0* sret %agg.result, i32 signext 1, i32 signext 2, i64 undef, fp128 %a0) // N64: declare void @foo6(%struct.S0* sret, i32 signext, i32 signext, i64, fp128) @@ -45,7 +45,7 @@ S0 foo5(long double a0) { // Do not insert padding if ABI is O32. // -// O32-LABEL: define void @foo7(float %a0, double %a1) +// O32-LABEL: define dso_local void @foo7(float %a0, double %a1) // O32: declare void @foo8(float, double) extern void foo8(float, double); @@ -54,7 +54,7 @@ void foo7(float a0, double a1) { foo8(a0 + 1.0f, a1 + 2.0); } -// O32-LABEL: define void @foo9() +// O32-LABEL: define dso_local void @foo9() // O32: declare void @foo10(i32 signext, i32 typedef struct __attribute__((aligned(16))) { diff --git a/clang/test/CodeGen/mrtd.c b/clang/test/CodeGen/mrtd.c index e526e0ba0041..bdb03892bab3 100644 --- a/clang/test/CodeGen/mrtd.c +++ b/clang/test/CodeGen/mrtd.c @@ -4,7 +4,7 @@ void baz(int arg); -// CHECK: define x86_stdcallcc void @foo(i32 %arg) [[NUW:#[0-9]+]] +// CHECK: define dso_local x86_stdcallcc void @foo(i32 %arg) [[NUW:#[0-9]+]] void foo(int arg) { // CHECK: call x86_stdcallcc i32 bitcast (i32 (...)* @bar to i32 (i32)*)( bar(arg); @@ -17,12 +17,12 @@ void foo(int arg) { // CHECK: declare x86_stdcallcc void @baz(i32) void qux(int arg, ...) { } -// CHECK: define void @qux(i32 %arg, ...) +// CHECK: define dso_local void @qux(i32 %arg, ...) void quux(int a1, int a2, int a3) { qux(a1, a2, a3); } -// CHECK-LABEL: define x86_stdcallcc void @quux +// CHECK-LABEL: define dso_local x86_stdcallcc void @quux // CHECK: call void (i32, ...) @qux // CHECK: attributes [[NUW]] = { noinline nounwind{{.*}} } diff --git a/clang/test/CodeGen/ms_abi.c b/clang/test/CodeGen/ms_abi.c index 75e1caf922df..e41376832e6a 100644 --- a/clang/test/CodeGen/ms_abi.c +++ b/clang/test/CodeGen/ms_abi.c @@ -12,7 +12,7 @@ struct foo { void __attribute__((ms_abi)) f1(void); void __attribute__((sysv_abi)) f2(void); void f3(void) { - // FREEBSD-LABEL: define void @f3() + // FREEBSD-LABEL: define dso_local void @f3() // WIN64-LABEL: define dso_local void @f3() f1(); // FREEBSD: call win64cc void @f1() @@ -28,7 +28,7 @@ void f3(void) { // Win64 ABI varargs void __attribute__((ms_abi)) f4(int a, ...) { - // FREEBSD-LABEL: define win64cc void @f4 + // FREEBSD-LABEL: define dso_local win64cc void @f4 // WIN64-LABEL: define dso_local void @f4 __builtin_ms_va_list ap; __builtin_ms_va_start(ap, a); @@ -108,7 +108,7 @@ void f5(int a, ...) { // Verify that using a Win64 va_list from a System V function works. void __attribute__((sysv_abi)) f6(__builtin_ms_va_list ap) { - // FREEBSD-LABEL: define void @f6 + // FREEBSD-LABEL: define dso_local void @f6 // FREEBSD: store i8* %ap, i8** %[[AP:.*]] // WIN64-LABEL: define dso_local x86_64_sysvcc void @f6 // WIN64: store i8* %ap, i8** %[[AP:.*]] @@ -156,6 +156,6 @@ struct i128 { __attribute__((ms_abi)) struct i128 f7(struct i128 a) { // WIN64: define dso_local void @f7(%struct.i128* noalias sret %agg.result, %struct.i128* %a) - // FREEBSD: define win64cc void @f7(%struct.i128* noalias sret %agg.result, %struct.i128* %a) + // FREEBSD: define dso_local win64cc void @f7(%struct.i128* noalias sret %agg.result, %struct.i128* %a) return a; } diff --git a/clang/test/CodeGen/ms_abi_aarch64.c b/clang/test/CodeGen/ms_abi_aarch64.c index 5b6cd6a208b6..54b8377c9a58 100644 --- a/clang/test/CodeGen/ms_abi_aarch64.c +++ b/clang/test/CodeGen/ms_abi_aarch64.c @@ -4,7 +4,7 @@ void __attribute__((ms_abi)) f1(void); void f2(void); void f3(void) { - // LINUX-LABEL: define void @f3() + // LINUX-LABEL: define dso_local void @f3() // WIN64-LABEL: define dso_local void @f3() f1(); // LINUX: call win64cc void @f1() @@ -20,7 +20,7 @@ void f3(void) { // Win64 ABI varargs void __attribute__((ms_abi)) f4(int a, ...) { - // LINUX-LABEL: define win64cc void @f4 + // LINUX-LABEL: define dso_local win64cc void @f4 // WIN64-LABEL: define dso_local void @f4 __builtin_ms_va_list ap; __builtin_ms_va_start(ap, a); diff --git a/clang/test/CodeGen/no-builtin.cpp b/clang/test/CodeGen/no-builtin.cpp index 24df100d8717..c643465d3a23 100644 --- a/clang/test/CodeGen/no-builtin.cpp +++ b/clang/test/CodeGen/no-builtin.cpp @@ -1,22 +1,22 @@ // RUN: %clang_cc1 -triple x86_64-linux-gnu -S -emit-llvm -o - %s | FileCheck %s // UNSUPPORTED: ppc64be -// CHECK-LABEL: define void @foo_no_mempcy() #0 +// CHECK-LABEL: define dso_local void @foo_no_mempcy() #0 extern "C" void foo_no_mempcy() __attribute__((no_builtin("memcpy"))) {} -// CHECK-LABEL: define void @foo_no_mempcy_twice() #0 +// CHECK-LABEL: define dso_local void @foo_no_mempcy_twice() #0 extern "C" void foo_no_mempcy_twice() __attribute__((no_builtin("memcpy"))) __attribute__((no_builtin("memcpy"))) {} -// CHECK-LABEL: define void @foo_no_builtins() #1 +// CHECK-LABEL: define dso_local void @foo_no_builtins() #1 extern "C" void foo_no_builtins() __attribute__((no_builtin)) {} -// CHECK-LABEL: define void @foo_no_mempcy_memset() #2 +// CHECK-LABEL: define dso_local void @foo_no_mempcy_memset() #2 extern "C" void foo_no_mempcy_memset() __attribute__((no_builtin("memset", "memcpy"))) {} -// CHECK-LABEL: define void @separate_attrs() #2 +// CHECK-LABEL: define dso_local void @separate_attrs() #2 extern "C" void separate_attrs() __attribute__((no_builtin("memset"))) __attribute__((no_builtin("memcpy"))) {} -// CHECK-LABEL: define void @separate_attrs_ordering() #2 +// CHECK-LABEL: define dso_local void @separate_attrs_ordering() #2 extern "C" void separate_attrs_ordering() __attribute__((no_builtin("memcpy"))) __attribute__((no_builtin("memset"))) {} struct A { @@ -29,19 +29,19 @@ struct B : public A { virtual ~B(); }; -// CHECK-LABEL: define void @call_a_foo(%struct.A* %a) #3 +// CHECK-LABEL: define dso_local void @call_a_foo(%struct.A* %a) #3 extern "C" void call_a_foo(A *a) { // CHECK: %call = call i32 %2(%struct.A* %0) a->foo(); // virtual call is not annotated } -// CHECK-LABEL: define void @call_b_foo(%struct.B* %b) #3 +// CHECK-LABEL: define dso_local void @call_b_foo(%struct.B* %b) #3 extern "C" void call_b_foo(B *b) { // CHECK: %call = call i32 %2(%struct.B* %0) b->foo(); // virtual call is not annotated } -// CHECK-LABEL: define void @call_foo_no_mempcy() #3 +// CHECK-LABEL: define dso_local void @call_foo_no_mempcy() #3 extern "C" void call_foo_no_mempcy() { // CHECK: call void @foo_no_mempcy() #6 foo_no_mempcy(); // call gets annotated with "no-builtin-memcpy" @@ -50,8 +50,8 @@ extern "C" void call_foo_no_mempcy() { A::~A() {} // Anchoring A so A::foo() gets generated B::~B() {} // Anchoring B so B::foo() gets generated -// CHECK-LABEL: define linkonce_odr i32 @_ZNK1A3fooEv(%struct.A* %this) unnamed_addr #0 comdat align 2 -// CHECK-LABEL: define linkonce_odr i32 @_ZNK1B3fooEv(%struct.B* %this) unnamed_addr #5 comdat align 2 +// CHECK-LABEL: define linkonce_odr dso_local i32 @_ZNK1A3fooEv(%struct.A* %this) unnamed_addr #0 comdat align 2 +// CHECK-LABEL: define linkonce_odr dso_local i32 @_ZNK1B3fooEv(%struct.B* %this) unnamed_addr #5 comdat align 2 // CHECK: attributes #0 = {{{.*}}"no-builtin-memcpy"{{.*}}} // CHECK-NOT: attributes #0 = {{{.*}}"no-builtin-memmove"{{.*}}} diff --git a/clang/test/CodeGen/noduplicate-cxx11-test.cpp b/clang/test/CodeGen/noduplicate-cxx11-test.cpp index bcec05f72a62..e5bb35c2e213 100644 --- a/clang/test/CodeGen/noduplicate-cxx11-test.cpp +++ b/clang/test/CodeGen/noduplicate-cxx11-test.cpp @@ -3,7 +3,7 @@ // This was a problem in Sema, but only shows up as noinline missing // in CodeGen. -// CHECK: define i32 @_Z15noduplicatedfuni(i32 %a) [[NI:#[0-9]+]] +// CHECK: define dso_local i32 @_Z15noduplicatedfuni(i32 %a) [[NI:#[0-9]+]] int noduplicatedfun [[clang::noduplicate]] (int a) { diff --git a/clang/test/CodeGen/nvptx-abi.c b/clang/test/CodeGen/nvptx-abi.c index 2f055b5f3348..bacb4b8120f8 100644 --- a/clang/test/CodeGen/nvptx-abi.c +++ b/clang/test/CodeGen/nvptx-abi.c @@ -6,7 +6,7 @@ typedef struct float4_s { } float4_t; float4_t my_function(void) { -// CHECK-LABEL: define %struct.float4_s @my_function +// CHECK-LABEL: define dso_local %struct.float4_s @my_function float4_t t; return t; }; diff --git a/clang/test/CodeGen/packed-arrays.c b/clang/test/CodeGen/packed-arrays.c index a90766fae40e..81b416471c1b 100644 --- a/clang/test/CodeGen/packed-arrays.c +++ b/clang/test/CodeGen/packed-arrays.c @@ -23,38 +23,38 @@ struct __attribute__((packed)) s3 { unsigned int z; }; -// CHECK: @align0 = local_unnamed_addr global i32 1 +// CHECK: @align0 = dso_local local_unnamed_addr global i32 1 int align0 = __alignof(struct s0); -// CHECK: @align1 = local_unnamed_addr global i32 4 +// CHECK: @align1 = dso_local local_unnamed_addr global i32 4 int align1 = __alignof(struct s1); -// CHECK: @align2 = local_unnamed_addr global i32 1 +// CHECK: @align2 = dso_local local_unnamed_addr global i32 1 int align2 = __alignof(struct s2); -// CHECK: @align3 = local_unnamed_addr global i32 1 +// CHECK: @align3 = dso_local local_unnamed_addr global i32 1 int align3 = __alignof(struct s3); -// CHECK: @align0_x = local_unnamed_addr global i32 1 +// CHECK: @align0_x = dso_local local_unnamed_addr global i32 1 int align0_x = __alignof(((struct s0*) 0)->x); // -// CHECK: @align1_x = local_unnamed_addr global i32 1 +// CHECK: @align1_x = dso_local local_unnamed_addr global i32 1 int align1_x = __alignof(((struct s1*) 0)->x); -// CHECK: @align2_x = local_unnamed_addr global i32 1 +// CHECK: @align2_x = dso_local local_unnamed_addr global i32 1 int align2_x = __alignof(((struct s2*) 0)->x); -// CHECK: @align3_x = local_unnamed_addr global i32 1 +// CHECK: @align3_x = dso_local local_unnamed_addr global i32 1 int align3_x = __alignof(((struct s3*) 0)->x); -// CHECK: @align0_x0 = local_unnamed_addr global i32 4 +// CHECK: @align0_x0 = dso_local local_unnamed_addr global i32 4 int align0_x0 = __alignof(((struct s0*) 0)->x[0]); -// CHECK: @align1_x0 = local_unnamed_addr global i32 4 +// CHECK: @align1_x0 = dso_local local_unnamed_addr global i32 4 int align1_x0 = __alignof(((struct s1*) 0)->x[0]); -// CHECK: @align2_x0 = local_unnamed_addr global i32 4 +// CHECK: @align2_x0 = dso_local local_unnamed_addr global i32 4 int align2_x0 = __alignof(((struct s2*) 0)->x[0]); -// CHECK: @align3_x0 = local_unnamed_addr global i32 4 +// CHECK: @align3_x0 = dso_local local_unnamed_addr global i32 4 int align3_x0 = __alignof(((struct s3*) 0)->x[0]); -// CHECK-LABEL: define i32 @f0_a +// CHECK-LABEL: define dso_local i32 @f0_a // CHECK: load i32, i32* %{{.*}}, align 1 // CHECK: } -// CHECK-LABEL: define i32 @f0_b +// CHECK-LABEL: define dso_local i32 @f0_b // CHECK: load i32, i32* %{{.*}}, align 4 // CHECK: } int f0_a(struct s0 *a) { @@ -68,19 +68,19 @@ int f0_b(struct s0 *a) { // Note that we are incompatible with GCC on this example. // -// CHECK-LABEL: define i32 @f1_a +// CHECK-LABEL: define dso_local i32 @f1_a // CHECK: load i32, i32* %{{.*}}, align 4 // CHECK: } -// CHECK-LABEL: define i32 @f1_b +// CHECK-LABEL: define dso_local i32 @f1_b // CHECK: load i32, i32* %{{.*}}, align 4 // CHECK: } // Note that we are incompatible with GCC on this example. // -// CHECK-LABEL: define i32 @f1_c +// CHECK-LABEL: define dso_local i32 @f1_c // CHECK: load i32, i32* %{{.*}}, align 4 // CHECK: } -// CHECK-LABEL: define i32 @f1_d +// CHECK-LABEL: define dso_local i32 @f1_d // CHECK: load i32, i32* %{{.*}}, align 4 // CHECK: } int f1_a(struct s1 *a) { @@ -96,16 +96,16 @@ int f1_d(struct s1 *a) { return a->z; } -// CHECK-LABEL: define i32 @f2_a +// CHECK-LABEL: define dso_local i32 @f2_a // CHECK: load i32, i32* %{{.*}}, align 1 // CHECK: } -// CHECK-LABEL: define i32 @f2_b +// CHECK-LABEL: define dso_local i32 @f2_b // CHECK: load i32, i32* %{{.*}}, align 4 // CHECK: } -// CHECK-LABEL: define i32 @f2_c +// CHECK-LABEL: define dso_local i32 @f2_c // CHECK: load i32, i32* %{{.*}}, align 1 // CHECK: } -// CHECK-LABEL: define i32 @f2_d +// CHECK-LABEL: define dso_local i32 @f2_d // CHECK: load i32, i32* %{{.*}}, align 1 // CHECK: } int f2_a(struct s2 *a) { @@ -121,16 +121,16 @@ int f2_d(struct s2 *a) { return a->z; } -// CHECK-LABEL: define i32 @f3_a +// CHECK-LABEL: define dso_local i32 @f3_a // CHECK: load i32, i32* %{{.*}}, align 1 // CHECK: } -// CHECK-LABEL: define i32 @f3_b +// CHECK-LABEL: define dso_local i32 @f3_b // CHECK: load i32, i32* %{{.*}}, align 4 // CHECK: } -// CHECK-LABEL: define i32 @f3_c +// CHECK-LABEL: define dso_local i32 @f3_c // CHECK: load i32, i32* %{{.*}}, align 1 // CHECK: } -// CHECK-LABEL: define i32 @f3_d +// CHECK-LABEL: define dso_local i32 @f3_d // CHECK: load i32, i32* %{{.*}}, align 1 // CHECK: } int f3_a(struct s3 *a) { @@ -148,7 +148,7 @@ int f3_d(struct s3 *a) { // Verify we don't claim things are overaligned. // -// CHECK-LABEL: define double @f4 +// CHECK-LABEL: define dso_local double @f4 // CHECK: load double, double* {{.*}}, align 8 // CHECK: } extern double g4[5] __attribute__((aligned(16))); diff --git a/clang/test/CodeGen/packed-structure.c b/clang/test/CodeGen/packed-structure.c index 91cacb400536..28efe8294af0 100644 --- a/clang/test/CodeGen/packed-structure.c +++ b/clang/test/CodeGen/packed-structure.c @@ -7,16 +7,16 @@ struct s0 { int y __attribute__((packed)); }; -// CHECK-GLOBAL: @s0_align_x = global i32 4 +// CHECK-GLOBAL: @s0_align_x = dso_local global i32 4 -// CHECK-GLOBAL: @s0_align_y = global i32 1 +// CHECK-GLOBAL: @s0_align_y = dso_local global i32 1 -// CHECK-GLOBAL: @s0_align = global i32 4 +// CHECK-GLOBAL: @s0_align = dso_local global i32 4 int s0_align_x = __alignof(((struct s0*)0)->x); int s0_align_y = __alignof(((struct s0*)0)->y); int s0_align = __alignof(struct s0); -// CHECK-FUNCTIONS-LABEL: define i32 @s0_load_x +// CHECK-FUNCTIONS-LABEL: define dso_local i32 @s0_load_x // CHECK-FUNCTIONS: [[s0_load_x:%.*]] = load i32, i32* {{.*}}, align 4 // CHECK-FUNCTIONS: ret i32 [[s0_load_x]] int s0_load_x(struct s0 *a) { return a->x; } @@ -24,11 +24,11 @@ int s0_load_x(struct s0 *a) { return a->x; } // has changed in llvm-gcc recently, previously both x and y would be loaded // with align 1 (in 2363.1 at least). // -// CHECK-FUNCTIONS-LABEL: define i32 @s0_load_y +// CHECK-FUNCTIONS-LABEL: define dso_local i32 @s0_load_y // CHECK-FUNCTIONS: [[s0_load_y:%.*]] = load i32, i32* {{.*}}, align 4 // CHECK-FUNCTIONS: ret i32 [[s0_load_y]] int s0_load_y(struct s0 *a) { return a->y; } -// CHECK-FUNCTIONS-LABEL: define void @s0_copy +// CHECK-FUNCTIONS-LABEL: define dso_local void @s0_copy // CHECK-FUNCTIONS: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 {{.*}}, i8* align 4 {{.*}}, i64 8, i1 false) void s0_copy(struct s0 *a, struct s0 *b) { *b = *a; } @@ -39,22 +39,22 @@ struct s1 { int y; } __attribute__((packed)); -// CHECK-GLOBAL: @s1_align_x = global i32 1 -// CHECK-GLOBAL: @s1_align_y = global i32 1 -// CHECK-GLOBAL: @s1_align = global i32 1 +// CHECK-GLOBAL: @s1_align_x = dso_local global i32 1 +// CHECK-GLOBAL: @s1_align_y = dso_local global i32 1 +// CHECK-GLOBAL: @s1_align = dso_local global i32 1 int s1_align_x = __alignof(((struct s1*)0)->x); int s1_align_y = __alignof(((struct s1*)0)->y); int s1_align = __alignof(struct s1); -// CHECK-FUNCTIONS-LABEL: define i32 @s1_load_x +// CHECK-FUNCTIONS-LABEL: define dso_local i32 @s1_load_x // CHECK-FUNCTIONS: [[s1_load_x:%.*]] = load i32, i32* {{.*}}, align 1 // CHECK-FUNCTIONS: ret i32 [[s1_load_x]] int s1_load_x(struct s1 *a) { return a->x; } -// CHECK-FUNCTIONS-LABEL: define i32 @s1_load_y +// CHECK-FUNCTIONS-LABEL: define dso_local i32 @s1_load_y // CHECK-FUNCTIONS: [[s1_load_y:%.*]] = load i32, i32* {{.*}}, align 1 // CHECK-FUNCTIONS: ret i32 [[s1_load_y]] int s1_load_y(struct s1 *a) { return a->y; } -// CHECK-FUNCTIONS-LABEL: define void @s1_copy +// CHECK-FUNCTIONS-LABEL: define dso_local void @s1_copy // CHECK-FUNCTIONS: call void @llvm.memcpy.p0i8.p0i8.i64(i8* {{.*}}, i8* {{.*}}, i64 8, i1 false) void s1_copy(struct s1 *a, struct s1 *b) { *b = *a; } @@ -67,22 +67,22 @@ struct s2 { }; #pragma pack(pop) -// CHECK-GLOBAL: @s2_align_x = global i32 2 -// CHECK-GLOBAL: @s2_align_y = global i32 2 -// CHECK-GLOBAL: @s2_align = global i32 2 +// CHECK-GLOBAL: @s2_align_x = dso_local global i32 2 +// CHECK-GLOBAL: @s2_align_y = dso_local global i32 2 +// CHECK-GLOBAL: @s2_align = dso_local global i32 2 int s2_align_x = __alignof(((struct s2*)0)->x); int s2_align_y = __alignof(((struct s2*)0)->y); int s2_align = __alignof(struct s2); -// CHECK-FUNCTIONS-LABEL: define i32 @s2_load_x +// CHECK-FUNCTIONS-LABEL: define dso_local i32 @s2_load_x // CHECK-FUNCTIONS: [[s2_load_y:%.*]] = load i32, i32* {{.*}}, align 2 // CHECK-FUNCTIONS: ret i32 [[s2_load_y]] int s2_load_x(struct s2 *a) { return a->x; } -// CHECK-FUNCTIONS-LABEL: define i32 @s2_load_y +// CHECK-FUNCTIONS-LABEL: define dso_local i32 @s2_load_y // CHECK-FUNCTIONS: [[s2_load_y:%.*]] = load i32, i32* {{.*}}, align 2 // CHECK-FUNCTIONS: ret i32 [[s2_load_y]] int s2_load_y(struct s2 *a) { return a->y; } -// CHECK-FUNCTIONS-LABEL: define void @s2_copy +// CHECK-FUNCTIONS-LABEL: define dso_local void @s2_copy // CHECK-FUNCTIONS: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 2 {{.*}}, i8* align 2 {{.*}}, i64 8, i1 false) void s2_copy(struct s2 *a, struct s2 *b) { *b = *a; } @@ -90,9 +90,9 @@ struct __attribute__((packed, aligned)) s3 { short aShort; int anInt; }; -// CHECK-GLOBAL: @s3_1 = global i32 1 +// CHECK-GLOBAL: @s3_1 = dso_local global i32 1 int s3_1 = __alignof(((struct s3*) 0)->anInt); -// CHECK-FUNCTIONS-LABEL: define i32 @test3( +// CHECK-FUNCTIONS-LABEL: define dso_local i32 @test3( int test3(struct s3 *ptr) { // CHECK-FUNCTIONS: [[PTR:%.*]] = getelementptr inbounds {{%.*}}, {{%.*}}* {{%.*}}, i32 0, i32 1 // CHECK-FUNCTIONS-NEXT: load i32, i32* [[PTR]], align 2 diff --git a/clang/test/CodeGen/partial-reinitialization1.c b/clang/test/CodeGen/partial-reinitialization1.c index 6a764b7fb02d..5dfdf115b711 100644 --- a/clang/test/CodeGen/partial-reinitialization1.c +++ b/clang/test/CodeGen/partial-reinitialization1.c @@ -42,7 +42,7 @@ struct P3 { } q; }; -// CHECK: @l3 = global %struct.P3 { %struct.Q3 { %struct.R1 { i32 1, i32 2, i32 3 }, %struct.R2 { i32 0, i32 10, i32 0 } } } +// CHECK: @l3 = dso_local global %struct.P3 { %struct.Q3 { %struct.R1 { i32 1, i32 2, i32 3 }, %struct.R2 { i32 0, i32 10, i32 0 } } } struct P3 l3 = { (struct Q3){ { 1, 2, 3 }, { 4, 5, 6 } }, .q.r2 = { 7, 8, 9 }, @@ -68,7 +68,7 @@ struct P5 { }; // A three-pass test -// CHECK: @l5 = global %struct.P5 { i32 1, %struct.Q5 { i32 6, i32 9, i32 8 }, i32 5 } +// CHECK: @l5 = dso_local global %struct.P5 { i32 1, %struct.Q5 { i32 6, i32 9, i32 8 }, i32 5 } struct P5 l5 = { 1, { 2, 3, 4 }, 5, .q = { 6, 7, 8 }, .q.b = 9 }; diff --git a/clang/test/CodeGen/patchable-function-entry.c b/clang/test/CodeGen/patchable-function-entry.c index f41f12d06695..338b8542a618 100644 --- a/clang/test/CodeGen/patchable-function-entry.c +++ b/clang/test/CodeGen/patchable-function-entry.c @@ -1,29 +1,29 @@ // RUN: %clang_cc1 -triple aarch64 -emit-llvm %s -o - | FileCheck %s // RUN: %clang_cc1 -triple x86_64 -emit-llvm %s -fpatchable-function-entry=1 -o - | FileCheck --check-prefixes=CHECK,OPT %s -// CHECK: define void @f0() #0 +// CHECK: define dso_local void @f0() #0 __attribute__((patchable_function_entry(0))) void f0() {} -// CHECK: define void @f00() #0 +// CHECK: define dso_local void @f00() #0 __attribute__((patchable_function_entry(0, 0))) void f00() {} -// CHECK: define void @f2() #1 +// CHECK: define dso_local void @f2() #1 __attribute__((patchable_function_entry(2))) void f2() {} -// CHECK: define void @f20() #1 +// CHECK: define dso_local void @f20() #1 __attribute__((patchable_function_entry(2, 0))) void f20() {} -// CHECK: define void @f20decl() #1 +// CHECK: define dso_local void @f20decl() #1 __attribute__((patchable_function_entry(2, 0))) void f20decl(); void f20decl() {} -// CHECK: define void @f44() #2 +// CHECK: define dso_local void @f44() #2 __attribute__((patchable_function_entry(4, 4))) void f44() {} -// CHECK: define void @f52() #3 +// CHECK: define dso_local void @f52() #3 __attribute__((patchable_function_entry(5, 2))) void f52() {} -// OPT: define void @f() #4 +// OPT: define dso_local void @f() #4 void f() {} /// No need to emit "patchable-function-entry"="0" diff --git a/clang/test/CodeGen/powerpc_types.c b/clang/test/CodeGen/powerpc_types.c index 86eb7f835680..08841c38a245 100644 --- a/clang/test/CodeGen/powerpc_types.c +++ b/clang/test/CodeGen/powerpc_types.c @@ -5,8 +5,8 @@ #include <stdarg.h> int va_list_size = sizeof(va_list); -// SVR4-CHECK: va_list_size = global i32 12, align 4 +// SVR4-CHECK: va_list_size = dso_local global i32 12, align 4 int long_double_size = sizeof(long double); -// SVR4-CHECK: long_double_size = global i32 8, align 4 +// SVR4-CHECK: long_double_size = dso_local global i32 8, align 4 int double_size = sizeof(double); -// SVR4-CHECK: double_size = global i32 8, align 4 +// SVR4-CHECK: double_size = dso_local global i32 8, align 4 diff --git a/clang/test/CodeGen/ppc-signbit.c b/clang/test/CodeGen/ppc-signbit.c index 31b71d8cdbb9..5a823520b6e1 100644 --- a/clang/test/CodeGen/ppc-signbit.c +++ b/clang/test/CodeGen/ppc-signbit.c @@ -3,7 +3,7 @@ int test(long double x) { return __builtin_signbitl(x); } -// CHECK-LABEL: define signext i32 @test(ppc_fp128 %x) +// CHECK-LABEL: define dso_local signext i32 @test(ppc_fp128 %x) // CHECK: bitcast ppc_fp128 %{{.*}} to i128 // CHECK: trunc i128 %{{.*}} to i64 // CHECK: icmp slt i64 %{{.*}}, 0 diff --git a/clang/test/CodeGen/ppc64-align-struct.c b/clang/test/CodeGen/ppc64-align-struct.c index bcff4920d0c4..ec9fef59da6b 100644 --- a/clang/test/CodeGen/ppc64-align-struct.c +++ b/clang/test/CodeGen/ppc64-align-struct.c @@ -10,45 +10,45 @@ struct test5 { int x[17]; }; struct test6 { int x[17]; } __attribute__((aligned (16))); struct test7 { int x[17]; } __attribute__((aligned (32))); -// CHECK: define void @test1(i32 signext %x, i64 %y.coerce) +// CHECK: define dso_local void @test1(i32 signext %x, i64 %y.coerce) void test1 (int x, struct test1 y) { } -// CHECK: define void @test2(i32 signext %x, [1 x i128] %y.coerce) +// CHECK: define dso_local void @test2(i32 signext %x, [1 x i128] %y.coerce) void test2 (int x, struct test2 y) { } -// CHECK: define void @test3(i32 signext %x, [2 x i128] %y.coerce) +// CHECK: define dso_local void @test3(i32 signext %x, [2 x i128] %y.coerce) void test3 (int x, struct test3 y) { } -// CHECK: define void @test4(i32 signext %x, [2 x i64] %y.coerce) +// CHECK: define dso_local void @test4(i32 signext %x, [2 x i64] %y.coerce) void test4 (int x, struct test4 y) { } -// CHECK: define void @test5(i32 signext %x, %struct.test5* byval(%struct.test5) align 8 %y) +// CHECK: define dso_local void @test5(i32 signext %x, %struct.test5* byval(%struct.test5) align 8 %y) void test5 (int x, struct test5 y) { } -// CHECK: define void @test6(i32 signext %x, %struct.test6* byval(%struct.test6) align 16 %y) +// CHECK: define dso_local void @test6(i32 signext %x, %struct.test6* byval(%struct.test6) align 16 %y) void test6 (int x, struct test6 y) { } // This case requires run-time realignment of the incoming struct -// CHECK-LABEL: define void @test7(i32 signext %x, %struct.test7* byval(%struct.test7) align 16 %0) +// CHECK-LABEL: define dso_local void @test7(i32 signext %x, %struct.test7* byval(%struct.test7) align 16 %0) // CHECK: %y = alloca %struct.test7, align 32 // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64 void test7 (int x, struct test7 y) { } -// CHECK: define void @test1va(%struct.test1* noalias sret %[[AGG_RESULT:.*]], i32 signext %x, ...) +// CHECK: define dso_local void @test1va(%struct.test1* noalias sret %[[AGG_RESULT:.*]], i32 signext %x, ...) // CHECK: %[[CUR:[^ ]+]] = load i8*, i8** %ap // CHECK: %[[NEXT:[^ ]+]] = getelementptr inbounds i8, i8* %[[CUR]], i64 8 // CHECK: store i8* %[[NEXT]], i8** %ap @@ -66,7 +66,7 @@ struct test1 test1va (int x, ...) return y; } -// CHECK: define void @test2va(%struct.test2* noalias sret %[[AGG_RESULT:.*]], i32 signext %x, ...) +// CHECK: define dso_local void @test2va(%struct.test2* noalias sret %[[AGG_RESULT:.*]], i32 signext %x, ...) // CHECK: %[[CUR:[^ ]+]] = load i8*, i8** %ap // CHECK: %[[TMP0:[^ ]+]] = ptrtoint i8* %[[CUR]] to i64 // CHECK: %[[TMP1:[^ ]+]] = add i64 %[[TMP0]], 15 @@ -88,7 +88,7 @@ struct test2 test2va (int x, ...) return y; } -// CHECK: define void @test3va(%struct.test3* noalias sret %[[AGG_RESULT:.*]], i32 signext %x, ...) +// CHECK: define dso_local void @test3va(%struct.test3* noalias sret %[[AGG_RESULT:.*]], i32 signext %x, ...) // CHECK: %[[CUR:[^ ]+]] = load i8*, i8** %ap // CHECK: %[[TMP0:[^ ]+]] = ptrtoint i8* %[[CUR]] to i64 // CHECK: %[[TMP1:[^ ]+]] = add i64 %[[TMP0]], 15 @@ -110,7 +110,7 @@ struct test3 test3va (int x, ...) return y; } -// CHECK: define void @test4va(%struct.test4* noalias sret %[[AGG_RESULT:.*]], i32 signext %x, ...) +// CHECK: define dso_local void @test4va(%struct.test4* noalias sret %[[AGG_RESULT:.*]], i32 signext %x, ...) // CHECK: %[[CUR:[^ ]+]] = load i8*, i8** %ap // CHECK: %[[NEXT:[^ ]+]] = getelementptr inbounds i8, i8* %[[CUR]], i64 16 // CHECK: store i8* %[[NEXT]], i8** %ap @@ -128,7 +128,7 @@ struct test4 test4va (int x, ...) return y; } -// CHECK: define void @testva_longdouble(%struct.test_longdouble* noalias sret %[[AGG_RESULT:.*]], i32 signext %x, ...) +// CHECK: define dso_local void @testva_longdouble(%struct.test_longdouble* noalias sret %[[AGG_RESULT:.*]], i32 signext %x, ...) // CHECK: %[[CUR:[^ ]+]] = load i8*, i8** %ap // CHECK: %[[NEXT:[^ ]+]] = getelementptr inbounds i8, i8* %[[CUR]], i64 16 // CHECK: store i8* %[[NEXT]], i8** %ap @@ -147,7 +147,7 @@ struct test_longdouble testva_longdouble (int x, ...) return y; } -// CHECK: define void @testva_vector(%struct.test_vector* noalias sret %[[AGG_RESULT:.*]], i32 signext %x, ...) +// CHECK: define dso_local void @testva_vector(%struct.test_vector* noalias sret %[[AGG_RESULT:.*]], i32 signext %x, ...) // CHECK: %[[CUR:[^ ]+]] = load i8*, i8** %ap // CHECK: %[[TMP0:[^ ]+]] = ptrtoint i8* %[[CUR]] to i64 // CHECK: %[[TMP1:[^ ]+]] = add i64 %[[TMP0]], 15 diff --git a/clang/test/CodeGen/ppc64-complex-parms.c b/clang/test/CodeGen/ppc64-complex-parms.c index c0e1794bf47c..80ff27b08be3 100644 --- a/clang/test/CodeGen/ppc64-complex-parms.c +++ b/clang/test/CodeGen/ppc64-complex-parms.c @@ -8,55 +8,55 @@ float foo_float(_Complex float x) { return crealf(x); } -// CHECK: define float @foo_float(float {{[%A-Za-z0-9.]+}}, float {{[%A-Za-z0-9.]+}}) [[NUW:#[0-9]+]] { +// CHECK: define dso_local float @foo_float(float {{[%A-Za-z0-9.]+}}, float {{[%A-Za-z0-9.]+}}) [[NUW:#[0-9]+]] { double foo_double(_Complex double x) { return creal(x); } -// CHECK: define double @foo_double(double {{[%A-Za-z0-9.]+}}, double {{[%A-Za-z0-9.]+}}) [[NUW]] { +// CHECK: define dso_local double @foo_double(double {{[%A-Za-z0-9.]+}}, double {{[%A-Za-z0-9.]+}}) [[NUW]] { long double foo_long_double(_Complex long double x) { return creall(x); } -// CHECK: define ppc_fp128 @foo_long_double(ppc_fp128 {{[%A-Za-z0-9.]+}}, ppc_fp128 {{[%A-Za-z0-9.]+}}) [[NUW]] { +// CHECK: define dso_local ppc_fp128 @foo_long_double(ppc_fp128 {{[%A-Za-z0-9.]+}}, ppc_fp128 {{[%A-Za-z0-9.]+}}) [[NUW]] { int foo_int(_Complex int x) { return __real__ x; } -// CHECK: define signext i32 @foo_int(i32 {{[%A-Za-z0-9.]+}}, i32 {{[%A-Za-z0-9.]+}}) [[NUW]] { +// CHECK: define dso_local signext i32 @foo_int(i32 {{[%A-Za-z0-9.]+}}, i32 {{[%A-Za-z0-9.]+}}) [[NUW]] { short foo_short(_Complex short x) { return __real__ x; } -// CHECK: define signext i16 @foo_short(i16 {{[%A-Za-z0-9.]+}}, i16 {{[%A-Za-z0-9.]+}}) [[NUW]] { +// CHECK: define dso_local signext i16 @foo_short(i16 {{[%A-Za-z0-9.]+}}, i16 {{[%A-Za-z0-9.]+}}) [[NUW]] { signed char foo_char(_Complex signed char x) { return __real__ x; } -// CHECK: define signext i8 @foo_char(i8 {{[%A-Za-z0-9.]+}}, i8 {{[%A-Za-z0-9.]+}}) [[NUW]] { +// CHECK: define dso_local signext i8 @foo_char(i8 {{[%A-Za-z0-9.]+}}, i8 {{[%A-Za-z0-9.]+}}) [[NUW]] { long foo_long(_Complex long x) { return __real__ x; } -// CHECK: define i64 @foo_long(i64 {{[%A-Za-z0-9.]+}}, i64 {{[%A-Za-z0-9.]+}}) [[NUW]] { +// CHECK: define dso_local i64 @foo_long(i64 {{[%A-Za-z0-9.]+}}, i64 {{[%A-Za-z0-9.]+}}) [[NUW]] { long long foo_long_long(_Complex long long x) { return __real__ x; } -// CHECK: define i64 @foo_long_long(i64 {{[%A-Za-z0-9.]+}}, i64 {{[%A-Za-z0-9.]+}}) [[NUW]] { +// CHECK: define dso_local i64 @foo_long_long(i64 {{[%A-Za-z0-9.]+}}, i64 {{[%A-Za-z0-9.]+}}) [[NUW]] { void bar_float(void) { foo_float(2.0f - 2.5fi); } -// CHECK: define void @bar_float() [[NUW]] { +// CHECK: define dso_local void @bar_float() [[NUW]] { // CHECK: %[[VAR1:[A-Za-z0-9.]+]] = alloca { float, float }, align 4 // CHECK: %[[VAR2:[A-Za-z0-9.]+]] = getelementptr inbounds { float, float }, { float, float }* %[[VAR1]], i32 0, i32 0 // CHECK: %[[VAR3:[A-Za-z0-9.]+]] = getelementptr inbounds { float, float }, { float, float }* %[[VAR1]], i32 0, i32 1 @@ -72,7 +72,7 @@ void bar_double(void) { foo_double(2.0 - 2.5i); } -// CHECK: define void @bar_double() [[NUW]] { +// CHECK: define dso_local void @bar_double() [[NUW]] { // CHECK: %[[VAR11:[A-Za-z0-9.]+]] = alloca { double, double }, align 8 // CHECK: %[[VAR12:[A-Za-z0-9.]+]] = getelementptr inbounds { double, double }, { double, double }* %[[VAR11]], i32 0, i32 0 // CHECK: %[[VAR13:[A-Za-z0-9.]+]] = getelementptr inbounds { double, double }, { double, double }* %[[VAR11]], i32 0, i32 1 @@ -88,7 +88,7 @@ void bar_long_double(void) { foo_long_double(2.0L - 2.5Li); } -// CHECK: define void @bar_long_double() [[NUW]] { +// CHECK: define dso_local void @bar_long_double() [[NUW]] { // CHECK: %[[VAR21:[A-Za-z0-9.]+]] = alloca { ppc_fp128, ppc_fp128 }, align 16 // CHECK: %[[VAR22:[A-Za-z0-9.]+]] = getelementptr inbounds { ppc_fp128, ppc_fp128 }, { ppc_fp128, ppc_fp128 }* %[[VAR21]], i32 0, i32 0 // CHECK: %[[VAR23:[A-Za-z0-9.]+]] = getelementptr inbounds { ppc_fp128, ppc_fp128 }, { ppc_fp128, ppc_fp128 }* %[[VAR21]], i32 0, i32 1 @@ -104,7 +104,7 @@ void bar_int(void) { foo_int(2 - 3i); } -// CHECK: define void @bar_int() [[NUW]] { +// CHECK: define dso_local void @bar_int() [[NUW]] { // CHECK: %[[VAR31:[A-Za-z0-9.]+]] = alloca { i32, i32 }, align 4 // CHECK: %[[VAR32:[A-Za-z0-9.]+]] = getelementptr inbounds { i32, i32 }, { i32, i32 }* %[[VAR31]], i32 0, i32 0 // CHECK: %[[VAR33:[A-Za-z0-9.]+]] = getelementptr inbounds { i32, i32 }, { i32, i32 }* %[[VAR31]], i32 0, i32 1 @@ -120,7 +120,7 @@ void bar_short(void) { foo_short(2 - 3i); } -// CHECK: define void @bar_short() [[NUW]] { +// CHECK: define dso_local void @bar_short() [[NUW]] { // CHECK: %[[VAR41:[A-Za-z0-9.]+]] = alloca { i16, i16 }, align 2 // CHECK: %[[VAR42:[A-Za-z0-9.]+]] = getelementptr inbounds { i16, i16 }, { i16, i16 }* %[[VAR41]], i32 0, i32 0 // CHECK: %[[VAR43:[A-Za-z0-9.]+]] = getelementptr inbounds { i16, i16 }, { i16, i16 }* %[[VAR41]], i32 0, i32 1 @@ -136,7 +136,7 @@ void bar_char(void) { foo_char(2 - 3i); } -// CHECK: define void @bar_char() [[NUW]] { +// CHECK: define dso_local void @bar_char() [[NUW]] { // CHECK: %[[VAR51:[A-Za-z0-9.]+]] = alloca { i8, i8 }, align 1 // CHECK: %[[VAR52:[A-Za-z0-9.]+]] = getelementptr inbounds { i8, i8 }, { i8, i8 }* %[[VAR51]], i32 0, i32 0 // CHECK: %[[VAR53:[A-Za-z0-9.]+]] = getelementptr inbounds { i8, i8 }, { i8, i8 }* %[[VAR51]], i32 0, i32 1 @@ -152,7 +152,7 @@ void bar_long(void) { foo_long(2L - 3Li); } -// CHECK: define void @bar_long() [[NUW]] { +// CHECK: define dso_local void @bar_long() [[NUW]] { // CHECK: %[[VAR61:[A-Za-z0-9.]+]] = alloca { i64, i64 }, align 8 // CHECK: %[[VAR62:[A-Za-z0-9.]+]] = getelementptr inbounds { i64, i64 }, { i64, i64 }* %[[VAR61]], i32 0, i32 0 // CHECK: %[[VAR63:[A-Za-z0-9.]+]] = getelementptr inbounds { i64, i64 }, { i64, i64 }* %[[VAR61]], i32 0, i32 1 @@ -168,7 +168,7 @@ void bar_long_long(void) { foo_long_long(2LL - 3LLi); } -// CHECK: define void @bar_long_long() [[NUW]] { +// CHECK: define dso_local void @bar_long_long() [[NUW]] { // CHECK: %[[VAR71:[A-Za-z0-9.]+]] = alloca { i64, i64 }, align 8 // CHECK: %[[VAR72:[A-Za-z0-9.]+]] = getelementptr inbounds { i64, i64 }, { i64, i64 }* %[[VAR71]], i32 0, i32 0 // CHECK: %[[VAR73:[A-Za-z0-9.]+]] = getelementptr inbounds { i64, i64 }, { i64, i64 }* %[[VAR71]], i32 0, i32 1 diff --git a/clang/test/CodeGen/ppc64-complex-return.c b/clang/test/CodeGen/ppc64-complex-return.c index 02bfe82d4efe..e6c874f70d32 100644 --- a/clang/test/CodeGen/ppc64-complex-return.c +++ b/clang/test/CodeGen/ppc64-complex-return.c @@ -9,55 +9,55 @@ _Complex float foo_float(_Complex float x) { return x; } -// CHECK: define { float, float } @foo_float(float {{[%A-Za-z0-9.]+}}, float {{[%A-Za-z0-9.]+}}) [[NUW:#[0-9]+]] { +// CHECK: define dso_local { float, float } @foo_float(float {{[%A-Za-z0-9.]+}}, float {{[%A-Za-z0-9.]+}}) [[NUW:#[0-9]+]] { _Complex double foo_double(_Complex double x) { return x; } -// CHECK: define { double, double } @foo_double(double {{[%A-Za-z0-9.]+}}, double {{[%A-Za-z0-9.]+}}) [[NUW]] { +// CHECK: define dso_local { double, double } @foo_double(double {{[%A-Za-z0-9.]+}}, double {{[%A-Za-z0-9.]+}}) [[NUW]] { _Complex long double foo_long_double(_Complex long double x) { return x; } -// CHECK: define { ppc_fp128, ppc_fp128 } @foo_long_double(ppc_fp128 {{[%A-Za-z0-9.]+}}, ppc_fp128 {{[%A-Za-z0-9.]+}}) [[NUW]] { +// CHECK: define dso_local { ppc_fp128, ppc_fp128 } @foo_long_double(ppc_fp128 {{[%A-Za-z0-9.]+}}, ppc_fp128 {{[%A-Za-z0-9.]+}}) [[NUW]] { _Complex int foo_int(_Complex int x) { return x; } -// CHECK: define { i32, i32 } @foo_int(i32 {{[%A-Za-z0-9.]+}}, i32 {{[%A-Za-z0-9.]+}}) [[NUW]] { +// CHECK: define dso_local { i32, i32 } @foo_int(i32 {{[%A-Za-z0-9.]+}}, i32 {{[%A-Za-z0-9.]+}}) [[NUW]] { _Complex short foo_short(_Complex short x) { return x; } -// CHECK: define { i16, i16 } @foo_short(i16 {{[%A-Za-z0-9.]+}}, i16 {{[%A-Za-z0-9.]+}}) [[NUW]] { +// CHECK: define dso_local { i16, i16 } @foo_short(i16 {{[%A-Za-z0-9.]+}}, i16 {{[%A-Za-z0-9.]+}}) [[NUW]] { _Complex signed char foo_char(_Complex signed char x) { return x; } -// CHECK: define { i8, i8 } @foo_char(i8 {{[%A-Za-z0-9.]+}}, i8 {{[%A-Za-z0-9.]+}}) [[NUW]] { +// CHECK: define dso_local { i8, i8 } @foo_char(i8 {{[%A-Za-z0-9.]+}}, i8 {{[%A-Za-z0-9.]+}}) [[NUW]] { _Complex long foo_long(_Complex long x) { return x; } -// CHECK: define { i64, i64 } @foo_long(i64 {{[%A-Za-z0-9.]+}}, i64 {{[%A-Za-z0-9.]+}}) [[NUW]] { +// CHECK: define dso_local { i64, i64 } @foo_long(i64 {{[%A-Za-z0-9.]+}}, i64 {{[%A-Za-z0-9.]+}}) [[NUW]] { _Complex long long foo_long_long(_Complex long long x) { return x; } -// CHECK: define { i64, i64 } @foo_long_long(i64 {{[%A-Za-z0-9.]+}}, i64 {{[%A-Za-z0-9.]+}}) [[NUW]] { +// CHECK: define dso_local { i64, i64 } @foo_long_long(i64 {{[%A-Za-z0-9.]+}}, i64 {{[%A-Za-z0-9.]+}}) [[NUW]] { float bar_float(void) { return crealf(foo_float(2.0f - 2.5fi)); } -// CHECK: define float @bar_float() [[NUW]] { +// CHECK: define dso_local float @bar_float() [[NUW]] { // CHECK: [[VAR1:[%A-Za-z0-9.]+]] = call { float, float } @foo_float // CHECK: extractvalue { float, float } [[VAR1]], 0 // CHECK: extractvalue { float, float } [[VAR1]], 1 @@ -66,7 +66,7 @@ double bar_double(void) { return creal(foo_double(2.0 - 2.5i)); } -// CHECK: define double @bar_double() [[NUW]] { +// CHECK: define dso_local double @bar_double() [[NUW]] { // CHECK: [[VAR2:[%A-Za-z0-9.]+]] = call { double, double } @foo_double // CHECK: extractvalue { double, double } [[VAR2]], 0 // CHECK: extractvalue { double, double } [[VAR2]], 1 @@ -75,7 +75,7 @@ long double bar_long_double(void) { return creall(foo_long_double(2.0L - 2.5Li)); } -// CHECK: define ppc_fp128 @bar_long_double() [[NUW]] { +// CHECK: define dso_local ppc_fp128 @bar_long_double() [[NUW]] { // CHECK: [[VAR3:[%A-Za-z0-9.]+]] = call { ppc_fp128, ppc_fp128 } @foo_long_double // CHECK: extractvalue { ppc_fp128, ppc_fp128 } [[VAR3]], 0 // CHECK: extractvalue { ppc_fp128, ppc_fp128 } [[VAR3]], 1 @@ -84,7 +84,7 @@ int bar_int(void) { return __real__(foo_int(2 - 3i)); } -// CHECK: define signext i32 @bar_int() [[NUW]] { +// CHECK: define dso_local signext i32 @bar_int() [[NUW]] { // CHECK: [[VAR4:[%A-Za-z0-9.]+]] = call { i32, i32 } @foo_int // CHECK: extractvalue { i32, i32 } [[VAR4]], 0 // CHECK: extractvalue { i32, i32 } [[VAR4]], 1 @@ -93,7 +93,7 @@ short bar_short(void) { return __real__(foo_short(2 - 3i)); } -// CHECK: define signext i16 @bar_short() [[NUW]] { +// CHECK: define dso_local signext i16 @bar_short() [[NUW]] { // CHECK: [[VAR5:[%A-Za-z0-9.]+]] = call { i16, i16 } @foo_short // CHECK: extractvalue { i16, i16 } [[VAR5]], 0 // CHECK: extractvalue { i16, i16 } [[VAR5]], 1 @@ -102,7 +102,7 @@ signed char bar_char(void) { return __real__(foo_char(2 - 3i)); } -// CHECK: define signext i8 @bar_char() [[NUW]] { +// CHECK: define dso_local signext i8 @bar_char() [[NUW]] { // CHECK: [[VAR6:[%A-Za-z0-9.]+]] = call { i8, i8 } @foo_char // CHECK: extractvalue { i8, i8 } [[VAR6]], 0 // CHECK: extractvalue { i8, i8 } [[VAR6]], 1 @@ -111,7 +111,7 @@ long bar_long(void) { return __real__(foo_long(2L - 3Li)); } -// CHECK: define i64 @bar_long() [[NUW]] { +// CHECK: define dso_local i64 @bar_long() [[NUW]] { // CHECK: [[VAR7:[%A-Za-z0-9.]+]] = call { i64, i64 } @foo_long // CHECK: extractvalue { i64, i64 } [[VAR7]], 0 // CHECK: extractvalue { i64, i64 } [[VAR7]], 1 @@ -120,7 +120,7 @@ long long bar_long_long(void) { return __real__(foo_long_long(2LL - 3LLi)); } -// CHECK: define i64 @bar_long_long() [[NUW]] { +// CHECK: define dso_local i64 @bar_long_long() [[NUW]] { // CHECK: [[VAR8:[%A-Za-z0-9.]+]] = call { i64, i64 } @foo_long_long // CHECK: extractvalue { i64, i64 } [[VAR8]], 0 // CHECK: extractvalue { i64, i64 } [[VAR8]], 1 diff --git a/clang/test/CodeGen/ppc64-dwarf.c b/clang/test/CodeGen/ppc64-dwarf.c index fc815c68988e..572819e6f632 100644 --- a/clang/test/CodeGen/ppc64-dwarf.c +++ b/clang/test/CodeGen/ppc64-dwarf.c @@ -7,7 +7,7 @@ int test() { return __builtin_dwarf_sp_column(); } -// CHECK-LABEL: define signext i32 @test() +// CHECK-LABEL: define dso_local signext i32 @test() // CHECK: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 0), align 1 // CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 1), align 1 // CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dwarf_reg_size_table, i64 0, i64 2), align 1 diff --git a/clang/test/CodeGen/ppc64-elf-abi.c b/clang/test/CodeGen/ppc64-elf-abi.c index 59112a0baf4a..dfff41f147da 100644 --- a/clang/test/CodeGen/ppc64-elf-abi.c +++ b/clang/test/CodeGen/ppc64-elf-abi.c @@ -17,7 +17,7 @@ // RUN: %clang_cc1 -triple powerpc64le-unknown-linux-gnu -emit-llvm -o - %s \ // RUN: -target-abi elfv2 | FileCheck %s --check-prefix=CHECK-ELFv2 -// CHECK-ELFv1: define void @func_fab(%struct.fab* noalias sret %agg.result, i64 %x.coerce) -// CHECK-ELFv2: define [2 x float] @func_fab([2 x float] %x.coerce) +// CHECK-ELFv1: define dso_local void @func_fab(%struct.fab* noalias sret %agg.result, i64 %x.coerce) +// CHECK-ELFv2: define dso_local [2 x float] @func_fab([2 x float] %x.coerce) struct fab { float a; float b; }; struct fab func_fab(struct fab x) { return x; } diff --git a/clang/test/CodeGen/ppc64-extend.c b/clang/test/CodeGen/ppc64-extend.c index 6b596b47d374..1b428c2a1463 100644 --- a/clang/test/CodeGen/ppc64-extend.c +++ b/clang/test/CodeGen/ppc64-extend.c @@ -2,15 +2,15 @@ // RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s void f1(int x) { return; } -// CHECK: define void @f1(i32 signext %x) [[NUW:#[0-9]+]] +// CHECK: define dso_local void @f1(i32 signext %x) [[NUW:#[0-9]+]] void f2(unsigned int x) { return; } -// CHECK: define void @f2(i32 zeroext %x) [[NUW]] +// CHECK: define dso_local void @f2(i32 zeroext %x) [[NUW]] int f3(void) { return 0; } -// CHECK: define signext i32 @f3() [[NUW]] +// CHECK: define dso_local signext i32 @f3() [[NUW]] unsigned int f4(void) { return 0; } -// CHECK: define zeroext i32 @f4() [[NUW]] +// CHECK: define dso_local zeroext i32 @f4() [[NUW]] // CHECK: attributes [[NUW]] = { noinline nounwind{{.*}} } diff --git a/clang/test/CodeGen/ppc64-inline-asm.c b/clang/test/CodeGen/ppc64-inline-asm.c index 3e958c328f92..1c1cb8cf722c 100644 --- a/clang/test/CodeGen/ppc64-inline-asm.c +++ b/clang/test/CodeGen/ppc64-inline-asm.c @@ -4,7 +4,7 @@ _Bool test_wc_i1(_Bool b1, _Bool b2) { _Bool o; asm("crand %0, %1, %2" : "=wc"(o) : "wc"(b1), "wc"(b2) : ); return o; -// CHECK-LABEL: define zeroext i1 @test_wc_i1(i1 zeroext %b1, i1 zeroext %b2) +// CHECK-LABEL: define dso_local zeroext i1 @test_wc_i1(i1 zeroext %b1, i1 zeroext %b2) // CHECK: call i8 asm "crand $0, $1, $2", "=^wc,^wc,^wc"(i1 %b1, i1 %b2) } diff --git a/clang/test/CodeGen/ppc64-long-double.cpp b/clang/test/CodeGen/ppc64-long-double.cpp index a35965f2bf68..90afc1b0385c 100644 --- a/clang/test/CodeGen/ppc64-long-double.cpp +++ b/clang/test/CodeGen/ppc64-long-double.cpp @@ -19,12 +19,12 @@ long double x = 0; int size = sizeof(x); -// FP64: @x = global double {{.*}}, align 8 -// FP64: @size = global i32 8 -// FP128: @x = global fp128 {{.*}}, align 16 -// FP128: @size = global i32 16 -// IBM128: @x = global ppc_fp128 {{.*}}, align 16 -// IBM128: @size = global i32 16 +// FP64: @x = dso_local global double {{.*}}, align 8 +// FP64: @size = dso_local global i32 8 +// FP128: @x = dso_local global fp128 {{.*}}, align 16 +// FP128: @size = dso_local global i32 16 +// IBM128: @x = dso_local global ppc_fp128 {{.*}}, align 16 +// IBM128: @size = dso_local global i32 16 long double foo(long double d) { return d; } diff --git a/clang/test/CodeGen/ppc64-qpx-vector.c b/clang/test/CodeGen/ppc64-qpx-vector.c index e7c009328b23..1df0d49cb00d 100644 --- a/clang/test/CodeGen/ppc64-qpx-vector.c +++ b/clang/test/CodeGen/ppc64-qpx-vector.c @@ -14,16 +14,16 @@ v4sf foo1(struct ssf a, v4sf b, struct ssf2 c) { return a.v + b; } -// ALL-LABEL: define <4 x float> @foo1(<4 x float> inreg %a.coerce, <4 x float> %b, [2 x i128] %c.coerce) +// ALL-LABEL: define dso_local <4 x float> @foo1(<4 x float> inreg %a.coerce, <4 x float> %b, [2 x i128] %c.coerce) // ALL: ret <4 x float> v4df foo2(struct sdf a, v4df b, struct sdf2 c) { return a.v + b; } -// QPX-LABEL: define <4 x double> @foo2(<4 x double> inreg %a.coerce, <4 x double> %b, [2 x i256] %c.coerce) +// QPX-LABEL: define dso_local <4 x double> @foo2(<4 x double> inreg %a.coerce, <4 x double> %b, [2 x i256] %c.coerce) // QPX: ret <4 x double> -// NORMAL-LABEL: define void @foo2(<4 x double>* noalias sret %agg.result, [2 x i128] %a.coerce, <4 x double>* %0, [4 x i128] %c.coerce) +// NORMAL-LABEL: define dso_local void @foo2(<4 x double>* noalias sret %agg.result, [2 x i128] %a.coerce, <4 x double>* %0, [4 x i128] %c.coerce) // NORMAL: ret void diff --git a/clang/test/CodeGen/ppc64-soft-float.c b/clang/test/CodeGen/ppc64-soft-float.c index 84ac2d55b636..9282457febd1 100644 --- a/clang/test/CodeGen/ppc64-soft-float.c +++ b/clang/test/CodeGen/ppc64-soft-float.c @@ -3,13 +3,13 @@ // Test float returns and params. -// CHECK: define float @func_p1(float %x) +// CHECK: define dso_local float @func_p1(float %x) float func_p1(float x) { return x; } -// CHECK: define double @func_p2(double %x) +// CHECK: define dso_local double @func_p2(double %x) double func_p2(double x) { return x; } -// CHECK: define ppc_fp128 @func_p3(ppc_fp128 %x) +// CHECK: define dso_local ppc_fp128 @func_p3(ppc_fp128 %x) long double func_p3(long double x) { return x; } // Test homogeneous float aggregate passing and returning. @@ -29,47 +29,47 @@ struct fabc { float a; float b; float c; }; struct f2a2b { float a[2]; float b[2]; }; -// CHECK-LE: define i32 @func_f1(float inreg %x.coerce) -// CHECK-BE: define void @func_f1(%struct.f1* noalias sret %agg.result, float inreg %x.coerce) +// CHECK-LE: define dso_local i32 @func_f1(float inreg %x.coerce) +// CHECK-BE: define dso_local void @func_f1(%struct.f1* noalias sret %agg.result, float inreg %x.coerce) struct f1 func_f1(struct f1 x) { return x; } -// CHECK-LE: define i64 @func_f2(i64 %x.coerce) -// CHECK-BE: define void @func_f2(%struct.f2* noalias sret %agg.result, i64 %x.coerce) +// CHECK-LE: define dso_local i64 @func_f2(i64 %x.coerce) +// CHECK-BE: define dso_local void @func_f2(%struct.f2* noalias sret %agg.result, i64 %x.coerce) struct f2 func_f2(struct f2 x) { return x; } -// CHECK-LE: define { i64, i64 } @func_f3([2 x i64] %x.coerce) -// CHECK-BE: define void @func_f3(%struct.f3* noalias sret %agg.result, [2 x i64] %x.coerce) +// CHECK-LE: define dso_local { i64, i64 } @func_f3([2 x i64] %x.coerce) +// CHECK-BE: define dso_local void @func_f3(%struct.f3* noalias sret %agg.result, [2 x i64] %x.coerce) struct f3 func_f3(struct f3 x) { return x; } -// CHECK-LE: define { i64, i64 } @func_f4([2 x i64] %x.coerce) -// CHECK-BE: define void @func_f4(%struct.f4* noalias sret %agg.result, [2 x i64] %x.coerce) +// CHECK-LE: define dso_local { i64, i64 } @func_f4([2 x i64] %x.coerce) +// CHECK-BE: define dso_local void @func_f4(%struct.f4* noalias sret %agg.result, [2 x i64] %x.coerce) struct f4 func_f4(struct f4 x) { return x; } -// CHECK: define void @func_f5(%struct.f5* noalias sret %agg.result, [3 x i64] %x.coerce) +// CHECK: define dso_local void @func_f5(%struct.f5* noalias sret %agg.result, [3 x i64] %x.coerce) struct f5 func_f5(struct f5 x) { return x; } -// CHECK: define void @func_f6(%struct.f6* noalias sret %agg.result, [3 x i64] %x.coerce) +// CHECK: define dso_local void @func_f6(%struct.f6* noalias sret %agg.result, [3 x i64] %x.coerce) struct f6 func_f6(struct f6 x) { return x; } -// CHECK: define void @func_f7(%struct.f7* noalias sret %agg.result, [4 x i64] %x.coerce) +// CHECK: define dso_local void @func_f7(%struct.f7* noalias sret %agg.result, [4 x i64] %x.coerce) struct f7 func_f7(struct f7 x) { return x; } -// CHECK: define void @func_f8(%struct.f8* noalias sret %agg.result, [4 x i64] %x.coerce) +// CHECK: define dso_local void @func_f8(%struct.f8* noalias sret %agg.result, [4 x i64] %x.coerce) struct f8 func_f8(struct f8 x) { return x; } -// CHECK: define void @func_f9(%struct.f9* noalias sret %agg.result, [5 x i64] %x.coerce) +// CHECK: define dso_local void @func_f9(%struct.f9* noalias sret %agg.result, [5 x i64] %x.coerce) struct f9 func_f9(struct f9 x) { return x; } -// CHECK-LE: define i64 @func_fab(i64 %x.coerce) -// CHECK-BE: define void @func_fab(%struct.fab* noalias sret %agg.result, i64 %x.coerce) +// CHECK-LE: define dso_local i64 @func_fab(i64 %x.coerce) +// CHECK-BE: define dso_local void @func_fab(%struct.fab* noalias sret %agg.result, i64 %x.coerce) struct fab func_fab(struct fab x) { return x; } -// CHECK-LE: define { i64, i64 } @func_fabc([2 x i64] %x.coerce) -// CHECK-BE: define void @func_fabc(%struct.fabc* noalias sret %agg.result, [2 x i64] %x.coerce) +// CHECK-LE: define dso_local { i64, i64 } @func_fabc([2 x i64] %x.coerce) +// CHECK-BE: define dso_local void @func_fabc(%struct.fabc* noalias sret %agg.result, [2 x i64] %x.coerce) struct fabc func_fabc(struct fabc x) { return x; } -// CHECK-LE: define { i64, i64 } @func_f2a2b([2 x i64] %x.coerce) -// CHECK-BE: define void @func_f2a2b(%struct.f2a2b* noalias sret %agg.result, [2 x i64] %x.coerce) +// CHECK-LE: define dso_local { i64, i64 } @func_f2a2b([2 x i64] %x.coerce) +// CHECK-BE: define dso_local void @func_f2a2b(%struct.f2a2b* noalias sret %agg.result, [2 x i64] %x.coerce) struct f2a2b func_f2a2b(struct f2a2b x) { return x; } // CHECK-LABEL: @call_f1 diff --git a/clang/test/CodeGen/ppc64-struct-onefloat.c b/clang/test/CodeGen/ppc64-struct-onefloat.c index efc6fe9d8d6f..aa5765c50253 100644 --- a/clang/test/CodeGen/ppc64-struct-onefloat.c +++ b/clang/test/CodeGen/ppc64-struct-onefloat.c @@ -8,7 +8,7 @@ typedef struct s5 { Sd ds; } SSd; void bar(Sf a, Sd b, SSf d, SSd e) {} -// CHECK-LABEL: define void @bar +// CHECK-LABEL: define dso_local void @bar // CHECK: %a = alloca %struct.s1, align 4 // CHECK: %b = alloca %struct.s2, align 8 // CHECK: %d = alloca %struct.s4, align 4 @@ -34,7 +34,7 @@ void foo(void) bar(p1, p2, p4, p5); } -// CHECK-LABEL: define void @foo +// CHECK-LABEL: define dso_local void @foo // CHECK: %{{[a-zA-Z0-9.]+}} = getelementptr inbounds %struct.s1, %struct.s1* %p1, i32 0, i32 0 // CHECK: %{{[0-9]+}} = load float, float* %{{[a-zA-Z0-9.]+}}, align 4 // CHECK: %{{[a-zA-Z0-9.]+}} = getelementptr inbounds %struct.s2, %struct.s2* %p2, i32 0, i32 0 diff --git a/clang/test/CodeGen/ppc64-struct-onevect.c b/clang/test/CodeGen/ppc64-struct-onevect.c index 8cd4126912a5..895e905ef552 100644 --- a/clang/test/CodeGen/ppc64-struct-onevect.c +++ b/clang/test/CodeGen/ppc64-struct-onevect.c @@ -9,5 +9,5 @@ v4sf foo (struct s a) { return a.v; } -// CHECK-LABEL: define <4 x float> @foo(<4 x float> inreg returned %a.coerce) +// CHECK-LABEL: define dso_local <4 x float> @foo(<4 x float> inreg returned %a.coerce) // CHECK: ret <4 x float> %a.coerce diff --git a/clang/test/CodeGen/ppc64-vector.c b/clang/test/CodeGen/ppc64-vector.c index 7ed0beade4cd..49e709dec961 100644 --- a/clang/test/CodeGen/ppc64-vector.c +++ b/clang/test/CodeGen/ppc64-vector.c @@ -9,43 +9,43 @@ typedef short v16i16 __attribute__((vector_size (32))); struct v16i16 { v16i16 x; }; -// CHECK: define i32 @test_v2i16(i32 %x.coerce) +// CHECK: define dso_local i32 @test_v2i16(i32 %x.coerce) v2i16 test_v2i16(v2i16 x) { return x; } -// CHECK: define i64 @test_v3i16(i64 %x.coerce) +// CHECK: define dso_local i64 @test_v3i16(i64 %x.coerce) v3i16 test_v3i16(v3i16 x) { return x; } -// CHECK: define i64 @test_v4i16(i64 %x.coerce) +// CHECK: define dso_local i64 @test_v4i16(i64 %x.coerce) v4i16 test_v4i16(v4i16 x) { return x; } -// CHECK: define <6 x i16> @test_v6i16(<6 x i16> %x) +// CHECK: define dso_local <6 x i16> @test_v6i16(<6 x i16> %x) v6i16 test_v6i16(v6i16 x) { return x; } -// CHECK: define <8 x i16> @test_v8i16(<8 x i16> %x) +// CHECK: define dso_local <8 x i16> @test_v8i16(<8 x i16> %x) v8i16 test_v8i16(v8i16 x) { return x; } -// CHECK: define void @test_v16i16(<16 x i16>* noalias sret %agg.result, <16 x i16>* %0) +// CHECK: define dso_local void @test_v16i16(<16 x i16>* noalias sret %agg.result, <16 x i16>* %0) v16i16 test_v16i16(v16i16 x) { return x; } -// CHECK: define void @test_struct_v16i16(%struct.v16i16* noalias sret %agg.result, [2 x i128] %x.coerce) +// CHECK: define dso_local void @test_struct_v16i16(%struct.v16i16* noalias sret %agg.result, [2 x i128] %x.coerce) struct v16i16 test_struct_v16i16(struct v16i16 x) { return x; diff --git a/clang/test/CodeGen/ppc64le-aggregates.c b/clang/test/CodeGen/ppc64le-aggregates.c index e36faa2b8025..e7509a9453b7 100644 --- a/clang/test/CodeGen/ppc64le-aggregates.c +++ b/clang/test/CodeGen/ppc64le-aggregates.c @@ -17,40 +17,40 @@ struct fabc { float a; float b; float c; }; struct f2a2b { float a[2]; float b[2]; }; -// CHECK: define [1 x float] @func_f1(float inreg %x.coerce) +// CHECK: define dso_local [1 x float] @func_f1(float inreg %x.coerce) struct f1 func_f1(struct f1 x) { return x; } -// CHECK: define [2 x float] @func_f2([2 x float] %x.coerce) +// CHECK: define dso_local [2 x float] @func_f2([2 x float] %x.coerce) struct f2 func_f2(struct f2 x) { return x; } -// CHECK: define [3 x float] @func_f3([3 x float] %x.coerce) +// CHECK: define dso_local [3 x float] @func_f3([3 x float] %x.coerce) struct f3 func_f3(struct f3 x) { return x; } -// CHECK: define [4 x float] @func_f4([4 x float] %x.coerce) +// CHECK: define dso_local [4 x float] @func_f4([4 x float] %x.coerce) struct f4 func_f4(struct f4 x) { return x; } -// CHECK: define [5 x float] @func_f5([5 x float] %x.coerce) +// CHECK: define dso_local [5 x float] @func_f5([5 x float] %x.coerce) struct f5 func_f5(struct f5 x) { return x; } -// CHECK: define [6 x float] @func_f6([6 x float] %x.coerce) +// CHECK: define dso_local [6 x float] @func_f6([6 x float] %x.coerce) struct f6 func_f6(struct f6 x) { return x; } -// CHECK: define [7 x float] @func_f7([7 x float] %x.coerce) +// CHECK: define dso_local [7 x float] @func_f7([7 x float] %x.coerce) struct f7 func_f7(struct f7 x) { return x; } -// CHECK: define [8 x float] @func_f8([8 x float] %x.coerce) +// CHECK: define dso_local [8 x float] @func_f8([8 x float] %x.coerce) struct f8 func_f8(struct f8 x) { return x; } -// CHECK: define void @func_f9(%struct.f9* noalias sret %agg.result, [5 x i64] %x.coerce) +// CHECK: define dso_local void @func_f9(%struct.f9* noalias sret %agg.result, [5 x i64] %x.coerce) struct f9 func_f9(struct f9 x) { return x; } -// CHECK: define [2 x float] @func_fab([2 x float] %x.coerce) +// CHECK: define dso_local [2 x float] @func_fab([2 x float] %x.coerce) struct fab func_fab(struct fab x) { return x; } -// CHECK: define [3 x float] @func_fabc([3 x float] %x.coerce) +// CHECK: define dso_local [3 x float] @func_fabc([3 x float] %x.coerce) struct fabc func_fabc(struct fabc x) { return x; } -// CHECK: define [4 x float] @func_f2a2b([4 x float] %x.coerce) +// CHECK: define dso_local [4 x float] @func_f2a2b([4 x float] %x.coerce) struct f2a2b func_f2a2b(struct f2a2b x) { return x; } // CHECK-LABEL: @call_f1 @@ -138,37 +138,37 @@ struct v9 { vector int v[9]; }; struct vab { vector int a; vector int b; }; struct vabc { vector int a; vector int b; vector int c; }; -// CHECK: define [1 x <4 x i32>] @func_v1(<4 x i32> inreg %x.coerce) +// CHECK: define dso_local [1 x <4 x i32>] @func_v1(<4 x i32> inreg %x.coerce) struct v1 func_v1(struct v1 x) { return x; } -// CHECK: define [2 x <4 x i32>] @func_v2([2 x <4 x i32>] %x.coerce) +// CHECK: define dso_local [2 x <4 x i32>] @func_v2([2 x <4 x i32>] %x.coerce) struct v2 func_v2(struct v2 x) { return x; } -// CHECK: define [3 x <4 x i32>] @func_v3([3 x <4 x i32>] %x.coerce) +// CHECK: define dso_local [3 x <4 x i32>] @func_v3([3 x <4 x i32>] %x.coerce) struct v3 func_v3(struct v3 x) { return x; } -// CHECK: define [4 x <4 x i32>] @func_v4([4 x <4 x i32>] %x.coerce) +// CHECK: define dso_local [4 x <4 x i32>] @func_v4([4 x <4 x i32>] %x.coerce) struct v4 func_v4(struct v4 x) { return x; } -// CHECK: define [5 x <4 x i32>] @func_v5([5 x <4 x i32>] %x.coerce) +// CHECK: define dso_local [5 x <4 x i32>] @func_v5([5 x <4 x i32>] %x.coerce) struct v5 func_v5(struct v5 x) { return x; } -// CHECK: define [6 x <4 x i32>] @func_v6([6 x <4 x i32>] %x.coerce) +// CHECK: define dso_local [6 x <4 x i32>] @func_v6([6 x <4 x i32>] %x.coerce) struct v6 func_v6(struct v6 x) { return x; } -// CHECK: define [7 x <4 x i32>] @func_v7([7 x <4 x i32>] %x.coerce) +// CHECK: define dso_local [7 x <4 x i32>] @func_v7([7 x <4 x i32>] %x.coerce) struct v7 func_v7(struct v7 x) { return x; } -// CHECK: define [8 x <4 x i32>] @func_v8([8 x <4 x i32>] %x.coerce) +// CHECK: define dso_local [8 x <4 x i32>] @func_v8([8 x <4 x i32>] %x.coerce) struct v8 func_v8(struct v8 x) { return x; } -// CHECK: define void @func_v9(%struct.v9* noalias sret %agg.result, %struct.v9* byval(%struct.v9) align 16 %x) +// CHECK: define dso_local void @func_v9(%struct.v9* noalias sret %agg.result, %struct.v9* byval(%struct.v9) align 16 %x) struct v9 func_v9(struct v9 x) { return x; } -// CHECK: define [2 x <4 x i32>] @func_vab([2 x <4 x i32>] %x.coerce) +// CHECK: define dso_local [2 x <4 x i32>] @func_vab([2 x <4 x i32>] %x.coerce) struct vab func_vab(struct vab x) { return x; } -// CHECK: define [3 x <4 x i32>] @func_vabc([3 x <4 x i32>] %x.coerce) +// CHECK: define dso_local [3 x <4 x i32>] @func_vabc([3 x <4 x i32>] %x.coerce) struct vabc func_vabc(struct vabc x) { return x; } // CHECK-LABEL: @call_v1 @@ -255,37 +255,37 @@ struct v3f9 { float3 v[9]; }; struct v3fab { float3 a; float3 b; }; struct v3fabc { float3 a; float3 b; float3 c; }; -// CHECK: define [1 x <4 x float>] @func_v3f1(<3 x float> inreg %x.coerce) +// CHECK: define dso_local [1 x <4 x float>] @func_v3f1(<3 x float> inreg %x.coerce) struct v3f1 func_v3f1(struct v3f1 x) { return x; } -// CHECK: define [2 x <4 x float>] @func_v3f2([2 x <4 x float>] %x.coerce) +// CHECK: define dso_local [2 x <4 x float>] @func_v3f2([2 x <4 x float>] %x.coerce) struct v3f2 func_v3f2(struct v3f2 x) { return x; } -// CHECK: define [3 x <4 x float>] @func_v3f3([3 x <4 x float>] %x.coerce) +// CHECK: define dso_local [3 x <4 x float>] @func_v3f3([3 x <4 x float>] %x.coerce) struct v3f3 func_v3f3(struct v3f3 x) { return x; } -// CHECK: define [4 x <4 x float>] @func_v3f4([4 x <4 x float>] %x.coerce) +// CHECK: define dso_local [4 x <4 x float>] @func_v3f4([4 x <4 x float>] %x.coerce) struct v3f4 func_v3f4(struct v3f4 x) { return x; } -// CHECK: define [5 x <4 x float>] @func_v3f5([5 x <4 x float>] %x.coerce) +// CHECK: define dso_local [5 x <4 x float>] @func_v3f5([5 x <4 x float>] %x.coerce) struct v3f5 func_v3f5(struct v3f5 x) { return x; } -// CHECK: define [6 x <4 x float>] @func_v3f6([6 x <4 x float>] %x.coerce) +// CHECK: define dso_local [6 x <4 x float>] @func_v3f6([6 x <4 x float>] %x.coerce) struct v3f6 func_v3f6(struct v3f6 x) { return x; } -// CHECK: define [7 x <4 x float>] @func_v3f7([7 x <4 x float>] %x.coerce) +// CHECK: define dso_local [7 x <4 x float>] @func_v3f7([7 x <4 x float>] %x.coerce) struct v3f7 func_v3f7(struct v3f7 x) { return x; } -// CHECK: define [8 x <4 x float>] @func_v3f8([8 x <4 x float>] %x.coerce) +// CHECK: define dso_local [8 x <4 x float>] @func_v3f8([8 x <4 x float>] %x.coerce) struct v3f8 func_v3f8(struct v3f8 x) { return x; } -// CHECK: define void @func_v3f9(%struct.v3f9* noalias sret %agg.result, %struct.v3f9* byval(%struct.v3f9) align 16 %x) +// CHECK: define dso_local void @func_v3f9(%struct.v3f9* noalias sret %agg.result, %struct.v3f9* byval(%struct.v3f9) align 16 %x) struct v3f9 func_v3f9(struct v3f9 x) { return x; } -// CHECK: define [2 x <4 x float>] @func_v3fab([2 x <4 x float>] %x.coerce) +// CHECK: define dso_local [2 x <4 x float>] @func_v3fab([2 x <4 x float>] %x.coerce) struct v3fab func_v3fab(struct v3fab x) { return x; } -// CHECK: define [3 x <4 x float>] @func_v3fabc([3 x <4 x float>] %x.coerce) +// CHECK: define dso_local [3 x <4 x float>] @func_v3fabc([3 x <4 x float>] %x.coerce) struct v3fabc func_v3fabc(struct v3fabc x) { return x; } // CHECK-LABEL: @call_v3f1 @@ -368,58 +368,58 @@ struct s9 { char c[9]; }; struct s16 { char c[16]; }; struct s17 { char c[17]; }; -// CHECK: define i8 @ret_s1() +// CHECK: define dso_local i8 @ret_s1() struct s1 ret_s1() { return (struct s1) { 17 }; } -// CHECK: define i16 @ret_s2() +// CHECK: define dso_local i16 @ret_s2() struct s2 ret_s2() { return (struct s2) { 17, 18 }; } -// CHECK: define i24 @ret_s3() +// CHECK: define dso_local i24 @ret_s3() struct s3 ret_s3() { return (struct s3) { 17, 18, 19 }; } -// CHECK: define i32 @ret_s4() +// CHECK: define dso_local i32 @ret_s4() struct s4 ret_s4() { return (struct s4) { 17, 18, 19, 20 }; } -// CHECK: define i40 @ret_s5() +// CHECK: define dso_local i40 @ret_s5() struct s5 ret_s5() { return (struct s5) { 17, 18, 19, 20, 21 }; } -// CHECK: define i48 @ret_s6() +// CHECK: define dso_local i48 @ret_s6() struct s6 ret_s6() { return (struct s6) { 17, 18, 19, 20, 21, 22 }; } -// CHECK: define i56 @ret_s7() +// CHECK: define dso_local i56 @ret_s7() struct s7 ret_s7() { return (struct s7) { 17, 18, 19, 20, 21, 22, 23 }; } -// CHECK: define i64 @ret_s8() +// CHECK: define dso_local i64 @ret_s8() struct s8 ret_s8() { return (struct s8) { 17, 18, 19, 20, 21, 22, 23, 24 }; } -// CHECK: define { i64, i64 } @ret_s9() +// CHECK: define dso_local { i64, i64 } @ret_s9() struct s9 ret_s9() { return (struct s9) { 17, 18, 19, 20, 21, 22, 23, 24, 25 }; } -// CHECK: define { i64, i64 } @ret_s16() +// CHECK: define dso_local { i64, i64 } @ret_s16() struct s16 ret_s16() { return (struct s16) { 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 }; } -// CHECK: define void @ret_s17(%struct.s17* +// CHECK: define dso_local void @ret_s17(%struct.s17* struct s17 ret_s17() { return (struct s17) { 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33 }; diff --git a/clang/test/CodeGen/ppc64le-f128Aggregates.c b/clang/test/CodeGen/ppc64le-f128Aggregates.c index 3b363bf0f2ea..44e4f7b4b7f3 100644 --- a/clang/test/CodeGen/ppc64le-f128Aggregates.c +++ b/clang/test/CodeGen/ppc64le-f128Aggregates.c @@ -18,40 +18,40 @@ struct fpabc { __float128 a; __float128 b; __float128 c; }; struct fp2a2b { __float128 a[2]; __float128 b[2]; }; -// CHECK: define [1 x fp128] @func_f1(fp128 inreg %x.coerce) +// CHECK: define dso_local [1 x fp128] @func_f1(fp128 inreg %x.coerce) struct fp1 func_f1(struct fp1 x) { return x; } -// CHECK: define [2 x fp128] @func_f2([2 x fp128] %x.coerce) +// CHECK: define dso_local [2 x fp128] @func_f2([2 x fp128] %x.coerce) struct fp2 func_f2(struct fp2 x) { return x; } -// CHECK: define [3 x fp128] @func_f3([3 x fp128] %x.coerce) +// CHECK: define dso_local [3 x fp128] @func_f3([3 x fp128] %x.coerce) struct fp3 func_f3(struct fp3 x) { return x; } -// CHECK: define [4 x fp128] @func_f4([4 x fp128] %x.coerce) +// CHECK: define dso_local [4 x fp128] @func_f4([4 x fp128] %x.coerce) struct fp4 func_f4(struct fp4 x) { return x; } -// CHECK: define [5 x fp128] @func_f5([5 x fp128] %x.coerce) +// CHECK: define dso_local [5 x fp128] @func_f5([5 x fp128] %x.coerce) struct fp5 func_f5(struct fp5 x) { return x; } -// CHECK: define [6 x fp128] @func_f6([6 x fp128] %x.coerce) +// CHECK: define dso_local [6 x fp128] @func_f6([6 x fp128] %x.coerce) struct fp6 func_f6(struct fp6 x) { return x; } -// CHECK: define [7 x fp128] @func_f7([7 x fp128] %x.coerce) +// CHECK: define dso_local [7 x fp128] @func_f7([7 x fp128] %x.coerce) struct fp7 func_f7(struct fp7 x) { return x; } -// CHECK: define [8 x fp128] @func_f8([8 x fp128] %x.coerce) +// CHECK: define dso_local [8 x fp128] @func_f8([8 x fp128] %x.coerce) struct fp8 func_f8(struct fp8 x) { return x; } -// CHECK: define void @func_f9(%struct.fp9* noalias sret %agg.result, %struct.fp9* byval(%struct.fp9) align 16 %x) +// CHECK: define dso_local void @func_f9(%struct.fp9* noalias sret %agg.result, %struct.fp9* byval(%struct.fp9) align 16 %x) struct fp9 func_f9(struct fp9 x) { return x; } -// CHECK: define [2 x fp128] @func_fab([2 x fp128] %x.coerce) +// CHECK: define dso_local [2 x fp128] @func_fab([2 x fp128] %x.coerce) struct fpab func_fab(struct fpab x) { return x; } -// CHECK: define [3 x fp128] @func_fabc([3 x fp128] %x.coerce) +// CHECK: define dso_local [3 x fp128] @func_fabc([3 x fp128] %x.coerce) struct fpabc func_fabc(struct fpabc x) { return x; } -// CHECK: define [4 x fp128] @func_f2a2b([4 x fp128] %x.coerce) +// CHECK: define dso_local [4 x fp128] @func_f2a2b([4 x fp128] %x.coerce) struct fp2a2b func_f2a2b(struct fp2a2b x) { return x; } // CHECK-LABEL: @call_fp1 diff --git a/clang/test/CodeGen/pr25786.c b/clang/test/CodeGen/pr25786.c index 612da7e8a369..7de668491d2b 100644 --- a/clang/test/CodeGen/pr25786.c +++ b/clang/test/CodeGen/pr25786.c @@ -4,8 +4,8 @@ void (__attribute__((regparm(3), stdcall)) *pf) (); void (__attribute__((regparm(2), stdcall)) foo)(int a) { } -// CHECK: @pf = common global void (...)* null -// CHECK: define void @foo(i32 %a) +// CHECK: @pf = common dso_local global void (...)* null +// CHECK: define dso_local void @foo(i32 %a) -// CHECK-OK: @pf = common global void (...)* null -// CHECK-OK: define x86_stdcallcc void @foo(i32 inreg %a) +// CHECK-OK: @pf = common dso_local global void (...)* null +// CHECK-OK: define dso_local x86_stdcallcc void @foo(i32 inreg %a) diff --git a/clang/test/CodeGen/pr34021.c b/clang/test/CodeGen/pr34021.c index 3c7a75a95aa9..ce69c781ed1c 100644 --- a/clang/test/CodeGen/pr34021.c +++ b/clang/test/CodeGen/pr34021.c @@ -4,7 +4,7 @@ typedef int v4si __attribute__ ((vector_size (16))); v4si rep() { -// X86-LABEL: define <4 x i32> @rep +// X86-LABEL: define dso_local <4 x i32> @rep // X86: %[[ALLOCA0:.*]] = alloca <4 x i32>, align 16 // X86: %[[ALLOCA1:.*]] = alloca <4 x i32>, align 16 // X86: %[[BITCAST:.*]] = bitcast <4 x i32>* %[[ALLOCA0]] to i128* @@ -14,7 +14,7 @@ v4si rep() { // X86: %[[LOAD:.*]] = load <4 x i32>, <4 x i32>* %[[ALLOCA1]], align 16 // X86: ret <4 x i32> %[[LOAD]] // -// X64-LABEL: define <4 x i32> @rep +// X64-LABEL: define dso_local <4 x i32> @rep // X64: %[[ALLOCA:.*]] = alloca <4 x i32>, align 16 // X64: call void asm sideeffect inteldialect "", "~{dirflag},~{fpsr},~{flags}"() // X64: %[[LOAD:.*]] = load <4 x i32>, <4 x i32>* %[[ALLOCA]], align 16 diff --git a/clang/test/CodeGen/pr9614.c b/clang/test/CodeGen/pr9614.c index 08089848eeba..44f3081603e2 100644 --- a/clang/test/CodeGen/pr9614.c +++ b/clang/test/CodeGen/pr9614.c @@ -30,7 +30,7 @@ void f(void) { memchr("", '.', 0); } -// CHECK-LABEL: define void @f() +// CHECK-LABEL: define dso_local void @f() // CHECK: call void @foo() // CHECK: call i32 @abs(i32 0) // CHECK: call i8* @strrchr( diff --git a/clang/test/CodeGen/pragma-weak.c b/clang/test/CodeGen/pragma-weak.c index d1f7ab6c3ebe..8a3129d60c9d 100644 --- a/clang/test/CodeGen/pragma-weak.c +++ b/clang/test/CodeGen/pragma-weak.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm %s -o - -verify | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -pic-level 2 -fsemantic-interposition %s -o - -verify | FileCheck %s // CHECK: @weakvar = weak global // CHECK: @__weakvar_alias = common global diff --git a/clang/test/CodeGen/prefetchw-builtins.c b/clang/test/CodeGen/prefetchw-builtins.c index b3a8062acf65..446e79a2ca8d 100644 --- a/clang/test/CodeGen/prefetchw-builtins.c +++ b/clang/test/CodeGen/prefetchw-builtins.c @@ -5,12 +5,12 @@ void test_m_prefetch(void *p) { return _m_prefetch(p); - // CHECK-LABEL: define void @test_m_prefetch + // CHECK-LABEL: define dso_local void @test_m_prefetch // CHECK: call void @llvm.prefetch.p0i8({{.*}}, i32 0, i32 3, i32 1) } void test_m_prefetch_w(void *p) { return _m_prefetchw(p); - // CHECK-LABEL: define void @test_m_prefetch_w + // CHECK-LABEL: define dso_local void @test_m_prefetch_w // CHECK: call void @llvm.prefetch.p0i8({{.*}}, i32 1, i32 3, i32 1) } diff --git a/clang/test/CodeGen/redefine_extname.c b/clang/test/CodeGen/redefine_extname.c index d56527a88953..0517ad9c5ad5 100644 --- a/clang/test/CodeGen/redefine_extname.c +++ b/clang/test/CodeGen/redefine_extname.c @@ -22,7 +22,7 @@ int f() { return foo; } extern int foo() { return 1; } -// CHECK: define i32 @bar() +// CHECK: define dso_local i32 @bar() // Check that pragma redefine_extname applies to external declarations only. #pragma redefine_extname foo_static bar_static diff --git a/clang/test/CodeGen/regcall.c b/clang/test/CodeGen/regcall.c index 03d9d2fb24b0..e9c7d278c995 100644 --- a/clang/test/CodeGen/regcall.c +++ b/clang/test/CodeGen/regcall.c @@ -8,34 +8,34 @@ void __regcall v1(int a, int b) {} // Win32: define dso_local x86_regcallcc void @__regcall3__v1(i32 inreg %a, i32 inreg %b) // Win64: define dso_local x86_regcallcc void @__regcall3__v1(i32 %a, i32 %b) -// Lin32: define x86_regcallcc void @__regcall3__v1(i32 inreg %a, i32 inreg %b) -// Lin64: define x86_regcallcc void @__regcall3__v1(i32 %a, i32 %b) +// Lin32: define dso_local x86_regcallcc void @__regcall3__v1(i32 inreg %a, i32 inreg %b) +// Lin64: define dso_local x86_regcallcc void @__regcall3__v1(i32 %a, i32 %b) void __attribute__((regcall)) v1b(int a, int b) {} // Win32: define dso_local x86_regcallcc void @__regcall3__v1b(i32 inreg %a, i32 inreg %b) // Win64: define dso_local x86_regcallcc void @__regcall3__v1b(i32 %a, i32 %b) -// Lin32: define x86_regcallcc void @__regcall3__v1b(i32 inreg %a, i32 inreg %b) -// Lin64: define x86_regcallcc void @__regcall3__v1b(i32 %a, i32 %b) +// Lin32: define dso_local x86_regcallcc void @__regcall3__v1b(i32 inreg %a, i32 inreg %b) +// Lin64: define dso_local x86_regcallcc void @__regcall3__v1b(i32 %a, i32 %b) void __regcall v2(char a, char b) {} // Win32: define dso_local x86_regcallcc void @__regcall3__v2(i8 inreg signext %a, i8 inreg signext %b) // Win64: define dso_local x86_regcallcc void @__regcall3__v2(i8 %a, i8 %b) -// Lin32: define x86_regcallcc void @__regcall3__v2(i8 inreg signext %a, i8 inreg signext %b) -// Lin64: define x86_regcallcc void @__regcall3__v2(i8 signext %a, i8 signext %b) +// Lin32: define dso_local x86_regcallcc void @__regcall3__v2(i8 inreg signext %a, i8 inreg signext %b) +// Lin64: define dso_local x86_regcallcc void @__regcall3__v2(i8 signext %a, i8 signext %b) struct Small { int x; }; void __regcall v3(int a, struct Small b, int c) {} // Win32: define dso_local x86_regcallcc void @__regcall3__v3(i32 inreg %a, i32 %b.0, i32 inreg %c) // Win64: define dso_local x86_regcallcc void @__regcall3__v3(i32 %a, i32 %b.coerce, i32 %c) -// Lin32: define x86_regcallcc void @__regcall3__v3(i32 inreg %a, i32 inreg %0, i32 %b.0, i32 inreg %c) -// Lin64: define x86_regcallcc void @__regcall3__v3(i32 %a, i32 %b.coerce, i32 %c) +// Lin32: define dso_local x86_regcallcc void @__regcall3__v3(i32 inreg %a, i32 inreg %0, i32 %b.0, i32 inreg %c) +// Lin64: define dso_local x86_regcallcc void @__regcall3__v3(i32 %a, i32 %b.coerce, i32 %c) struct Large { int a[5]; }; void __regcall v4(int a, struct Large b, int c) {} // Win32: define dso_local x86_regcallcc void @__regcall3__v4(i32 inreg %a, %struct.Large* byval(%struct.Large) align 4 %b, i32 inreg %c) // Win64: define dso_local x86_regcallcc void @__regcall3__v4(i32 %a, %struct.Large* %b, i32 %c) -// Lin32: define x86_regcallcc void @__regcall3__v4(i32 inreg %a, %struct.Large* byval(%struct.Large) align 4 %b, i32 %c) -// Lin64: define x86_regcallcc void @__regcall3__v4(i32 %a, [5 x i32] %b.coerce, i32 %c) +// Lin32: define dso_local x86_regcallcc void @__regcall3__v4(i32 inreg %a, %struct.Large* byval(%struct.Large) align 4 %b, i32 %c) +// Lin64: define dso_local x86_regcallcc void @__regcall3__v4(i32 %a, [5 x i32] %b.coerce, i32 %c) struct HFA2 { double x, y; }; struct HFA4 { double w, x, y, z; }; @@ -44,8 +44,8 @@ struct HFA5 { double v, w, x, y, z; }; void __regcall hfa1(int a, struct HFA4 b, int c) {} // Win32: define dso_local x86_regcallcc void @__regcall3__hfa1(i32 inreg %a, double %b.0, double %b.1, double %b.2, double %b.3, i32 inreg %c) // Win64: define dso_local x86_regcallcc void @__regcall3__hfa1(i32 %a, double %b.0, double %b.1, double %b.2, double %b.3, i32 %c) -// Lin32: define x86_regcallcc void @__regcall3__hfa1(i32 inreg %a, double %b.0, double %b.1, double %b.2, double %b.3, i32 inreg %c) -// Lin64: define x86_regcallcc void @__regcall3__hfa1(i32 %a, double %b.coerce0, double %b.coerce1, double %b.coerce2, double %b.coerce3, i32 %c) +// Lin32: define dso_local x86_regcallcc void @__regcall3__hfa1(i32 inreg %a, double %b.0, double %b.1, double %b.2, double %b.3, i32 inreg %c) +// Lin64: define dso_local x86_regcallcc void @__regcall3__hfa1(i32 %a, double %b.coerce0, double %b.coerce1, double %b.coerce2, double %b.coerce3, i32 %c) // HFAs that would require more than six total SSE registers are passed // indirectly. Additional vector arguments can consume the rest of the SSE @@ -53,16 +53,16 @@ void __regcall hfa1(int a, struct HFA4 b, int c) {} void __regcall hfa2(struct HFA4 a, struct HFA4 b, double c) {} // Win32: define dso_local x86_regcallcc void @__regcall3__hfa2(double %a.0, double %a.1, double %a.2, double %a.3, double %b.0, double %b.1, double %b.2, double %b.3, double* inreg %0) // Win64: define dso_local x86_regcallcc void @__regcall3__hfa2(double %a.0, double %a.1, double %a.2, double %a.3, double %b.0, double %b.1, double %b.2, double %b.3, double %c) -// Lin32: define x86_regcallcc void @__regcall3__hfa2(double %a.0, double %a.1, double %a.2, double %a.3, double %b.0, double %b.1, double %b.2, double %b.3, double* inreg %0) -// Lin64: define x86_regcallcc void @__regcall3__hfa2(double %a.coerce0, double %a.coerce1, double %a.coerce2, double %a.coerce3, double %b.coerce0, double %b.coerce1, double %b.coerce2, double %b.coerce3, double %c) +// Lin32: define dso_local x86_regcallcc void @__regcall3__hfa2(double %a.0, double %a.1, double %a.2, double %a.3, double %b.0, double %b.1, double %b.2, double %b.3, double* inreg %0) +// Lin64: define dso_local x86_regcallcc void @__regcall3__hfa2(double %a.coerce0, double %a.coerce1, double %a.coerce2, double %a.coerce3, double %b.coerce0, double %b.coerce1, double %b.coerce2, double %b.coerce3, double %c) // Ensure that we pass builtin types directly while counting them against the // SSE register usage. void __regcall hfa3(double a, double b, double c, double d, double e, struct HFA2 f) {} // Win32: define dso_local x86_regcallcc void @__regcall3__hfa3(double %a, double %b, double %c, double %d, double %e, double %f.0, double %f.1) // Win64: define dso_local x86_regcallcc void @__regcall3__hfa3(double %a, double %b, double %c, double %d, double %e, double %f.0, double %f.1) -// Lin32: define x86_regcallcc void @__regcall3__hfa3(double %a, double %b, double %c, double %d, double %e, double %f.0, double %f.1) -// Lin64: define x86_regcallcc void @__regcall3__hfa3(double %a, double %b, double %c, double %d, double %e, double %f.coerce0, double %f.coerce1) +// Lin32: define dso_local x86_regcallcc void @__regcall3__hfa3(double %a, double %b, double %c, double %d, double %e, double %f.0, double %f.1) +// Lin64: define dso_local x86_regcallcc void @__regcall3__hfa3(double %a, double %b, double %c, double %d, double %e, double %f.coerce0, double %f.coerce1) // Aggregates with more than four elements are not HFAs and are passed byval(%b.3, double). // Because they are not classified as homogeneous, they don't get special @@ -70,16 +70,16 @@ void __regcall hfa3(double a, double b, double c, double d, double e, struct HFA void __regcall hfa4(struct HFA5 a) {} // Win32: define dso_local x86_regcallcc void @__regcall3__hfa4(%struct.HFA5* byval(%struct.HFA5) align 4 %0) // Win64: define dso_local x86_regcallcc void @__regcall3__hfa4(%struct.HFA5* %a) -// Lin32: define x86_regcallcc void @__regcall3__hfa4(%struct.HFA5* byval(%struct.HFA5) align 4 %a) -// Lin64: define x86_regcallcc void @__regcall3__hfa4(double %a.coerce0, double %a.coerce1, double %a.coerce2, double %a.coerce3, double %a.coerce4) +// Lin32: define dso_local x86_regcallcc void @__regcall3__hfa4(%struct.HFA5* byval(%struct.HFA5) align 4 %a) +// Lin64: define dso_local x86_regcallcc void @__regcall3__hfa4(double %a.coerce0, double %a.coerce1, double %a.coerce2, double %a.coerce3, double %a.coerce4) // Return HFAs of 4 or fewer elements in registers. static struct HFA2 g_hfa2; struct HFA2 __regcall hfa5(void) { return g_hfa2; } // Win32: define dso_local x86_regcallcc %struct.HFA2 @__regcall3__hfa5() // Win64: define dso_local x86_regcallcc %struct.HFA2 @__regcall3__hfa5() -// Lin32: define x86_regcallcc %struct.HFA2 @__regcall3__hfa5() -// Lin64: define x86_regcallcc %struct.HFA2 @__regcall3__hfa5() +// Lin32: define dso_local x86_regcallcc %struct.HFA2 @__regcall3__hfa5() +// Lin64: define dso_local x86_regcallcc %struct.HFA2 @__regcall3__hfa5() typedef float __attribute__((vector_size(16))) v4f32; struct HVA2 { v4f32 x, y; }; @@ -88,20 +88,20 @@ struct HVA4 { v4f32 w, x, y, z; }; void __regcall hva1(int a, struct HVA4 b, int c) {} // Win32: define dso_local x86_regcallcc void @__regcall3__hva1(i32 inreg %a, <4 x float> %b.0, <4 x float> %b.1, <4 x float> %b.2, <4 x float> %b.3, i32 inreg %c) // Win64: define dso_local x86_regcallcc void @__regcall3__hva1(i32 %a, <4 x float> %b.0, <4 x float> %b.1, <4 x float> %b.2, <4 x float> %b.3, i32 %c) -// Lin32: define x86_regcallcc void @__regcall3__hva1(i32 inreg %a, <4 x float> %b.0, <4 x float> %b.1, <4 x float> %b.2, <4 x float> %b.3, i32 inreg %c) -// Lin64: define x86_regcallcc void @__regcall3__hva1(i32 %a, <4 x float> %b.coerce0, <4 x float> %b.coerce1, <4 x float> %b.coerce2, <4 x float> %b.coerce3, i32 %c) +// Lin32: define dso_local x86_regcallcc void @__regcall3__hva1(i32 inreg %a, <4 x float> %b.0, <4 x float> %b.1, <4 x float> %b.2, <4 x float> %b.3, i32 inreg %c) +// Lin64: define dso_local x86_regcallcc void @__regcall3__hva1(i32 %a, <4 x float> %b.coerce0, <4 x float> %b.coerce1, <4 x float> %b.coerce2, <4 x float> %b.coerce3, i32 %c) void __regcall hva2(struct HVA4 a, struct HVA4 b, v4f32 c) {} // Win32: define dso_local x86_regcallcc void @__regcall3__hva2(<4 x float> %a.0, <4 x float> %a.1, <4 x float> %a.2, <4 x float> %a.3, <4 x float> %b.0, <4 x float> %b.1, <4 x float> %b.2, <4 x float> %b.3, <4 x float>* inreg %0) // Win64: define dso_local x86_regcallcc void @__regcall3__hva2(<4 x float> %a.0, <4 x float> %a.1, <4 x float> %a.2, <4 x float> %a.3, <4 x float> %b.0, <4 x float> %b.1, <4 x float> %b.2, <4 x float> %b.3, <4 x float> %c) -// Lin32: define x86_regcallcc void @__regcall3__hva2(<4 x float> %a.0, <4 x float> %a.1, <4 x float> %a.2, <4 x float> %a.3, <4 x float> %b.0, <4 x float> %b.1, <4 x float> %b.2, <4 x float> %b.3, <4 x float>* inreg %0) -// Lin64: define x86_regcallcc void @__regcall3__hva2(<4 x float> %a.coerce0, <4 x float> %a.coerce1, <4 x float> %a.coerce2, <4 x float> %a.coerce3, <4 x float> %b.coerce0, <4 x float> %b.coerce1, <4 x float> %b.coerce2, <4 x float> %b.coerce3, <4 x float> %c) +// Lin32: define dso_local x86_regcallcc void @__regcall3__hva2(<4 x float> %a.0, <4 x float> %a.1, <4 x float> %a.2, <4 x float> %a.3, <4 x float> %b.0, <4 x float> %b.1, <4 x float> %b.2, <4 x float> %b.3, <4 x float>* inreg %0) +// Lin64: define dso_local x86_regcallcc void @__regcall3__hva2(<4 x float> %a.coerce0, <4 x float> %a.coerce1, <4 x float> %a.coerce2, <4 x float> %a.coerce3, <4 x float> %b.coerce0, <4 x float> %b.coerce1, <4 x float> %b.coerce2, <4 x float> %b.coerce3, <4 x float> %c) void __regcall hva3(v4f32 a, v4f32 b, v4f32 c, v4f32 d, v4f32 e, struct HVA2 f) {} // Win32: define dso_local x86_regcallcc void @__regcall3__hva3(<4 x float> %a, <4 x float> %b, <4 x float> %c, <4 x float> %d, <4 x float> %e, <4 x float> %f.0, <4 x float> %f.1) // Win64: define dso_local x86_regcallcc void @__regcall3__hva3(<4 x float> %a, <4 x float> %b, <4 x float> %c, <4 x float> %d, <4 x float> %e, <4 x float> %f.0, <4 x float> %f.1) -// Lin32: define x86_regcallcc void @__regcall3__hva3(<4 x float> %a, <4 x float> %b, <4 x float> %c, <4 x float> %d, <4 x float> %e, <4 x float> %f.0, <4 x float> %f.1) -// Lin64: define x86_regcallcc void @__regcall3__hva3(<4 x float> %a, <4 x float> %b, <4 x float> %c, <4 x float> %d, <4 x float> %e, <4 x float> %f.coerce0, <4 x float> %f.coerce1) +// Lin32: define dso_local x86_regcallcc void @__regcall3__hva3(<4 x float> %a, <4 x float> %b, <4 x float> %c, <4 x float> %d, <4 x float> %e, <4 x float> %f.0, <4 x float> %f.1) +// Lin64: define dso_local x86_regcallcc void @__regcall3__hva3(<4 x float> %a, <4 x float> %b, <4 x float> %c, <4 x float> %d, <4 x float> %e, <4 x float> %f.coerce0, <4 x float> %f.coerce1) typedef float __attribute__((ext_vector_type(3))) v3f32; struct OddSizeHVA { v3f32 x, y; }; @@ -109,12 +109,12 @@ struct OddSizeHVA { v3f32 x, y; }; void __regcall odd_size_hva(struct OddSizeHVA a) {} // Win32: define dso_local x86_regcallcc void @__regcall3__odd_size_hva(<3 x float> %a.0, <3 x float> %a.1) // Win64: define dso_local x86_regcallcc void @__regcall3__odd_size_hva(<3 x float> %a.0, <3 x float> %a.1) -// Lin32: define x86_regcallcc void @__regcall3__odd_size_hva(<3 x float> %a.0, <3 x float> %a.1) -// Lin64: define x86_regcallcc void @__regcall3__odd_size_hva(<3 x float> %a.coerce0, <3 x float> %a.coerce1) +// Lin32: define dso_local x86_regcallcc void @__regcall3__odd_size_hva(<3 x float> %a.0, <3 x float> %a.1) +// Lin64: define dso_local x86_regcallcc void @__regcall3__odd_size_hva(<3 x float> %a.coerce0, <3 x float> %a.coerce1) struct HFA6 { __m128 f[4]; }; struct HFA6 __regcall ret_reg_reused(struct HFA6 a, struct HFA6 b, struct HFA6 c, struct HFA6 d){ struct HFA6 h; return h;} // Win32: define dso_local x86_regcallcc %struct.HFA6 @__regcall3__ret_reg_reused(<4 x float> %a.0, <4 x float> %a.1, <4 x float> %a.2, <4 x float> %a.3, <4 x float> %b.0, <4 x float> %b.1, <4 x float> %b.2, <4 x float> %b.3, %struct.HFA6* inreg %c, %struct.HFA6* inreg %d) // Win64: define dso_local x86_regcallcc %struct.HFA6 @__regcall3__ret_reg_reused(<4 x float> %a.0, <4 x float> %a.1, <4 x float> %a.2, <4 x float> %a.3, <4 x float> %b.0, <4 x float> %b.1, <4 x float> %b.2, <4 x float> %b.3, <4 x float> %c.0, <4 x float> %c.1, <4 x float> %c.2, <4 x float> %c.3, <4 x float> %d.0, <4 x float> %d.1, <4 x float> %d.2, <4 x float> %d.3) -// Lin32: define x86_regcallcc %struct.HFA6 @__regcall3__ret_reg_reused(<4 x float> %a.0, <4 x float> %a.1, <4 x float> %a.2, <4 x float> %a.3, <4 x float> %b.0, <4 x float> %b.1, <4 x float> %b.2, <4 x float> %b.3, %struct.HFA6* inreg %c, %struct.HFA6* inreg %d) -// Lin64: define x86_regcallcc %struct.HFA6 @__regcall3__ret_reg_reused([4 x <4 x float>] %a.coerce, [4 x <4 x float>] %b.coerce, [4 x <4 x float>] %c.coerce, [4 x <4 x float>] %d.coerce) +// Lin32: define dso_local x86_regcallcc %struct.HFA6 @__regcall3__ret_reg_reused(<4 x float> %a.0, <4 x float> %a.1, <4 x float> %a.2, <4 x float> %a.3, <4 x float> %b.0, <4 x float> %b.1, <4 x float> %b.2, <4 x float> %b.3, %struct.HFA6* inreg %c, %struct.HFA6* inreg %d) +// Lin64: define dso_local x86_regcallcc %struct.HFA6 @__regcall3__ret_reg_reused([4 x <4 x float>] %a.coerce, [4 x <4 x float>] %b.coerce, [4 x <4 x float>] %c.coerce, [4 x <4 x float>] %d.coerce) diff --git a/clang/test/CodeGen/regparm.c b/clang/test/CodeGen/regparm.c index 151c58f958bd..2b4462a41c35 100644 --- a/clang/test/CodeGen/regparm.c +++ b/clang/test/CodeGen/regparm.c @@ -15,7 +15,7 @@ extern void FASTCALL reduced(char b, double c, foo* d, double e, int f); // PR7025 void FASTCALL f1(int i, int j, int k); -// CHECK-LABEL: define void @f1(i32 inreg %i, i32 inreg %j, i32 %k) +// CHECK-LABEL: define dso_local void @f1(i32 inreg %i, i32 inreg %j, i32 %k) void f1(int i, int j, int k) { } int diff --git a/clang/test/CodeGen/riscv-inline-asm.c b/clang/test/CodeGen/riscv-inline-asm.c index 2c92d15ca90a..621fdbb785c0 100644 --- a/clang/test/CodeGen/riscv-inline-asm.c +++ b/clang/test/CodeGen/riscv-inline-asm.c @@ -6,7 +6,7 @@ // Test RISC-V specific inline assembly constraints. void test_I() { -// CHECK-LABEL: define void @test_I() +// CHECK-LABEL: define dso_local void @test_I() // CHECK: call void asm sideeffect "", "I"(i32 2047) asm volatile ("" :: "I"(2047)); // CHECK: call void asm sideeffect "", "I"(i32 -2048) @@ -14,13 +14,13 @@ void test_I() { } void test_J() { -// CHECK-LABEL: define void @test_J() +// CHECK-LABEL: define dso_local void @test_J() // CHECK: call void asm sideeffect "", "J"(i32 0) asm volatile ("" :: "J"(0)); } void test_K() { -// CHECK-LABEL: define void @test_K() +// CHECK-LABEL: define dso_local void @test_K() // CHECK: call void asm sideeffect "", "K"(i32 31) asm volatile ("" :: "K"(31)); // CHECK: call void asm sideeffect "", "K"(i32 0) @@ -30,7 +30,7 @@ void test_K() { float f; double d; void test_f() { -// CHECK-LABEL: define void @test_f() +// CHECK-LABEL: define dso_local void @test_f() // CHECK: [[FLT_ARG:%[a-zA-Z_0-9]+]] = load float, float* @f // CHECK: call void asm sideeffect "", "f"(float [[FLT_ARG]]) asm volatile ("" :: "f"(f)); @@ -40,7 +40,7 @@ void test_f() { } void test_A(int *p) { -// CHECK-LABEL: define void @test_A(i32* %p) +// CHECK-LABEL: define dso_local void @test_A(i32* %p) // CHECK: call void asm sideeffect "", "*A"(i32* %p) asm volatile("" :: "A"(*p)); } diff --git a/clang/test/CodeGen/riscv32-ilp32-abi.c b/clang/test/CodeGen/riscv32-ilp32-abi.c index 59f0bb568372..8cc3ef295bc7 100644 --- a/clang/test/CodeGen/riscv32-ilp32-abi.c +++ b/clang/test/CodeGen/riscv32-ilp32-abi.c @@ -25,7 +25,7 @@ struct large { // Scalars passed on the stack should not have signext/zeroext attributes // (they are anyext). -// CHECK-LABEL: define i32 @f_scalar_stack_1(i32 %a, i64 %b, float %c, double %d, fp128 %e, i8 zeroext %f, i8 %g, i8 %h) +// CHECK-LABEL: define dso_local i32 @f_scalar_stack_1(i32 %a, i64 %b, float %c, double %d, fp128 %e, i8 zeroext %f, i8 %g, i8 %h) int f_scalar_stack_1(int32_t a, int64_t b, float c, double d, long double e, uint8_t f, int8_t g, uint8_t h) { return g + h; @@ -35,7 +35,7 @@ int f_scalar_stack_1(int32_t a, int64_t b, float c, double d, long double e, // the presence of large return values that consume a register due to the need // to pass a pointer. -// CHECK-LABEL: define void @f_scalar_stack_2(%struct.large* noalias sret %agg.result, float %a, i64 %b, double %c, fp128 %d, i8 zeroext %e, i8 %f, i8 %g) +// CHECK-LABEL: define dso_local void @f_scalar_stack_2(%struct.large* noalias sret %agg.result, float %a, i64 %b, double %c, fp128 %d, i8 zeroext %e, i8 %f, i8 %g) struct large f_scalar_stack_2(float a, int64_t b, double c, long double d, uint8_t e, int8_t f, uint8_t g) { return (struct large){a, e, f, g}; @@ -44,10 +44,10 @@ struct large f_scalar_stack_2(float a, int64_t b, double c, long double d, // Aggregates and >=XLen scalars passed on the stack should be lowered just as // they would be if passed via registers. -// CHECK-LABEL: define void @f_scalar_stack_3(double %a, i64 %b, double %c, i64 %d, i32 %e, i64 %f, float %g, double %h, fp128 %i) +// CHECK-LABEL: define dso_local void @f_scalar_stack_3(double %a, i64 %b, double %c, i64 %d, i32 %e, i64 %f, float %g, double %h, fp128 %i) void f_scalar_stack_3(double a, int64_t b, double c, int64_t d, int e, int64_t f, float g, double h, long double i) {} -// CHECK-LABEL: define void @f_agg_stack(double %a, i64 %b, double %c, i64 %d, i32 %e.coerce, [2 x i32] %f.coerce, i64 %g.coerce, %struct.large* %h) +// CHECK-LABEL: define dso_local void @f_agg_stack(double %a, i64 %b, double %c, i64 %d, i32 %e.coerce, [2 x i32] %f.coerce, i64 %g.coerce, %struct.large* %h) void f_agg_stack(double a, int64_t b, double c, int64_t d, struct tiny e, struct small f, struct small_aligned g, struct large h) {} diff --git a/clang/test/CodeGen/riscv32-ilp32-ilp32f-abi.c b/clang/test/CodeGen/riscv32-ilp32-ilp32f-abi.c index 677040626f57..80edfa443567 100644 --- a/clang/test/CodeGen/riscv32-ilp32-ilp32f-abi.c +++ b/clang/test/CodeGen/riscv32-ilp32-ilp32f-abi.c @@ -27,7 +27,7 @@ struct large { // Scalars passed on the stack should not have signext/zeroext attributes // (they are anyext). -// CHECK-LABEL: define i32 @f_scalar_stack_1(i32 %a, i64 %b, i32 %c, double %d, fp128 %e, i8 zeroext %f, i8 %g, i8 %h) +// CHECK-LABEL: define dso_local i32 @f_scalar_stack_1(i32 %a, i64 %b, i32 %c, double %d, fp128 %e, i8 zeroext %f, i8 %g, i8 %h) int f_scalar_stack_1(int32_t a, int64_t b, int32_t c, double d, long double e, uint8_t f, int8_t g, uint8_t h) { return g + h; @@ -37,7 +37,7 @@ int f_scalar_stack_1(int32_t a, int64_t b, int32_t c, double d, long double e, // the presence of large return values that consume a register due to the need // to pass a pointer. -// CHECK-LABEL: define void @f_scalar_stack_2(%struct.large* noalias sret %agg.result, i32 %a, i64 %b, double %c, fp128 %d, i8 zeroext %e, i8 %f, i8 %g) +// CHECK-LABEL: define dso_local void @f_scalar_stack_2(%struct.large* noalias sret %agg.result, i32 %a, i64 %b, double %c, fp128 %d, i8 zeroext %e, i8 %f, i8 %g) struct large f_scalar_stack_2(int32_t a, int64_t b, double c, long double d, uint8_t e, int8_t f, uint8_t g) { return (struct large){a, e, f, g}; @@ -46,10 +46,10 @@ struct large f_scalar_stack_2(int32_t a, int64_t b, double c, long double d, // Aggregates and >=XLen scalars passed on the stack should be lowered just as // they would be if passed via registers. -// CHECK-LABEL: define void @f_scalar_stack_3(double %a, i64 %b, double %c, i64 %d, i32 %e, i64 %f, i32 %g, double %h, fp128 %i) +// CHECK-LABEL: define dso_local void @f_scalar_stack_3(double %a, i64 %b, double %c, i64 %d, i32 %e, i64 %f, i32 %g, double %h, fp128 %i) void f_scalar_stack_3(double a, int64_t b, double c, int64_t d, int e, int64_t f, int32_t g, double h, long double i) {} -// CHECK-LABEL: define void @f_agg_stack(double %a, i64 %b, double %c, i64 %d, i32 %e.coerce, [2 x i32] %f.coerce, i64 %g.coerce, %struct.large* %h) +// CHECK-LABEL: define dso_local void @f_agg_stack(double %a, i64 %b, double %c, i64 %d, i32 %e.coerce, [2 x i32] %f.coerce, i64 %g.coerce, %struct.large* %h) void f_agg_stack(double a, int64_t b, double c, int64_t d, struct tiny e, struct small f, struct small_aligned g, struct large h) {} diff --git a/clang/test/CodeGen/riscv32-ilp32-ilp32f-ilp32d-abi.c b/clang/test/CodeGen/riscv32-ilp32-ilp32f-ilp32d-abi.c index 86ad8fd370bc..f1135f25d34f 100644 --- a/clang/test/CodeGen/riscv32-ilp32-ilp32f-ilp32d-abi.c +++ b/clang/test/CodeGen/riscv32-ilp32-ilp32f-ilp32d-abi.c @@ -12,57 +12,57 @@ #include <stddef.h> #include <stdint.h> -// CHECK-LABEL: define void @f_void() +// CHECK-LABEL: define dso_local void @f_void() void f_void(void) {} // Scalar arguments and return values smaller than the word size are extended // according to the sign of their type, up to 32 bits -// CHECK-LABEL: define zeroext i1 @f_scalar_0(i1 zeroext %x) +// CHECK-LABEL: define dso_local zeroext i1 @f_scalar_0(i1 zeroext %x) _Bool f_scalar_0(_Bool x) { return x; } -// CHECK-LABEL: define signext i8 @f_scalar_1(i8 signext %x) +// CHECK-LABEL: define dso_local signext i8 @f_scalar_1(i8 signext %x) int8_t f_scalar_1(int8_t x) { return x; } -// CHECK-LABEL: define zeroext i8 @f_scalar_2(i8 zeroext %x) +// CHECK-LABEL: define dso_local zeroext i8 @f_scalar_2(i8 zeroext %x) uint8_t f_scalar_2(uint8_t x) { return x; } -// CHECK-LABEL: define i32 @f_scalar_3(i32 %x) +// CHECK-LABEL: define dso_local i32 @f_scalar_3(i32 %x) int32_t f_scalar_3(int32_t x) { return x; } -// CHECK-LABEL: define i64 @f_scalar_4(i64 %x) +// CHECK-LABEL: define dso_local i64 @f_scalar_4(i64 %x) int64_t f_scalar_4(int64_t x) { return x; } #ifdef __SIZEOF_INT128__ -// CHECK-FORCEINT128-LABEL: define i128 @f_scalar_5(i128 %x) +// CHECK-FORCEINT128-LABEL: define dso_local i128 @f_scalar_5(i128 %x) __int128_t f_scalar_5(__int128_t x) { return x; } #endif -// CHECK-LABEL: define float @f_fp_scalar_1(float %x) +// CHECK-LABEL: define dso_local float @f_fp_scalar_1(float %x) float f_fp_scalar_1(float x) { return x; } -// CHECK-LABEL: define double @f_fp_scalar_2(double %x) +// CHECK-LABEL: define dso_local double @f_fp_scalar_2(double %x) double f_fp_scalar_2(double x) { return x; } // Scalars larger than 2*xlen are passed/returned indirect. However, the // RISC-V LLVM backend can handle this fine, so the function doesn't need to // be modified. -// CHECK-LABEL: define fp128 @f_fp_scalar_3(fp128 %x) +// CHECK-LABEL: define dso_local fp128 @f_fp_scalar_3(fp128 %x) long double f_fp_scalar_3(long double x) { return x; } // Empty structs or unions are ignored. struct empty_s {}; -// CHECK-LABEL: define void @f_agg_empty_struct() +// CHECK-LABEL: define dso_local void @f_agg_empty_struct() struct empty_s f_agg_empty_struct(struct empty_s x) { return x; } union empty_u {}; -// CHECK-LABEL: define void @f_agg_empty_union() +// CHECK-LABEL: define dso_local void @f_agg_empty_union() union empty_u f_agg_empty_union(union empty_u x) { return x; } @@ -74,13 +74,13 @@ struct tiny { uint8_t a, b, c, d; }; -// CHECK-LABEL: define void @f_agg_tiny(i32 %x.coerce) +// CHECK-LABEL: define dso_local void @f_agg_tiny(i32 %x.coerce) void f_agg_tiny(struct tiny x) { x.a += x.b; x.c += x.d; } -// CHECK-LABEL: define i32 @f_agg_tiny_ret() +// CHECK-LABEL: define dso_local i32 @f_agg_tiny_ret() struct tiny f_agg_tiny_ret() { return (struct tiny){1, 2, 3, 4}; } @@ -88,23 +88,23 @@ struct tiny f_agg_tiny_ret() { typedef uint8_t v4i8 __attribute__((vector_size(4))); typedef int32_t v1i32 __attribute__((vector_size(4))); -// CHECK-LABEL: define void @f_vec_tiny_v4i8(i32 %x.coerce) +// CHECK-LABEL: define dso_local void @f_vec_tiny_v4i8(i32 %x.coerce) void f_vec_tiny_v4i8(v4i8 x) { x[0] = x[1]; x[2] = x[3]; } -// CHECK-LABEL: define i32 @f_vec_tiny_v4i8_ret() +// CHECK-LABEL: define dso_local i32 @f_vec_tiny_v4i8_ret() v4i8 f_vec_tiny_v4i8_ret() { return (v4i8){1, 2, 3, 4}; } -// CHECK-LABEL: define void @f_vec_tiny_v1i32(i32 %x.coerce) +// CHECK-LABEL: define dso_local void @f_vec_tiny_v1i32(i32 %x.coerce) void f_vec_tiny_v1i32(v1i32 x) { x[0] = 114; } -// CHECK-LABEL: define i32 @f_vec_tiny_v1i32_ret() +// CHECK-LABEL: define dso_local i32 @f_vec_tiny_v1i32_ret() v1i32 f_vec_tiny_v1i32_ret() { return (v1i32){1}; } @@ -113,13 +113,13 @@ struct small { int32_t a, *b; }; -// CHECK-LABEL: define void @f_agg_small([2 x i32] %x.coerce) +// CHECK-LABEL: define dso_local void @f_agg_small([2 x i32] %x.coerce) void f_agg_small(struct small x) { x.a += *x.b; x.b = &x.a; } -// CHECK-LABEL: define [2 x i32] @f_agg_small_ret() +// CHECK-LABEL: define dso_local [2 x i32] @f_agg_small_ret() struct small f_agg_small_ret() { return (struct small){1, 0}; } @@ -127,22 +127,22 @@ struct small f_agg_small_ret() { typedef uint8_t v8i8 __attribute__((vector_size(8))); typedef int64_t v1i64 __attribute__((vector_size(8))); -// CHECK-LABEL: define void @f_vec_small_v8i8(i64 %x.coerce) +// CHECK-LABEL: define dso_local void @f_vec_small_v8i8(i64 %x.coerce) void f_vec_small_v8i8(v8i8 x) { x[0] = x[7]; } -// CHECK-LABEL: define i64 @f_vec_small_v8i8_ret() +// CHECK-LABEL: define dso_local i64 @f_vec_small_v8i8_ret() v8i8 f_vec_small_v8i8_ret() { return (v8i8){1, 2, 3, 4, 5, 6, 7, 8}; } -// CHECK-LABEL: define void @f_vec_small_v1i64(i64 %x.coerce) +// CHECK-LABEL: define dso_local void @f_vec_small_v1i64(i64 %x.coerce) void f_vec_small_v1i64(v1i64 x) { x[0] = 114; } -// CHECK-LABEL: define i64 @f_vec_small_v1i64_ret() +// CHECK-LABEL: define dso_local i64 @f_vec_small_v1i64_ret() v1i64 f_vec_small_v1i64_ret() { return (v1i64){1}; } @@ -155,12 +155,12 @@ struct small_aligned { int64_t a; }; -// CHECK-LABEL: define void @f_agg_small_aligned(i64 %x.coerce) +// CHECK-LABEL: define dso_local void @f_agg_small_aligned(i64 %x.coerce) void f_agg_small_aligned(struct small_aligned x) { x.a += x.a; } -// CHECK-LABEL: define i64 @f_agg_small_aligned_ret(i64 %x.coerce) +// CHECK-LABEL: define dso_local i64 @f_agg_small_aligned_ret(i64 %x.coerce) struct small_aligned f_agg_small_aligned_ret(struct small_aligned x) { return (struct small_aligned){10}; } @@ -170,26 +170,26 @@ struct large { int32_t a, b, c, d; }; -// CHECK-LABEL: define void @f_agg_large(%struct.large* %x) +// CHECK-LABEL: define dso_local void @f_agg_large(%struct.large* %x) void f_agg_large(struct large x) { x.a = x.b + x.c + x.d; } // The address where the struct should be written to will be the first // argument -// CHECK-LABEL: define void @f_agg_large_ret(%struct.large* noalias sret %agg.result, i32 %i, i8 signext %j) +// CHECK-LABEL: define dso_local void @f_agg_large_ret(%struct.large* noalias sret %agg.result, i32 %i, i8 signext %j) struct large f_agg_large_ret(int32_t i, int8_t j) { return (struct large){1, 2, 3, 4}; } typedef unsigned char v16i8 __attribute__((vector_size(16))); -// CHECK-LABEL: define void @f_vec_large_v16i8(<16 x i8>* %0) +// CHECK-LABEL: define dso_local void @f_vec_large_v16i8(<16 x i8>* %0) void f_vec_large_v16i8(v16i8 x) { x[0] = x[7]; } -// CHECK-LABEL: define void @f_vec_large_v16i8_ret(<16 x i8>* noalias sret %agg.result) +// CHECK-LABEL: define dso_local void @f_vec_large_v16i8_ret(<16 x i8>* noalias sret %agg.result) v16i8 f_vec_large_v16i8_ret() { return (v16i8){1, 2, 3, 4, 5, 6, 7, 8}; } @@ -197,7 +197,7 @@ v16i8 f_vec_large_v16i8_ret() { // Scalars passed on the stack should not have signext/zeroext attributes // (they are anyext). -// CHECK-LABEL: define i32 @f_scalar_stack_1(i32 %a.coerce, [2 x i32] %b.coerce, i64 %c.coerce, %struct.large* %d, i8 zeroext %e, i8 signext %f, i8 %g, i8 %h) +// CHECK-LABEL: define dso_local i32 @f_scalar_stack_1(i32 %a.coerce, [2 x i32] %b.coerce, i64 %c.coerce, %struct.large* %d, i8 zeroext %e, i8 signext %f, i8 %g, i8 %h) int f_scalar_stack_1(struct tiny a, struct small b, struct small_aligned c, struct large d, uint8_t e, int8_t f, uint8_t g, int8_t h) { return g + h; @@ -207,13 +207,13 @@ int f_scalar_stack_1(struct tiny a, struct small b, struct small_aligned c, // the presence of large return values that consume a register due to the need // to pass a pointer. -// CHECK-LABEL: define void @f_scalar_stack_2(%struct.large* noalias sret %agg.result, i32 %a, i64 %b, i64 %c, fp128 %d, i8 zeroext %e, i8 %f, i8 %g) +// CHECK-LABEL: define dso_local void @f_scalar_stack_2(%struct.large* noalias sret %agg.result, i32 %a, i64 %b, i64 %c, fp128 %d, i8 zeroext %e, i8 %f, i8 %g) struct large f_scalar_stack_2(int32_t a, int64_t b, int64_t c, long double d, uint8_t e, int8_t f, uint8_t g) { return (struct large){a, e, f, g}; } -// CHECK-LABEL: define fp128 @f_scalar_stack_4(i32 %a, i64 %b, i64 %c, fp128 %d, i8 zeroext %e, i8 %f, i8 %g) +// CHECK-LABEL: define dso_local fp128 @f_scalar_stack_4(i32 %a, i64 %b, i64 %c, fp128 %d, i8 zeroext %e, i8 %f, i8 %g) long double f_scalar_stack_4(int32_t a, int64_t b, int64_t c, long double d, uint8_t e, int8_t f, uint8_t g) { return d; @@ -222,11 +222,11 @@ long double f_scalar_stack_4(int32_t a, int64_t b, int64_t c, long double d, // Aggregates and >=XLen scalars passed on the stack should be lowered just as // they would be if passed via registers. -// CHECK-LABEL: define void @f_scalar_stack_5(double %a, i64 %b, double %c, i64 %d, i32 %e, i64 %f, float %g, double %h, fp128 %i) +// CHECK-LABEL: define dso_local void @f_scalar_stack_5(double %a, i64 %b, double %c, i64 %d, i32 %e, i64 %f, float %g, double %h, fp128 %i) void f_scalar_stack_5(double a, int64_t b, double c, int64_t d, int e, int64_t f, float g, double h, long double i) {} -// CHECK-LABEL: define void @f_agg_stack(double %a, i64 %b, double %c, i64 %d, i32 %e.coerce, [2 x i32] %f.coerce, i64 %g.coerce, %struct.large* %h) +// CHECK-LABEL: define dso_local void @f_agg_stack(double %a, i64 %b, double %c, i64 %d, i32 %e.coerce, [2 x i32] %f.coerce, i64 %g.coerce, %struct.large* %h) void f_agg_stack(double a, int64_t b, double c, int64_t d, struct tiny e, struct small f, struct small_aligned g, struct large h) {} @@ -236,7 +236,7 @@ void f_agg_stack(double a, int64_t b, double c, int64_t d, struct tiny e, int f_va_callee(int, ...); -// CHECK-LABEL: define void @f_va_caller() +// CHECK-LABEL: define dso_local void @f_va_caller() // CHECK: call i32 (i32, ...) @f_va_callee(i32 1, i32 2, i64 3, double 4.000000e+00, double 5.000000e+00, i32 {{%.*}}, [2 x i32] {{%.*}}, i64 {{%.*}}, %struct.large* {{%.*}}) void f_va_caller() { f_va_callee(1, 2, 3LL, 4.0f, 5.0, (struct tiny){6, 7, 8, 9}, @@ -244,7 +244,7 @@ void f_va_caller() { (struct large){12, 13, 14, 15}); } -// CHECK-LABEL: define i32 @f_va_1(i8* %fmt, ...) {{.*}} { +// CHECK-LABEL: define dso_local i32 @f_va_1(i8* %fmt, ...) {{.*}} { // CHECK: [[FMT_ADDR:%.*]] = alloca i8*, align 4 // CHECK: [[VA:%.*]] = alloca i8*, align 4 // CHECK: [[V:%.*]] = alloca i32, align 4 @@ -362,7 +362,7 @@ double f_va_3(char *fmt, ...) { return v + x; } -// CHECK-LABEL: define i32 @f_va_4(i8* %fmt, ...) {{.*}} { +// CHECK-LABEL: define dso_local i32 @f_va_4(i8* %fmt, ...) {{.*}} { // CHECK: [[FMT_ADDR:%.*]] = alloca i8*, align 4 // CHECK-NEXT: [[VA:%.*]] = alloca i8*, align 4 // CHECK-NEXT: [[V:%.*]] = alloca i32, align 4 diff --git a/clang/test/CodeGen/riscv32-ilp32d-abi.c b/clang/test/CodeGen/riscv32-ilp32d-abi.c index b5b451cee151..fd74f05544c9 100644 --- a/clang/test/CodeGen/riscv32-ilp32d-abi.c +++ b/clang/test/CodeGen/riscv32-ilp32d-abi.c @@ -9,7 +9,7 @@ // Doubles are passed in FPRs, so argument 'i' will be passed zero-extended // because it will be passed in a GPR. -// CHECK: define void @f_fpr_tracking(double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, i8 zeroext %i) +// CHECK: define dso_local void @f_fpr_tracking(double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, i8 zeroext %i) void f_fpr_tracking(double a, double b, double c, double d, double e, double f, double g, double h, uint8_t i) {} @@ -25,10 +25,10 @@ void f_fpr_tracking(double a, double b, double c, double d, double e, double f, struct double_s { double f; }; -// CHECK: define void @f_double_s_arg(double %0) +// CHECK: define dso_local void @f_double_s_arg(double %0) void f_double_s_arg(struct double_s a) {} -// CHECK: define double @f_ret_double_s() +// CHECK: define dso_local double @f_ret_double_s() struct double_s f_ret_double_s() { return (struct double_s){1.0}; } @@ -39,18 +39,18 @@ struct double_s f_ret_double_s() { struct zbf_double_s { int : 0; double f; }; struct zbf_double_zbf_s { int : 0; double f; int : 0; }; -// CHECK: define void @f_zbf_double_s_arg(double %0) +// CHECK: define dso_local void @f_zbf_double_s_arg(double %0) void f_zbf_double_s_arg(struct zbf_double_s a) {} -// CHECK: define double @f_ret_zbf_double_s() +// CHECK: define dso_local double @f_ret_zbf_double_s() struct zbf_double_s f_ret_zbf_double_s() { return (struct zbf_double_s){1.0}; } -// CHECK: define void @f_zbf_double_zbf_s_arg(double %0) +// CHECK: define dso_local void @f_zbf_double_zbf_s_arg(double %0) void f_zbf_double_zbf_s_arg(struct zbf_double_zbf_s a) {} -// CHECK: define double @f_ret_zbf_double_zbf_s() +// CHECK: define dso_local double @f_ret_zbf_double_zbf_s() struct zbf_double_zbf_s f_ret_zbf_double_zbf_s() { return (struct zbf_double_zbf_s){1.0}; } @@ -61,23 +61,23 @@ struct zbf_double_zbf_s f_ret_zbf_double_zbf_s() { struct double_double_s { double f; double g; }; struct double_float_s { double f; float g; }; -// CHECK: define void @f_double_double_s_arg(double %0, double %1) +// CHECK: define dso_local void @f_double_double_s_arg(double %0, double %1) void f_double_double_s_arg(struct double_double_s a) {} -// CHECK: define { double, double } @f_ret_double_double_s() +// CHECK: define dso_local { double, double } @f_ret_double_double_s() struct double_double_s f_ret_double_double_s() { return (struct double_double_s){1.0, 2.0}; } -// CHECK: define void @f_double_float_s_arg(double %0, float %1) +// CHECK: define dso_local void @f_double_float_s_arg(double %0, float %1) void f_double_float_s_arg(struct double_float_s a) {} -// CHECK: define { double, float } @f_ret_double_float_s() +// CHECK: define dso_local { double, float } @f_ret_double_float_s() struct double_float_s f_ret_double_float_s() { return (struct double_float_s){1.0, 2.0}; } -// CHECK: define void @f_double_double_s_arg_insufficient_fprs(float %a, double %b, double %c, double %d, double %e, double %f, double %g, %struct.double_double_s* %h) +// CHECK: define dso_local void @f_double_double_s_arg_insufficient_fprs(float %a, double %b, double %c, double %d, double %e, double %f, double %g, %struct.double_double_s* %h) void f_double_double_s_arg_insufficient_fprs(float a, double b, double c, double d, double e, double f, double g, struct double_double_s h) {} @@ -92,42 +92,42 @@ struct double_int64_s { double f; int64_t i; }; struct double_int64bf_s { double f; int64_t i : 32; }; struct double_int8_zbf_s { double f; int8_t i; int : 0; }; -// CHECK: define void @f_double_int8_s_arg(double %0, i8 %1) +// CHECK: define dso_local void @f_double_int8_s_arg(double %0, i8 %1) void f_double_int8_s_arg(struct double_int8_s a) {} -// CHECK: define { double, i8 } @f_ret_double_int8_s() +// CHECK: define dso_local { double, i8 } @f_ret_double_int8_s() struct double_int8_s f_ret_double_int8_s() { return (struct double_int8_s){1.0, 2}; } -// CHECK: define void @f_double_uint8_s_arg(double %0, i8 %1) +// CHECK: define dso_local void @f_double_uint8_s_arg(double %0, i8 %1) void f_double_uint8_s_arg(struct double_uint8_s a) {} -// CHECK: define { double, i8 } @f_ret_double_uint8_s() +// CHECK: define dso_local { double, i8 } @f_ret_double_uint8_s() struct double_uint8_s f_ret_double_uint8_s() { return (struct double_uint8_s){1.0, 2}; } -// CHECK: define void @f_double_int32_s_arg(double %0, i32 %1) +// CHECK: define dso_local void @f_double_int32_s_arg(double %0, i32 %1) void f_double_int32_s_arg(struct double_int32_s a) {} -// CHECK: define { double, i32 } @f_ret_double_int32_s() +// CHECK: define dso_local { double, i32 } @f_ret_double_int32_s() struct double_int32_s f_ret_double_int32_s() { return (struct double_int32_s){1.0, 2}; } -// CHECK: define void @f_double_int64_s_arg(%struct.double_int64_s* %a) +// CHECK: define dso_local void @f_double_int64_s_arg(%struct.double_int64_s* %a) void f_double_int64_s_arg(struct double_int64_s a) {} -// CHECK: define void @f_ret_double_int64_s(%struct.double_int64_s* noalias sret %agg.result) +// CHECK: define dso_local void @f_ret_double_int64_s(%struct.double_int64_s* noalias sret %agg.result) struct double_int64_s f_ret_double_int64_s() { return (struct double_int64_s){1.0, 2}; } -// CHECK: define void @f_double_int64bf_s_arg(double %0, i32 %1) +// CHECK: define dso_local void @f_double_int64bf_s_arg(double %0, i32 %1) void f_double_int64bf_s_arg(struct double_int64bf_s a) {} -// CHECK: define { double, i32 } @f_ret_double_int64bf_s() +// CHECK: define dso_local { double, i32 } @f_ret_double_int64bf_s() struct double_int64bf_s f_ret_double_int64bf_s() { return (struct double_int64bf_s){1.0, 2}; } @@ -135,39 +135,39 @@ struct double_int64bf_s f_ret_double_int64bf_s() { // The zero-width bitfield means the struct can't be passed according to the // floating point calling convention. -// CHECK: define void @f_double_int8_zbf_s(double %0, i8 %1) +// CHECK: define dso_local void @f_double_int8_zbf_s(double %0, i8 %1) void f_double_int8_zbf_s(struct double_int8_zbf_s a) {} -// CHECK: define { double, i8 } @f_ret_double_int8_zbf_s() +// CHECK: define dso_local { double, i8 } @f_ret_double_int8_zbf_s() struct double_int8_zbf_s f_ret_double_int8_zbf_s() { return (struct double_int8_zbf_s){1.0, 2}; } -// CHECK: define void @f_double_int8_s_arg_insufficient_gprs(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, i32 %h, %struct.double_int8_s* %i) +// CHECK: define dso_local void @f_double_int8_s_arg_insufficient_gprs(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, i32 %h, %struct.double_int8_s* %i) void f_double_int8_s_arg_insufficient_gprs(int a, int b, int c, int d, int e, int f, int g, int h, struct double_int8_s i) {} -// CHECK: define void @f_struct_double_int8_insufficient_fprs(float %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, %struct.double_int8_s* %i) +// CHECK: define dso_local void @f_struct_double_int8_insufficient_fprs(float %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, %struct.double_int8_s* %i) void f_struct_double_int8_insufficient_fprs(float a, double b, double c, double d, double e, double f, double g, double h, struct double_int8_s i) {} // Complex floating-point values or structs containing a single complex // floating-point value should be passed as if it were an fp+fp struct. -// CHECK: define void @f_doublecomplex(double %a.coerce0, double %a.coerce1) +// CHECK: define dso_local void @f_doublecomplex(double %a.coerce0, double %a.coerce1) void f_doublecomplex(double __complex__ a) {} -// CHECK: define { double, double } @f_ret_doublecomplex() +// CHECK: define dso_local { double, double } @f_ret_doublecomplex() double __complex__ f_ret_doublecomplex() { return 1.0; } struct doublecomplex_s { double __complex__ c; }; -// CHECK: define void @f_doublecomplex_s_arg(double %0, double %1) +// CHECK: define dso_local void @f_doublecomplex_s_arg(double %0, double %1) void f_doublecomplex_s_arg(struct doublecomplex_s a) {} -// CHECK: define { double, double } @f_ret_doublecomplex_s() +// CHECK: define dso_local { double, double } @f_ret_doublecomplex_s() struct doublecomplex_s f_ret_doublecomplex_s() { return (struct doublecomplex_s){1.0}; } @@ -177,60 +177,60 @@ struct doublecomplex_s f_ret_doublecomplex_s() { struct doublearr1_s { double a[1]; }; -// CHECK: define void @f_doublearr1_s_arg(double %0) +// CHECK: define dso_local void @f_doublearr1_s_arg(double %0) void f_doublearr1_s_arg(struct doublearr1_s a) {} -// CHECK: define double @f_ret_doublearr1_s() +// CHECK: define dso_local double @f_ret_doublearr1_s() struct doublearr1_s f_ret_doublearr1_s() { return (struct doublearr1_s){{1.0}}; } struct doublearr2_s { double a[2]; }; -// CHECK: define void @f_doublearr2_s_arg(double %0, double %1) +// CHECK: define dso_local void @f_doublearr2_s_arg(double %0, double %1) void f_doublearr2_s_arg(struct doublearr2_s a) {} -// CHECK: define { double, double } @f_ret_doublearr2_s() +// CHECK: define dso_local { double, double } @f_ret_doublearr2_s() struct doublearr2_s f_ret_doublearr2_s() { return (struct doublearr2_s){{1.0, 2.0}}; } struct doublearr2_tricky1_s { struct { double f[1]; } g[2]; }; -// CHECK: define void @f_doublearr2_tricky1_s_arg(double %0, double %1) +// CHECK: define dso_local void @f_doublearr2_tricky1_s_arg(double %0, double %1) void f_doublearr2_tricky1_s_arg(struct doublearr2_tricky1_s a) {} -// CHECK: define { double, double } @f_ret_doublearr2_tricky1_s() +// CHECK: define dso_local { double, double } @f_ret_doublearr2_tricky1_s() struct doublearr2_tricky1_s f_ret_doublearr2_tricky1_s() { return (struct doublearr2_tricky1_s){{{{1.0}}, {{2.0}}}}; } struct doublearr2_tricky2_s { struct {}; struct { double f[1]; } g[2]; }; -// CHECK: define void @f_doublearr2_tricky2_s_arg(double %0, double %1) +// CHECK: define dso_local void @f_doublearr2_tricky2_s_arg(double %0, double %1) void f_doublearr2_tricky2_s_arg(struct doublearr2_tricky2_s a) {} -// CHECK: define { double, double } @f_ret_doublearr2_tricky2_s() +// CHECK: define dso_local { double, double } @f_ret_doublearr2_tricky2_s() struct doublearr2_tricky2_s f_ret_doublearr2_tricky2_s() { return (struct doublearr2_tricky2_s){{}, {{{1.0}}, {{2.0}}}}; } struct doublearr2_tricky3_s { union {}; struct { double f[1]; } g[2]; }; -// CHECK: define void @f_doublearr2_tricky3_s_arg(double %0, double %1) +// CHECK: define dso_local void @f_doublearr2_tricky3_s_arg(double %0, double %1) void f_doublearr2_tricky3_s_arg(struct doublearr2_tricky3_s a) {} -// CHECK: define { double, double } @f_ret_doublearr2_tricky3_s() +// CHECK: define dso_local { double, double } @f_ret_doublearr2_tricky3_s() struct doublearr2_tricky3_s f_ret_doublearr2_tricky3_s() { return (struct doublearr2_tricky3_s){{}, {{{1.0}}, {{2.0}}}}; } struct doublearr2_tricky4_s { union {}; struct { struct {}; double f[1]; } g[2]; }; -// CHECK: define void @f_doublearr2_tricky4_s_arg(double %0, double %1) +// CHECK: define dso_local void @f_doublearr2_tricky4_s_arg(double %0, double %1) void f_doublearr2_tricky4_s_arg(struct doublearr2_tricky4_s a) {} -// CHECK: define { double, double } @f_ret_doublearr2_tricky4_s() +// CHECK: define dso_local { double, double } @f_ret_doublearr2_tricky4_s() struct doublearr2_tricky4_s f_ret_doublearr2_tricky4_s() { return (struct doublearr2_tricky4_s){{}, {{{}, {1.0}}, {{}, {2.0}}}}; } @@ -240,30 +240,30 @@ struct doublearr2_tricky4_s f_ret_doublearr2_tricky4_s() { struct int_double_int_s { int a; double b; int c; }; -// CHECK: define void @f_int_double_int_s_arg(%struct.int_double_int_s* %a) +// CHECK: define dso_local void @f_int_double_int_s_arg(%struct.int_double_int_s* %a) void f_int_double_int_s_arg(struct int_double_int_s a) {} -// CHECK: define void @f_ret_int_double_int_s(%struct.int_double_int_s* noalias sret %agg.result) +// CHECK: define dso_local void @f_ret_int_double_int_s(%struct.int_double_int_s* noalias sret %agg.result) struct int_double_int_s f_ret_int_double_int_s() { return (struct int_double_int_s){1, 2.0, 3}; } struct int64_double_s { int64_t a; double b; }; -// CHECK: define void @f_int64_double_s_arg(%struct.int64_double_s* %a) +// CHECK: define dso_local void @f_int64_double_s_arg(%struct.int64_double_s* %a) void f_int64_double_s_arg(struct int64_double_s a) {} -// CHECK: define void @f_ret_int64_double_s(%struct.int64_double_s* noalias sret %agg.result) +// CHECK: define dso_local void @f_ret_int64_double_s(%struct.int64_double_s* noalias sret %agg.result) struct int64_double_s f_ret_int64_double_s() { return (struct int64_double_s){1, 2.0}; } struct char_char_double_s { char a; char b; double c; }; -// CHECK-LABEL: define void @f_char_char_double_s_arg(%struct.char_char_double_s* %a) +// CHECK-LABEL: define dso_local void @f_char_char_double_s_arg(%struct.char_char_double_s* %a) void f_char_char_double_s_arg(struct char_char_double_s a) {} -// CHECK: define void @f_ret_char_char_double_s(%struct.char_char_double_s* noalias sret %agg.result) +// CHECK: define dso_local void @f_ret_char_char_double_s(%struct.char_char_double_s* noalias sret %agg.result) struct char_char_double_s f_ret_char_char_double_s() { return (struct char_char_double_s){1, 2, 3.0}; } @@ -273,10 +273,10 @@ struct char_char_double_s f_ret_char_char_double_s() { union double_u { double a; }; -// CHECK: define void @f_double_u_arg(i64 %a.coerce) +// CHECK: define dso_local void @f_double_u_arg(i64 %a.coerce) void f_double_u_arg(union double_u a) {} -// CHECK: define i64 @f_ret_double_u() +// CHECK: define dso_local i64 @f_ret_double_u() union double_u f_ret_double_u() { return (union double_u){1.0}; } @@ -287,19 +287,19 @@ union double_u f_ret_double_u() { // returned in registers). This includes complex doubles, which are treated as // double+double structs by the ABI. -// CHECK: define { double, i32 } @f_ret_double_int32_s_double_int32_s_just_sufficient_gprs(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, double %0, i32 %1) +// CHECK: define dso_local { double, i32 } @f_ret_double_int32_s_double_int32_s_just_sufficient_gprs(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, double %0, i32 %1) struct double_int32_s f_ret_double_int32_s_double_int32_s_just_sufficient_gprs( int a, int b, int c, int d, int e, int f, int g, struct double_int32_s h) { return (struct double_int32_s){1.0, 2}; } -// CHECK: define { double, double } @f_ret_double_double_s_double_int32_s_just_sufficient_gprs(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, double %0, i32 %1) +// CHECK: define dso_local { double, double } @f_ret_double_double_s_double_int32_s_just_sufficient_gprs(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, double %0, i32 %1) struct double_double_s f_ret_double_double_s_double_int32_s_just_sufficient_gprs( int a, int b, int c, int d, int e, int f, int g, struct double_int32_s h) { return (struct double_double_s){1.0, 2.0}; } -// CHECK: define { double, double } @f_ret_doublecomplex_double_int32_s_just_sufficient_gprs(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, double %0, i32 %1) +// CHECK: define dso_local { double, double } @f_ret_doublecomplex_double_int32_s_just_sufficient_gprs(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, double %0, i32 %1) double __complex__ f_ret_doublecomplex_double_int32_s_just_sufficient_gprs( int a, int b, int c, int d, int e, int f, int g, struct double_int32_s h) { return 1.0; diff --git a/clang/test/CodeGen/riscv32-ilp32f-abi.c b/clang/test/CodeGen/riscv32-ilp32f-abi.c index 76092958aedd..f99dc2dfd804 100644 --- a/clang/test/CodeGen/riscv32-ilp32f-abi.c +++ b/clang/test/CodeGen/riscv32-ilp32f-abi.c @@ -6,27 +6,27 @@ // Doubles are still passed in GPRs, so the 'e' argument will be anyext as // GPRs are exhausted. -// CHECK: define void @f_fpr_tracking(double %a, double %b, double %c, double %d, i8 %e) +// CHECK: define dso_local void @f_fpr_tracking(double %a, double %b, double %c, double %d, i8 %e) void f_fpr_tracking(double a, double b, double c, double d, int8_t e) {} // Lowering for doubles is unnmodified, as 64 > FLEN. struct double_s { double d; }; -// CHECK: define void @f_double_s_arg(i64 %a.coerce) +// CHECK: define dso_local void @f_double_s_arg(i64 %a.coerce) void f_double_s_arg(struct double_s a) {} -// CHECK: define i64 @f_ret_double_s() +// CHECK: define dso_local i64 @f_ret_double_s() struct double_s f_ret_double_s() { return (struct double_s){1.0}; } struct double_double_s { double d; double e; }; -// CHECK: define void @f_double_double_s_arg(%struct.double_double_s* %a) +// CHECK: define dso_local void @f_double_double_s_arg(%struct.double_double_s* %a) void f_double_double_s_arg(struct double_double_s a) {} -// CHECK: define void @f_ret_double_double_s(%struct.double_double_s* noalias sret %agg.result) +// CHECK: define dso_local void @f_ret_double_double_s(%struct.double_double_s* noalias sret %agg.result) struct double_double_s f_ret_double_double_s() { return (struct double_double_s){1.0, 2.0}; } @@ -35,10 +35,10 @@ struct double_int8_s { double d; int64_t i; }; struct int_double_s { int a; double b; }; -// CHECK: define void @f_int_double_s_arg(%struct.int_double_s* %a) +// CHECK: define dso_local void @f_int_double_s_arg(%struct.int_double_s* %a) void f_int_double_s_arg(struct int_double_s a) {} -// CHECK: define void @f_ret_int_double_s(%struct.int_double_s* noalias sret %agg.result) +// CHECK: define dso_local void @f_ret_int_double_s(%struct.int_double_s* noalias sret %agg.result) struct int_double_s f_ret_int_double_s() { return (struct int_double_s){1, 2.0}; } diff --git a/clang/test/CodeGen/riscv32-ilp32f-ilp32d-abi.c b/clang/test/CodeGen/riscv32-ilp32f-ilp32d-abi.c index e9705ca3d62b..4b3a1edde754 100644 --- a/clang/test/CodeGen/riscv32-ilp32f-ilp32d-abi.c +++ b/clang/test/CodeGen/riscv32-ilp32f-ilp32d-abi.c @@ -11,7 +11,7 @@ // Floats are passed in FPRs, so argument 'i' will be passed zero-extended // because it will be passed in a GPR. -// CHECK: define void @f_fpr_tracking(float %a, float %b, float %c, float %d, float %e, float %f, float %g, float %h, i8 zeroext %i) +// CHECK: define dso_local void @f_fpr_tracking(float %a, float %b, float %c, float %d, float %e, float %f, float %g, float %h, i8 zeroext %i) void f_fpr_tracking(float a, float b, float c, float d, float e, float f, float g, float h, uint8_t i) {} @@ -27,10 +27,10 @@ void f_fpr_tracking(float a, float b, float c, float d, float e, float f, struct float_s { float f; }; -// CHECK: define void @f_float_s_arg(float %0) +// CHECK: define dso_local void @f_float_s_arg(float %0) void f_float_s_arg(struct float_s a) {} -// CHECK: define float @f_ret_float_s() +// CHECK: define dso_local float @f_ret_float_s() struct float_s f_ret_float_s() { return (struct float_s){1.0}; } @@ -41,18 +41,18 @@ struct float_s f_ret_float_s() { struct zbf_float_s { int : 0; float f; }; struct zbf_float_zbf_s { int : 0; float f; int : 0; }; -// CHECK: define void @f_zbf_float_s_arg(float %0) +// CHECK: define dso_local void @f_zbf_float_s_arg(float %0) void f_zbf_float_s_arg(struct zbf_float_s a) {} -// CHECK: define float @f_ret_zbf_float_s() +// CHECK: define dso_local float @f_ret_zbf_float_s() struct zbf_float_s f_ret_zbf_float_s() { return (struct zbf_float_s){1.0}; } -// CHECK: define void @f_zbf_float_zbf_s_arg(float %0) +// CHECK: define dso_local void @f_zbf_float_zbf_s_arg(float %0) void f_zbf_float_zbf_s_arg(struct zbf_float_zbf_s a) {} -// CHECK: define float @f_ret_zbf_float_zbf_s() +// CHECK: define dso_local float @f_ret_zbf_float_zbf_s() struct zbf_float_zbf_s f_ret_zbf_float_zbf_s() { return (struct zbf_float_zbf_s){1.0}; } @@ -62,15 +62,15 @@ struct zbf_float_zbf_s f_ret_zbf_float_zbf_s() { struct float_float_s { float f; float g; }; -// CHECK: define void @f_float_float_s_arg(float %0, float %1) +// CHECK: define dso_local void @f_float_float_s_arg(float %0, float %1) void f_float_float_s_arg(struct float_float_s a) {} -// CHECK: define { float, float } @f_ret_float_float_s() +// CHECK: define dso_local { float, float } @f_ret_float_float_s() struct float_float_s f_ret_float_float_s() { return (struct float_float_s){1.0, 2.0}; } -// CHECK: define void @f_float_float_s_arg_insufficient_fprs(float %a, float %b, float %c, float %d, float %e, float %f, float %g, [2 x i32] %h.coerce) +// CHECK: define dso_local void @f_float_float_s_arg_insufficient_fprs(float %a, float %b, float %c, float %d, float %e, float %f, float %g, [2 x i32] %h.coerce) void f_float_float_s_arg_insufficient_fprs(float a, float b, float c, float d, float e, float f, float g, struct float_float_s h) {} @@ -85,42 +85,42 @@ struct float_int64_s { float f; int64_t i; }; struct float_int64bf_s { float f; int64_t i : 32; }; struct float_int8_zbf_s { float f; int8_t i; int : 0; }; -// CHECK: define void @f_float_int8_s_arg(float %0, i8 %1) +// CHECK: define dso_local void @f_float_int8_s_arg(float %0, i8 %1) void f_float_int8_s_arg(struct float_int8_s a) {} -// CHECK: define { float, i8 } @f_ret_float_int8_s() +// CHECK: define dso_local { float, i8 } @f_ret_float_int8_s() struct float_int8_s f_ret_float_int8_s() { return (struct float_int8_s){1.0, 2}; } -// CHECK: define void @f_float_uint8_s_arg(float %0, i8 %1) +// CHECK: define dso_local void @f_float_uint8_s_arg(float %0, i8 %1) void f_float_uint8_s_arg(struct float_uint8_s a) {} -// CHECK: define { float, i8 } @f_ret_float_uint8_s() +// CHECK: define dso_local { float, i8 } @f_ret_float_uint8_s() struct float_uint8_s f_ret_float_uint8_s() { return (struct float_uint8_s){1.0, 2}; } -// CHECK: define void @f_float_int32_s_arg(float %0, i32 %1) +// CHECK: define dso_local void @f_float_int32_s_arg(float %0, i32 %1) void f_float_int32_s_arg(struct float_int32_s a) {} -// CHECK: define { float, i32 } @f_ret_float_int32_s() +// CHECK: define dso_local { float, i32 } @f_ret_float_int32_s() struct float_int32_s f_ret_float_int32_s() { return (struct float_int32_s){1.0, 2}; } -// CHECK: define void @f_float_int64_s_arg(%struct.float_int64_s* %a) +// CHECK: define dso_local void @f_float_int64_s_arg(%struct.float_int64_s* %a) void f_float_int64_s_arg(struct float_int64_s a) {} -// CHECK: define void @f_ret_float_int64_s(%struct.float_int64_s* noalias sret %agg.result) +// CHECK: define dso_local void @f_ret_float_int64_s(%struct.float_int64_s* noalias sret %agg.result) struct float_int64_s f_ret_float_int64_s() { return (struct float_int64_s){1.0, 2}; } -// CHECK: define void @f_float_int64bf_s_arg(float %0, i32 %1) +// CHECK: define dso_local void @f_float_int64bf_s_arg(float %0, i32 %1) void f_float_int64bf_s_arg(struct float_int64bf_s a) {} -// CHECK: define { float, i32 } @f_ret_float_int64bf_s() +// CHECK: define dso_local { float, i32 } @f_ret_float_int64bf_s() struct float_int64bf_s f_ret_float_int64bf_s() { return (struct float_int64bf_s){1.0, 2}; } @@ -128,39 +128,39 @@ struct float_int64bf_s f_ret_float_int64bf_s() { // The zero-width bitfield means the struct can't be passed according to the // floating point calling convention. -// CHECK: define void @f_float_int8_zbf_s(float %0, i8 %1) +// CHECK: define dso_local void @f_float_int8_zbf_s(float %0, i8 %1) void f_float_int8_zbf_s(struct float_int8_zbf_s a) {} -// CHECK: define { float, i8 } @f_ret_float_int8_zbf_s() +// CHECK: define dso_local { float, i8 } @f_ret_float_int8_zbf_s() struct float_int8_zbf_s f_ret_float_int8_zbf_s() { return (struct float_int8_zbf_s){1.0, 2}; } -// CHECK: define void @f_float_int8_s_arg_insufficient_gprs(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, i32 %h, [2 x i32] %i.coerce) +// CHECK: define dso_local void @f_float_int8_s_arg_insufficient_gprs(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, i32 %h, [2 x i32] %i.coerce) void f_float_int8_s_arg_insufficient_gprs(int a, int b, int c, int d, int e, int f, int g, int h, struct float_int8_s i) {} -// CHECK: define void @f_struct_float_int8_insufficient_fprs(float %a, float %b, float %c, float %d, float %e, float %f, float %g, float %h, [2 x i32] %i.coerce) +// CHECK: define dso_local void @f_struct_float_int8_insufficient_fprs(float %a, float %b, float %c, float %d, float %e, float %f, float %g, float %h, [2 x i32] %i.coerce) void f_struct_float_int8_insufficient_fprs(float a, float b, float c, float d, float e, float f, float g, float h, struct float_int8_s i) {} // Complex floating-point values or structs containing a single complex // floating-point value should be passed as if it were an fp+fp struct. -// CHECK: define void @f_floatcomplex(float %a.coerce0, float %a.coerce1) +// CHECK: define dso_local void @f_floatcomplex(float %a.coerce0, float %a.coerce1) void f_floatcomplex(float __complex__ a) {} -// CHECK: define { float, float } @f_ret_floatcomplex() +// CHECK: define dso_local { float, float } @f_ret_floatcomplex() float __complex__ f_ret_floatcomplex() { return 1.0; } struct floatcomplex_s { float __complex__ c; }; -// CHECK: define void @f_floatcomplex_s_arg(float %0, float %1) +// CHECK: define dso_local void @f_floatcomplex_s_arg(float %0, float %1) void f_floatcomplex_s_arg(struct floatcomplex_s a) {} -// CHECK: define { float, float } @f_ret_floatcomplex_s() +// CHECK: define dso_local { float, float } @f_ret_floatcomplex_s() struct floatcomplex_s f_ret_floatcomplex_s() { return (struct floatcomplex_s){1.0}; } @@ -170,60 +170,60 @@ struct floatcomplex_s f_ret_floatcomplex_s() { struct floatarr1_s { float a[1]; }; -// CHECK: define void @f_floatarr1_s_arg(float %0) +// CHECK: define dso_local void @f_floatarr1_s_arg(float %0) void f_floatarr1_s_arg(struct floatarr1_s a) {} -// CHECK: define float @f_ret_floatarr1_s() +// CHECK: define dso_local float @f_ret_floatarr1_s() struct floatarr1_s f_ret_floatarr1_s() { return (struct floatarr1_s){{1.0}}; } struct floatarr2_s { float a[2]; }; -// CHECK: define void @f_floatarr2_s_arg(float %0, float %1) +// CHECK: define dso_local void @f_floatarr2_s_arg(float %0, float %1) void f_floatarr2_s_arg(struct floatarr2_s a) {} -// CHECK: define { float, float } @f_ret_floatarr2_s() +// CHECK: define dso_local { float, float } @f_ret_floatarr2_s() struct floatarr2_s f_ret_floatarr2_s() { return (struct floatarr2_s){{1.0, 2.0}}; } struct floatarr2_tricky1_s { struct { float f[1]; } g[2]; }; -// CHECK: define void @f_floatarr2_tricky1_s_arg(float %0, float %1) +// CHECK: define dso_local void @f_floatarr2_tricky1_s_arg(float %0, float %1) void f_floatarr2_tricky1_s_arg(struct floatarr2_tricky1_s a) {} -// CHECK: define { float, float } @f_ret_floatarr2_tricky1_s() +// CHECK: define dso_local { float, float } @f_ret_floatarr2_tricky1_s() struct floatarr2_tricky1_s f_ret_floatarr2_tricky1_s() { return (struct floatarr2_tricky1_s){{{{1.0}}, {{2.0}}}}; } struct floatarr2_tricky2_s { struct {}; struct { float f[1]; } g[2]; }; -// CHECK: define void @f_floatarr2_tricky2_s_arg(float %0, float %1) +// CHECK: define dso_local void @f_floatarr2_tricky2_s_arg(float %0, float %1) void f_floatarr2_tricky2_s_arg(struct floatarr2_tricky2_s a) {} -// CHECK: define { float, float } @f_ret_floatarr2_tricky2_s() +// CHECK: define dso_local { float, float } @f_ret_floatarr2_tricky2_s() struct floatarr2_tricky2_s f_ret_floatarr2_tricky2_s() { return (struct floatarr2_tricky2_s){{}, {{{1.0}}, {{2.0}}}}; } struct floatarr2_tricky3_s { union {}; struct { float f[1]; } g[2]; }; -// CHECK: define void @f_floatarr2_tricky3_s_arg(float %0, float %1) +// CHECK: define dso_local void @f_floatarr2_tricky3_s_arg(float %0, float %1) void f_floatarr2_tricky3_s_arg(struct floatarr2_tricky3_s a) {} -// CHECK: define { float, float } @f_ret_floatarr2_tricky3_s() +// CHECK: define dso_local { float, float } @f_ret_floatarr2_tricky3_s() struct floatarr2_tricky3_s f_ret_floatarr2_tricky3_s() { return (struct floatarr2_tricky3_s){{}, {{{1.0}}, {{2.0}}}}; } struct floatarr2_tricky4_s { union {}; struct { struct {}; float f[1]; } g[2]; }; -// CHECK: define void @f_floatarr2_tricky4_s_arg(float %0, float %1) +// CHECK: define dso_local void @f_floatarr2_tricky4_s_arg(float %0, float %1) void f_floatarr2_tricky4_s_arg(struct floatarr2_tricky4_s a) {} -// CHECK: define { float, float } @f_ret_floatarr2_tricky4_s() +// CHECK: define dso_local { float, float } @f_ret_floatarr2_tricky4_s() struct floatarr2_tricky4_s f_ret_floatarr2_tricky4_s() { return (struct floatarr2_tricky4_s){{}, {{{}, {1.0}}, {{}, {2.0}}}}; } @@ -233,30 +233,30 @@ struct floatarr2_tricky4_s f_ret_floatarr2_tricky4_s() { struct int_float_int_s { int a; float b; int c; }; -// CHECK: define void @f_int_float_int_s_arg(%struct.int_float_int_s* %a) +// CHECK: define dso_local void @f_int_float_int_s_arg(%struct.int_float_int_s* %a) void f_int_float_int_s_arg(struct int_float_int_s a) {} -// CHECK: define void @f_ret_int_float_int_s(%struct.int_float_int_s* noalias sret %agg.result) +// CHECK: define dso_local void @f_ret_int_float_int_s(%struct.int_float_int_s* noalias sret %agg.result) struct int_float_int_s f_ret_int_float_int_s() { return (struct int_float_int_s){1, 2.0, 3}; } struct int64_float_s { int64_t a; float b; }; -// CHECK: define void @f_int64_float_s_arg(%struct.int64_float_s* %a) +// CHECK: define dso_local void @f_int64_float_s_arg(%struct.int64_float_s* %a) void f_int64_float_s_arg(struct int64_float_s a) {} -// CHECK: define void @f_ret_int64_float_s(%struct.int64_float_s* noalias sret %agg.result) +// CHECK: define dso_local void @f_ret_int64_float_s(%struct.int64_float_s* noalias sret %agg.result) struct int64_float_s f_ret_int64_float_s() { return (struct int64_float_s){1, 2.0}; } struct char_char_float_s { char a; char b; float c; }; -// CHECK-LABEL: define void @f_char_char_float_s_arg([2 x i32] %a.coerce) +// CHECK-LABEL: define dso_local void @f_char_char_float_s_arg([2 x i32] %a.coerce) void f_char_char_float_s_arg(struct char_char_float_s a) {} -// CHECK: define [2 x i32] @f_ret_char_char_float_s() +// CHECK: define dso_local [2 x i32] @f_ret_char_char_float_s() struct char_char_float_s f_ret_char_char_float_s() { return (struct char_char_float_s){1, 2, 3.0}; } @@ -266,10 +266,10 @@ struct char_char_float_s f_ret_char_char_float_s() { union float_u { float a; }; -// CHECK: define void @f_float_u_arg(i32 %a.coerce) +// CHECK: define dso_local void @f_float_u_arg(i32 %a.coerce) void f_float_u_arg(union float_u a) {} -// CHECK: define i32 @f_ret_float_u() +// CHECK: define dso_local i32 @f_ret_float_u() union float_u f_ret_float_u() { return (union float_u){1.0}; } diff --git a/clang/test/CodeGen/riscv64-lp64-abi.c b/clang/test/CodeGen/riscv64-lp64-abi.c index bae5470c377d..ccfcdc3cda7e 100644 --- a/clang/test/CodeGen/riscv64-lp64-abi.c +++ b/clang/test/CodeGen/riscv64-lp64-abi.c @@ -15,7 +15,7 @@ typedef unsigned char v32i8 __attribute__((vector_size(32))); // Scalars passed on the stack should not have signext/zeroext attributes // (they are anyext). -// CHECK-LABEL: define signext i32 @f_scalar_stack_1(i32 signext %a, i128 %b, float %c, fp128 %d, <32 x i8>* %0, i8 zeroext %f, i8 %g, i8 %h) +// CHECK-LABEL: define dso_local signext i32 @f_scalar_stack_1(i32 signext %a, i128 %b, float %c, fp128 %d, <32 x i8>* %0, i8 zeroext %f, i8 %g, i8 %h) int f_scalar_stack_1(int32_t a, __int128_t b, float c, long double d, v32i8 e, uint8_t f, int8_t g, uint8_t h) { return g + h; @@ -25,7 +25,7 @@ int f_scalar_stack_1(int32_t a, __int128_t b, float c, long double d, v32i8 e, // the presence of large return values that consume a register due to the need // to pass a pointer. -// CHECK-LABEL: define void @f_scalar_stack_2(%struct.large* noalias sret %agg.result, double %a, i128 %b, fp128 %c, <32 x i8>* %0, i8 zeroext %e, i8 %f, i8 %g) +// CHECK-LABEL: define dso_local void @f_scalar_stack_2(%struct.large* noalias sret %agg.result, double %a, i128 %b, fp128 %c, <32 x i8>* %0, i8 zeroext %e, i8 %f, i8 %g) struct large f_scalar_stack_2(double a, __int128_t b, long double c, v32i8 d, uint8_t e, int8_t f, uint8_t g) { return (struct large){a, e, f, g}; diff --git a/clang/test/CodeGen/riscv64-lp64-lp64f-abi.c b/clang/test/CodeGen/riscv64-lp64-lp64f-abi.c index d9c909e88bd8..5462d3650ce0 100644 --- a/clang/test/CodeGen/riscv64-lp64-lp64f-abi.c +++ b/clang/test/CodeGen/riscv64-lp64-lp64f-abi.c @@ -17,7 +17,7 @@ typedef unsigned char v32i8 __attribute__((vector_size(32))); // Scalars passed on the stack should not have signext/zeroext attributes // (they are anyext). -// CHECK-LABEL: define signext i32 @f_scalar_stack_1(i32 signext %a, i128 %b, double %c, fp128 %d, <32 x i8>* %0, i8 zeroext %f, i8 %g, i8 %h) +// CHECK-LABEL: define dso_local signext i32 @f_scalar_stack_1(i32 signext %a, i128 %b, double %c, fp128 %d, <32 x i8>* %0, i8 zeroext %f, i8 %g, i8 %h) int f_scalar_stack_1(int32_t a, __int128_t b, double c, long double d, v32i8 e, uint8_t f, int8_t g, uint8_t h) { return g + h; @@ -27,7 +27,7 @@ int f_scalar_stack_1(int32_t a, __int128_t b, double c, long double d, v32i8 e, // the presence of large return values that consume a register due to the need // to pass a pointer. -// CHECK-LABEL: define void @f_scalar_stack_2(%struct.large* noalias sret %agg.result, double %a, i128 %b, fp128 %c, <32 x i8>* %0, i8 zeroext %e, i8 %f, i8 %g) +// CHECK-LABEL: define dso_local void @f_scalar_stack_2(%struct.large* noalias sret %agg.result, double %a, i128 %b, fp128 %c, <32 x i8>* %0, i8 zeroext %e, i8 %f, i8 %g) struct large f_scalar_stack_2(double a, __int128_t b, long double c, v32i8 d, uint8_t e, int8_t f, uint8_t g) { return (struct large){a, e, f, g}; diff --git a/clang/test/CodeGen/riscv64-lp64-lp64f-lp64d-abi.c b/clang/test/CodeGen/riscv64-lp64-lp64f-lp64d-abi.c index f50a8ca90575..cad0fe23d9f6 100644 --- a/clang/test/CodeGen/riscv64-lp64-lp64f-lp64d-abi.c +++ b/clang/test/CodeGen/riscv64-lp64-lp64f-lp64d-abi.c @@ -10,48 +10,48 @@ #include <stddef.h> #include <stdint.h> -// CHECK-LABEL: define void @f_void() +// CHECK-LABEL: define dso_local void @f_void() void f_void(void) {} // Scalar arguments and return values smaller than the word size are extended // according to the sign of their type, up to 32 bits -// CHECK-LABEL: define zeroext i1 @f_scalar_0(i1 zeroext %x) +// CHECK-LABEL: define dso_local zeroext i1 @f_scalar_0(i1 zeroext %x) _Bool f_scalar_0(_Bool x) { return x; } -// CHECK-LABEL: define signext i8 @f_scalar_1(i8 signext %x) +// CHECK-LABEL: define dso_local signext i8 @f_scalar_1(i8 signext %x) int8_t f_scalar_1(int8_t x) { return x; } -// CHECK-LABEL: define zeroext i8 @f_scalar_2(i8 zeroext %x) +// CHECK-LABEL: define dso_local zeroext i8 @f_scalar_2(i8 zeroext %x) uint8_t f_scalar_2(uint8_t x) { return x; } -// CHECK-LABEL: define signext i32 @f_scalar_3(i32 signext %x) +// CHECK-LABEL: define dso_local signext i32 @f_scalar_3(i32 signext %x) uint32_t f_scalar_3(int32_t x) { return x; } -// CHECK-LABEL: define i64 @f_scalar_4(i64 %x) +// CHECK-LABEL: define dso_local i64 @f_scalar_4(i64 %x) int64_t f_scalar_4(int64_t x) { return x; } -// CHECK-LABEL: define float @f_fp_scalar_1(float %x) +// CHECK-LABEL: define dso_local float @f_fp_scalar_1(float %x) float f_fp_scalar_1(float x) { return x; } -// CHECK-LABEL: define double @f_fp_scalar_2(double %x) +// CHECK-LABEL: define dso_local double @f_fp_scalar_2(double %x) double f_fp_scalar_2(double x) { return x; } -// CHECK-LABEL: define fp128 @f_fp_scalar_3(fp128 %x) +// CHECK-LABEL: define dso_local fp128 @f_fp_scalar_3(fp128 %x) long double f_fp_scalar_3(long double x) { return x; } // Empty structs or unions are ignored. struct empty_s {}; -// CHECK-LABEL: define void @f_agg_empty_struct() +// CHECK-LABEL: define dso_local void @f_agg_empty_struct() struct empty_s f_agg_empty_struct(struct empty_s x) { return x; } union empty_u {}; -// CHECK-LABEL: define void @f_agg_empty_union() +// CHECK-LABEL: define dso_local void @f_agg_empty_union() union empty_u f_agg_empty_union(union empty_u x) { return x; } @@ -63,13 +63,13 @@ struct tiny { uint16_t a, b, c, d; }; -// CHECK-LABEL: define void @f_agg_tiny(i64 %x.coerce) +// CHECK-LABEL: define dso_local void @f_agg_tiny(i64 %x.coerce) void f_agg_tiny(struct tiny x) { x.a += x.b; x.c += x.d; } -// CHECK-LABEL: define i64 @f_agg_tiny_ret() +// CHECK-LABEL: define dso_local i64 @f_agg_tiny_ret() struct tiny f_agg_tiny_ret() { return (struct tiny){1, 2, 3, 4}; } @@ -77,23 +77,23 @@ struct tiny f_agg_tiny_ret() { typedef uint16_t v4i16 __attribute__((vector_size(8))); typedef int64_t v1i64 __attribute__((vector_size(8))); -// CHECK-LABEL: define void @f_vec_tiny_v4i16(i64 %x.coerce) +// CHECK-LABEL: define dso_local void @f_vec_tiny_v4i16(i64 %x.coerce) void f_vec_tiny_v4i16(v4i16 x) { x[0] = x[1]; x[2] = x[3]; } -// CHECK-LABEL: define i64 @f_vec_tiny_v4i16_ret() +// CHECK-LABEL: define dso_local i64 @f_vec_tiny_v4i16_ret() v4i16 f_vec_tiny_v4i16_ret() { return (v4i16){1, 2, 3, 4}; } -// CHECK-LABEL: define void @f_vec_tiny_v1i64(i64 %x.coerce) +// CHECK-LABEL: define dso_local void @f_vec_tiny_v1i64(i64 %x.coerce) void f_vec_tiny_v1i64(v1i64 x) { x[0] = 114; } -// CHECK-LABEL: define i64 @f_vec_tiny_v1i64_ret() +// CHECK-LABEL: define dso_local i64 @f_vec_tiny_v1i64_ret() v1i64 f_vec_tiny_v1i64_ret() { return (v1i64){1}; } @@ -102,13 +102,13 @@ struct small { int64_t a, *b; }; -// CHECK-LABEL: define void @f_agg_small([2 x i64] %x.coerce) +// CHECK-LABEL: define dso_local void @f_agg_small([2 x i64] %x.coerce) void f_agg_small(struct small x) { x.a += *x.b; x.b = &x.a; } -// CHECK-LABEL: define [2 x i64] @f_agg_small_ret() +// CHECK-LABEL: define dso_local [2 x i64] @f_agg_small_ret() struct small f_agg_small_ret() { return (struct small){1, 0}; } @@ -116,22 +116,22 @@ struct small f_agg_small_ret() { typedef uint16_t v8i16 __attribute__((vector_size(16))); typedef __int128_t v1i128 __attribute__((vector_size(16))); -// CHECK-LABEL: define void @f_vec_small_v8i16(i128 %x.coerce) +// CHECK-LABEL: define dso_local void @f_vec_small_v8i16(i128 %x.coerce) void f_vec_small_v8i16(v8i16 x) { x[0] = x[7]; } -// CHECK-LABEL: define i128 @f_vec_small_v8i16_ret() +// CHECK-LABEL: define dso_local i128 @f_vec_small_v8i16_ret() v8i16 f_vec_small_v8i16_ret() { return (v8i16){1, 2, 3, 4, 5, 6, 7, 8}; } -// CHECK-LABEL: define void @f_vec_small_v1i128(i128 %x.coerce) +// CHECK-LABEL: define dso_local void @f_vec_small_v1i128(i128 %x.coerce) void f_vec_small_v1i128(v1i128 x) { x[0] = 114; } -// CHECK-LABEL: define i128 @f_vec_small_v1i128_ret() +// CHECK-LABEL: define dso_local i128 @f_vec_small_v1i128_ret() v1i128 f_vec_small_v1i128_ret() { return (v1i128){1}; } @@ -144,12 +144,12 @@ struct small_aligned { __int128_t a; }; -// CHECK-LABEL: define void @f_agg_small_aligned(i128 %x.coerce) +// CHECK-LABEL: define dso_local void @f_agg_small_aligned(i128 %x.coerce) void f_agg_small_aligned(struct small_aligned x) { x.a += x.a; } -// CHECK-LABEL: define i128 @f_agg_small_aligned_ret(i128 %x.coerce) +// CHECK-LABEL: define dso_local i128 @f_agg_small_aligned_ret(i128 %x.coerce) struct small_aligned f_agg_small_aligned_ret(struct small_aligned x) { return (struct small_aligned){10}; } @@ -159,26 +159,26 @@ struct large { int64_t a, b, c, d; }; -// CHECK-LABEL: define void @f_agg_large(%struct.large* %x) +// CHECK-LABEL: define dso_local void @f_agg_large(%struct.large* %x) void f_agg_large(struct large x) { x.a = x.b + x.c + x.d; } // The address where the struct should be written to will be the first // argument -// CHECK-LABEL: define void @f_agg_large_ret(%struct.large* noalias sret %agg.result, i32 signext %i, i8 signext %j) +// CHECK-LABEL: define dso_local void @f_agg_large_ret(%struct.large* noalias sret %agg.result, i32 signext %i, i8 signext %j) struct large f_agg_large_ret(int32_t i, int8_t j) { return (struct large){1, 2, 3, 4}; } typedef unsigned char v32i8 __attribute__((vector_size(32))); -// CHECK-LABEL: define void @f_vec_large_v32i8(<32 x i8>* %0) +// CHECK-LABEL: define dso_local void @f_vec_large_v32i8(<32 x i8>* %0) void f_vec_large_v32i8(v32i8 x) { x[0] = x[7]; } -// CHECK-LABEL: define void @f_vec_large_v32i8_ret(<32 x i8>* noalias sret %agg.result) +// CHECK-LABEL: define dso_local void @f_vec_large_v32i8_ret(<32 x i8>* noalias sret %agg.result) v32i8 f_vec_large_v32i8_ret() { return (v32i8){1, 2, 3, 4, 5, 6, 7, 8}; } @@ -186,13 +186,13 @@ v32i8 f_vec_large_v32i8_ret() { // Scalars passed on the stack should not have signext/zeroext attributes // (they are anyext). -// CHECK-LABEL: define signext i32 @f_scalar_stack_1(i64 %a.coerce, [2 x i64] %b.coerce, i128 %c.coerce, %struct.large* %d, i8 zeroext %e, i8 signext %f, i8 %g, i8 %h) +// CHECK-LABEL: define dso_local signext i32 @f_scalar_stack_1(i64 %a.coerce, [2 x i64] %b.coerce, i128 %c.coerce, %struct.large* %d, i8 zeroext %e, i8 signext %f, i8 %g, i8 %h) int f_scalar_stack_1(struct tiny a, struct small b, struct small_aligned c, struct large d, uint8_t e, int8_t f, uint8_t g, int8_t h) { return g + h; } -// CHECK-LABEL: define signext i32 @f_scalar_stack_2(i32 signext %a, i128 %b, i64 %c, fp128 %d, <32 x i8>* %0, i8 zeroext %f, i8 %g, i8 %h) +// CHECK-LABEL: define dso_local signext i32 @f_scalar_stack_2(i32 signext %a, i128 %b, i64 %c, fp128 %d, <32 x i8>* %0, i8 zeroext %f, i8 %g, i8 %h) int f_scalar_stack_2(int32_t a, __int128_t b, int64_t c, long double d, v32i8 e, uint8_t f, int8_t g, uint8_t h) { return g + h; @@ -202,7 +202,7 @@ int f_scalar_stack_2(int32_t a, __int128_t b, int64_t c, long double d, v32i8 e, // the presence of large return values that consume a register due to the need // to pass a pointer. -// CHECK-LABEL: define void @f_scalar_stack_3(%struct.large* noalias sret %agg.result, i32 signext %a, i128 %b, fp128 %c, <32 x i8>* %0, i8 zeroext %e, i8 %f, i8 %g) +// CHECK-LABEL: define dso_local void @f_scalar_stack_3(%struct.large* noalias sret %agg.result, i32 signext %a, i128 %b, fp128 %c, <32 x i8>* %0, i8 zeroext %e, i8 %f, i8 %g) struct large f_scalar_stack_3(uint32_t a, __int128_t b, long double c, v32i8 d, uint8_t e, int8_t f, uint8_t g) { return (struct large){a, e, f, g}; @@ -215,7 +215,7 @@ struct large f_scalar_stack_3(uint32_t a, __int128_t b, long double c, v32i8 d, int f_va_callee(int, ...); -// CHECK-LABEL: define void @f_va_caller() +// CHECK-LABEL: define dso_local void @f_va_caller() void f_va_caller() { // CHECK: call signext i32 (i32, ...) @f_va_callee(i32 signext 1, i32 signext 2, i64 3, double 4.000000e+00, double 5.000000e+00, i64 {{%.*}}, [2 x i64] {{%.*}}, i128 {{%.*}}, %struct.large* {{%.*}}) f_va_callee(1, 2, 3LL, 4.0f, 5.0, (struct tiny){6, 7, 8, 9}, @@ -241,7 +241,7 @@ void f_va_caller() { f_va_callee(1, 2, 3, 4, 5, 6, (struct small){7, NULL}, 8, 9); } -// CHECK-LABEL: define signext i32 @f_va_1(i8* %fmt, ...) {{.*}} { +// CHECK-LABEL: define dso_local signext i32 @f_va_1(i8* %fmt, ...) {{.*}} { // CHECK: [[FMT_ADDR:%.*]] = alloca i8*, align 8 // CHECK: [[VA:%.*]] = alloca i8*, align 8 // CHECK: [[V:%.*]] = alloca i32, align 4 diff --git a/clang/test/CodeGen/riscv64-lp64d-abi.c b/clang/test/CodeGen/riscv64-lp64d-abi.c index 83947def3085..930a98af17e0 100644 --- a/clang/test/CodeGen/riscv64-lp64d-abi.c +++ b/clang/test/CodeGen/riscv64-lp64d-abi.c @@ -9,7 +9,7 @@ // Doubles are passed in FPRs, so argument 'i' will be passed zero-extended // because it will be passed in a GPR. -// CHECK: define void @f_fpr_tracking(double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, i8 zeroext %i) +// CHECK: define dso_local void @f_fpr_tracking(double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, i8 zeroext %i) void f_fpr_tracking(double a, double b, double c, double d, double e, double f, double g, double h, uint8_t i) {} @@ -25,10 +25,10 @@ void f_fpr_tracking(double a, double b, double c, double d, double e, double f, struct double_s { double f; }; -// CHECK: define void @f_double_s_arg(double %0) +// CHECK: define dso_local void @f_double_s_arg(double %0) void f_double_s_arg(struct double_s a) {} -// CHECK: define double @f_ret_double_s() +// CHECK: define dso_local double @f_ret_double_s() struct double_s f_ret_double_s() { return (struct double_s){1.0}; } @@ -39,18 +39,18 @@ struct double_s f_ret_double_s() { struct zbf_double_s { int : 0; double f; }; struct zbf_double_zbf_s { int : 0; double f; int : 0; }; -// CHECK: define void @f_zbf_double_s_arg(double %0) +// CHECK: define dso_local void @f_zbf_double_s_arg(double %0) void f_zbf_double_s_arg(struct zbf_double_s a) {} -// CHECK: define double @f_ret_zbf_double_s() +// CHECK: define dso_local double @f_ret_zbf_double_s() struct zbf_double_s f_ret_zbf_double_s() { return (struct zbf_double_s){1.0}; } -// CHECK: define void @f_zbf_double_zbf_s_arg(double %0) +// CHECK: define dso_local void @f_zbf_double_zbf_s_arg(double %0) void f_zbf_double_zbf_s_arg(struct zbf_double_zbf_s a) {} -// CHECK: define double @f_ret_zbf_double_zbf_s() +// CHECK: define dso_local double @f_ret_zbf_double_zbf_s() struct zbf_double_zbf_s f_ret_zbf_double_zbf_s() { return (struct zbf_double_zbf_s){1.0}; } @@ -61,23 +61,23 @@ struct zbf_double_zbf_s f_ret_zbf_double_zbf_s() { struct double_double_s { double f; double g; }; struct double_float_s { double f; float g; }; -// CHECK: define void @f_double_double_s_arg(double %0, double %1) +// CHECK: define dso_local void @f_double_double_s_arg(double %0, double %1) void f_double_double_s_arg(struct double_double_s a) {} -// CHECK: define { double, double } @f_ret_double_double_s() +// CHECK: define dso_local { double, double } @f_ret_double_double_s() struct double_double_s f_ret_double_double_s() { return (struct double_double_s){1.0, 2.0}; } -// CHECK: define void @f_double_float_s_arg(double %0, float %1) +// CHECK: define dso_local void @f_double_float_s_arg(double %0, float %1) void f_double_float_s_arg(struct double_float_s a) {} -// CHECK: define { double, float } @f_ret_double_float_s() +// CHECK: define dso_local { double, float } @f_ret_double_float_s() struct double_float_s f_ret_double_float_s() { return (struct double_float_s){1.0, 2.0}; } -// CHECK: define void @f_double_double_s_arg_insufficient_fprs(float %a, double %b, double %c, double %d, double %e, double %f, double %g, [2 x i64] %h.coerce) +// CHECK: define dso_local void @f_double_double_s_arg_insufficient_fprs(float %a, double %b, double %c, double %d, double %e, double %f, double %g, [2 x i64] %h.coerce) void f_double_double_s_arg_insufficient_fprs(float a, double b, double c, double d, double e, double f, double g, struct double_double_s h) {} @@ -92,42 +92,42 @@ struct double_int64_s { double f; int64_t i; }; struct double_int128bf_s { double f; __int128_t i : 64; }; struct double_int8_zbf_s { double f; int8_t i; int : 0; }; -// CHECK: define void @f_double_int8_s_arg(double %0, i8 %1) +// CHECK: define dso_local void @f_double_int8_s_arg(double %0, i8 %1) void f_double_int8_s_arg(struct double_int8_s a) {} -// CHECK: define { double, i8 } @f_ret_double_int8_s() +// CHECK: define dso_local { double, i8 } @f_ret_double_int8_s() struct double_int8_s f_ret_double_int8_s() { return (struct double_int8_s){1.0, 2}; } -// CHECK: define void @f_double_uint8_s_arg(double %0, i8 %1) +// CHECK: define dso_local void @f_double_uint8_s_arg(double %0, i8 %1) void f_double_uint8_s_arg(struct double_uint8_s a) {} -// CHECK: define { double, i8 } @f_ret_double_uint8_s() +// CHECK: define dso_local { double, i8 } @f_ret_double_uint8_s() struct double_uint8_s f_ret_double_uint8_s() { return (struct double_uint8_s){1.0, 2}; } -// CHECK: define void @f_double_int32_s_arg(double %0, i32 %1) +// CHECK: define dso_local void @f_double_int32_s_arg(double %0, i32 %1) void f_double_int32_s_arg(struct double_int32_s a) {} -// CHECK: define { double, i32 } @f_ret_double_int32_s() +// CHECK: define dso_local { double, i32 } @f_ret_double_int32_s() struct double_int32_s f_ret_double_int32_s() { return (struct double_int32_s){1.0, 2}; } -// CHECK: define void @f_double_int64_s_arg(double %0, i64 %1) +// CHECK: define dso_local void @f_double_int64_s_arg(double %0, i64 %1) void f_double_int64_s_arg(struct double_int64_s a) {} -// CHECK: define { double, i64 } @f_ret_double_int64_s() +// CHECK: define dso_local { double, i64 } @f_ret_double_int64_s() struct double_int64_s f_ret_double_int64_s() { return (struct double_int64_s){1.0, 2}; } -// CHECK: define void @f_double_int128bf_s_arg(double %0, i64 %1) +// CHECK: define dso_local void @f_double_int128bf_s_arg(double %0, i64 %1) void f_double_int128bf_s_arg(struct double_int128bf_s a) {} -// CHECK: define { double, i64 } @f_ret_double_int128bf_s() +// CHECK: define dso_local { double, i64 } @f_ret_double_int128bf_s() struct double_int128bf_s f_ret_double_int128bf_s() { return (struct double_int128bf_s){1.0, 2}; } @@ -135,39 +135,39 @@ struct double_int128bf_s f_ret_double_int128bf_s() { // The zero-width bitfield means the struct can't be passed according to the // floating point calling convention. -// CHECK: define void @f_double_int8_zbf_s(double %0, i8 %1) +// CHECK: define dso_local void @f_double_int8_zbf_s(double %0, i8 %1) void f_double_int8_zbf_s(struct double_int8_zbf_s a) {} -// CHECK: define { double, i8 } @f_ret_double_int8_zbf_s() +// CHECK: define dso_local { double, i8 } @f_ret_double_int8_zbf_s() struct double_int8_zbf_s f_ret_double_int8_zbf_s() { return (struct double_int8_zbf_s){1.0, 2}; } -// CHECK: define void @f_double_int8_s_arg_insufficient_gprs(i32 signext %a, i32 signext %b, i32 signext %c, i32 signext %d, i32 signext %e, i32 signext %f, i32 signext %g, i32 signext %h, [2 x i64] %i.coerce) +// CHECK: define dso_local void @f_double_int8_s_arg_insufficient_gprs(i32 signext %a, i32 signext %b, i32 signext %c, i32 signext %d, i32 signext %e, i32 signext %f, i32 signext %g, i32 signext %h, [2 x i64] %i.coerce) void f_double_int8_s_arg_insufficient_gprs(int a, int b, int c, int d, int e, int f, int g, int h, struct double_int8_s i) {} -// CHECK: define void @f_struct_double_int8_insufficient_fprs(float %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, [2 x i64] %i.coerce) +// CHECK: define dso_local void @f_struct_double_int8_insufficient_fprs(float %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, [2 x i64] %i.coerce) void f_struct_double_int8_insufficient_fprs(float a, double b, double c, double d, double e, double f, double g, double h, struct double_int8_s i) {} // Complex floating-point values or structs containing a single complex // floating-point value should be passed as if it were an fp+fp struct. -// CHECK: define void @f_doublecomplex(double %a.coerce0, double %a.coerce1) +// CHECK: define dso_local void @f_doublecomplex(double %a.coerce0, double %a.coerce1) void f_doublecomplex(double __complex__ a) {} -// CHECK: define { double, double } @f_ret_doublecomplex() +// CHECK: define dso_local { double, double } @f_ret_doublecomplex() double __complex__ f_ret_doublecomplex() { return 1.0; } struct doublecomplex_s { double __complex__ c; }; -// CHECK: define void @f_doublecomplex_s_arg(double %0, double %1) +// CHECK: define dso_local void @f_doublecomplex_s_arg(double %0, double %1) void f_doublecomplex_s_arg(struct doublecomplex_s a) {} -// CHECK: define { double, double } @f_ret_doublecomplex_s() +// CHECK: define dso_local { double, double } @f_ret_doublecomplex_s() struct doublecomplex_s f_ret_doublecomplex_s() { return (struct doublecomplex_s){1.0}; } @@ -177,60 +177,60 @@ struct doublecomplex_s f_ret_doublecomplex_s() { struct doublearr1_s { double a[1]; }; -// CHECK: define void @f_doublearr1_s_arg(double %0) +// CHECK: define dso_local void @f_doublearr1_s_arg(double %0) void f_doublearr1_s_arg(struct doublearr1_s a) {} -// CHECK: define double @f_ret_doublearr1_s() +// CHECK: define dso_local double @f_ret_doublearr1_s() struct doublearr1_s f_ret_doublearr1_s() { return (struct doublearr1_s){{1.0}}; } struct doublearr2_s { double a[2]; }; -// CHECK: define void @f_doublearr2_s_arg(double %0, double %1) +// CHECK: define dso_local void @f_doublearr2_s_arg(double %0, double %1) void f_doublearr2_s_arg(struct doublearr2_s a) {} -// CHECK: define { double, double } @f_ret_doublearr2_s() +// CHECK: define dso_local { double, double } @f_ret_doublearr2_s() struct doublearr2_s f_ret_doublearr2_s() { return (struct doublearr2_s){{1.0, 2.0}}; } struct doublearr2_tricky1_s { struct { double f[1]; } g[2]; }; -// CHECK: define void @f_doublearr2_tricky1_s_arg(double %0, double %1) +// CHECK: define dso_local void @f_doublearr2_tricky1_s_arg(double %0, double %1) void f_doublearr2_tricky1_s_arg(struct doublearr2_tricky1_s a) {} -// CHECK: define { double, double } @f_ret_doublearr2_tricky1_s() +// CHECK: define dso_local { double, double } @f_ret_doublearr2_tricky1_s() struct doublearr2_tricky1_s f_ret_doublearr2_tricky1_s() { return (struct doublearr2_tricky1_s){{{{1.0}}, {{2.0}}}}; } struct doublearr2_tricky2_s { struct {}; struct { double f[1]; } g[2]; }; -// CHECK: define void @f_doublearr2_tricky2_s_arg(double %0, double %1) +// CHECK: define dso_local void @f_doublearr2_tricky2_s_arg(double %0, double %1) void f_doublearr2_tricky2_s_arg(struct doublearr2_tricky2_s a) {} -// CHECK: define { double, double } @f_ret_doublearr2_tricky2_s() +// CHECK: define dso_local { double, double } @f_ret_doublearr2_tricky2_s() struct doublearr2_tricky2_s f_ret_doublearr2_tricky2_s() { return (struct doublearr2_tricky2_s){{}, {{{1.0}}, {{2.0}}}}; } struct doublearr2_tricky3_s { union {}; struct { double f[1]; } g[2]; }; -// CHECK: define void @f_doublearr2_tricky3_s_arg(double %0, double %1) +// CHECK: define dso_local void @f_doublearr2_tricky3_s_arg(double %0, double %1) void f_doublearr2_tricky3_s_arg(struct doublearr2_tricky3_s a) {} -// CHECK: define { double, double } @f_ret_doublearr2_tricky3_s() +// CHECK: define dso_local { double, double } @f_ret_doublearr2_tricky3_s() struct doublearr2_tricky3_s f_ret_doublearr2_tricky3_s() { return (struct doublearr2_tricky3_s){{}, {{{1.0}}, {{2.0}}}}; } struct doublearr2_tricky4_s { union {}; struct { struct {}; double f[1]; } g[2]; }; -// CHECK: define void @f_doublearr2_tricky4_s_arg(double %0, double %1) +// CHECK: define dso_local void @f_doublearr2_tricky4_s_arg(double %0, double %1) void f_doublearr2_tricky4_s_arg(struct doublearr2_tricky4_s a) {} -// CHECK: define { double, double } @f_ret_doublearr2_tricky4_s() +// CHECK: define dso_local { double, double } @f_ret_doublearr2_tricky4_s() struct doublearr2_tricky4_s f_ret_doublearr2_tricky4_s() { return (struct doublearr2_tricky4_s){{}, {{{}, {1.0}}, {{}, {2.0}}}}; } @@ -240,20 +240,20 @@ struct doublearr2_tricky4_s f_ret_doublearr2_tricky4_s() { struct int_double_int_s { int a; double b; int c; }; -// CHECK: define void @f_int_double_int_s_arg(%struct.int_double_int_s* %a) +// CHECK: define dso_local void @f_int_double_int_s_arg(%struct.int_double_int_s* %a) void f_int_double_int_s_arg(struct int_double_int_s a) {} -// CHECK: define void @f_ret_int_double_int_s(%struct.int_double_int_s* noalias sret %agg.result) +// CHECK: define dso_local void @f_ret_int_double_int_s(%struct.int_double_int_s* noalias sret %agg.result) struct int_double_int_s f_ret_int_double_int_s() { return (struct int_double_int_s){1, 2.0, 3}; } struct char_char_double_s { char a; char b; double c; }; -// CHECK-LABEL: define void @f_char_char_double_s_arg([2 x i64] %a.coerce) +// CHECK-LABEL: define dso_local void @f_char_char_double_s_arg([2 x i64] %a.coerce) void f_char_char_double_s_arg(struct char_char_double_s a) {} -// CHECK: define [2 x i64] @f_ret_char_char_double_s() +// CHECK: define dso_local [2 x i64] @f_ret_char_char_double_s() struct char_char_double_s f_ret_char_char_double_s() { return (struct char_char_double_s){1, 2, 3.0}; } @@ -263,10 +263,10 @@ struct char_char_double_s f_ret_char_char_double_s() { union double_u { double a; }; -// CHECK: define void @f_double_u_arg(i64 %a.coerce) +// CHECK: define dso_local void @f_double_u_arg(i64 %a.coerce) void f_double_u_arg(union double_u a) {} -// CHECK: define i64 @f_ret_double_u() +// CHECK: define dso_local i64 @f_ret_double_u() union double_u f_ret_double_u() { return (union double_u){1.0}; } diff --git a/clang/test/CodeGen/riscv64-lp64f-lp64d-abi.c b/clang/test/CodeGen/riscv64-lp64f-lp64d-abi.c index 9a44928cac8d..cd4ea7a91b4f 100644 --- a/clang/test/CodeGen/riscv64-lp64f-lp64d-abi.c +++ b/clang/test/CodeGen/riscv64-lp64f-lp64d-abi.c @@ -11,7 +11,7 @@ // Floats are passed in FPRs, so argument 'i' will be passed zero-extended // because it will be passed in a GPR. -// CHECK: define void @f_fpr_tracking(float %a, float %b, float %c, float %d, float %e, float %f, float %g, float %h, i8 zeroext %i) +// CHECK: define dso_local void @f_fpr_tracking(float %a, float %b, float %c, float %d, float %e, float %f, float %g, float %h, i8 zeroext %i) void f_fpr_tracking(float a, float b, float c, float d, float e, float f, float g, float h, uint8_t i) {} @@ -27,10 +27,10 @@ void f_fpr_tracking(float a, float b, float c, float d, float e, float f, struct float_s { float f; }; -// CHECK: define void @f_float_s_arg(float %0) +// CHECK: define dso_local void @f_float_s_arg(float %0) void f_float_s_arg(struct float_s a) {} -// CHECK: define float @f_ret_float_s() +// CHECK: define dso_local float @f_ret_float_s() struct float_s f_ret_float_s() { return (struct float_s){1.0}; } @@ -41,18 +41,18 @@ struct float_s f_ret_float_s() { struct zbf_float_s { int : 0; float f; }; struct zbf_float_zbf_s { int : 0; float f; int : 0; }; -// CHECK: define void @f_zbf_float_s_arg(float %0) +// CHECK: define dso_local void @f_zbf_float_s_arg(float %0) void f_zbf_float_s_arg(struct zbf_float_s a) {} -// CHECK: define float @f_ret_zbf_float_s() +// CHECK: define dso_local float @f_ret_zbf_float_s() struct zbf_float_s f_ret_zbf_float_s() { return (struct zbf_float_s){1.0}; } -// CHECK: define void @f_zbf_float_zbf_s_arg(float %0) +// CHECK: define dso_local void @f_zbf_float_zbf_s_arg(float %0) void f_zbf_float_zbf_s_arg(struct zbf_float_zbf_s a) {} -// CHECK: define float @f_ret_zbf_float_zbf_s() +// CHECK: define dso_local float @f_ret_zbf_float_zbf_s() struct zbf_float_zbf_s f_ret_zbf_float_zbf_s() { return (struct zbf_float_zbf_s){1.0}; } @@ -62,15 +62,15 @@ struct zbf_float_zbf_s f_ret_zbf_float_zbf_s() { struct float_float_s { float f; float g; }; -// CHECK: define void @f_float_float_s_arg(float %0, float %1) +// CHECK: define dso_local void @f_float_float_s_arg(float %0, float %1) void f_float_float_s_arg(struct float_float_s a) {} -// CHECK: define { float, float } @f_ret_float_float_s() +// CHECK: define dso_local { float, float } @f_ret_float_float_s() struct float_float_s f_ret_float_float_s() { return (struct float_float_s){1.0, 2.0}; } -// CHECK: define void @f_float_float_s_arg_insufficient_fprs(float %a, float %b, float %c, float %d, float %e, float %f, float %g, i64 %h.coerce) +// CHECK: define dso_local void @f_float_float_s_arg_insufficient_fprs(float %a, float %b, float %c, float %d, float %e, float %f, float %g, i64 %h.coerce) void f_float_float_s_arg_insufficient_fprs(float a, float b, float c, float d, float e, float f, float g, struct float_float_s h) {} @@ -85,42 +85,42 @@ struct float_int64_s { float f; int64_t i; }; struct float_int128bf_s { float f; __int128_t i : 64; }; struct float_int8_zbf_s { float f; int8_t i; int : 0; }; -// CHECK: define void @f_float_int8_s_arg(float %0, i8 %1) +// CHECK: define dso_local void @f_float_int8_s_arg(float %0, i8 %1) void f_float_int8_s_arg(struct float_int8_s a) {} -// CHECK: define { float, i8 } @f_ret_float_int8_s() +// CHECK: define dso_local { float, i8 } @f_ret_float_int8_s() struct float_int8_s f_ret_float_int8_s() { return (struct float_int8_s){1.0, 2}; } -// CHECK: define void @f_float_uint8_s_arg(float %0, i8 %1) +// CHECK: define dso_local void @f_float_uint8_s_arg(float %0, i8 %1) void f_float_uint8_s_arg(struct float_uint8_s a) {} -// CHECK: define { float, i8 } @f_ret_float_uint8_s() +// CHECK: define dso_local { float, i8 } @f_ret_float_uint8_s() struct float_uint8_s f_ret_float_uint8_s() { return (struct float_uint8_s){1.0, 2}; } -// CHECK: define void @f_float_int32_s_arg(float %0, i32 %1) +// CHECK: define dso_local void @f_float_int32_s_arg(float %0, i32 %1) void f_float_int32_s_arg(struct float_int32_s a) {} -// CHECK: define { float, i32 } @f_ret_float_int32_s() +// CHECK: define dso_local { float, i32 } @f_ret_float_int32_s() struct float_int32_s f_ret_float_int32_s() { return (struct float_int32_s){1.0, 2}; } -// CHECK: define void @f_float_int64_s_arg(float %0, i64 %1) +// CHECK: define dso_local void @f_float_int64_s_arg(float %0, i64 %1) void f_float_int64_s_arg(struct float_int64_s a) {} -// CHECK: define { float, i64 } @f_ret_float_int64_s() +// CHECK: define dso_local { float, i64 } @f_ret_float_int64_s() struct float_int64_s f_ret_float_int64_s() { return (struct float_int64_s){1.0, 2}; } -// CHECK: define void @f_float_int128bf_s_arg(float %0, i64 %1) +// CHECK: define dso_local void @f_float_int128bf_s_arg(float %0, i64 %1) void f_float_int128bf_s_arg(struct float_int128bf_s a) {} -// CHECK: define <{ float, i64 }> @f_ret_float_int128bf_s() +// CHECK: define dso_local <{ float, i64 }> @f_ret_float_int128bf_s() struct float_int128bf_s f_ret_float_int128bf_s() { return (struct float_int128bf_s){1.0, 2}; } @@ -128,39 +128,39 @@ struct float_int128bf_s f_ret_float_int128bf_s() { // The zero-width bitfield means the struct can't be passed according to the // floating point calling convention. -// CHECK: define void @f_float_int8_zbf_s(float %0, i8 %1) +// CHECK: define dso_local void @f_float_int8_zbf_s(float %0, i8 %1) void f_float_int8_zbf_s(struct float_int8_zbf_s a) {} -// CHECK: define { float, i8 } @f_ret_float_int8_zbf_s() +// CHECK: define dso_local { float, i8 } @f_ret_float_int8_zbf_s() struct float_int8_zbf_s f_ret_float_int8_zbf_s() { return (struct float_int8_zbf_s){1.0, 2}; } -// CHECK: define void @f_float_int8_s_arg_insufficient_gprs(i32 signext %a, i32 signext %b, i32 signext %c, i32 signext %d, i32 signext %e, i32 signext %f, i32 signext %g, i32 signext %h, i64 %i.coerce) +// CHECK: define dso_local void @f_float_int8_s_arg_insufficient_gprs(i32 signext %a, i32 signext %b, i32 signext %c, i32 signext %d, i32 signext %e, i32 signext %f, i32 signext %g, i32 signext %h, i64 %i.coerce) void f_float_int8_s_arg_insufficient_gprs(int a, int b, int c, int d, int e, int f, int g, int h, struct float_int8_s i) {} -// CHECK: define void @f_struct_float_int8_insufficient_fprs(float %a, float %b, float %c, float %d, float %e, float %f, float %g, float %h, i64 %i.coerce) +// CHECK: define dso_local void @f_struct_float_int8_insufficient_fprs(float %a, float %b, float %c, float %d, float %e, float %f, float %g, float %h, i64 %i.coerce) void f_struct_float_int8_insufficient_fprs(float a, float b, float c, float d, float e, float f, float g, float h, struct float_int8_s i) {} // Complex floating-point values or structs containing a single complex // floating-point value should be passed as if it were an fp+fp struct. -// CHECK: define void @f_floatcomplex(float %a.coerce0, float %a.coerce1) +// CHECK: define dso_local void @f_floatcomplex(float %a.coerce0, float %a.coerce1) void f_floatcomplex(float __complex__ a) {} -// CHECK: define { float, float } @f_ret_floatcomplex() +// CHECK: define dso_local { float, float } @f_ret_floatcomplex() float __complex__ f_ret_floatcomplex() { return 1.0; } struct floatcomplex_s { float __complex__ c; }; -// CHECK: define void @f_floatcomplex_s_arg(float %0, float %1) +// CHECK: define dso_local void @f_floatcomplex_s_arg(float %0, float %1) void f_floatcomplex_s_arg(struct floatcomplex_s a) {} -// CHECK: define { float, float } @f_ret_floatcomplex_s() +// CHECK: define dso_local { float, float } @f_ret_floatcomplex_s() struct floatcomplex_s f_ret_floatcomplex_s() { return (struct floatcomplex_s){1.0}; } @@ -170,60 +170,60 @@ struct floatcomplex_s f_ret_floatcomplex_s() { struct floatarr1_s { float a[1]; }; -// CHECK: define void @f_floatarr1_s_arg(float %0) +// CHECK: define dso_local void @f_floatarr1_s_arg(float %0) void f_floatarr1_s_arg(struct floatarr1_s a) {} -// CHECK: define float @f_ret_floatarr1_s() +// CHECK: define dso_local float @f_ret_floatarr1_s() struct floatarr1_s f_ret_floatarr1_s() { return (struct floatarr1_s){{1.0}}; } struct floatarr2_s { float a[2]; }; -// CHECK: define void @f_floatarr2_s_arg(float %0, float %1) +// CHECK: define dso_local void @f_floatarr2_s_arg(float %0, float %1) void f_floatarr2_s_arg(struct floatarr2_s a) {} -// CHECK: define { float, float } @f_ret_floatarr2_s() +// CHECK: define dso_local { float, float } @f_ret_floatarr2_s() struct floatarr2_s f_ret_floatarr2_s() { return (struct floatarr2_s){{1.0, 2.0}}; } struct floatarr2_tricky1_s { struct { float f[1]; } g[2]; }; -// CHECK: define void @f_floatarr2_tricky1_s_arg(float %0, float %1) +// CHECK: define dso_local void @f_floatarr2_tricky1_s_arg(float %0, float %1) void f_floatarr2_tricky1_s_arg(struct floatarr2_tricky1_s a) {} -// CHECK: define { float, float } @f_ret_floatarr2_tricky1_s() +// CHECK: define dso_local { float, float } @f_ret_floatarr2_tricky1_s() struct floatarr2_tricky1_s f_ret_floatarr2_tricky1_s() { return (struct floatarr2_tricky1_s){{{{1.0}}, {{2.0}}}}; } struct floatarr2_tricky2_s { struct {}; struct { float f[1]; } g[2]; }; -// CHECK: define void @f_floatarr2_tricky2_s_arg(float %0, float %1) +// CHECK: define dso_local void @f_floatarr2_tricky2_s_arg(float %0, float %1) void f_floatarr2_tricky2_s_arg(struct floatarr2_tricky2_s a) {} -// CHECK: define { float, float } @f_ret_floatarr2_tricky2_s() +// CHECK: define dso_local { float, float } @f_ret_floatarr2_tricky2_s() struct floatarr2_tricky2_s f_ret_floatarr2_tricky2_s() { return (struct floatarr2_tricky2_s){{}, {{{1.0}}, {{2.0}}}}; } struct floatarr2_tricky3_s { union {}; struct { float f[1]; } g[2]; }; -// CHECK: define void @f_floatarr2_tricky3_s_arg(float %0, float %1) +// CHECK: define dso_local void @f_floatarr2_tricky3_s_arg(float %0, float %1) void f_floatarr2_tricky3_s_arg(struct floatarr2_tricky3_s a) {} -// CHECK: define { float, float } @f_ret_floatarr2_tricky3_s() +// CHECK: define dso_local { float, float } @f_ret_floatarr2_tricky3_s() struct floatarr2_tricky3_s f_ret_floatarr2_tricky3_s() { return (struct floatarr2_tricky3_s){{}, {{{1.0}}, {{2.0}}}}; } struct floatarr2_tricky4_s { union {}; struct { struct {}; float f[1]; } g[2]; }; -// CHECK: define void @f_floatarr2_tricky4_s_arg(float %0, float %1) +// CHECK: define dso_local void @f_floatarr2_tricky4_s_arg(float %0, float %1) void f_floatarr2_tricky4_s_arg(struct floatarr2_tricky4_s a) {} -// CHECK: define { float, float } @f_ret_floatarr2_tricky4_s() +// CHECK: define dso_local { float, float } @f_ret_floatarr2_tricky4_s() struct floatarr2_tricky4_s f_ret_floatarr2_tricky4_s() { return (struct floatarr2_tricky4_s){{}, {{{}, {1.0}}, {{}, {2.0}}}}; } @@ -233,20 +233,20 @@ struct floatarr2_tricky4_s f_ret_floatarr2_tricky4_s() { struct int_float_int_s { int a; float b; int c; }; -// CHECK: define void @f_int_float_int_s_arg([2 x i64] %a.coerce) +// CHECK: define dso_local void @f_int_float_int_s_arg([2 x i64] %a.coerce) void f_int_float_int_s_arg(struct int_float_int_s a) {} -// CHECK: define [2 x i64] @f_ret_int_float_int_s() +// CHECK: define dso_local [2 x i64] @f_ret_int_float_int_s() struct int_float_int_s f_ret_int_float_int_s() { return (struct int_float_int_s){1, 2.0, 3}; } struct char_char_float_s { char a; char b; float c; }; -// CHECK-LABEL: define void @f_char_char_float_s_arg(i64 %a.coerce) +// CHECK-LABEL: define dso_local void @f_char_char_float_s_arg(i64 %a.coerce) void f_char_char_float_s_arg(struct char_char_float_s a) {} -// CHECK: define i64 @f_ret_char_char_float_s() +// CHECK: define dso_local i64 @f_ret_char_char_float_s() struct char_char_float_s f_ret_char_char_float_s() { return (struct char_char_float_s){1, 2, 3.0}; } @@ -256,10 +256,10 @@ struct char_char_float_s f_ret_char_char_float_s() { union float_u { float a; }; -// CHECK: define void @f_float_u_arg(i64 %a.coerce) +// CHECK: define dso_local void @f_float_u_arg(i64 %a.coerce) void f_float_u_arg(union float_u a) {} -// CHECK: define i64 @f_ret_float_u() +// CHECK: define dso_local i64 @f_ret_float_u() union float_u f_ret_float_u() { return (union float_u){1.0}; } diff --git a/clang/test/CodeGen/sanitize-address-field-padding.cpp b/clang/test/CodeGen/sanitize-address-field-padding.cpp index c20b24769add..8bb2c1504938 100644 --- a/clang/test/CodeGen/sanitize-address-field-padding.cpp +++ b/clang/test/CodeGen/sanitize-address-field-padding.cpp @@ -188,7 +188,7 @@ ExternCStruct extern_C_struct; // CHECK: ret void // // -// CHECK-LABEL: define linkonce_odr void @_ZN20ClassWithVirtualBaseC1Ev +// CHECK-LABEL: define linkonce_odr dso_local void @_ZN20ClassWithVirtualBaseC1Ev // CHECK: call void @__asan_poison_intra_object_redzone({{.*}} 12) // CHECK: call void @__asan_poison_intra_object_redzone({{.*}} 9) // CHECK: call void @__asan_poison_intra_object_redzone({{.*}} 15) @@ -215,7 +215,7 @@ void Create_InheritsFrom_WithVirtualDtor() { // i.e. we ignore -mconstructor-aliases when field paddings are added // because the paddings in InheritsFrom_WithVirtualDtor needs to be unpoisoned // in the dtor. -// WITH_CTOR_ALIASES-LABEL: define void @_Z35Create_InheritsFrom_WithVirtualDtor +// WITH_CTOR_ALIASES-LABEL: define dso_local void @_Z35Create_InheritsFrom_WithVirtualDtor // WITH_CTOR_ALIASES-NOT: call void @_ZN15WithVirtualDtorD2Ev // WITH_CTOR_ALIASES: call void @_ZN28InheritsFrom_WithVirtualDtorD2Ev // WITH_CTOR_ALIASES: ret void @@ -234,6 +234,6 @@ void MakeTrivialCopy(ClassWithTrivialCopy *s1, ClassWithTrivialCopy *s2) { ClassWithTrivialCopy s3(*s2); } -// CHECK-LABEL: define void @_Z15MakeTrivialCopyP20ClassWithTrivialCopyS0_ +// CHECK-LABEL: define dso_local void @_Z15MakeTrivialCopyP20ClassWithTrivialCopyS0_ // CHECK-NOT: memcpy // CHECK: ret void diff --git a/clang/test/CodeGen/sparc-arguments.c b/clang/test/CodeGen/sparc-arguments.c index c5925de89264..24f511b58ca6 100644 --- a/clang/test/CodeGen/sparc-arguments.c +++ b/clang/test/CodeGen/sparc-arguments.c @@ -16,7 +16,7 @@ struct s1 x1; // Ensure the align 8 is passed through: -// CHECK-LABEL: define void @f1() +// CHECK-LABEL: define dso_local void @f1() // CHECK: call void @f1_helper(%struct.s1* byval(%struct.s1) align 8 @x1) // Also ensure the declaration of f1_helper includes it // CHECK: declare void @f1_helper(%struct.s1* byval(%struct.s1) align 8) diff --git a/clang/test/CodeGen/sparc-vaarg.c b/clang/test/CodeGen/sparc-vaarg.c index 920b9a18b065..4ae2b074ad2e 100644 --- a/clang/test/CodeGen/sparc-vaarg.c +++ b/clang/test/CodeGen/sparc-vaarg.c @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -triple sparc -emit-llvm -o - %s | FileCheck %s #include <stdarg.h> -// CHECK-LABEL: define i32 @get_int +// CHECK-LABEL: define dso_local i32 @get_int // CHECK: [[RESULT:%[a-z_0-9]+]] = va_arg {{.*}}, i32{{$}} // CHECK: store i32 [[RESULT]], i32* [[LOC:%[a-z_0-9]+]] // CHECK: [[RESULT2:%[a-z_0-9]+]] = load i32, i32* [[LOC]] @@ -16,7 +16,7 @@ struct Foo { struct Foo dest; -// CHECK-LABEL: define void @get_struct +// CHECK-LABEL: define dso_local void @get_struct // CHECK: [[RESULT:%[a-z_0-9]+]] = va_arg {{.*}}, %struct.Foo*{{$}} // CHECK: [[RESULT2:%[a-z_0-9]+]] = bitcast {{.*}} [[RESULT]] to i8* // CHECK: call void @llvm.memcpy{{.*}}@dest{{.*}}, i8* align {{[0-9]+}} [[RESULT2]] @@ -28,7 +28,7 @@ enum E { Foo_one = 1 }; enum E enum_dest; -// CHECK-LABEL: define void @get_enum +// CHECK-LABEL: define dso_local void @get_enum // CHECK: va_arg i8** {{.*}}, i32 void get_enum(va_list *args) { enum_dest = va_arg(*args, enum E); diff --git a/clang/test/CodeGen/sparcv8-abi.c b/clang/test/CodeGen/sparcv8-abi.c index ee99ee420a74..49193a37f0e9 100644 --- a/clang/test/CodeGen/sparcv8-abi.c +++ b/clang/test/CodeGen/sparcv8-abi.c @@ -1,18 +1,18 @@ // RUN: %clang_cc1 -triple sparc-unknown-unknown -emit-llvm %s -o - | FileCheck %s -// CHECK-LABEL: define { float, float } @p({ float, float }* byval({ float, float }) align 4 %a, { float, float }* byval({ float, float }) align 4 %b) #0 { +// CHECK-LABEL: define dso_local { float, float } @p({ float, float }* byval({ float, float }) align 4 %a, { float, float }* byval({ float, float }) align 4 %b) #0 { float __complex__ p (float __complex__ a, float __complex__ b) { } -// CHECK-LABEL: define { double, double } @q({ double, double }* byval({ double, double }) align 8 %a, { double, double }* byval({ double, double }) align 8 %b) #0 { +// CHECK-LABEL: define dso_local { double, double } @q({ double, double }* byval({ double, double }) align 8 %a, { double, double }* byval({ double, double }) align 8 %b) #0 { double __complex__ q (double __complex__ a, double __complex__ b) { } -// CHECK-LABEL: define { i64, i64 } @r({ i64, i64 }* byval({ i64, i64 }) align 8 %a, { i64, i64 }* byval({ i64, i64 }) align 8 %b) #0 { +// CHECK-LABEL: define dso_local { i64, i64 } @r({ i64, i64 }* byval({ i64, i64 }) align 8 %a, { i64, i64 }* byval({ i64, i64 }) align 8 %b) #0 { long long __complex__ r (long long __complex__ a, long long __complex__ b) { diff --git a/clang/test/CodeGen/sparcv8-inline-asm.c b/clang/test/CodeGen/sparcv8-inline-asm.c index 8befe4556c84..647aa552c417 100644 --- a/clang/test/CodeGen/sparcv8-inline-asm.c +++ b/clang/test/CodeGen/sparcv8-inline-asm.c @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -triple sparc-unknown-unknown -emit-llvm %s -o - | FileCheck %s -// CHECK: define float @fabsf(float %a) +// CHECK: define dso_local float @fabsf(float %a) // CHECK: %{{.*}} = call float asm sideeffect "fabss $1, $0;", "=e,f"(float %{{.*}}) float fabsf(float a) { float res; diff --git a/clang/test/CodeGen/sparcv9-abi.c b/clang/test/CodeGen/sparcv9-abi.c index 5984fa558c83..f9bec31e50df 100644 --- a/clang/test/CodeGen/sparcv9-abi.c +++ b/clang/test/CodeGen/sparcv9-abi.c @@ -1,24 +1,24 @@ // RUN: %clang_cc1 -triple sparcv9-unknown-unknown -emit-llvm %s -o - | FileCheck %s #include <stdarg.h> -// CHECK-LABEL: define void @f_void() +// CHECK-LABEL: define dso_local void @f_void() void f_void(void) {} // Arguments and return values smaller than the word size are extended. -// CHECK-LABEL: define signext i32 @f_int_1(i32 signext %x) +// CHECK-LABEL: define dso_local signext i32 @f_int_1(i32 signext %x) int f_int_1(int x) { return x; } -// CHECK-LABEL: define zeroext i32 @f_int_2(i32 zeroext %x) +// CHECK-LABEL: define dso_local zeroext i32 @f_int_2(i32 zeroext %x) unsigned f_int_2(unsigned x) { return x; } -// CHECK-LABEL: define i64 @f_int_3(i64 %x) +// CHECK-LABEL: define dso_local i64 @f_int_3(i64 %x) long long f_int_3(long long x) { return x; } -// CHECK-LABEL: define signext i8 @f_int_4(i8 signext %x) +// CHECK-LABEL: define dso_local signext i8 @f_int_4(i8 signext %x) char f_int_4(char x) { return x; } -// CHECK-LABEL: define fp128 @f_ld(fp128 %x) +// CHECK-LABEL: define dso_local fp128 @f_ld(fp128 %x) long double f_ld(long double x) { return x; } // Small structs are passed in registers. @@ -26,7 +26,7 @@ struct small { int *a, *b; }; -// CHECK-LABEL: define %struct.small @f_small(i32* %x.coerce0, i32* %x.coerce1) +// CHECK-LABEL: define dso_local %struct.small @f_small(i32* %x.coerce0, i32* %x.coerce1) struct small f_small(struct small x) { x.a += *x.b; x.b = 0; @@ -39,7 +39,7 @@ struct medium { int *c, *d; }; -// CHECK-LABEL: define %struct.medium @f_medium(%struct.medium* %x) +// CHECK-LABEL: define dso_local %struct.medium @f_medium(%struct.medium* %x) struct medium f_medium(struct medium x) { x.a += *x.b; x.b = 0; @@ -53,7 +53,7 @@ struct large { int x; }; -// CHECK-LABEL: define void @f_large(%struct.large* noalias sret %agg.result, %struct.large* %x) +// CHECK-LABEL: define dso_local void @f_large(%struct.large* noalias sret %agg.result, %struct.large* %x) struct large f_large(struct large x) { x.a += *x.b; x.b = 0; @@ -65,7 +65,7 @@ struct reg { int a, b; }; -// CHECK-LABEL: define i64 @f_reg(i64 %x.coerce) +// CHECK-LABEL: define dso_local i64 @f_reg(i64 %x.coerce) struct reg f_reg(struct reg x) { x.a += x.b; return x; @@ -77,7 +77,7 @@ struct mixed { float b; }; -// CHECK-LABEL: define inreg %struct.mixed @f_mixed(i32 inreg %x.coerce0, float inreg %x.coerce1) +// CHECK-LABEL: define dso_local inreg %struct.mixed @f_mixed(i32 inreg %x.coerce0, float inreg %x.coerce1) struct mixed f_mixed(struct mixed x) { x.a += 1; return x; @@ -89,7 +89,7 @@ struct mixed2 { double b; }; -// CHECK: define { i64, double } @f_mixed2(i64 %x.coerce0, double %x.coerce1) +// CHECK: define dso_local { i64, double } @f_mixed2(i64 %x.coerce0, double %x.coerce1) // CHECK: store i64 %x.coerce0 // CHECK: store double %x.coerce1 struct mixed2 f_mixed2(struct mixed2 x) { @@ -103,7 +103,7 @@ struct tiny { char a; }; -// CHECK-LABEL: define i64 @f_tiny(i64 %x.coerce) +// CHECK-LABEL: define dso_local i64 @f_tiny(i64 %x.coerce) // CHECK: %[[HB:[^ ]+]] = lshr i64 %x.coerce, 56 // CHECK: = trunc i64 %[[HB]] to i8 struct tiny f_tiny(struct tiny x) { @@ -111,7 +111,7 @@ struct tiny f_tiny(struct tiny x) { return x; } -// CHECK-LABEL: define void @call_tiny() +// CHECK-LABEL: define dso_local void @call_tiny() // CHECK: %[[XV:[^ ]+]] = zext i8 %{{[^ ]+}} to i64 // CHECK: %[[HB:[^ ]+]] = shl i64 %[[XV]], 56 // CHECK: = call i64 @f_tiny(i64 %[[HB]]) @@ -120,7 +120,7 @@ void call_tiny() { f_tiny(x); } -// CHECK-LABEL: define signext i32 @f_variable(i8* %f, ...) +// CHECK-LABEL: define dso_local signext i32 @f_variable(i8* %f, ...) // CHECK: %ap = alloca i8* // CHECK: call void @llvm.va_start // diff --git a/clang/test/CodeGen/sparcv9-dwarf.c b/clang/test/CodeGen/sparcv9-dwarf.c index b893d9ff74ba..1c83eb955e14 100644 --- a/clang/test/CodeGen/sparcv9-dwarf.c +++ b/clang/test/CodeGen/sparcv9-dwarf.c @@ -7,7 +7,7 @@ int test() { return __builtin_dwarf_sp_column(); } -// CHECK-LABEL: define signext i32 @test() +// CHECK-LABEL: define dso_local signext i32 @test() // CHECK: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 0) // CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 1) // CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @dwarf_reg_size_table, i64 0, i64 2) diff --git a/clang/test/CodeGen/spir-half-type.cpp b/clang/test/CodeGen/spir-half-type.cpp index 5cdc38e99797..9e4b0fe0ca2d 100644 --- a/clang/test/CodeGen/spir-half-type.cpp +++ b/clang/test/CodeGen/spir-half-type.cpp @@ -116,7 +116,7 @@ _Float16 fsub() { return a - b - 3.0f16; } -// CHECK: define spir_func half @_Z4fmulDF16_(half %arg) +// CHECK: define dso_local spir_func half @_Z4fmulDF16_(half %arg) _Float16 fmul(_Float16 arg) { _Float16 a = 1.0f16; const _Float16 b = 2.0f16; diff --git a/clang/test/CodeGen/stackrealign-main.c b/clang/test/CodeGen/stackrealign-main.c index 10b21bf548db..1147048eeecc 100644 --- a/clang/test/CodeGen/stackrealign-main.c +++ b/clang/test/CodeGen/stackrealign-main.c @@ -1,11 +1,11 @@ // RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -o - -mstack-alignment=64 %s | FileCheck %s -// CHECK-LABEL: define void @other() +// CHECK-LABEL: define dso_local void @other() // CHECK: [[OTHER:#[0-9]+]] // CHECK: { void other(void) {} -// CHECK-LABEL: define i32 @main( +// CHECK-LABEL: define dso_local i32 @main( // CHECK: [[MAIN:#[0-9]+]] // CHECK: { int main(int argc, char **argv) { diff --git a/clang/test/CodeGen/stdcall-fastcall.c b/clang/test/CodeGen/stdcall-fastcall.c index cfb430cd06e7..ff1ac84208c8 100644 --- a/clang/test/CodeGen/stdcall-fastcall.c +++ b/clang/test/CodeGen/stdcall-fastcall.c @@ -4,17 +4,17 @@ void __attribute__((fastcall)) f1(void); void __attribute__((stdcall)) f2(void); void __attribute__((thiscall)) f3(void); void __attribute__((fastcall)) f4(void) { -// CHECK-LABEL: define x86_fastcallcc void @f4() +// CHECK-LABEL: define dso_local x86_fastcallcc void @f4() f1(); // CHECK: call x86_fastcallcc void @f1() } void __attribute__((stdcall)) f5(void) { -// CHECK-LABEL: define x86_stdcallcc void @f5() +// CHECK-LABEL: define dso_local x86_stdcallcc void @f5() f2(); // CHECK: call x86_stdcallcc void @f2() } void __attribute__((thiscall)) f6(void) { -// CHECK-LABEL: define x86_thiscallcc void @f6() +// CHECK-LABEL: define dso_local x86_thiscallcc void @f6() f3(); // CHECK: call x86_thiscallcc void @f3() } @@ -51,7 +51,7 @@ void f8(void) { void __attribute__((fastcall)) foo1(int y); void bar1(int y) { - // CHECK-LABEL: define void @bar1 + // CHECK-LABEL: define dso_local void @bar1 // CHECK: call x86_fastcallcc void @foo1(i32 inreg % foo1(y); } @@ -61,14 +61,14 @@ struct S1 { }; void __attribute__((fastcall)) foo2(struct S1 y); void bar2(struct S1 y) { - // CHECK-LABEL: define void @bar2 + // CHECK-LABEL: define dso_local void @bar2 // CHECK: call x86_fastcallcc void @foo2(i32 inreg undef, i32 % foo2(y); } void __attribute__((fastcall)) foo3(int *y); void bar3(int *y) { - // CHECK-LABEL: define void @bar3 + // CHECK-LABEL: define dso_local void @bar3 // CHECK: call x86_fastcallcc void @foo3(i32* inreg % foo3(y); } @@ -76,7 +76,7 @@ void bar3(int *y) { enum Enum {Eval}; void __attribute__((fastcall)) foo4(enum Enum y); void bar4(enum Enum y) { - // CHECK-LABEL: define void @bar4 + // CHECK-LABEL: define dso_local void @bar4 // CHECK: call x86_fastcallcc void @foo4(i32 inreg % foo4(y); } @@ -88,49 +88,49 @@ struct S2 { }; void __attribute__((fastcall)) foo5(struct S2 y); void bar5(struct S2 y) { - // CHECK-LABEL: define void @bar5 + // CHECK-LABEL: define dso_local void @bar5 // CHECK: call x86_fastcallcc void @foo5(%struct.S2* byval(%struct.S2) align 4 % foo5(y); } void __attribute__((fastcall)) foo6(long long y); void bar6(long long y) { - // CHECK-LABEL: define void @bar6 + // CHECK-LABEL: define dso_local void @bar6 // CHECK: call x86_fastcallcc void @foo6(i64 % foo6(y); } void __attribute__((fastcall)) foo7(int a, struct S1 b, int c); void bar7(int a, struct S1 b, int c) { - // CHECK-LABEL: define void @bar7 + // CHECK-LABEL: define dso_local void @bar7 // CHECK: call x86_fastcallcc void @foo7(i32 inreg %{{.*}}, i32 %{{.*}}, i32 %{{.*}} foo7(a, b, c); } void __attribute__((fastcall)) foo8(struct S1 a, int b); void bar8(struct S1 a, int b) { - // CHECK-LABEL: define void @bar8 + // CHECK-LABEL: define dso_local void @bar8 // CHECK: call x86_fastcallcc void @foo8(i32 inreg undef, i32 %{{.*}}, i32 inreg % foo8(a, b); } void __attribute__((fastcall)) foo9(struct S2 a, int b); void bar9(struct S2 a, int b) { - // CHECK-LABEL: define void @bar9 + // CHECK-LABEL: define dso_local void @bar9 // CHECK: call x86_fastcallcc void @foo9(%struct.S2* byval(%struct.S2) align 4 %{{.*}}, i32 % foo9(a, b); } void __attribute__((fastcall)) foo10(float y, int x); void bar10(float y, int x) { - // CHECK-LABEL: define void @bar10 + // CHECK-LABEL: define dso_local void @bar10 // CHECK: call x86_fastcallcc void @foo10(float %{{.*}}, i32 inreg % foo10(y, x); } void __attribute__((fastcall)) foo11(double y, int x); void bar11(double y, int x) { - // CHECK-LABEL: define void @bar11 + // CHECK-LABEL: define dso_local void @bar11 // CHECK: call x86_fastcallcc void @foo11(double %{{.*}}, i32 inreg % foo11(y, x); } @@ -140,7 +140,7 @@ struct S3 { }; void __attribute__((fastcall)) foo12(struct S3 y, int x); void bar12(struct S3 y, int x) { - // CHECK-LABEL: define void @bar12 + // CHECK-LABEL: define dso_local void @bar12 // CHECK: call x86_fastcallcc void @foo12(float %{{.*}}, i32 inreg % foo12(y, x); } diff --git a/clang/test/CodeGen/switch.c b/clang/test/CodeGen/switch.c index 2417a870f166..ab219837cc0d 100644 --- a/clang/test/CodeGen/switch.c +++ b/clang/test/CodeGen/switch.c @@ -63,7 +63,7 @@ static int foo4(int i) { return j; } -// CHECK-LABEL: define i32 @foo4t() +// CHECK-LABEL: define dso_local i32 @foo4t() // CHECK: ret i32 376 // CHECK: } int foo4t() { @@ -71,7 +71,7 @@ int foo4t() { return foo4(111) + foo4(99) + foo4(222) + foo4(601); } -// CHECK-LABEL: define void @foo5() +// CHECK-LABEL: define dso_local void @foo5() // CHECK-NOT: switch // CHECK: } void foo5(){ @@ -83,7 +83,7 @@ void foo5(){ } } -// CHECK-LABEL: define void @foo6() +// CHECK-LABEL: define dso_local void @foo6() // CHECK-NOT: switch // CHECK: } void foo6(){ @@ -91,7 +91,7 @@ void foo6(){ } } -// CHECK-LABEL: define void @foo7() +// CHECK-LABEL: define dso_local void @foo7() // CHECK-NOT: switch // CHECK: } void foo7(){ @@ -101,7 +101,7 @@ void foo7(){ } -// CHECK-LABEL: define i32 @f8( +// CHECK-LABEL: define dso_local i32 @f8( // CHECK: ret i32 3 // CHECK: } int f8(unsigned x) { @@ -115,7 +115,7 @@ int f8(unsigned x) { // Ensure that default after a case range is not ignored. // -// CHECK-LABEL: define i32 @f9() +// CHECK-LABEL: define dso_local i32 @f9() // CHECK: ret i32 10 // CHECK: } static int f9_0(unsigned x) { @@ -134,7 +134,7 @@ int f9() { // miscompilation of fallthrough from default to a (tested) case // range. // -// CHECK-LABEL: define i32 @f10() +// CHECK-LABEL: define dso_local i32 @f10() // CHECK: ret i32 10 // CHECK: } static int f10_0(unsigned x) { @@ -153,7 +153,7 @@ int f10() { // This generated incorrect code because of poor switch chaining. // -// CHECK-LABEL: define i32 @f11( +// CHECK-LABEL: define dso_local i32 @f11( // CHECK: ret i32 3 // CHECK: } int f11(int x) { @@ -167,7 +167,7 @@ int f11(int x) { // This just asserted because of the way case ranges were calculated. // -// CHECK-LABEL: define i32 @f12( +// CHECK-LABEL: define dso_local i32 @f12( // CHECK: ret i32 3 // CHECK: } int f12(int x) { @@ -181,7 +181,7 @@ int f12(int x) { // Make sure return is not constant (if empty range is skipped or miscompiled) // -// CHECK-LABEL: define i32 @f13( +// CHECK-LABEL: define dso_local i32 @f13( // CHECK: ret i32 % // CHECK: } int f13(unsigned x) { diff --git a/clang/test/CodeGen/systemz-abi-vector.c b/clang/test/CodeGen/systemz-abi-vector.c index f2e6c13c718f..8fdc5ed1ab8c 100644 --- a/clang/test/CodeGen/systemz-abi-vector.c +++ b/clang/test/CodeGen/systemz-abi-vector.c @@ -46,158 +46,158 @@ typedef __attribute__((vector_size(16))) long double v1f128; typedef __attribute__((vector_size(32))) char v32i8; unsigned int align = __alignof__ (v16i8); -// CHECK: @align = global i32 16 -// CHECK-VECTOR: @align = global i32 8 +// CHECK: @align = dso_local global i32 16 +// CHECK-VECTOR: @align = dso_local global i32 8 v1i8 pass_v1i8(v1i8 arg) { return arg; } -// CHECK-LABEL: define void @pass_v1i8(<1 x i8>* noalias sret %{{.*}}, <1 x i8>* %0) -// CHECK-VECTOR-LABEL: define <1 x i8> @pass_v1i8(<1 x i8> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_v1i8(<1 x i8>* noalias sret %{{.*}}, <1 x i8>* %0) +// CHECK-VECTOR-LABEL: define dso_local <1 x i8> @pass_v1i8(<1 x i8> %{{.*}}) v2i8 pass_v2i8(v2i8 arg) { return arg; } -// CHECK-LABEL: define void @pass_v2i8(<2 x i8>* noalias sret %{{.*}}, <2 x i8>* %0) -// CHECK-VECTOR-LABEL: define <2 x i8> @pass_v2i8(<2 x i8> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_v2i8(<2 x i8>* noalias sret %{{.*}}, <2 x i8>* %0) +// CHECK-VECTOR-LABEL: define dso_local <2 x i8> @pass_v2i8(<2 x i8> %{{.*}}) v4i8 pass_v4i8(v4i8 arg) { return arg; } -// CHECK-LABEL: define void @pass_v4i8(<4 x i8>* noalias sret %{{.*}}, <4 x i8>* %0) -// CHECK-VECTOR-LABEL: define <4 x i8> @pass_v4i8(<4 x i8> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_v4i8(<4 x i8>* noalias sret %{{.*}}, <4 x i8>* %0) +// CHECK-VECTOR-LABEL: define dso_local <4 x i8> @pass_v4i8(<4 x i8> %{{.*}}) v8i8 pass_v8i8(v8i8 arg) { return arg; } -// CHECK-LABEL: define void @pass_v8i8(<8 x i8>* noalias sret %{{.*}}, <8 x i8>* %0) -// CHECK-VECTOR-LABEL: define <8 x i8> @pass_v8i8(<8 x i8> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_v8i8(<8 x i8>* noalias sret %{{.*}}, <8 x i8>* %0) +// CHECK-VECTOR-LABEL: define dso_local <8 x i8> @pass_v8i8(<8 x i8> %{{.*}}) v16i8 pass_v16i8(v16i8 arg) { return arg; } -// CHECK-LABEL: define void @pass_v16i8(<16 x i8>* noalias sret %{{.*}}, <16 x i8>* %0) -// CHECK-VECTOR-LABEL: define <16 x i8> @pass_v16i8(<16 x i8> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_v16i8(<16 x i8>* noalias sret %{{.*}}, <16 x i8>* %0) +// CHECK-VECTOR-LABEL: define dso_local <16 x i8> @pass_v16i8(<16 x i8> %{{.*}}) v32i8 pass_v32i8(v32i8 arg) { return arg; } -// CHECK-LABEL: define void @pass_v32i8(<32 x i8>* noalias sret %{{.*}}, <32 x i8>* %0) -// CHECK-VECTOR-LABEL: define void @pass_v32i8(<32 x i8>* noalias sret %{{.*}}, <32 x i8>* %0) +// CHECK-LABEL: define dso_local void @pass_v32i8(<32 x i8>* noalias sret %{{.*}}, <32 x i8>* %0) +// CHECK-VECTOR-LABEL: define dso_local void @pass_v32i8(<32 x i8>* noalias sret %{{.*}}, <32 x i8>* %0) v1i16 pass_v1i16(v1i16 arg) { return arg; } -// CHECK-LABEL: define void @pass_v1i16(<1 x i16>* noalias sret %{{.*}}, <1 x i16>* %0) -// CHECK-VECTOR-LABEL: define <1 x i16> @pass_v1i16(<1 x i16> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_v1i16(<1 x i16>* noalias sret %{{.*}}, <1 x i16>* %0) +// CHECK-VECTOR-LABEL: define dso_local <1 x i16> @pass_v1i16(<1 x i16> %{{.*}}) v2i16 pass_v2i16(v2i16 arg) { return arg; } -// CHECK-LABEL: define void @pass_v2i16(<2 x i16>* noalias sret %{{.*}}, <2 x i16>* %0) -// CHECK-VECTOR-LABEL: define <2 x i16> @pass_v2i16(<2 x i16> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_v2i16(<2 x i16>* noalias sret %{{.*}}, <2 x i16>* %0) +// CHECK-VECTOR-LABEL: define dso_local <2 x i16> @pass_v2i16(<2 x i16> %{{.*}}) v4i16 pass_v4i16(v4i16 arg) { return arg; } -// CHECK-LABEL: define void @pass_v4i16(<4 x i16>* noalias sret %{{.*}}, <4 x i16>* %0) -// CHECK-VECTOR-LABEL: define <4 x i16> @pass_v4i16(<4 x i16> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_v4i16(<4 x i16>* noalias sret %{{.*}}, <4 x i16>* %0) +// CHECK-VECTOR-LABEL: define dso_local <4 x i16> @pass_v4i16(<4 x i16> %{{.*}}) v8i16 pass_v8i16(v8i16 arg) { return arg; } -// CHECK-LABEL: define void @pass_v8i16(<8 x i16>* noalias sret %{{.*}}, <8 x i16>* %0) -// CHECK-VECTOR-LABEL: define <8 x i16> @pass_v8i16(<8 x i16> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_v8i16(<8 x i16>* noalias sret %{{.*}}, <8 x i16>* %0) +// CHECK-VECTOR-LABEL: define dso_local <8 x i16> @pass_v8i16(<8 x i16> %{{.*}}) v1i32 pass_v1i32(v1i32 arg) { return arg; } -// CHECK-LABEL: define void @pass_v1i32(<1 x i32>* noalias sret %{{.*}}, <1 x i32>* %0) -// CHECK-VECTOR-LABEL: define <1 x i32> @pass_v1i32(<1 x i32> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_v1i32(<1 x i32>* noalias sret %{{.*}}, <1 x i32>* %0) +// CHECK-VECTOR-LABEL: define dso_local <1 x i32> @pass_v1i32(<1 x i32> %{{.*}}) v2i32 pass_v2i32(v2i32 arg) { return arg; } -// CHECK-LABEL: define void @pass_v2i32(<2 x i32>* noalias sret %{{.*}}, <2 x i32>* %0) -// CHECK-VECTOR-LABEL: define <2 x i32> @pass_v2i32(<2 x i32> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_v2i32(<2 x i32>* noalias sret %{{.*}}, <2 x i32>* %0) +// CHECK-VECTOR-LABEL: define dso_local <2 x i32> @pass_v2i32(<2 x i32> %{{.*}}) v4i32 pass_v4i32(v4i32 arg) { return arg; } -// CHECK-LABEL: define void @pass_v4i32(<4 x i32>* noalias sret %{{.*}}, <4 x i32>* %0) -// CHECK-VECTOR-LABEL: define <4 x i32> @pass_v4i32(<4 x i32> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_v4i32(<4 x i32>* noalias sret %{{.*}}, <4 x i32>* %0) +// CHECK-VECTOR-LABEL: define dso_local <4 x i32> @pass_v4i32(<4 x i32> %{{.*}}) v1i64 pass_v1i64(v1i64 arg) { return arg; } -// CHECK-LABEL: define void @pass_v1i64(<1 x i64>* noalias sret %{{.*}}, <1 x i64>* %0) -// CHECK-VECTOR-LABEL: define <1 x i64> @pass_v1i64(<1 x i64> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_v1i64(<1 x i64>* noalias sret %{{.*}}, <1 x i64>* %0) +// CHECK-VECTOR-LABEL: define dso_local <1 x i64> @pass_v1i64(<1 x i64> %{{.*}}) v2i64 pass_v2i64(v2i64 arg) { return arg; } -// CHECK-LABEL: define void @pass_v2i64(<2 x i64>* noalias sret %{{.*}}, <2 x i64>* %0) -// CHECK-VECTOR-LABEL: define <2 x i64> @pass_v2i64(<2 x i64> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_v2i64(<2 x i64>* noalias sret %{{.*}}, <2 x i64>* %0) +// CHECK-VECTOR-LABEL: define dso_local <2 x i64> @pass_v2i64(<2 x i64> %{{.*}}) v1i128 pass_v1i128(v1i128 arg) { return arg; } -// CHECK-LABEL: define void @pass_v1i128(<1 x i128>* noalias sret %{{.*}}, <1 x i128>* %0) -// CHECK-VECTOR-LABEL: define <1 x i128> @pass_v1i128(<1 x i128> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_v1i128(<1 x i128>* noalias sret %{{.*}}, <1 x i128>* %0) +// CHECK-VECTOR-LABEL: define dso_local <1 x i128> @pass_v1i128(<1 x i128> %{{.*}}) v1f32 pass_v1f32(v1f32 arg) { return arg; } -// CHECK-LABEL: define void @pass_v1f32(<1 x float>* noalias sret %{{.*}}, <1 x float>* %0) -// CHECK-VECTOR-LABEL: define <1 x float> @pass_v1f32(<1 x float> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_v1f32(<1 x float>* noalias sret %{{.*}}, <1 x float>* %0) +// CHECK-VECTOR-LABEL: define dso_local <1 x float> @pass_v1f32(<1 x float> %{{.*}}) v2f32 pass_v2f32(v2f32 arg) { return arg; } -// CHECK-LABEL: define void @pass_v2f32(<2 x float>* noalias sret %{{.*}}, <2 x float>* %0) -// CHECK-VECTOR-LABEL: define <2 x float> @pass_v2f32(<2 x float> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_v2f32(<2 x float>* noalias sret %{{.*}}, <2 x float>* %0) +// CHECK-VECTOR-LABEL: define dso_local <2 x float> @pass_v2f32(<2 x float> %{{.*}}) v4f32 pass_v4f32(v4f32 arg) { return arg; } -// CHECK-LABEL: define void @pass_v4f32(<4 x float>* noalias sret %{{.*}}, <4 x float>* %0) -// CHECK-VECTOR-LABEL: define <4 x float> @pass_v4f32(<4 x float> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_v4f32(<4 x float>* noalias sret %{{.*}}, <4 x float>* %0) +// CHECK-VECTOR-LABEL: define dso_local <4 x float> @pass_v4f32(<4 x float> %{{.*}}) v1f64 pass_v1f64(v1f64 arg) { return arg; } -// CHECK-LABEL: define void @pass_v1f64(<1 x double>* noalias sret %{{.*}}, <1 x double>* %0) -// CHECK-VECTOR-LABEL: define <1 x double> @pass_v1f64(<1 x double> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_v1f64(<1 x double>* noalias sret %{{.*}}, <1 x double>* %0) +// CHECK-VECTOR-LABEL: define dso_local <1 x double> @pass_v1f64(<1 x double> %{{.*}}) v2f64 pass_v2f64(v2f64 arg) { return arg; } -// CHECK-LABEL: define void @pass_v2f64(<2 x double>* noalias sret %{{.*}}, <2 x double>* %0) -// CHECK-VECTOR-LABEL: define <2 x double> @pass_v2f64(<2 x double> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_v2f64(<2 x double>* noalias sret %{{.*}}, <2 x double>* %0) +// CHECK-VECTOR-LABEL: define dso_local <2 x double> @pass_v2f64(<2 x double> %{{.*}}) v1f128 pass_v1f128(v1f128 arg) { return arg; } -// CHECK-LABEL: define void @pass_v1f128(<1 x fp128>* noalias sret %{{.*}}, <1 x fp128>* %0) -// CHECK-VECTOR-LABEL: define <1 x fp128> @pass_v1f128(<1 x fp128> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_v1f128(<1 x fp128>* noalias sret %{{.*}}, <1 x fp128>* %0) +// CHECK-VECTOR-LABEL: define dso_local <1 x fp128> @pass_v1f128(<1 x fp128> %{{.*}}) // Vector-like aggregate types struct agg_v1i8 { v1i8 a; }; struct agg_v1i8 pass_agg_v1i8(struct agg_v1i8 arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_v1i8(%struct.agg_v1i8* noalias sret %{{.*}}, i8 %{{.*}}) -// CHECK-VECTOR-LABEL: define void @pass_agg_v1i8(%struct.agg_v1i8* noalias sret %{{.*}}, <1 x i8> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_v1i8(%struct.agg_v1i8* noalias sret %{{.*}}, i8 %{{.*}}) +// CHECK-VECTOR-LABEL: define dso_local void @pass_agg_v1i8(%struct.agg_v1i8* noalias sret %{{.*}}, <1 x i8> %{{.*}}) struct agg_v2i8 { v2i8 a; }; struct agg_v2i8 pass_agg_v2i8(struct agg_v2i8 arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_v2i8(%struct.agg_v2i8* noalias sret %{{.*}}, i16 %{{.*}}) -// CHECK-VECTOR-LABEL: define void @pass_agg_v2i8(%struct.agg_v2i8* noalias sret %{{.*}}, <2 x i8> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_v2i8(%struct.agg_v2i8* noalias sret %{{.*}}, i16 %{{.*}}) +// CHECK-VECTOR-LABEL: define dso_local void @pass_agg_v2i8(%struct.agg_v2i8* noalias sret %{{.*}}, <2 x i8> %{{.*}}) struct agg_v4i8 { v4i8 a; }; struct agg_v4i8 pass_agg_v4i8(struct agg_v4i8 arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_v4i8(%struct.agg_v4i8* noalias sret %{{.*}}, i32 %{{.*}}) -// CHECK-VECTOR-LABEL: define void @pass_agg_v4i8(%struct.agg_v4i8* noalias sret %{{.*}}, <4 x i8> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_v4i8(%struct.agg_v4i8* noalias sret %{{.*}}, i32 %{{.*}}) +// CHECK-VECTOR-LABEL: define dso_local void @pass_agg_v4i8(%struct.agg_v4i8* noalias sret %{{.*}}, <4 x i8> %{{.*}}) struct agg_v8i8 { v8i8 a; }; struct agg_v8i8 pass_agg_v8i8(struct agg_v8i8 arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_v8i8(%struct.agg_v8i8* noalias sret %{{.*}}, i64 %{{.*}}) -// CHECK-VECTOR-LABEL: define void @pass_agg_v8i8(%struct.agg_v8i8* noalias sret %{{.*}}, <8 x i8> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_v8i8(%struct.agg_v8i8* noalias sret %{{.*}}, i64 %{{.*}}) +// CHECK-VECTOR-LABEL: define dso_local void @pass_agg_v8i8(%struct.agg_v8i8* noalias sret %{{.*}}, <8 x i8> %{{.*}}) struct agg_v16i8 { v16i8 a; }; struct agg_v16i8 pass_agg_v16i8(struct agg_v16i8 arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_v16i8(%struct.agg_v16i8* noalias sret %{{.*}}, %struct.agg_v16i8* %{{.*}}) -// CHECK-VECTOR-LABEL: define void @pass_agg_v16i8(%struct.agg_v16i8* noalias sret %{{.*}}, <16 x i8> %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_v16i8(%struct.agg_v16i8* noalias sret %{{.*}}, %struct.agg_v16i8* %{{.*}}) +// CHECK-VECTOR-LABEL: define dso_local void @pass_agg_v16i8(%struct.agg_v16i8* noalias sret %{{.*}}, <16 x i8> %{{.*}}) struct agg_v32i8 { v32i8 a; }; struct agg_v32i8 pass_agg_v32i8(struct agg_v32i8 arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_v32i8(%struct.agg_v32i8* noalias sret %{{.*}}, %struct.agg_v32i8* %{{.*}}) -// CHECK-VECTOR-LABEL: define void @pass_agg_v32i8(%struct.agg_v32i8* noalias sret %{{.*}}, %struct.agg_v32i8* %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_v32i8(%struct.agg_v32i8* noalias sret %{{.*}}, %struct.agg_v32i8* %{{.*}}) +// CHECK-VECTOR-LABEL: define dso_local void @pass_agg_v32i8(%struct.agg_v32i8* noalias sret %{{.*}}, %struct.agg_v32i8* %{{.*}}) // Verify that the following are *not* vector-like aggregate types struct agg_novector1 { v4i8 a; v4i8 b; }; struct agg_novector1 pass_agg_novector1(struct agg_novector1 arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_novector1(%struct.agg_novector1* noalias sret %{{.*}}, i64 %{{.*}}) -// CHECK-VECTOR-LABEL: define void @pass_agg_novector1(%struct.agg_novector1* noalias sret %{{.*}}, i64 %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_novector1(%struct.agg_novector1* noalias sret %{{.*}}, i64 %{{.*}}) +// CHECK-VECTOR-LABEL: define dso_local void @pass_agg_novector1(%struct.agg_novector1* noalias sret %{{.*}}, i64 %{{.*}}) struct agg_novector2 { v4i8 a; float b; }; struct agg_novector2 pass_agg_novector2(struct agg_novector2 arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_novector2(%struct.agg_novector2* noalias sret %{{.*}}, i64 %{{.*}}) -// CHECK-VECTOR-LABEL: define void @pass_agg_novector2(%struct.agg_novector2* noalias sret %{{.*}}, i64 %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_novector2(%struct.agg_novector2* noalias sret %{{.*}}, i64 %{{.*}}) +// CHECK-VECTOR-LABEL: define dso_local void @pass_agg_novector2(%struct.agg_novector2* noalias sret %{{.*}}, i64 %{{.*}}) struct agg_novector3 { v4i8 a; int : 0; }; struct agg_novector3 pass_agg_novector3(struct agg_novector3 arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_novector3(%struct.agg_novector3* noalias sret %{{.*}}, i32 %{{.*}}) -// CHECK-VECTOR-LABEL: define void @pass_agg_novector3(%struct.agg_novector3* noalias sret %{{.*}}, i32 %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_novector3(%struct.agg_novector3* noalias sret %{{.*}}, i32 %{{.*}}) +// CHECK-VECTOR-LABEL: define dso_local void @pass_agg_novector3(%struct.agg_novector3* noalias sret %{{.*}}, i32 %{{.*}}) struct agg_novector4 { v4i8 a __attribute__((aligned (8))); }; struct agg_novector4 pass_agg_novector4(struct agg_novector4 arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_novector4(%struct.agg_novector4* noalias sret %{{.*}}, i64 %{{.*}}) -// CHECK-VECTOR-LABEL: define void @pass_agg_novector4(%struct.agg_novector4* noalias sret %{{.*}}, i64 %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_novector4(%struct.agg_novector4* noalias sret %{{.*}}, i64 %{{.*}}) +// CHECK-VECTOR-LABEL: define dso_local void @pass_agg_novector4(%struct.agg_novector4* noalias sret %{{.*}}, i64 %{{.*}}) // Accessing variable argument lists v1i8 va_v1i8(__builtin_va_list l) { return __builtin_va_arg(l, v1i8); } -// CHECK-LABEL: define void @va_v1i8(<1 x i8>* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) +// CHECK-LABEL: define dso_local void @va_v1i8(<1 x i8>* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -219,7 +219,7 @@ v1i8 va_v1i8(__builtin_va_list l) { return __builtin_va_arg(l, v1i8); } // CHECK: [[VA_ARG_ADDR:%[^ ]+]] = phi <1 x i8>** [ [[REG_ADDR]], %{{.*}} ], [ [[MEM_ADDR]], %{{.*}} ] // CHECK: [[INDIRECT_ARG:%[^ ]+]] = load <1 x i8>*, <1 x i8>** [[VA_ARG_ADDR]] // CHECK: ret void -// CHECK-VECTOR-LABEL: define <1 x i8> @va_v1i8(%struct.__va_list_tag* %{{.*}}) +// CHECK-VECTOR-LABEL: define dso_local <1 x i8> @va_v1i8(%struct.__va_list_tag* %{{.*}}) // CHECK-VECTOR: [[OVERFLOW_ARG_AREA_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 2 // CHECK-VECTOR: [[OVERFLOW_ARG_AREA:%[^ ]+]] = load i8*, i8** [[OVERFLOW_ARG_AREA_PTR]] // CHECK-VECTOR: [[MEM_ADDR:%[^ ]+]] = bitcast i8* [[OVERFLOW_ARG_AREA]] to <1 x i8>* @@ -229,7 +229,7 @@ v1i8 va_v1i8(__builtin_va_list l) { return __builtin_va_arg(l, v1i8); } // CHECK-VECTOR: ret <1 x i8> [[RET]] v2i8 va_v2i8(__builtin_va_list l) { return __builtin_va_arg(l, v2i8); } -// CHECK-LABEL: define void @va_v2i8(<2 x i8>* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) +// CHECK-LABEL: define dso_local void @va_v2i8(<2 x i8>* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -251,7 +251,7 @@ v2i8 va_v2i8(__builtin_va_list l) { return __builtin_va_arg(l, v2i8); } // CHECK: [[VA_ARG_ADDR:%[^ ]+]] = phi <2 x i8>** [ [[REG_ADDR]], %{{.*}} ], [ [[MEM_ADDR]], %{{.*}} ] // CHECK: [[INDIRECT_ARG:%[^ ]+]] = load <2 x i8>*, <2 x i8>** [[VA_ARG_ADDR]] // CHECK: ret void -// CHECK-VECTOR-LABEL: define <2 x i8> @va_v2i8(%struct.__va_list_tag* %{{.*}}) +// CHECK-VECTOR-LABEL: define dso_local <2 x i8> @va_v2i8(%struct.__va_list_tag* %{{.*}}) // CHECK-VECTOR: [[OVERFLOW_ARG_AREA_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 2 // CHECK-VECTOR: [[OVERFLOW_ARG_AREA:%[^ ]+]] = load i8*, i8** [[OVERFLOW_ARG_AREA_PTR]] // CHECK-VECTOR: [[MEM_ADDR:%[^ ]+]] = bitcast i8* [[OVERFLOW_ARG_AREA]] to <2 x i8>* @@ -261,7 +261,7 @@ v2i8 va_v2i8(__builtin_va_list l) { return __builtin_va_arg(l, v2i8); } // CHECK-VECTOR: ret <2 x i8> [[RET]] v4i8 va_v4i8(__builtin_va_list l) { return __builtin_va_arg(l, v4i8); } -// CHECK-LABEL: define void @va_v4i8(<4 x i8>* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) +// CHECK-LABEL: define dso_local void @va_v4i8(<4 x i8>* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -283,7 +283,7 @@ v4i8 va_v4i8(__builtin_va_list l) { return __builtin_va_arg(l, v4i8); } // CHECK: [[VA_ARG_ADDR:%[^ ]+]] = phi <4 x i8>** [ [[REG_ADDR]], %{{.*}} ], [ [[MEM_ADDR]], %{{.*}} ] // CHECK: [[INDIRECT_ARG:%[^ ]+]] = load <4 x i8>*, <4 x i8>** [[VA_ARG_ADDR]] // CHECK: ret void -// CHECK-VECTOR-LABEL: define <4 x i8> @va_v4i8(%struct.__va_list_tag* %{{.*}}) +// CHECK-VECTOR-LABEL: define dso_local <4 x i8> @va_v4i8(%struct.__va_list_tag* %{{.*}}) // CHECK-VECTOR: [[OVERFLOW_ARG_AREA_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 2 // CHECK-VECTOR: [[OVERFLOW_ARG_AREA:%[^ ]+]] = load i8*, i8** [[OVERFLOW_ARG_AREA_PTR]] // CHECK-VECTOR: [[MEM_ADDR:%[^ ]+]] = bitcast i8* [[OVERFLOW_ARG_AREA]] to <4 x i8>* @@ -293,7 +293,7 @@ v4i8 va_v4i8(__builtin_va_list l) { return __builtin_va_arg(l, v4i8); } // CHECK-VECTOR: ret <4 x i8> [[RET]] v8i8 va_v8i8(__builtin_va_list l) { return __builtin_va_arg(l, v8i8); } -// CHECK-LABEL: define void @va_v8i8(<8 x i8>* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) +// CHECK-LABEL: define dso_local void @va_v8i8(<8 x i8>* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -315,7 +315,7 @@ v8i8 va_v8i8(__builtin_va_list l) { return __builtin_va_arg(l, v8i8); } // CHECK: [[VA_ARG_ADDR:%[^ ]+]] = phi <8 x i8>** [ [[REG_ADDR]], %{{.*}} ], [ [[MEM_ADDR]], %{{.*}} ] // CHECK: [[INDIRECT_ARG:%[^ ]+]] = load <8 x i8>*, <8 x i8>** [[VA_ARG_ADDR]] // CHECK: ret void -// CHECK-VECTOR-LABEL: define <8 x i8> @va_v8i8(%struct.__va_list_tag* %{{.*}}) +// CHECK-VECTOR-LABEL: define dso_local <8 x i8> @va_v8i8(%struct.__va_list_tag* %{{.*}}) // CHECK-VECTOR: [[OVERFLOW_ARG_AREA_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 2 // CHECK-VECTOR: [[OVERFLOW_ARG_AREA:%[^ ]+]] = load i8*, i8** [[OVERFLOW_ARG_AREA_PTR]] // CHECK-VECTOR: [[MEM_ADDR:%[^ ]+]] = bitcast i8* [[OVERFLOW_ARG_AREA]] to <8 x i8>* @@ -325,7 +325,7 @@ v8i8 va_v8i8(__builtin_va_list l) { return __builtin_va_arg(l, v8i8); } // CHECK-VECTOR: ret <8 x i8> [[RET]] v16i8 va_v16i8(__builtin_va_list l) { return __builtin_va_arg(l, v16i8); } -// CHECK-LABEL: define void @va_v16i8(<16 x i8>* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) +// CHECK-LABEL: define dso_local void @va_v16i8(<16 x i8>* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -347,7 +347,7 @@ v16i8 va_v16i8(__builtin_va_list l) { return __builtin_va_arg(l, v16i8); } // CHECK: [[VA_ARG_ADDR:%[^ ]+]] = phi <16 x i8>** [ [[REG_ADDR]], %{{.*}} ], [ [[MEM_ADDR]], %{{.*}} ] // CHECK: [[INDIRECT_ARG:%[^ ]+]] = load <16 x i8>*, <16 x i8>** [[VA_ARG_ADDR]] // CHECK: ret void -// CHECK-VECTOR-LABEL: define <16 x i8> @va_v16i8(%struct.__va_list_tag* %{{.*}}) +// CHECK-VECTOR-LABEL: define dso_local <16 x i8> @va_v16i8(%struct.__va_list_tag* %{{.*}}) // CHECK-VECTOR: [[OVERFLOW_ARG_AREA_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 2 // CHECK-VECTOR: [[OVERFLOW_ARG_AREA:%[^ ]+]] = load i8*, i8** [[OVERFLOW_ARG_AREA_PTR]] // CHECK-VECTOR: [[MEM_ADDR:%[^ ]+]] = bitcast i8* [[OVERFLOW_ARG_AREA]] to <16 x i8>* @@ -357,7 +357,7 @@ v16i8 va_v16i8(__builtin_va_list l) { return __builtin_va_arg(l, v16i8); } // CHECK-VECTOR: ret <16 x i8> [[RET]] v32i8 va_v32i8(__builtin_va_list l) { return __builtin_va_arg(l, v32i8); } -// CHECK-LABEL: define void @va_v32i8(<32 x i8>* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) +// CHECK-LABEL: define dso_local void @va_v32i8(<32 x i8>* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -379,7 +379,7 @@ v32i8 va_v32i8(__builtin_va_list l) { return __builtin_va_arg(l, v32i8); } // CHECK: [[VA_ARG_ADDR:%[^ ]+]] = phi <32 x i8>** [ [[REG_ADDR]], %{{.*}} ], [ [[MEM_ADDR]], %{{.*}} ] // CHECK: [[INDIRECT_ARG:%[^ ]+]] = load <32 x i8>*, <32 x i8>** [[VA_ARG_ADDR]] // CHECK: ret void -// CHECK-VECTOR-LABEL: define void @va_v32i8(<32 x i8>* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) +// CHECK-VECTOR-LABEL: define dso_local void @va_v32i8(<32 x i8>* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) // CHECK-VECTOR: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK-VECTOR: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK-VECTOR: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -403,7 +403,7 @@ v32i8 va_v32i8(__builtin_va_list l) { return __builtin_va_arg(l, v32i8); } // CHECK-VECTOR: ret void struct agg_v1i8 va_agg_v1i8(__builtin_va_list l) { return __builtin_va_arg(l, struct agg_v1i8); } -// CHECK-LABEL: define void @va_agg_v1i8(%struct.agg_v1i8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) +// CHECK-LABEL: define dso_local void @va_agg_v1i8(%struct.agg_v1i8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -424,7 +424,7 @@ struct agg_v1i8 va_agg_v1i8(__builtin_va_list l) { return __builtin_va_arg(l, st // CHECK: store i8* [[OVERFLOW_ARG_AREA2]], i8** [[OVERFLOW_ARG_AREA_PTR]] // CHECK: [[VA_ARG_ADDR:%[^ ]+]] = phi %struct.agg_v1i8* [ [[REG_ADDR]], %{{.*}} ], [ [[MEM_ADDR]], %{{.*}} ] // CHECK: ret void -// CHECK-VECTOR-LABEL: define void @va_agg_v1i8(%struct.agg_v1i8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) +// CHECK-VECTOR-LABEL: define dso_local void @va_agg_v1i8(%struct.agg_v1i8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) // CHECK-VECTOR: [[OVERFLOW_ARG_AREA_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 2 // CHECK-VECTOR: [[OVERFLOW_ARG_AREA:%[^ ]+]] = load i8*, i8** [[OVERFLOW_ARG_AREA_PTR]] // CHECK-VECTOR: [[MEM_ADDR:%[^ ]+]] = bitcast i8* [[OVERFLOW_ARG_AREA]] to %struct.agg_v1i8* @@ -433,7 +433,7 @@ struct agg_v1i8 va_agg_v1i8(__builtin_va_list l) { return __builtin_va_arg(l, st // CHECK-VECTOR: ret void struct agg_v2i8 va_agg_v2i8(__builtin_va_list l) { return __builtin_va_arg(l, struct agg_v2i8); } -// CHECK-LABEL: define void @va_agg_v2i8(%struct.agg_v2i8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) +// CHECK-LABEL: define dso_local void @va_agg_v2i8(%struct.agg_v2i8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -454,7 +454,7 @@ struct agg_v2i8 va_agg_v2i8(__builtin_va_list l) { return __builtin_va_arg(l, st // CHECK: store i8* [[OVERFLOW_ARG_AREA2]], i8** [[OVERFLOW_ARG_AREA_PTR]] // CHECK: [[VA_ARG_ADDR:%[^ ]+]] = phi %struct.agg_v2i8* [ [[REG_ADDR]], %{{.*}} ], [ [[MEM_ADDR]], %{{.*}} ] // CHECK: ret void -// CHECK-VECTOR-LABEL: define void @va_agg_v2i8(%struct.agg_v2i8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) +// CHECK-VECTOR-LABEL: define dso_local void @va_agg_v2i8(%struct.agg_v2i8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) // CHECK-VECTOR: [[OVERFLOW_ARG_AREA_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 2 // CHECK-VECTOR: [[OVERFLOW_ARG_AREA:%[^ ]+]] = load i8*, i8** [[OVERFLOW_ARG_AREA_PTR]] // CHECK-VECTOR: [[MEM_ADDR:%[^ ]+]] = bitcast i8* [[OVERFLOW_ARG_AREA]] to %struct.agg_v2i8* @@ -463,7 +463,7 @@ struct agg_v2i8 va_agg_v2i8(__builtin_va_list l) { return __builtin_va_arg(l, st // CHECK-VECTOR: ret void struct agg_v4i8 va_agg_v4i8(__builtin_va_list l) { return __builtin_va_arg(l, struct agg_v4i8); } -// CHECK-LABEL: define void @va_agg_v4i8(%struct.agg_v4i8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) +// CHECK-LABEL: define dso_local void @va_agg_v4i8(%struct.agg_v4i8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -484,7 +484,7 @@ struct agg_v4i8 va_agg_v4i8(__builtin_va_list l) { return __builtin_va_arg(l, st // CHECK: store i8* [[OVERFLOW_ARG_AREA2]], i8** [[OVERFLOW_ARG_AREA_PTR]] // CHECK: [[VA_ARG_ADDR:%[^ ]+]] = phi %struct.agg_v4i8* [ [[REG_ADDR]], %{{.*}} ], [ [[MEM_ADDR]], %{{.*}} ] // CHECK: ret void -// CHECK-VECTOR-LABEL: define void @va_agg_v4i8(%struct.agg_v4i8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) +// CHECK-VECTOR-LABEL: define dso_local void @va_agg_v4i8(%struct.agg_v4i8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) // CHECK-VECTOR: [[OVERFLOW_ARG_AREA_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 2 // CHECK-VECTOR: [[OVERFLOW_ARG_AREA:%[^ ]+]] = load i8*, i8** [[OVERFLOW_ARG_AREA_PTR]] // CHECK-VECTOR: [[MEM_ADDR:%[^ ]+]] = bitcast i8* [[OVERFLOW_ARG_AREA]] to %struct.agg_v4i8* @@ -493,7 +493,7 @@ struct agg_v4i8 va_agg_v4i8(__builtin_va_list l) { return __builtin_va_arg(l, st // CHECK-VECTOR: ret void struct agg_v8i8 va_agg_v8i8(__builtin_va_list l) { return __builtin_va_arg(l, struct agg_v8i8); } -// CHECK-LABEL: define void @va_agg_v8i8(%struct.agg_v8i8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) +// CHECK-LABEL: define dso_local void @va_agg_v8i8(%struct.agg_v8i8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -514,7 +514,7 @@ struct agg_v8i8 va_agg_v8i8(__builtin_va_list l) { return __builtin_va_arg(l, st // CHECK: store i8* [[OVERFLOW_ARG_AREA2]], i8** [[OVERFLOW_ARG_AREA_PTR]] // CHECK: [[VA_ARG_ADDR:%[^ ]+]] = phi %struct.agg_v8i8* [ [[REG_ADDR]], %{{.*}} ], [ [[MEM_ADDR]], %{{.*}} ] // CHECK: ret void -// CHECK-VECTOR-LABEL: define void @va_agg_v8i8(%struct.agg_v8i8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) +// CHECK-VECTOR-LABEL: define dso_local void @va_agg_v8i8(%struct.agg_v8i8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) // CHECK-VECTOR: [[OVERFLOW_ARG_AREA_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 2 // CHECK-VECTOR: [[OVERFLOW_ARG_AREA:%[^ ]+]] = load i8*, i8** [[OVERFLOW_ARG_AREA_PTR]] // CHECK-VECTOR: [[MEM_ADDR:%[^ ]+]] = bitcast i8* [[OVERFLOW_ARG_AREA]] to %struct.agg_v8i8* @@ -523,7 +523,7 @@ struct agg_v8i8 va_agg_v8i8(__builtin_va_list l) { return __builtin_va_arg(l, st // CHECK-VECTOR: ret void struct agg_v16i8 va_agg_v16i8(__builtin_va_list l) { return __builtin_va_arg(l, struct agg_v16i8); } -// CHECK-LABEL: define void @va_agg_v16i8(%struct.agg_v16i8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) +// CHECK-LABEL: define dso_local void @va_agg_v16i8(%struct.agg_v16i8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -545,7 +545,7 @@ struct agg_v16i8 va_agg_v16i8(__builtin_va_list l) { return __builtin_va_arg(l, // CHECK: [[VA_ARG_ADDR:%[^ ]+]] = phi %struct.agg_v16i8** [ [[REG_ADDR]], %{{.*}} ], [ [[MEM_ADDR]], %{{.*}} ] // CHECK: [[INDIRECT_ARG:%[^ ]+]] = load %struct.agg_v16i8*, %struct.agg_v16i8** [[VA_ARG_ADDR]] // CHECK: ret void -// CHECK-VECTOR-LABEL: define void @va_agg_v16i8(%struct.agg_v16i8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) +// CHECK-VECTOR-LABEL: define dso_local void @va_agg_v16i8(%struct.agg_v16i8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) // CHECK-VECTOR: [[OVERFLOW_ARG_AREA_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 2 // CHECK-VECTOR: [[OVERFLOW_ARG_AREA:%[^ ]+]] = load i8*, i8** [[OVERFLOW_ARG_AREA_PTR]] // CHECK-VECTOR: [[MEM_ADDR:%[^ ]+]] = bitcast i8* [[OVERFLOW_ARG_AREA]] to %struct.agg_v16i8* @@ -554,7 +554,7 @@ struct agg_v16i8 va_agg_v16i8(__builtin_va_list l) { return __builtin_va_arg(l, // CHECK-VECTOR: ret void struct agg_v32i8 va_agg_v32i8(__builtin_va_list l) { return __builtin_va_arg(l, struct agg_v32i8); } -// CHECK-LABEL: define void @va_agg_v32i8(%struct.agg_v32i8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) +// CHECK-LABEL: define dso_local void @va_agg_v32i8(%struct.agg_v32i8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -576,7 +576,7 @@ struct agg_v32i8 va_agg_v32i8(__builtin_va_list l) { return __builtin_va_arg(l, // CHECK: [[VA_ARG_ADDR:%[^ ]+]] = phi %struct.agg_v32i8** [ [[REG_ADDR]], %{{.*}} ], [ [[MEM_ADDR]], %{{.*}} ] // CHECK: [[INDIRECT_ARG:%[^ ]+]] = load %struct.agg_v32i8*, %struct.agg_v32i8** [[VA_ARG_ADDR]] // CHECK: ret void -// CHECK-VECTOR-LABEL: define void @va_agg_v32i8(%struct.agg_v32i8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) +// CHECK-VECTOR-LABEL: define dso_local void @va_agg_v32i8(%struct.agg_v32i8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) // CHECK-VECTOR: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK-VECTOR: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK-VECTOR: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 diff --git a/clang/test/CodeGen/systemz-abi.c b/clang/test/CodeGen/systemz-abi.c index 3511983e32d7..380c0203d865 100644 --- a/clang/test/CodeGen/systemz-abi.c +++ b/clang/test/CodeGen/systemz-abi.c @@ -18,141 +18,141 @@ // Scalar types char pass_char(char arg) { return arg; } -// CHECK-LABEL: define signext i8 @pass_char(i8 signext %{{.*}}) +// CHECK-LABEL: define dso_local signext i8 @pass_char(i8 signext %{{.*}}) short pass_short(short arg) { return arg; } -// CHECK-LABEL: define signext i16 @pass_short(i16 signext %{{.*}}) +// CHECK-LABEL: define dso_local signext i16 @pass_short(i16 signext %{{.*}}) int pass_int(int arg) { return arg; } -// CHECK-LABEL: define signext i32 @pass_int(i32 signext %{{.*}}) +// CHECK-LABEL: define dso_local signext i32 @pass_int(i32 signext %{{.*}}) long pass_long(long arg) { return arg; } -// CHECK-LABEL: define i64 @pass_long(i64 %{{.*}}) +// CHECK-LABEL: define dso_local i64 @pass_long(i64 %{{.*}}) long long pass_longlong(long long arg) { return arg; } -// CHECK-LABEL: define i64 @pass_longlong(i64 %{{.*}}) +// CHECK-LABEL: define dso_local i64 @pass_longlong(i64 %{{.*}}) __int128 pass_int128(__int128 arg) { return arg; } -// CHECK-LABEL: define void @pass_int128(i128* noalias sret %{{.*}}, i128* %0) +// CHECK-LABEL: define dso_local void @pass_int128(i128* noalias sret %{{.*}}, i128* %0) float pass_float(float arg) { return arg; } -// CHECK-LABEL: define float @pass_float(float %{{.*}}) +// CHECK-LABEL: define dso_local float @pass_float(float %{{.*}}) double pass_double(double arg) { return arg; } -// CHECK-LABEL: define double @pass_double(double %{{.*}}) +// CHECK-LABEL: define dso_local double @pass_double(double %{{.*}}) long double pass_longdouble(long double arg) { return arg; } -// CHECK-LABEL: define void @pass_longdouble(fp128* noalias sret %{{.*}}, fp128* %0) +// CHECK-LABEL: define dso_local void @pass_longdouble(fp128* noalias sret %{{.*}}, fp128* %0) // Complex types _Complex char pass_complex_char(_Complex char arg) { return arg; } -// CHECK-LABEL: define void @pass_complex_char({ i8, i8 }* noalias sret %{{.*}}, { i8, i8 }* %{{.*}}arg) +// CHECK-LABEL: define dso_local void @pass_complex_char({ i8, i8 }* noalias sret %{{.*}}, { i8, i8 }* %{{.*}}arg) _Complex short pass_complex_short(_Complex short arg) { return arg; } -// CHECK-LABEL: define void @pass_complex_short({ i16, i16 }* noalias sret %{{.*}}, { i16, i16 }* %{{.*}}arg) +// CHECK-LABEL: define dso_local void @pass_complex_short({ i16, i16 }* noalias sret %{{.*}}, { i16, i16 }* %{{.*}}arg) _Complex int pass_complex_int(_Complex int arg) { return arg; } -// CHECK-LABEL: define void @pass_complex_int({ i32, i32 }* noalias sret %{{.*}}, { i32, i32 }* %{{.*}}arg) +// CHECK-LABEL: define dso_local void @pass_complex_int({ i32, i32 }* noalias sret %{{.*}}, { i32, i32 }* %{{.*}}arg) _Complex long pass_complex_long(_Complex long arg) { return arg; } -// CHECK-LABEL: define void @pass_complex_long({ i64, i64 }* noalias sret %{{.*}}, { i64, i64 }* %{{.*}}arg) +// CHECK-LABEL: define dso_local void @pass_complex_long({ i64, i64 }* noalias sret %{{.*}}, { i64, i64 }* %{{.*}}arg) _Complex long long pass_complex_longlong(_Complex long long arg) { return arg; } -// CHECK-LABEL: define void @pass_complex_longlong({ i64, i64 }* noalias sret %{{.*}}, { i64, i64 }* %{{.*}}arg) +// CHECK-LABEL: define dso_local void @pass_complex_longlong({ i64, i64 }* noalias sret %{{.*}}, { i64, i64 }* %{{.*}}arg) _Complex float pass_complex_float(_Complex float arg) { return arg; } -// CHECK-LABEL: define void @pass_complex_float({ float, float }* noalias sret %{{.*}}, { float, float }* %{{.*}}arg) +// CHECK-LABEL: define dso_local void @pass_complex_float({ float, float }* noalias sret %{{.*}}, { float, float }* %{{.*}}arg) _Complex double pass_complex_double(_Complex double arg) { return arg; } -// CHECK-LABEL: define void @pass_complex_double({ double, double }* noalias sret %{{.*}}, { double, double }* %{{.*}}arg) +// CHECK-LABEL: define dso_local void @pass_complex_double({ double, double }* noalias sret %{{.*}}, { double, double }* %{{.*}}arg) _Complex long double pass_complex_longdouble(_Complex long double arg) { return arg; } -// CHECK-LABEL: define void @pass_complex_longdouble({ fp128, fp128 }* noalias sret %{{.*}}, { fp128, fp128 }* %{{.*}}arg) +// CHECK-LABEL: define dso_local void @pass_complex_longdouble({ fp128, fp128 }* noalias sret %{{.*}}, { fp128, fp128 }* %{{.*}}arg) // Aggregate types struct agg_1byte { char a[1]; }; struct agg_1byte pass_agg_1byte(struct agg_1byte arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_1byte(%struct.agg_1byte* noalias sret %{{.*}}, i8 %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_1byte(%struct.agg_1byte* noalias sret %{{.*}}, i8 %{{.*}}) struct agg_2byte { char a[2]; }; struct agg_2byte pass_agg_2byte(struct agg_2byte arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_2byte(%struct.agg_2byte* noalias sret %{{.*}}, i16 %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_2byte(%struct.agg_2byte* noalias sret %{{.*}}, i16 %{{.*}}) struct agg_3byte { char a[3]; }; struct agg_3byte pass_agg_3byte(struct agg_3byte arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_3byte(%struct.agg_3byte* noalias sret %{{.*}}, %struct.agg_3byte* %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_3byte(%struct.agg_3byte* noalias sret %{{.*}}, %struct.agg_3byte* %{{.*}}) struct agg_4byte { char a[4]; }; struct agg_4byte pass_agg_4byte(struct agg_4byte arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_4byte(%struct.agg_4byte* noalias sret %{{.*}}, i32 %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_4byte(%struct.agg_4byte* noalias sret %{{.*}}, i32 %{{.*}}) struct agg_5byte { char a[5]; }; struct agg_5byte pass_agg_5byte(struct agg_5byte arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_5byte(%struct.agg_5byte* noalias sret %{{.*}}, %struct.agg_5byte* %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_5byte(%struct.agg_5byte* noalias sret %{{.*}}, %struct.agg_5byte* %{{.*}}) struct agg_6byte { char a[6]; }; struct agg_6byte pass_agg_6byte(struct agg_6byte arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_6byte(%struct.agg_6byte* noalias sret %{{.*}}, %struct.agg_6byte* %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_6byte(%struct.agg_6byte* noalias sret %{{.*}}, %struct.agg_6byte* %{{.*}}) struct agg_7byte { char a[7]; }; struct agg_7byte pass_agg_7byte(struct agg_7byte arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_7byte(%struct.agg_7byte* noalias sret %{{.*}}, %struct.agg_7byte* %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_7byte(%struct.agg_7byte* noalias sret %{{.*}}, %struct.agg_7byte* %{{.*}}) struct agg_8byte { char a[8]; }; struct agg_8byte pass_agg_8byte(struct agg_8byte arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_8byte(%struct.agg_8byte* noalias sret %{{.*}}, i64 %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_8byte(%struct.agg_8byte* noalias sret %{{.*}}, i64 %{{.*}}) struct agg_16byte { char a[16]; }; struct agg_16byte pass_agg_16byte(struct agg_16byte arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_16byte(%struct.agg_16byte* noalias sret %{{.*}}, %struct.agg_16byte* %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_16byte(%struct.agg_16byte* noalias sret %{{.*}}, %struct.agg_16byte* %{{.*}}) // Float-like aggregate types struct agg_float { float a; }; struct agg_float pass_agg_float(struct agg_float arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_float(%struct.agg_float* noalias sret %{{.*}}, float %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_float(%struct.agg_float* noalias sret %{{.*}}, float %{{.*}}) struct agg_double { double a; }; struct agg_double pass_agg_double(struct agg_double arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_double(%struct.agg_double* noalias sret %{{.*}}, double %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_double(%struct.agg_double* noalias sret %{{.*}}, double %{{.*}}) struct agg_longdouble { long double a; }; struct agg_longdouble pass_agg_longdouble(struct agg_longdouble arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_longdouble(%struct.agg_longdouble* noalias sret %{{.*}}, %struct.agg_longdouble* %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_longdouble(%struct.agg_longdouble* noalias sret %{{.*}}, %struct.agg_longdouble* %{{.*}}) struct agg_float_a8 { float a __attribute__((aligned (8))); }; struct agg_float_a8 pass_agg_float_a8(struct agg_float_a8 arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_float_a8(%struct.agg_float_a8* noalias sret %{{.*}}, double %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_float_a8(%struct.agg_float_a8* noalias sret %{{.*}}, double %{{.*}}) struct agg_float_a16 { float a __attribute__((aligned (16))); }; struct agg_float_a16 pass_agg_float_a16(struct agg_float_a16 arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_float_a16(%struct.agg_float_a16* noalias sret %{{.*}}, %struct.agg_float_a16* %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_float_a16(%struct.agg_float_a16* noalias sret %{{.*}}, %struct.agg_float_a16* %{{.*}}) // Verify that the following are *not* float-like aggregate types struct agg_nofloat1 { float a; float b; }; struct agg_nofloat1 pass_agg_nofloat1(struct agg_nofloat1 arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_nofloat1(%struct.agg_nofloat1* noalias sret %{{.*}}, i64 %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_nofloat1(%struct.agg_nofloat1* noalias sret %{{.*}}, i64 %{{.*}}) struct agg_nofloat2 { float a; int b; }; struct agg_nofloat2 pass_agg_nofloat2(struct agg_nofloat2 arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_nofloat2(%struct.agg_nofloat2* noalias sret %{{.*}}, i64 %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_nofloat2(%struct.agg_nofloat2* noalias sret %{{.*}}, i64 %{{.*}}) struct agg_nofloat3 { float a; int : 0; }; struct agg_nofloat3 pass_agg_nofloat3(struct agg_nofloat3 arg) { return arg; } -// CHECK-LABEL: define void @pass_agg_nofloat3(%struct.agg_nofloat3* noalias sret %{{.*}}, i32 %{{.*}}) +// CHECK-LABEL: define dso_local void @pass_agg_nofloat3(%struct.agg_nofloat3* noalias sret %{{.*}}, i32 %{{.*}}) // Accessing variable argument lists int va_int(__builtin_va_list l) { return __builtin_va_arg(l, int); } -// CHECK-LABEL: define signext i32 @va_int(%struct.__va_list_tag* %{{.*}}) +// CHECK-LABEL: define dso_local signext i32 @va_int(%struct.__va_list_tag* %{{.*}}) // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -176,7 +176,7 @@ int va_int(__builtin_va_list l) { return __builtin_va_arg(l, int); } // CHECK: ret i32 [[RET]] long va_long(__builtin_va_list l) { return __builtin_va_arg(l, long); } -// CHECK-LABEL: define i64 @va_long(%struct.__va_list_tag* %{{.*}}) +// CHECK-LABEL: define dso_local i64 @va_long(%struct.__va_list_tag* %{{.*}}) // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -200,7 +200,7 @@ long va_long(__builtin_va_list l) { return __builtin_va_arg(l, long); } // CHECK: ret i64 [[RET]] long long va_longlong(__builtin_va_list l) { return __builtin_va_arg(l, long long); } -// CHECK-LABEL: define i64 @va_longlong(%struct.__va_list_tag* %{{.*}}) +// CHECK-LABEL: define dso_local i64 @va_longlong(%struct.__va_list_tag* %{{.*}}) // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -224,7 +224,7 @@ long long va_longlong(__builtin_va_list l) { return __builtin_va_arg(l, long lon // CHECK: ret i64 [[RET]] double va_double(__builtin_va_list l) { return __builtin_va_arg(l, double); } -// CHECK-LABEL: define double @va_double(%struct.__va_list_tag* %{{.*}}) +// CHECK-LABEL: define dso_local double @va_double(%struct.__va_list_tag* %{{.*}}) // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 1 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 4 @@ -248,7 +248,7 @@ double va_double(__builtin_va_list l) { return __builtin_va_arg(l, double); } // CHECK: ret double [[RET]] long double va_longdouble(__builtin_va_list l) { return __builtin_va_arg(l, long double); } -// CHECK-LABEL: define void @va_longdouble(fp128* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) +// CHECK-LABEL: define dso_local void @va_longdouble(fp128* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}}) // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -274,7 +274,7 @@ long double va_longdouble(__builtin_va_list l) { return __builtin_va_arg(l, long // CHECK: ret void _Complex char va_complex_char(__builtin_va_list l) { return __builtin_va_arg(l, _Complex char); } -// CHECK-LABEL: define void @va_complex_char({ i8, i8 }* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} +// CHECK-LABEL: define dso_local void @va_complex_char({ i8, i8 }* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -298,7 +298,7 @@ _Complex char va_complex_char(__builtin_va_list l) { return __builtin_va_arg(l, // CHECK: ret void struct agg_1byte va_agg_1byte(__builtin_va_list l) { return __builtin_va_arg(l, struct agg_1byte); } -// CHECK-LABEL: define void @va_agg_1byte(%struct.agg_1byte* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} +// CHECK-LABEL: define dso_local void @va_agg_1byte(%struct.agg_1byte* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -321,7 +321,7 @@ struct agg_1byte va_agg_1byte(__builtin_va_list l) { return __builtin_va_arg(l, // CHECK: ret void struct agg_2byte va_agg_2byte(__builtin_va_list l) { return __builtin_va_arg(l, struct agg_2byte); } -// CHECK-LABEL: define void @va_agg_2byte(%struct.agg_2byte* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} +// CHECK-LABEL: define dso_local void @va_agg_2byte(%struct.agg_2byte* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -344,7 +344,7 @@ struct agg_2byte va_agg_2byte(__builtin_va_list l) { return __builtin_va_arg(l, // CHECK: ret void struct agg_3byte va_agg_3byte(__builtin_va_list l) { return __builtin_va_arg(l, struct agg_3byte); } -// CHECK-LABEL: define void @va_agg_3byte(%struct.agg_3byte* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} +// CHECK-LABEL: define dso_local void @va_agg_3byte(%struct.agg_3byte* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -368,7 +368,7 @@ struct agg_3byte va_agg_3byte(__builtin_va_list l) { return __builtin_va_arg(l, // CHECK: ret void struct agg_4byte va_agg_4byte(__builtin_va_list l) { return __builtin_va_arg(l, struct agg_4byte); } -// CHECK-LABEL: define void @va_agg_4byte(%struct.agg_4byte* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} +// CHECK-LABEL: define dso_local void @va_agg_4byte(%struct.agg_4byte* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -391,7 +391,7 @@ struct agg_4byte va_agg_4byte(__builtin_va_list l) { return __builtin_va_arg(l, // CHECK: ret void struct agg_8byte va_agg_8byte(__builtin_va_list l) { return __builtin_va_arg(l, struct agg_8byte); } -// CHECK-LABEL: define void @va_agg_8byte(%struct.agg_8byte* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} +// CHECK-LABEL: define dso_local void @va_agg_8byte(%struct.agg_8byte* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -414,7 +414,7 @@ struct agg_8byte va_agg_8byte(__builtin_va_list l) { return __builtin_va_arg(l, // CHECK: ret void struct agg_float va_agg_float(__builtin_va_list l) { return __builtin_va_arg(l, struct agg_float); } -// CHECK-LABEL: define void @va_agg_float(%struct.agg_float* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} +// CHECK-LABEL: define dso_local void @va_agg_float(%struct.agg_float* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 1 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 4 @@ -437,7 +437,7 @@ struct agg_float va_agg_float(__builtin_va_list l) { return __builtin_va_arg(l, // CHECK: ret void struct agg_double va_agg_double(__builtin_va_list l) { return __builtin_va_arg(l, struct agg_double); } -// CHECK-LABEL: define void @va_agg_double(%struct.agg_double* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} +// CHECK-LABEL: define dso_local void @va_agg_double(%struct.agg_double* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 1 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 4 @@ -460,7 +460,7 @@ struct agg_double va_agg_double(__builtin_va_list l) { return __builtin_va_arg(l // CHECK: ret void struct agg_longdouble va_agg_longdouble(__builtin_va_list l) { return __builtin_va_arg(l, struct agg_longdouble); } -// CHECK-LABEL: define void @va_agg_longdouble(%struct.agg_longdouble* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} +// CHECK-LABEL: define dso_local void @va_agg_longdouble(%struct.agg_longdouble* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -484,7 +484,7 @@ struct agg_longdouble va_agg_longdouble(__builtin_va_list l) { return __builtin_ // CHECK: ret void struct agg_float_a8 va_agg_float_a8(__builtin_va_list l) { return __builtin_va_arg(l, struct agg_float_a8); } -// CHECK-LABEL: define void @va_agg_float_a8(%struct.agg_float_a8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} +// CHECK-LABEL: define dso_local void @va_agg_float_a8(%struct.agg_float_a8* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 1 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 4 @@ -507,7 +507,7 @@ struct agg_float_a8 va_agg_float_a8(__builtin_va_list l) { return __builtin_va_a // CHECK: ret void struct agg_float_a16 va_agg_float_a16(__builtin_va_list l) { return __builtin_va_arg(l, struct agg_float_a16); } -// CHECK-LABEL: define void @va_agg_float_a16(%struct.agg_float_a16* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} +// CHECK-LABEL: define dso_local void @va_agg_float_a16(%struct.agg_float_a16* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -531,7 +531,7 @@ struct agg_float_a16 va_agg_float_a16(__builtin_va_list l) { return __builtin_va // CHECK: ret void struct agg_nofloat1 va_agg_nofloat1(__builtin_va_list l) { return __builtin_va_arg(l, struct agg_nofloat1); } -// CHECK-LABEL: define void @va_agg_nofloat1(%struct.agg_nofloat1* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} +// CHECK-LABEL: define dso_local void @va_agg_nofloat1(%struct.agg_nofloat1* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -554,7 +554,7 @@ struct agg_nofloat1 va_agg_nofloat1(__builtin_va_list l) { return __builtin_va_a // CHECK: ret void struct agg_nofloat2 va_agg_nofloat2(__builtin_va_list l) { return __builtin_va_arg(l, struct agg_nofloat2); } -// CHECK-LABEL: define void @va_agg_nofloat2(%struct.agg_nofloat2* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} +// CHECK-LABEL: define dso_local void @va_agg_nofloat2(%struct.agg_nofloat2* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 @@ -577,7 +577,7 @@ struct agg_nofloat2 va_agg_nofloat2(__builtin_va_list l) { return __builtin_va_a // CHECK: ret void struct agg_nofloat3 va_agg_nofloat3(__builtin_va_list l) { return __builtin_va_arg(l, struct agg_nofloat3); } -// CHECK-LABEL: define void @va_agg_nofloat3(%struct.agg_nofloat3* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} +// CHECK-LABEL: define dso_local void @va_agg_nofloat3(%struct.agg_nofloat3* noalias sret %{{.*}}, %struct.__va_list_tag* %{{.*}} // CHECK: [[REG_COUNT_PTR:%[^ ]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %{{.*}}, i32 0, i32 0 // CHECK: [[REG_COUNT:%[^ ]+]] = load i64, i64* [[REG_COUNT_PTR]] // CHECK: [[FITS_IN_REGS:%[^ ]+]] = icmp ult i64 [[REG_COUNT]], 5 diff --git a/clang/test/CodeGen/systemz-abi.cpp b/clang/test/CodeGen/systemz-abi.cpp index 0249e9f63c9b..9cc81290a898 100644 --- a/clang/test/CodeGen/systemz-abi.cpp +++ b/clang/test/CodeGen/systemz-abi.cpp @@ -5,5 +5,5 @@ struct agg_float_cpp { float a; int : 0; }; struct agg_float_cpp pass_agg_float_cpp(struct agg_float_cpp arg) { return arg; } -// CHECK-LABEL: define void @_Z18pass_agg_float_cpp13agg_float_cpp(%struct.agg_float_cpp* noalias sret %{{.*}}, float %{{.*}}) +// CHECK-LABEL: define dso_local void @_Z18pass_agg_float_cpp13agg_float_cpp(%struct.agg_float_cpp* noalias sret %{{.*}}, float %{{.*}}) diff --git a/clang/test/CodeGen/systemz-inline-asm.c b/clang/test/CodeGen/systemz-inline-asm.c index 7c273dac579e..3dfd9801ad5b 100644 --- a/clang/test/CodeGen/systemz-inline-asm.c +++ b/clang/test/CodeGen/systemz-inline-asm.c @@ -5,31 +5,31 @@ unsigned long gl; void test_store_m(unsigned int i) { asm("st %1, %0" : "=m" (gi) : "r" (i)); -// CHECK-LABEL: define void @test_store_m(i32 zeroext %i) +// CHECK-LABEL: define dso_local void @test_store_m(i32 zeroext %i) // CHECK: call void asm "st $1, $0", "=*m,r"(i32* nonnull @gi, i32 %i) } void test_store_Q(unsigned int i) { asm("st %1, %0" : "=Q" (gi) : "r" (i)); -// CHECK-LABEL: define void @test_store_Q(i32 zeroext %i) +// CHECK-LABEL: define dso_local void @test_store_Q(i32 zeroext %i) // CHECK: call void asm "st $1, $0", "=*Q,r"(i32* nonnull @gi, i32 %i) } void test_store_R(unsigned int i) { asm("st %1, %0" : "=R" (gi) : "r" (i)); -// CHECK-LABEL: define void @test_store_R(i32 zeroext %i) +// CHECK-LABEL: define dso_local void @test_store_R(i32 zeroext %i) // CHECK: call void asm "st $1, $0", "=*R,r"(i32* nonnull @gi, i32 %i) } void test_store_S(unsigned int i) { asm("st %1, %0" : "=S" (gi) : "r" (i)); -// CHECK-LABEL: define void @test_store_S(i32 zeroext %i) +// CHECK-LABEL: define dso_local void @test_store_S(i32 zeroext %i) // CHECK: call void asm "st $1, $0", "=*S,r"(i32* nonnull @gi, i32 %i) } void test_store_T(unsigned int i) { asm("st %1, %0" : "=T" (gi) : "r" (i)); -// CHECK-LABEL: define void @test_store_T(i32 zeroext %i) +// CHECK-LABEL: define dso_local void @test_store_T(i32 zeroext %i) // CHECK: call void asm "st $1, $0", "=*T,r"(i32* nonnull @gi, i32 %i) } @@ -37,7 +37,7 @@ int test_load_m() { unsigned int i; asm("l %0, %1" : "=r" (i) : "m" (gi)); return i; -// CHECK-LABEL: define signext i32 @test_load_m() +// CHECK-LABEL: define dso_local signext i32 @test_load_m() // CHECK: call i32 asm "l $0, $1", "=r,*m"(i32* nonnull @gi) } @@ -45,7 +45,7 @@ int test_load_Q() { unsigned int i; asm("l %0, %1" : "=r" (i) : "Q" (gi)); return i; -// CHECK-LABEL: define signext i32 @test_load_Q() +// CHECK-LABEL: define dso_local signext i32 @test_load_Q() // CHECK: call i32 asm "l $0, $1", "=r,*Q"(i32* nonnull @gi) } @@ -53,7 +53,7 @@ int test_load_R() { unsigned int i; asm("l %0, %1" : "=r" (i) : "R" (gi)); return i; -// CHECK-LABEL: define signext i32 @test_load_R() +// CHECK-LABEL: define dso_local signext i32 @test_load_R() // CHECK: call i32 asm "l $0, $1", "=r,*R"(i32* nonnull @gi) } @@ -61,7 +61,7 @@ int test_load_S() { unsigned int i; asm("l %0, %1" : "=r" (i) : "S" (gi)); return i; -// CHECK-LABEL: define signext i32 @test_load_S() +// CHECK-LABEL: define dso_local signext i32 @test_load_S() // CHECK: call i32 asm "l $0, $1", "=r,*S"(i32* nonnull @gi) } @@ -69,61 +69,61 @@ int test_load_T() { unsigned int i; asm("l %0, %1" : "=r" (i) : "T" (gi)); return i; -// CHECK-LABEL: define signext i32 @test_load_T() +// CHECK-LABEL: define dso_local signext i32 @test_load_T() // CHECK: call i32 asm "l $0, $1", "=r,*T"(i32* nonnull @gi) } void test_mI(unsigned char *c) { asm volatile("cli %0, %1" :: "Q" (*c), "I" (100)); -// CHECK-LABEL: define void @test_mI(i8* %c) +// CHECK-LABEL: define dso_local void @test_mI(i8* %c) // CHECK: call void asm sideeffect "cli $0, $1", "*Q,I"(i8* %c, i32 100) } unsigned int test_dJa(unsigned int i, unsigned int j) { asm("sll %0, %2(%3)" : "=d" (i) : "0" (i), "J" (1000), "a" (j)); return i; -// CHECK-LABEL: define zeroext i32 @test_dJa(i32 zeroext %i, i32 zeroext %j) +// CHECK-LABEL: define dso_local zeroext i32 @test_dJa(i32 zeroext %i, i32 zeroext %j) // CHECK: call i32 asm "sll $0, $2($3)", "=d,0,J,a"(i32 %i, i32 1000, i32 %j) } unsigned long test_rK(unsigned long i) { asm("aghi %0, %2" : "=r" (i) : "0" (i), "K" (-30000)); return i; -// CHECK-LABEL: define i64 @test_rK(i64 %i) +// CHECK-LABEL: define dso_local i64 @test_rK(i64 %i) // CHECK: call i64 asm "aghi $0, $2", "=r,0,K"(i64 %i, i32 -30000) } unsigned long test_rL(unsigned long i) { asm("sllg %0, %1, %2" : "=r" (i) : "r" (i), "L" (500000)); return i; -// CHECK-LABEL: define i64 @test_rL(i64 %i) +// CHECK-LABEL: define dso_local i64 @test_rL(i64 %i) // CHECK: call i64 asm "sllg $0, $1, $2", "=r,r,L"(i64 %i, i32 500000) } void test_M() { asm volatile("#FOO %0" :: "M"(0x7fffffff)); -// CHECK-LABEL: define void @test_M() +// CHECK-LABEL: define dso_local void @test_M() // CHECK: call void asm sideeffect "#FOO $0", "M"(i32 2147483647) } float test_f32(float f, float g) { asm("aebr %0, %2" : "=f" (f) : "0" (f), "f" (g)); return f; -// CHECK-LABEL: define float @test_f32(float %f, float %g) +// CHECK-LABEL: define dso_local float @test_f32(float %f, float %g) // CHECK: call float asm "aebr $0, $2", "=f,0,f"(float %f, float %g) } double test_f64(double f, double g) { asm("adbr %0, %2" : "=f" (f) : "0" (f), "f" (g)); return f; -// CHECK-LABEL: define double @test_f64(double %f, double %g) +// CHECK-LABEL: define dso_local double @test_f64(double %f, double %g) // CHECK: call double asm "adbr $0, $2", "=f,0,f"(double %f, double %g) } long double test_f128(long double f, long double g) { asm("axbr %0, %2" : "=f" (f) : "0" (f), "f" (g)); return f; -// CHECK: define void @test_f128(fp128* noalias nocapture sret [[DEST:%.*]], fp128* nocapture readonly %0, fp128* nocapture readonly %1) +// CHECK: define dso_local void @test_f128(fp128* noalias nocapture sret [[DEST:%.*]], fp128* nocapture readonly %0, fp128* nocapture readonly %1) // CHECK: %f = load fp128, fp128* %0 // CHECK: %g = load fp128, fp128* %1 // CHECK: [[RESULT:%.*]] = tail call fp128 asm "axbr $0, $2", "=f,0,f"(fp128 %f, fp128 %g) diff --git a/clang/test/CodeGen/thread-specifier.c b/clang/test/CodeGen/thread-specifier.c index ddcb4375a8d6..1bd800f2eb16 100644 --- a/clang/test/CodeGen/thread-specifier.c +++ b/clang/test/CodeGen/thread-specifier.c @@ -6,11 +6,11 @@ // CHECK: @d.e = internal thread_local global // CHECK: @d.f = internal thread_local global // CHECK: @f.a = internal thread_local(initialexec) global -// CHECK: @a = thread_local global -// CHECK: @g = thread_local global -// CHECK: @h = thread_local(localdynamic) global -// CHECK: @i = thread_local(initialexec) global -// CHECK: @j = thread_local(localexec) global +// CHECK: @a = dso_local thread_local global +// CHECK: @g = dso_local thread_local global +// CHECK: @h = dso_local thread_local(localdynamic) global +// CHECK: @i = dso_local thread_local(initialexec) global +// CHECK: @j = dso_local thread_local(localexec) global // CHECK-NOT: @_ZTW // CHECK-NOT: @_ZTH diff --git a/clang/test/CodeGen/tls-model.c b/clang/test/CodeGen/tls-model.c index 41c8de0b0e89..66b2a43e6009 100644 --- a/clang/test/CodeGen/tls-model.c +++ b/clang/test/CodeGen/tls-model.c @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 %s -triple x86_64-pc-linux-gnu -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-GD -// RUN: %clang_cc1 %s -triple x86_64-pc-linux-gnu -ftls-model=global-dynamic -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-GD -// RUN: %clang_cc1 %s -triple x86_64-pc-linux-gnu -ftls-model=local-dynamic -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-LD +// RUN: %clang_cc1 %s -triple x86_64-pc-linux-gnu -pic-level 2 -fsemantic-interposition -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-GD +// RUN: %clang_cc1 %s -triple x86_64-pc-linux-gnu -pic-level 2 -fsemantic-interposition -ftls-model=global-dynamic -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-GD +// RUN: %clang_cc1 %s -triple x86_64-pc-linux-gnu -pic-level 2 -fsemantic-interposition -ftls-model=local-dynamic -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-LD // RUN: %clang_cc1 %s -triple x86_64-pc-linux-gnu -ftls-model=initial-exec -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-IE // RUN: %clang_cc1 %s -triple x86_64-pc-linux-gnu -ftls-model=local-exec -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-LE // -// RUN: %clang_cc1 %s -triple x86_64-pc-linux-gnu -femulated-tls -emit-llvm -o - 2>&1 | \ +// RUN: %clang_cc1 %s -triple x86_64-pc-linux-gnu -pic-level 2 -fsemantic-interposition -femulated-tls -emit-llvm -o - 2>&1 | \ // RUN: FileCheck %s -check-prefix=CHECK-GD int z1 = 0; @@ -31,14 +31,14 @@ int __thread __attribute__((tls_model("initial-exec"))) z; // CHECK-LD: @x = thread_local(localdynamic) global i32 0 // CHECK-LD: @z = thread_local(initialexec) global i32 0 -// CHECK-IE: @z1 = global i32 0 +// CHECK-IE: @z1 = dso_local global i32 0 // CHECK-IE: @f.y = internal thread_local(initialexec) global i32 0 -// CHECK-IE: @z2 = common global i32 0 -// CHECK-IE: @x = thread_local(initialexec) global i32 0 -// CHECK-IE: @z = thread_local(initialexec) global i32 0 +// CHECK-IE: @z2 = common dso_local global i32 0 +// CHECK-IE: @x = dso_local thread_local(initialexec) global i32 0 +// CHECK-IE: @z = dso_local thread_local(initialexec) global i32 0 -// CHECK-LE: @z1 = global i32 0 +// CHECK-LE: @z1 = dso_local global i32 0 // CHECK-LE: @f.y = internal thread_local(localexec) global i32 0 -// CHECK-LE: @z2 = common global i32 0 -// CHECK-LE: @x = thread_local(localexec) global i32 0 -// CHECK-LE: @z = thread_local(initialexec) global i32 0 +// CHECK-LE: @z2 = common dso_local global i32 0 +// CHECK-LE: @x = dso_local thread_local(localexec) global i32 0 +// CHECK-LE: @z = dso_local thread_local(initialexec) global i32 0 diff --git a/clang/test/CodeGen/transparent-union-redecl.c b/clang/test/CodeGen/transparent-union-redecl.c index 31192089827d..499a859207b0 100644 --- a/clang/test/CodeGen/transparent-union-redecl.c +++ b/clang/test/CodeGen/transparent-union-redecl.c @@ -9,34 +9,34 @@ typedef union { float f; } TU __attribute__((transparent_union)); -// CHECK-LABEL: define void @f0(i32 %tu.coerce) +// CHECK-LABEL: define dso_local void @f0(i32 %tu.coerce) // CHECK: %tu = alloca %union.TU, align 4 // CHECK: %coerce.dive = getelementptr inbounds %union.TU, %union.TU* %tu, i32 0, i32 0 // CHECK: store i32 %tu.coerce, i32* %coerce.dive, align 4 void f0(TU tu) {} void f0(int i); -// CHECK-LABEL: define void @f1(i32 %tu.coerce) +// CHECK-LABEL: define dso_local void @f1(i32 %tu.coerce) // CHECK: %tu = alloca %union.TU, align 4 // CHECK: %coerce.dive = getelementptr inbounds %union.TU, %union.TU* %tu, i32 0, i32 0 // CHECK: store i32 %tu.coerce, i32* %coerce.dive, align 4 void f1(int i); void f1(TU tu) {} -// CHECK-LABEL: define void @f2(i32 %i) +// CHECK-LABEL: define dso_local void @f2(i32 %i) // CHECK: %i.addr = alloca i32, align 4 // CHECK: store i32 %i, i32* %i.addr, align 4 void f2(TU tu); void f2(int i) {} -// CHECK-LABEL: define void @f3(i32 %i) +// CHECK-LABEL: define dso_local void @f3(i32 %i) // CHECK: %i.addr = alloca i32, align 4 // CHECK: store i32 %i, i32* %i.addr, align 4 void f3(int i) {} void f3(TU tu); // Also test functions with parameters specified K&R style. -// CHECK-LABEL: define void @knrStyle(i32 %tu.coerce) +// CHECK-LABEL: define dso_local void @knrStyle(i32 %tu.coerce) // CHECK: %tu = alloca %union.TU, align 4 // CHECK: %coerce.dive = getelementptr inbounds %union.TU, %union.TU* %tu, i32 0, i32 0 // CHECK: store i32 %tu.coerce, i32* %coerce.dive, align 4 diff --git a/clang/test/CodeGen/transparent-union.c b/clang/test/CodeGen/transparent-union.c index efaef1bae987..c17f2553eb9b 100644 --- a/clang/test/CodeGen/transparent-union.c +++ b/clang/test/CodeGen/transparent-union.c @@ -21,12 +21,12 @@ typedef union { void f0(transp_t0 obj); -// CHECK-LABEL: define void @f1_0(i32* %a0) +// CHECK-LABEL: define dso_local void @f1_0(i32* %a0) // CHECK: call void @f0(i8* %{{.*}}) // CHECK: call void %{{.*}}(i8* %{{[a-z0-9]*}}) // CHECK: } -// ARM-LABEL: define arm_aapcscc void @f1_0(i32* %a0) +// ARM-LABEL: define dso_local arm_aapcscc void @f1_0(i32* %a0) // ARM: call arm_aapcscc void @f0(i8* %{{.*}}) // ARM: call arm_aapcscc void %{{.*}}(i8* %{{[a-z0-9]*}}) // ARM: } diff --git a/clang/test/CodeGen/ubsan-asan-noreturn.c b/clang/test/CodeGen/ubsan-asan-noreturn.c index 516c58469d59..046acfadef3e 100644 --- a/clang/test/CodeGen/ubsan-asan-noreturn.c +++ b/clang/test/CodeGen/ubsan-asan-noreturn.c @@ -5,7 +5,7 @@ void my_longjmp(void) __attribute__((noreturn)); -// CHECK-LABEL: define void @calls_noreturn() +// CHECK-LABEL: define dso_local void @calls_noreturn() void calls_noreturn() { my_longjmp(); // CHECK: @__asan_handle_no_return{{.*}} !nosanitize diff --git a/clang/test/CodeGen/ubsan-function.cpp b/clang/test/CodeGen/ubsan-function.cpp index 749e6214242c..143d9c8f3654 100644 --- a/clang/test/CodeGen/ubsan-function.cpp +++ b/clang/test/CodeGen/ubsan-function.cpp @@ -1,9 +1,9 @@ // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - %s -fsanitize=function -fno-sanitize-recover=all | FileCheck %s -// CHECK-LABEL: define void @_Z3funv() #0 prologue <{ i32, i32 }> <{ i32 846595819, i32 trunc (i64 sub (i64 ptrtoint (i8** @0 to i64), i64 ptrtoint (void ()* @_Z3funv to i64)) to i32) }> { +// CHECK-LABEL: define dso_local void @_Z3funv() #0 prologue <{ i32, i32 }> <{ i32 846595819, i32 trunc (i64 sub (i64 ptrtoint (i8** @0 to i64), i64 ptrtoint (void ()* @_Z3funv to i64)) to i32) }> { void fun() {} -// CHECK-LABEL: define void @_Z6callerPFvvE(void ()* %f) +// CHECK-LABEL: define dso_local void @_Z6callerPFvvE(void ()* %f) // CHECK: getelementptr <{ i32, i32 }>, <{ i32, i32 }>* {{.*}}, i32 0, i32 0, !nosanitize // CHECK: load i32, i32* {{.*}}, align {{.*}}, !nosanitize // CHECK: icmp eq i32 {{.*}}, 846595819, !nosanitize diff --git a/clang/test/CodeGen/unaligned-decl.c b/clang/test/CodeGen/unaligned-decl.c index d5d32bd830fa..90ae0ab09773 100644 --- a/clang/test/CodeGen/unaligned-decl.c +++ b/clang/test/CodeGen/unaligned-decl.c @@ -1,9 +1,9 @@ // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fms-extensions -emit-llvm < %s | FileCheck %s -// CHECK: @a1 = global i32 1, align 1 +// CHECK: @a1 = dso_local global i32 1, align 1 __unaligned int a1 = 1; -// CHECK: @a2 = global i32 1, align 1 +// CHECK: @a2 = dso_local global i32 1, align 1 int __unaligned a2 = 1; // CHECK: @a3 = {{.*}} align 1 diff --git a/clang/test/CodeGen/union-tbaa1.c b/clang/test/CodeGen/union-tbaa1.c index 07f5fcfeb421..01f8f316c167 100644 --- a/clang/test/CodeGen/union-tbaa1.c +++ b/clang/test/CodeGen/union-tbaa1.c @@ -7,7 +7,7 @@ typedef union __attribute__((aligned(4))) { void bar(vect32 p[][2]); -// CHECK-LABEL: define void @fred +// CHECK-LABEL: define dso_local void @fred void fred(unsigned Num, int Vec[2], int *Index, int Arr[4][2]) { vect32 Tmp[4][2]; // Generate tbaa for the load of Index: diff --git a/clang/test/CodeGen/unsigned-overflow-minimal.c b/clang/test/CodeGen/unsigned-overflow-minimal.c index d4b89664f840..6904569c889d 100644 --- a/clang/test/CodeGen/unsigned-overflow-minimal.c +++ b/clang/test/CodeGen/unsigned-overflow-minimal.c @@ -2,19 +2,19 @@ unsigned long li, lj, lk; -// CHECK-LABEL: define void @testlongadd() +// CHECK-LABEL: define dso_local void @testlongadd() void testlongadd() { // CHECK: call void @__ubsan_handle_add_overflow_minimal_abort() li = lj + lk; } -// CHECK-LABEL: define void @testlongsub() +// CHECK-LABEL: define dso_local void @testlongsub() void testlongsub() { // CHECK: call void @__ubsan_handle_sub_overflow_minimal_abort() li = lj - lk; } -// CHECK-LABEL: define void @testlongmul() +// CHECK-LABEL: define dso_local void @testlongmul() void testlongmul() { // CHECK: call void @__ubsan_handle_mul_overflow_minimal_abort() li = lj * lk; diff --git a/clang/test/CodeGen/unwind-attr.c b/clang/test/CodeGen/unwind-attr.c index 997923500369..73b755ae6265 100644 --- a/clang/test/CodeGen/unwind-attr.c +++ b/clang/test/CodeGen/unwind-attr.c @@ -3,22 +3,22 @@ int opaque(); -// CHECK: define [[INT:i.*]] @test0() [[TF:#[0-9]+]] { -// CHECK-NOEXC: define [[INT:i.*]] @test0() [[NUW:#[0-9]+]] { +// CHECK: define dso_local [[INT:i.*]] @test0() [[TF:#[0-9]+]] { +// CHECK-NOEXC: define dso_local [[INT:i.*]] @test0() [[NUW:#[0-9]+]] { int test0(void) { return opaque(); } // <rdar://problem/8087431>: locally infer nounwind at -O0 -// CHECK: define [[INT:i.*]] @test1() [[NUW:#[0-9]+]] { -// CHECK-NOEXC: define [[INT:i.*]] @test1() [[NUW]] { +// CHECK: define dso_local [[INT:i.*]] @test1() [[NUW:#[0-9]+]] { +// CHECK-NOEXC: define dso_local [[INT:i.*]] @test1() [[NUW]] { int test1(void) { return 0; } // <rdar://problem/8283071>: not for weak functions -// CHECK: define weak [[INT:i.*]] @test2() [[TF]] { -// CHECK-NOEXC: define weak [[INT:i.*]] @test2() [[NUW]] { +// CHECK: define weak dso_local [[INT:i.*]] @test2() [[TF]] { +// CHECK-NOEXC: define weak dso_local [[INT:i.*]] @test2() [[NUW]] { __attribute__((weak)) int test2(void) { return 0; } diff --git a/clang/test/CodeGen/variadic-null-win64.c b/clang/test/CodeGen/variadic-null-win64.c index a52fb896ddab..0c0cebacee25 100644 --- a/clang/test/CodeGen/variadic-null-win64.c +++ b/clang/test/CodeGen/variadic-null-win64.c @@ -18,6 +18,6 @@ void f(const char *f) { // WINDOWS: define dso_local void @f(i8* %f) // WINDOWS: call void (i8*, ...) @v(i8* {{.*}}, i32 1, i32 2, i32 3, i64 0) // WINDOWS: call void bitcast (void (...)* @kr to void (i8*, i32, i32, i32, i32)*)(i8* {{.*}}, i32 1, i32 2, i32 3, i32 0) -// LINUX: define void @f(i8* %f) +// LINUX: define dso_local void @f(i8* %f) // LINUX: call void (i8*, ...) @v(i8* {{.*}}, i32 1, i32 2, i32 3, i32 0) // LINUX: call void (i8*, i32, i32, i32, i32, ...) bitcast (void (...)* @kr to void (i8*, i32, i32, i32, i32, ...)*)(i8* {{.*}}, i32 1, i32 2, i32 3, i32 0) diff --git a/clang/test/CodeGen/visibility.c b/clang/test/CodeGen/visibility.c index 8e153b893a3f..f2635517fb22 100644 --- a/clang/test/CodeGen/visibility.c +++ b/clang/test/CodeGen/visibility.c @@ -2,8 +2,8 @@ // RUN: %clang_cc1 %s -triple i386-unknown-unknown -fvisibility protected -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-PROTECTED // RUN: %clang_cc1 %s -triple i386-unknown-unknown -fvisibility hidden -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-HIDDEN -// CHECK-DEFAULT: @g_def = global i32 0 -// CHECK-DEFAULT: @g_com = common global i32 0 +// CHECK-DEFAULT: @g_def = dso_local global i32 0 +// CHECK-DEFAULT: @g_com = common dso_local global i32 0 // CHECK-DEFAULT: @g_ext = external global i32 // CHECK-DEFAULT: @g_deferred = internal global // CHECK-PROTECTED: @g_def = protected global i32 0 @@ -23,7 +23,7 @@ static char g_deferred[] = "hello"; // CHECK-PROTECTED: @test4 = hidden global i32 10 // CHECK-HIDDEN: @test4 = hidden global i32 10 -// CHECK-DEFAULT-LABEL: define i32 @f_def() +// CHECK-DEFAULT-LABEL: define dso_local i32 @f_def() // CHECK-DEFAULT: declare void @f_ext() // CHECK-DEFAULT-LABEL: define internal void @f_deferred() // CHECK-PROTECTED-LABEL: define protected i32 @f_def() @@ -45,16 +45,16 @@ int f_def(void) { } // PR8457 -// CHECK-DEFAULT-LABEL: define void @test1( -// CHECK-PROTECTED-LABEL: define void @test1( -// CHECK-HIDDEN-LABEL: define void @test1( +// CHECK-DEFAULT-LABEL: define dso_local void @test1( +// CHECK-PROTECTED-LABEL: define dso_local void @test1( +// CHECK-HIDDEN-LABEL: define dso_local void @test1( struct Test1 { int field; }; void __attribute__((visibility("default"))) test1(struct Test1 *v) { } // rdar://problem/8595231 -// CHECK-DEFAULT-LABEL: define void @test2() -// CHECK-PROTECTED-LABEL: define void @test2() -// CHECK-HIDDEN-LABEL: define void @test2() +// CHECK-DEFAULT-LABEL: define dso_local void @test2() +// CHECK-PROTECTED-LABEL: define dso_local void @test2() +// CHECK-HIDDEN-LABEL: define dso_local void @test2() void test2(void); void __attribute__((visibility("default"))) test2(void) {} diff --git a/clang/test/CodeGen/vla.c b/clang/test/CodeGen/vla.c index 37243cd17290..307fe36447da 100644 --- a/clang/test/CodeGen/vla.c +++ b/clang/test/CodeGen/vla.c @@ -38,7 +38,7 @@ void g(int count) { } // rdar://8403108 -// CHECK-LABEL: define void @f_8403108 +// CHECK-LABEL: define dso_local void @f_8403108 void f_8403108(unsigned x) { // CHECK: call i8* @llvm.stacksave() char s1[x]; @@ -87,7 +87,7 @@ int test2(int n) } // http://llvm.org/PR8567 -// CHECK-LABEL: define double @test_PR8567 +// CHECK-LABEL: define dso_local double @test_PR8567 double test_PR8567(int n, double (*p)[n][5]) { // CHECK: [[NV:%.*]] = alloca i32, align 4 // CHECK-NEXT: [[PV:%.*]] = alloca [5 x double]*, align 4 @@ -105,7 +105,7 @@ double test_PR8567(int n, double (*p)[n][5]) { } int test4(unsigned n, char (*p)[n][n+1][6]) { - // CHECK-LABEL: define i32 @test4( + // CHECK-LABEL: define dso_local i32 @test4( // CHECK: [[N:%.*]] = alloca i32, align 4 // CHECK-NEXT: [[P:%.*]] = alloca [6 x i8]*, align 4 // CHECK-NEXT: [[P2:%.*]] = alloca [6 x i8]*, align 4 @@ -147,7 +147,7 @@ int test4(unsigned n, char (*p)[n][n+1][6]) { // rdar://11485774 void test5(void) { - // CHECK-LABEL: define void @test5( + // CHECK-LABEL: define dso_local void @test5( int a[5], i = 0; // CHECK: [[A:%.*]] = alloca [5 x i32], align 4 // CHECK-NEXT: [[I:%.*]] = alloca i32, align 4 @@ -170,7 +170,7 @@ void test5(void) void test6(void) { - // CHECK-LABEL: define void @test6( + // CHECK-LABEL: define dso_local void @test6( int n = 20, **a, i=0; // CHECK: [[N:%.*]] = alloca i32, align 4 // CHECK-NEXT: [[A:%.*]] = alloca i32**, align 4 @@ -193,16 +193,16 @@ void test6(void) // Follow gcc's behavior for VLAs in parameter lists. PR9559. void test7(int a[b(0)]) { - // CHECK-LABEL: define void @test7( + // CHECK-LABEL: define dso_local void @test7( // CHECK: call i32 @b(i8* null) } // Make sure we emit dereferenceable or nonnull when the static keyword is // provided. void test8(int a[static 3]) { } -// CHECK: define void @test8(i32* dereferenceable(12) %a) +// CHECK: define dso_local void @test8(i32* dereferenceable(12) %a) void test9(int n, int a[static n]) { } -// NULL-INVALID: define void @test9(i32 %n, i32* nonnull %a) -// NULL-VALID: define void @test9(i32 %n, i32* %a) +// NULL-INVALID: define dso_local void @test9(i32 %n, i32* nonnull %a) +// NULL-VALID: define dso_local void @test9(i32 %n, i32* %a) diff --git a/clang/test/CodeGen/volatile-complex.c b/clang/test/CodeGen/volatile-complex.c index cd8f72d28669..3a811987ecfc 100644 --- a/clang/test/CodeGen/volatile-complex.c +++ b/clang/test/CodeGen/volatile-complex.c @@ -12,7 +12,7 @@ volatile _Complex double cd; volatile _Complex float cf32 __attribute__((aligned(32))); volatile _Complex double cd32 __attribute__((aligned(32))); -// CHECK-LABEL: define void @test_cf() +// CHECK-LABEL: define dso_local void @test_cf() void test_cf() { // CHECK: load volatile float, float* getelementptr inbounds ({ float, float }, { float, float }* @cf, i32 0, i32 0), align 4 // CHECK-NEXT: load volatile float, float* getelementptr inbounds ({ float, float }, { float, float }* @cf, i32 0, i32 1), align 4 @@ -25,7 +25,7 @@ void test_cf() { // CHECK-NEXT: ret void } -// CHECK-LABEL: define void @test_cd() +// CHECK-LABEL: define dso_local void @test_cd() void test_cd() { // CHECK: load volatile double, double* getelementptr inbounds ({ double, double }, { double, double }* @cd, i32 0, i32 0), align 8 // CHECK-NEXT: load volatile double, double* getelementptr inbounds ({ double, double }, { double, double }* @cd, i32 0, i32 1), align 8 @@ -38,7 +38,7 @@ void test_cd() { // CHECK-NEXT: ret void } -// CHECK-LABEL: define void @test_cf32() +// CHECK-LABEL: define dso_local void @test_cf32() void test_cf32() { // CHECK: load volatile float, float* getelementptr inbounds ({ float, float }, { float, float }* @cf32, i32 0, i32 0), align 32 // CHECK-NEXT: load volatile float, float* getelementptr inbounds ({ float, float }, { float, float }* @cf32, i32 0, i32 1), align 4 @@ -51,7 +51,7 @@ void test_cf32() { // CHECK-NEXT: ret void } -// CHECK-LABEL: define void @test_cd32() +// CHECK-LABEL: define dso_local void @test_cd32() void test_cd32() { // CHECK: load volatile double, double* getelementptr inbounds ({ double, double }, { double, double }* @cd32, i32 0, i32 0), align 32 // CHECK-NEXT: load volatile double, double* getelementptr inbounds ({ double, double }, { double, double }* @cd32, i32 0, i32 1), align 8 diff --git a/clang/test/CodeGen/x86-inline-asm-min-vector-width.c b/clang/test/CodeGen/x86-inline-asm-min-vector-width.c index 8d08ca0c6f9a..16b1c4d68737 100644 --- a/clang/test/CodeGen/x86-inline-asm-min-vector-width.c +++ b/clang/test/CodeGen/x86-inline-asm-min-vector-width.c @@ -4,38 +4,38 @@ typedef long long __m128i __attribute__ ((vector_size (16))); typedef long long __m256i __attribute__ ((vector_size (32))); typedef long long __m512i __attribute__ ((vector_size (64))); -// CHECK: define <2 x i64> @testXMMout(<2 x i64>* %p) #0 +// CHECK: define dso_local <2 x i64> @testXMMout(<2 x i64>* %p) #0 __m128i testXMMout(__m128i *p) { __m128i xmm0; __asm__("vmovdqu %1, %0" :"=v"(xmm0) : "m"(*(__m128i*)p)); return xmm0; } -// CHECK: define <4 x i64> @testYMMout(<4 x i64>* %p) #1 +// CHECK: define dso_local <4 x i64> @testYMMout(<4 x i64>* %p) #1 __m256i testYMMout(__m256i *p) { __m256i ymm0; __asm__("vmovdqu %1, %0" :"=v"(ymm0) : "m"(*(__m256i*)p)); return ymm0; } -// CHECK: define <8 x i64> @testZMMout(<8 x i64>* %p) #2 +// CHECK: define dso_local <8 x i64> @testZMMout(<8 x i64>* %p) #2 __m512i testZMMout(__m512i *p) { __m512i zmm0; __asm__("vmovdqu64 %1, %0" :"=v"(zmm0) : "m"(*(__m512i*)p)); return zmm0; } -// CHECK: define void @testXMMin(<2 x i64> %xmm0, <2 x i64>* %p) #0 +// CHECK: define dso_local void @testXMMin(<2 x i64> %xmm0, <2 x i64>* %p) #0 void testXMMin(__m128i xmm0, __m128i *p) { __asm__("vmovdqu %0, %1" : : "v"(xmm0), "m"(*(__m128i*)p)); } -// CHECK: define void @testYMMin(<4 x i64> %ymm0, <4 x i64>* %p) #1 +// CHECK: define dso_local void @testYMMin(<4 x i64> %ymm0, <4 x i64>* %p) #1 void testYMMin(__m256i ymm0, __m256i *p) { __asm__("vmovdqu %0, %1" : : "v"(ymm0), "m"(*(__m256i*)p)); } -// CHECK: define void @testZMMin(<8 x i64> %zmm0, <8 x i64>* %p) #2 +// CHECK: define dso_local void @testZMMin(<8 x i64> %zmm0, <8 x i64>* %p) #2 void testZMMin(__m512i zmm0, __m512i *p) { __asm__("vmovdqu64 %0, %1" : : "v"(zmm0), "m"(*(__m512i*)p)); } diff --git a/clang/test/CodeGen/x86-long-double.cpp b/clang/test/CodeGen/x86-long-double.cpp index 40ac29715fd6..3e67f41970e7 100644 --- a/clang/test/CodeGen/x86-long-double.cpp +++ b/clang/test/CodeGen/x86-long-double.cpp @@ -34,20 +34,20 @@ long double x = 0; int size = sizeof(x); -// FP80-ELF32: @x = global x86_fp80 {{.*}}, align 4 -// FP80-ELF32: @size = global i32 12 -// FP80-ELF64: @x = global x86_fp80 {{.*}}, align 16 -// FP80-ELF64: @size = global i32 16 +// FP80-ELF32: @x = dso_local global x86_fp80 {{.*}}, align 4 +// FP80-ELF32: @size = dso_local global i32 12 +// FP80-ELF64: @x = dso_local global x86_fp80 {{.*}}, align 16 +// FP80-ELF64: @size = dso_local global i32 16 // FP80-DARWIN: @x = global x86_fp80 {{.*}}, align 16 // FP80-DARWIN: @size = global i32 16 -// FP64-X32: @x = global double {{.*}}, align 4 -// FP64-X32: @size = global i32 8 -// FP64-X64: @x = global double {{.*}}, align 8 -// FP64-X64: @size = global i32 8 +// FP64-X32: @x = {{.*}}global double {{.*}}, align 4 +// FP64-X32: @size = {{.*}}global i32 8 +// FP64-X64: @x = {{.*}}global double {{.*}}, align 8 +// FP64-X64: @size = {{.*}}global i32 8 -// FP128: @x = global fp128 {{.*}}, align 16 -// FP128: @size = global i32 16 +// FP128: @x = {{.*}}global fp128 {{.*}}, align 16 +// FP128: @size = {{.*}}global i32 16 long double foo(long double d) { return d; } diff --git a/clang/test/CodeGen/x86-soft-float.c b/clang/test/CodeGen/x86-soft-float.c index 3f756286fe00..fbc4026f2140 100644 --- a/clang/test/CodeGen/x86-soft-float.c +++ b/clang/test/CodeGen/x86-soft-float.c @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -triple i386-unknown-unknown -mregparm 3 -emit-llvm %s -o - | FileCheck %s -check-prefix=HARD // RUN: %clang_cc1 -triple i386-unknown-unknown -mregparm 3 -mfloat-abi soft -emit-llvm %s -o - | FileCheck %s -check-prefix=SOFT -// HARD: define void @f1(float %a) -// SOFT: define void @f1(float inreg %a) +// HARD: define dso_local void @f1(float %a) +// SOFT: define dso_local void @f1(float inreg %a) void f1(float a) {} diff --git a/clang/test/CodeGen/x86-vec-i128.c b/clang/test/CodeGen/x86-vec-i128.c index aee3b9efe7b1..9c8a8eabbcee 100644 --- a/clang/test/CodeGen/x86-vec-i128.c +++ b/clang/test/CodeGen/x86-vec-i128.c @@ -23,8 +23,8 @@ typedef unsigned long long v16u64 __attribute__((vector_size(16))); typedef unsigned __int128 v16u128 __attribute__((vector_size(16))); v16u64 test_v16u128(v16u64 a, v16u128 b) { -// CLANG10ABI128: define <2 x i64> @test_v16u128(<2 x i64> %{{.*}}, <2 x i64> %{{.*}}) -// CLANG9ABI128: define <2 x i64> @test_v16u128(<2 x i64> %{{.*}}, <1 x i128> %{{.*}}) +// CLANG10ABI128: define dso_local <2 x i64> @test_v16u128(<2 x i64> %{{.*}}, <2 x i64> %{{.*}}) +// CLANG9ABI128: define {{(dso_local )?}}<2 x i64> @test_v16u128(<2 x i64> %{{.*}}, <1 x i128> %{{.*}}) return a + (v16u64)b; } @@ -33,9 +33,9 @@ typedef unsigned __int128 v32u128 __attribute__((vector_size(32))); v32u64 test_v32u128(v32u64 a, v32u128 b) { // MEM256ALIGN16: define <4 x i64> @test_v32u128(<4 x i64>* byval(<4 x i64>) align 16 %{{.*}}, <2 x i128>* byval(<2 x i128>) align 16 %{{.*}}) -// MEM256ALIGN32: define <4 x i64> @test_v32u128(<4 x i64>* byval(<4 x i64>) align 32 %{{.*}}, <2 x i128>* byval(<2 x i128>) align 32 %{{.*}}) -// CLANG10ABI256: define <4 x i64> @test_v32u128(<4 x i64> %{{.*}}, <2 x i128>* byval(<2 x i128>) align 32 %{{.*}}) -// CLANG9ABI256: define <4 x i64> @test_v32u128(<4 x i64> %{{.*}}, <2 x i128> %{{.*}}) +// MEM256ALIGN32: define dso_local <4 x i64> @test_v32u128(<4 x i64>* byval(<4 x i64>) align 32 %{{.*}}, <2 x i128>* byval(<2 x i128>) align 32 %{{.*}}) +// CLANG10ABI256: define dso_local <4 x i64> @test_v32u128(<4 x i64> %{{.*}}, <2 x i128>* byval(<2 x i128>) align 32 %{{.*}}) +// CLANG9ABI256: define {{(dso_local )?}}<4 x i64> @test_v32u128(<4 x i64> %{{.*}}, <2 x i128> %{{.*}}) return a + (v32u64)b; } @@ -45,8 +45,8 @@ typedef unsigned __int128 v64u128 __attribute__((vector_size(64))); v64u64 test_v64u128(v64u64 a, v64u128 b) { // MEM512ALIGN16: define <8 x i64> @test_v64u128(<8 x i64>* byval(<8 x i64>) align 16 %{{.*}}, <4 x i128>* byval(<4 x i128>) align 16 %{{.*}}) // MEM512ALIGN32: define <8 x i64> @test_v64u128(<8 x i64>* byval(<8 x i64>) align 32 %{{.*}}, <4 x i128>* byval(<4 x i128>) align 32 %{{.*}}) -// MEM512ALIGN64: define <8 x i64> @test_v64u128(<8 x i64>* byval(<8 x i64>) align 64 %{{.*}}, <4 x i128>* byval(<4 x i128>) align 64 %{{.*}}) -// CLANG10ABI512: define <8 x i64> @test_v64u128(<8 x i64> %{{.*}}, <4 x i128>* byval(<4 x i128>) align 64 %{{.*}}) -// CLANG9ABI512: define <8 x i64> @test_v64u128(<8 x i64> %{{.*}}, <4 x i128> %{{.*}}) +// MEM512ALIGN64: define dso_local <8 x i64> @test_v64u128(<8 x i64>* byval(<8 x i64>) align 64 %{{.*}}, <4 x i128>* byval(<4 x i128>) align 64 %{{.*}}) +// CLANG10ABI512: define dso_local <8 x i64> @test_v64u128(<8 x i64> %{{.*}}, <4 x i128>* byval(<4 x i128>) align 64 %{{.*}}) +// CLANG9ABI512: define {{(dso_local )?}}<8 x i64> @test_v64u128(<8 x i64> %{{.*}}, <4 x i128> %{{.*}}) return a + (v64u64)b; } diff --git a/clang/test/CodeGen/x86_32-arguments-iamcu.c b/clang/test/CodeGen/x86_32-arguments-iamcu.c index e391c711ea10..a2263660896b 100644 --- a/clang/test/CodeGen/x86_32-arguments-iamcu.c +++ b/clang/test/CodeGen/x86_32-arguments-iamcu.c @@ -1,18 +1,18 @@ // RUN: %clang_cc1 -w -triple i386-pc-elfiamcu -mfloat-abi soft -emit-llvm -o - %s | FileCheck %s -// CHECK-LABEL: define void @ints(i32 %a, i32 %b, i32 %c, i32 %d) +// CHECK-LABEL: define dso_local void @ints(i32 %a, i32 %b, i32 %c, i32 %d) void ints(int a, int b, int c, int d) {} -// CHECK-LABEL: define void @floats(float %a, float %b, float %c, float %d) +// CHECK-LABEL: define dso_local void @floats(float %a, float %b, float %c, float %d) void floats(float a, float b, float c, float d) {} -// CHECK-LABEL: define void @mixed(i32 %a, float %b, i32 %c, float %d) +// CHECK-LABEL: define dso_local void @mixed(i32 %a, float %b, i32 %c, float %d) void mixed(int a, float b, int c, float d) {} -// CHECK-LABEL: define void @doubles(double %d1, double %d2) +// CHECK-LABEL: define dso_local void @doubles(double %d1, double %d2) void doubles(double d1, double d2) {} -// CHECK-LABEL: define void @mixedDoubles(i32 %a, double %d1) +// CHECK-LABEL: define dso_local void @mixedDoubles(i32 %a, double %d1) void mixedDoubles(int a, double d1) {} typedef struct st3_t { @@ -34,36 +34,36 @@ typedef struct st12_t { int c; } st12_t; -// CHECK-LABEL: define void @smallStructs(i32 %st1.coerce, i32 %st2.coerce, i32 %st3.coerce) +// CHECK-LABEL: define dso_local void @smallStructs(i32 %st1.coerce, i32 %st2.coerce, i32 %st3.coerce) void smallStructs(st4_t st1, st4_t st2, st4_t st3) {} -// CHECK-LABEL: define void @paddedStruct(i32 %i1, i32 %st.coerce0, i32 %st.coerce1, i32 %st4.0) +// CHECK-LABEL: define dso_local void @paddedStruct(i32 %i1, i32 %st.coerce0, i32 %st.coerce1, i32 %st4.0) void paddedStruct(int i1, st5_t st, st4_t st4) {} -// CHECK-LABEL: define void @largeStructBegin(%struct.st12_t* byval(%struct.st12_t) align 4 %st) +// CHECK-LABEL: define dso_local void @largeStructBegin(%struct.st12_t* byval(%struct.st12_t) align 4 %st) void largeStructBegin(st12_t st) {} -// CHECK-LABEL: define void @largeStructMiddle(i32 %i1, %struct.st12_t* byval(%struct.st12_t) align 4 %st, i32 %i2, i32 %i3) +// CHECK-LABEL: define dso_local void @largeStructMiddle(i32 %i1, %struct.st12_t* byval(%struct.st12_t) align 4 %st, i32 %i2, i32 %i3) void largeStructMiddle(int i1, st12_t st, int i2, int i3) {} -// CHECK-LABEL: define void @largeStructEnd(i32 %i1, i32 %i2, i32 %i3, i32 %st.0, i32 %st.1, i32 %st.2) +// CHECK-LABEL: define dso_local void @largeStructEnd(i32 %i1, i32 %i2, i32 %i3, i32 %st.0, i32 %st.1, i32 %st.2) void largeStructEnd(int i1, int i2, int i3, st12_t st) {} -// CHECK-LABEL: define i24 @retNonPow2Struct(i32 %r.coerce) +// CHECK-LABEL: define dso_local i24 @retNonPow2Struct(i32 %r.coerce) st3_t retNonPow2Struct(st3_t r) { return r; } -// CHECK-LABEL: define i32 @retSmallStruct(i32 %r.coerce) +// CHECK-LABEL: define dso_local i32 @retSmallStruct(i32 %r.coerce) st4_t retSmallStruct(st4_t r) { return r; } -// CHECK-LABEL: define i64 @retPaddedStruct(i32 %r.coerce0, i32 %r.coerce1) +// CHECK-LABEL: define dso_local i64 @retPaddedStruct(i32 %r.coerce0, i32 %r.coerce1) st5_t retPaddedStruct(st5_t r) { return r; } -// CHECK-LABEL: define void @retLargeStruct(%struct.st12_t* noalias sret %agg.result, i32 %i1, %struct.st12_t* byval(%struct.st12_t) align 4 %r) +// CHECK-LABEL: define dso_local void @retLargeStruct(%struct.st12_t* noalias sret %agg.result, i32 %i1, %struct.st12_t* byval(%struct.st12_t) align 4 %r) st12_t retLargeStruct(int i1, st12_t r) { return r; } -// CHECK-LABEL: define i32 @varArgs(i32 %i1, ...) +// CHECK-LABEL: define dso_local i32 @varArgs(i32 %i1, ...) int varArgs(int i1, ...) { return i1; } -// CHECK-LABEL: define double @longDoubleArg(double %ld1) +// CHECK-LABEL: define dso_local double @longDoubleArg(double %ld1) long double longDoubleArg(long double ld1) { return ld1; } diff --git a/clang/test/CodeGen/x86_32-arguments-linux.c b/clang/test/CodeGen/x86_32-arguments-linux.c index a199b7dc0f62..53adaa645d8e 100644 --- a/clang/test/CodeGen/x86_32-arguments-linux.c +++ b/clang/test/CodeGen/x86_32-arguments-linux.c @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -w -fblocks -triple i386-pc-linux-gnu -target-cpu pentium4 -emit-llvm -o %t %s // RUN: FileCheck < %t %s -// CHECK-LABEL: define void @f56( +// CHECK-LABEL: define dso_local void @f56( // CHECK: i8 signext %a0, %struct.s56_0* byval(%struct.s56_0) align 4 %a1, // CHECK: i64 %a2.coerce, %struct.s56_1* byval(%struct.s56_1) align 4 %0, // CHECK: <1 x double> %a4, %struct.s56_2* byval(%struct.s56_2) align 4 %1, diff --git a/clang/test/CodeGen/x86_32-arguments-nommx.c b/clang/test/CodeGen/x86_32-arguments-nommx.c index ce68e3a8916c..70363bc12e83 100644 --- a/clang/test/CodeGen/x86_32-arguments-nommx.c +++ b/clang/test/CodeGen/x86_32-arguments-nommx.c @@ -3,9 +3,9 @@ // no-mmx should put mmx into memory typedef int __attribute__((vector_size (8))) i32v2; int a(i32v2 x) { return x[0]; } -// CHECK-LABEL: define i32 @a(i64 %x.coerce) +// CHECK-LABEL: define dso_local i32 @a(i64 %x.coerce) // but SSE2 vectors should still go into an SSE2 register typedef int __attribute__((vector_size (16))) i32v4; int b(i32v4 x) { return x[0]; } -// CHECK-LABEL: define i32 @b(<4 x i32> %x) +// CHECK-LABEL: define dso_local i32 @b(<4 x i32> %x) diff --git a/clang/test/CodeGen/x86_64-arguments-nacl.c b/clang/test/CodeGen/x86_64-arguments-nacl.c index ea4483422dfe..b1006ff12c29 100644 --- a/clang/test/CodeGen/x86_64-arguments-nacl.c +++ b/clang/test/CodeGen/x86_64-arguments-nacl.c @@ -15,27 +15,27 @@ struct PP_Var { union PP_VarValue value; }; -// CHECK: define { i64, i64 } @f0() +// CHECK: define dso_local { i64, i64 } @f0() struct PP_Var f0() { struct PP_Var result = { 0, 0, 0 }; return result; } -// CHECK-LABEL: define void @f1(i64 %p1.coerce0, i64 %p1.coerce1) +// CHECK-LABEL: define dso_local void @f1(i64 %p1.coerce0, i64 %p1.coerce1) void f1(struct PP_Var p1) { while(1) {} } // long doubles are 64 bits on NaCl -// CHECK-LABEL: define double @f5() +// CHECK-LABEL: define dso_local double @f5() long double f5(void) { return 0; } -// CHECK-LABEL: define void @f6(i8 signext %a0, i16 signext %a1, i32 %a2, i64 %a3, i8* %a4) +// CHECK-LABEL: define dso_local void @f6(i8 signext %a0, i16 signext %a1, i32 %a2, i64 %a3, i8* %a4) void f6(char a0, short a1, int a2, long long a3, void *a4) { } -// CHECK-LABEL: define i64 @f8_1() -// CHECK-LABEL: define void @f8_2(i64 %a0.coerce) +// CHECK-LABEL: define dso_local i64 @f8_1() +// CHECK-LABEL: define dso_local void @f8_2(i64 %a0.coerce) union u8 { long double a; int b; @@ -43,32 +43,32 @@ union u8 { union u8 f8_1() { while (1) {} } void f8_2(union u8 a0) {} -// CHECK-LABEL: define i64 @f9() +// CHECK-LABEL: define dso_local i64 @f9() struct s9 { int a; int b; int : 0; } f9(void) { while (1) {} } -// CHECK-LABEL: define void @f10(i64 %a0.coerce) +// CHECK-LABEL: define dso_local void @f10(i64 %a0.coerce) struct s10 { int a; int b; int : 0; }; void f10(struct s10 a0) {} -// CHECK-LABEL: define double @f11() +// CHECK-LABEL: define dso_local double @f11() union { long double a; float b; } f11() { while (1) {} } -// CHECK-LABEL: define i32 @f12_0() -// CHECK-LABEL: define void @f12_1(i32 %a0.coerce) +// CHECK-LABEL: define dso_local i32 @f12_0() +// CHECK-LABEL: define dso_local void @f12_1(i32 %a0.coerce) struct s12 { int a __attribute__((aligned(16))); }; struct s12 f12_0(void) { while (1) {} } void f12_1(struct s12 a0) {} // Check that sret parameter is accounted for when checking available integer // registers. -// CHECK: define void @f13(%struct.s13_0* noalias sret %agg.result, i32 %a, i32 %b, i32 %c, i32 %d, {{.*}}* byval({{.*}}) align 8 %e, i32 %f) +// CHECK: define dso_local void @f13(%struct.s13_0* noalias sret %agg.result, i32 %a, i32 %b, i32 %c, i32 %d, {{.*}}* byval({{.*}}) align 8 %e, i32 %f) struct s13_0 { long long f0[3]; }; struct s13_1 { long long f0[2]; }; struct s13_0 f13(int a, int b, int c, int d, struct s13_1 e, int f) { while (1) {} } -// CHECK-LABEL: define void @f20(%struct.s20* byval(%struct.s20) align 32 %x) +// CHECK-LABEL: define dso_local void @f20(%struct.s20* byval(%struct.s20) align 32 %x) struct __attribute__((aligned(32))) s20 { int x; int y; diff --git a/clang/test/CodeGen/x86_64-arguments.c b/clang/test/CodeGen/x86_64-arguments.c index 107571d8140b..a67f44fd0cc3 100644 --- a/clang/test/CodeGen/x86_64-arguments.c +++ b/clang/test/CodeGen/x86_64-arguments.c @@ -6,49 +6,49 @@ // RUN: FileCheck %s -check-prefix=CHECK -check-prefix=AVX -check-prefix=AVX512 #include <stdarg.h> -// CHECK-LABEL: define signext i8 @f0() +// CHECK-LABEL: define dso_local signext i8 @f0() char f0(void) { return 0; } -// CHECK-LABEL: define signext i16 @f1() +// CHECK-LABEL: define dso_local signext i16 @f1() short f1(void) { return 0; } -// CHECK-LABEL: define i32 @f2() +// CHECK-LABEL: define dso_local i32 @f2() int f2(void) { return 0; } -// CHECK-LABEL: define float @f3() +// CHECK-LABEL: define dso_local float @f3() float f3(void) { return 0; } -// CHECK-LABEL: define double @f4() +// CHECK-LABEL: define dso_local double @f4() double f4(void) { return 0; } -// CHECK-LABEL: define x86_fp80 @f5() +// CHECK-LABEL: define dso_local x86_fp80 @f5() long double f5(void) { return 0; } -// CHECK-LABEL: define void @f6(i8 signext %a0, i16 signext %a1, i32 %a2, i64 %a3, i8* %a4) +// CHECK-LABEL: define dso_local void @f6(i8 signext %a0, i16 signext %a1, i32 %a2, i64 %a3, i8* %a4) void f6(char a0, short a1, int a2, long long a3, void *a4) { } -// CHECK-LABEL: define void @f7(i32 %a0) +// CHECK-LABEL: define dso_local void @f7(i32 %a0) typedef enum { A, B, C } e7; void f7(e7 a0) { } // Test merging/passing of upper eightbyte with X87 class. // -// CHECK-LABEL: define void @f8_1(%union.u8* noalias sret %agg.result) -// CHECK-LABEL: define void @f8_2(%union.u8* byval(%union.u8) align 16 %a0) +// CHECK-LABEL: define dso_local void @f8_1(%union.u8* noalias sret %agg.result) +// CHECK-LABEL: define dso_local void @f8_2(%union.u8* byval(%union.u8) align 16 %a0) union u8 { long double a; int b; @@ -56,61 +56,61 @@ union u8 { union u8 f8_1() { while (1) {} } void f8_2(union u8 a0) {} -// CHECK-LABEL: define i64 @f9() +// CHECK-LABEL: define dso_local i64 @f9() struct s9 { int a; int b; int : 0; } f9(void) { while (1) {} } -// CHECK-LABEL: define void @f10(i64 %a0.coerce) +// CHECK-LABEL: define dso_local void @f10(i64 %a0.coerce) struct s10 { int a; int b; int : 0; }; void f10(struct s10 a0) {} -// CHECK-LABEL: define void @f11(%union.anon* noalias sret %agg.result) +// CHECK-LABEL: define dso_local void @f11(%union.anon* noalias sret %agg.result) union { long double a; float b; } f11() { while (1) {} } -// CHECK-LABEL: define i32 @f12_0() -// CHECK-LABEL: define void @f12_1(i32 %a0.coerce) +// CHECK-LABEL: define dso_local i32 @f12_0() +// CHECK-LABEL: define dso_local void @f12_1(i32 %a0.coerce) struct s12 { int a __attribute__((aligned(16))); }; struct s12 f12_0(void) { while (1) {} } void f12_1(struct s12 a0) {} // Check that sret parameter is accounted for when checking available integer // registers. -// CHECK: define void @f13(%struct.s13_0* noalias sret %agg.result, i32 %a, i32 %b, i32 %c, i32 %d, {{.*}}* byval({{.*}}) align 8 %e, i32 %f) +// CHECK: define dso_local void @f13(%struct.s13_0* noalias sret %agg.result, i32 %a, i32 %b, i32 %c, i32 %d, {{.*}}* byval({{.*}}) align 8 %e, i32 %f) struct s13_0 { long long f0[3]; }; struct s13_1 { long long f0[2]; }; struct s13_0 f13(int a, int b, int c, int d, struct s13_1 e, int f) { while (1) {} } -// CHECK: define void @f14({{.*}}, i8 signext %X) +// CHECK: define dso_local void @f14({{.*}}, i8 signext %X) void f14(int a, int b, int c, int d, int e, int f, char X) {} -// CHECK: define void @f15({{.*}}, i8* %X) +// CHECK: define dso_local void @f15({{.*}}, i8* %X) void f15(int a, int b, int c, int d, int e, int f, void *X) {} -// CHECK: define void @f16({{.*}}, float %X) +// CHECK: define dso_local void @f16({{.*}}, float %X) void f16(float a, float b, float c, float d, float e, float f, float g, float h, float X) {} -// CHECK: define void @f17({{.*}}, x86_fp80 %X) +// CHECK: define dso_local void @f17({{.*}}, x86_fp80 %X) void f17(float a, float b, float c, float d, float e, float f, float g, float h, long double X) {} // Check for valid coercion. The struct should be passed/returned as i32, not // as i64 for better code quality. // rdar://8135035 -// CHECK-LABEL: define void @f18(i32 %a, i32 %f18_arg1.coerce) +// CHECK-LABEL: define dso_local void @f18(i32 %a, i32 %f18_arg1.coerce) struct f18_s0 { int f0; }; void f18(int a, struct f18_s0 f18_arg1) { while (1) {} } // Check byval alignment. -// CHECK-LABEL: define void @f19(%struct.s19* byval(%struct.s19) align 16 %x) +// CHECK-LABEL: define dso_local void @f19(%struct.s19* byval(%struct.s19) align 16 %x) struct s19 { long double a; }; void f19(struct s19 x) {} -// CHECK-LABEL: define void @f20(%struct.s20* byval(%struct.s20) align 32 %x) +// CHECK-LABEL: define dso_local void @f20(%struct.s20* byval(%struct.s20) align 32 %x) struct __attribute__((aligned(32))) s20 { int x; int y; @@ -123,7 +123,7 @@ struct StringRef { }; // rdar://7375902 -// CHECK-LABEL: define i8* @f21(i64 %S.coerce0, i8* %S.coerce1) +// CHECK-LABEL: define dso_local i8* @f21(i64 %S.coerce0, i8* %S.coerce1) const char *f21(struct StringRef S) { return S.x+S.Ptr; } // PR7567 @@ -144,7 +144,7 @@ struct f23S { void f23(int A, struct f23S B) { - // CHECK-LABEL: define void @f23(i32 %A, i64 %B.coerce0, i32 %B.coerce1) + // CHECK-LABEL: define dso_local void @f23(i32 %A, i64 %B.coerce0, i32 %B.coerce1) } struct f24s { long a; int b; }; @@ -152,13 +152,13 @@ struct f24s { long a; int b; }; struct f23S f24(struct f23S *X, struct f24s *P2) { return *X; - // CHECK: define { i64, i32 } @f24(%struct.f23S* %X, %struct.f24s* %P2) + // CHECK: define dso_local { i64, i32 } @f24(%struct.f23S* %X, %struct.f24s* %P2) } // rdar://8248065 typedef float v4f32 __attribute__((__vector_size__(16))); v4f32 f25(v4f32 X) { - // CHECK-LABEL: define <4 x float> @f25(<4 x float> %X) + // CHECK-LABEL: define dso_local <4 x float> @f25(<4 x float> %X) // CHECK-NOT: alloca // CHECK: alloca <4 x float> // CHECK-NOT: alloca @@ -174,7 +174,7 @@ struct foo26 { }; struct foo26 f26(struct foo26 *P) { - // CHECK: define { i32*, float* } @f26(%struct.foo26* %P) + // CHECK: define dso_local { i32*, float* } @f26(%struct.foo26* %P) return *P; } @@ -184,7 +184,7 @@ struct v4f32wrapper { }; struct v4f32wrapper f27(struct v4f32wrapper X) { - // CHECK-LABEL: define <4 x float> @f27(<4 x float> %X.coerce) + // CHECK-LABEL: define dso_local <4 x float> @f27(<4 x float> %X.coerce) return X; } @@ -197,7 +197,7 @@ struct v8f32wrapper { }; struct v8f32wrapper f27a(struct v8f32wrapper X) { - // AVX-LABEL: define <8 x float> @f27a(<8 x float> %X.coerce) + // AVX-LABEL: define dso_local <8 x float> @f27a(<8 x float> %X.coerce) return X; } @@ -206,7 +206,7 @@ struct v8f32wrapper_wrapper { }; struct v8f32wrapper_wrapper f27b(struct v8f32wrapper_wrapper X) { - // AVX-LABEL: define <8 x float> @f27b(<8 x float> %X.coerce) + // AVX-LABEL: define dso_local <8 x float> @f27b(<8 x float> %X.coerce) return X; } @@ -216,7 +216,7 @@ struct f28c { int y; }; void f28(struct f28c C) { - // CHECK-LABEL: define void @f28(double %C.coerce0, i32 %C.coerce1) + // CHECK-LABEL: define dso_local void @f28(double %C.coerce0, i32 %C.coerce1) } struct f29a { @@ -227,26 +227,26 @@ struct f29a { }; void f29a(struct f29a A) { - // CHECK-LABEL: define void @f29a(double %A.coerce0, i32 %A.coerce1) + // CHECK-LABEL: define dso_local void @f29a(double %A.coerce0, i32 %A.coerce1) } // rdar://8249586 struct S0 { char f0[8]; char f2; char f3; char f4; }; void f30(struct S0 p_4) { - // CHECK-LABEL: define void @f30(i64 %p_4.coerce0, i24 %p_4.coerce1) + // CHECK-LABEL: define dso_local void @f30(i64 %p_4.coerce0, i24 %p_4.coerce1) } // Pass the third element as a float when followed by tail padding. // rdar://8251384 struct f31foo { float a, b, c; }; float f31(struct f31foo X) { - // CHECK-LABEL: define float @f31(<2 x float> %X.coerce0, float %X.coerce1) + // CHECK-LABEL: define dso_local float @f31(<2 x float> %X.coerce0, float %X.coerce1) return X.c; } _Complex float f32(_Complex float A, _Complex float B) { // rdar://6379669 - // CHECK-LABEL: define <2 x float> @f32(<2 x float> %A.coerce, <2 x float> %B.coerce) + // CHECK-LABEL: define dso_local <2 x float> @f32(<2 x float> %A.coerce, <2 x float> %B.coerce) return A+B; } @@ -261,12 +261,12 @@ void f33(va_list X) { typedef unsigned long long v1i64 __attribute__((__vector_size__(8))); // rdar://8359248 -// CHECK-LABEL: define double @f34(double %arg.coerce) +// CHECK-LABEL: define dso_local double @f34(double %arg.coerce) v1i64 f34(v1i64 arg) { return arg; } // rdar://8358475 -// CHECK-LABEL: define double @f35(double %arg.coerce) +// CHECK-LABEL: define dso_local double @f35(double %arg.coerce) typedef unsigned long v1i64_2 __attribute__((__vector_size__(8))); v1i64_2 f35(v1i64_2 arg) { return arg+arg; } @@ -286,7 +286,7 @@ void f9122143() func(ss); } -// CHECK-LABEL: define double @f36(double %arg.coerce) +// CHECK-LABEL: define dso_local double @f36(double %arg.coerce) typedef unsigned v2i32 __attribute((__vector_size__(8))); v2i32 f36(v2i32 arg) { return arg; } @@ -334,7 +334,7 @@ void func43(SA s) { func42(s); } -// CHECK-LABEL: define i32 @f44 +// CHECK-LABEL: define dso_local i32 @f44 // CHECK: ptrtoint // CHECK-NEXT: add i64 %{{[0-9]+}}, 31 // CHECK-NEXT: and i64 %{{[0-9]+}}, -32 @@ -350,7 +350,7 @@ int f44(int i, ...) { } // Text that vec3 returns the correct LLVM IR type. -// AVX-LABEL: define i32 @foo(<3 x i64> %X) +// AVX-LABEL: define dso_local i32 @foo(<3 x i64> %X) typedef long long3 __attribute((ext_vector_type(3))); int foo(long3 X) { @@ -406,7 +406,7 @@ void test49_helper(double, ...); void test49(double d, double e) { test49_helper(d, e); } -// CHECK-LABEL: define void @test49( +// CHECK-LABEL: define dso_local void @test49( // CHECK: [[T0:%.*]] = load double, double* // CHECK-NEXT: [[T1:%.*]] = load double, double* // CHECK-NEXT: call void (double, ...) @test49_helper(double [[T0]], double [[T1]]) @@ -415,7 +415,7 @@ void test50_helper(); void test50(double d, double e) { test50_helper(d, e); } -// CHECK-LABEL: define void @test50( +// CHECK-LABEL: define dso_local void @test50( // CHECK: [[T0:%.*]] = load double, double* // CHECK-NEXT: [[T1:%.*]] = load double, double* // CHECK-NEXT: call void (double, double, ...) bitcast (void (...)* @test50_helper to void (double, double, ...)*)(double [[T0]], double [[T1]]) @@ -425,7 +425,7 @@ void test51(struct test51_s *s, __builtin_va_list argList) { *s = __builtin_va_arg(argList, struct test51_s); } -// CHECK-LABEL: define void @test51 +// CHECK-LABEL: define dso_local void @test51 // CHECK: [[TMP_ADDR:%.*]] = alloca [[STRUCT_TEST51:%.*]], align 16 // CHECK: br i1 // CHECK: [[REG_SAVE_AREA_PTR:%.*]] = getelementptr inbounds {{.*}}, i32 0, i32 3 @@ -449,7 +449,7 @@ void test52() { void test53(__m256 *m, __builtin_va_list argList) { *m = __builtin_va_arg(argList, __m256); } -// AVX-LABEL: define void @test53 +// AVX-LABEL: define dso_local void @test53 // AVX-NOT: br i1 // AVX: ret void @@ -521,7 +521,7 @@ void f62() { // Like for __m256 on AVX, we always pass __m512 in memory, and don't // need to use the register save area. // -// AVX512-LABEL: define void @f63 +// AVX512-LABEL: define dso_local void @f63 // AVX512-NOT: br i1 // AVX512: ret void void f63(__m512 *m, __builtin_va_list argList) { diff --git a/clang/test/CodeGen/x86_64-floatvectors.c b/clang/test/CodeGen/x86_64-floatvectors.c index 389a06a6d6e4..d689456bd88b 100644 --- a/clang/test/CodeGen/x86_64-floatvectors.c +++ b/clang/test/CodeGen/x86_64-floatvectors.c @@ -11,7 +11,7 @@ double Vec3FTest(__builtin_va_list ap) { vec3f vec = __builtin_va_arg(ap, vec3f); return vec.x + vec.y + vec.z; } -// CHECK: define double @Vec3FTest +// CHECK: define dso_local double @Vec3FTest // CHECK: vaarg.in_reg: // CHECK: [[Vec3FLoad1:%.*]] = load <2 x float>, <2 x float>* // CHECK: [[Vec3FGEP1:%.*]] = getelementptr inbounds { <2 x float>, float }, { <2 x float>, float }* {{%.*}}, i32 0, i32 0 @@ -28,7 +28,7 @@ double Vec4FTest(__builtin_va_list ap) { vec4f vec = __builtin_va_arg(ap, vec4f); return vec.x + vec.y + vec.z + vec.q; } -// CHECK: define double @Vec4FTest +// CHECK: define dso_local double @Vec4FTest // CHECK: vaarg.in_reg: // CHECK: [[Vec4FLoad1:%.*]] = load <2 x float>, <2 x float>* // CHECK: [[Vec4FGEP1:%.*]] = getelementptr inbounds { <2 x float>, <2 x float> }, { <2 x float>, <2 x float> }* {{%.*}}, i32 0, i32 0 @@ -44,7 +44,7 @@ double Vec2DTest(__builtin_va_list ap) { vec2d vec = __builtin_va_arg(ap, vec2d); return vec.x + vec.y; } -// CHECK: define double @Vec2DTest +// CHECK: define dso_local double @Vec2DTest // CHECK: vaarg.in_reg: // CHECK: [[Vec2DLoad1:%.*]] = load double, double* // CHECK: [[Vec2DGEP1:%.*]] = getelementptr inbounds { double, double }, { double, double }* {{%.*}}, i32 0, i32 0 @@ -63,7 +63,7 @@ double Vec2F1DTest(__builtin_va_list ap) { vec2f1d vec = __builtin_va_arg(ap, vec2f1d); return vec.x + vec.y + vec.z; } -// CHECK: define double @Vec2F1DTest +// CHECK: define dso_local double @Vec2F1DTest // CHECK: vaarg.in_reg: // CHECK: [[Vec2F1DLoad1:%.*]] = load <2 x float>, <2 x float>* // CHECK: [[Vec2F1DGEP1:%.*]] = getelementptr inbounds { <2 x float>, double }, { <2 x float>, double }* {{%.*}}, i32 0, i32 0 @@ -82,7 +82,7 @@ double Vec1D2FTest(__builtin_va_list ap) { vec1d2f vec = __builtin_va_arg(ap, vec1d2f); return vec.x + vec.y + vec.z; } -// CHECK: define double @Vec1D2FTest +// CHECK: define dso_local double @Vec1D2FTest // CHECK: vaarg.in_reg: // CHECK: [[Vec1D2FLoad1:%.*]] = load double, double* // CHECK: [[Vec1D2FGEP1:%.*]] = getelementptr inbounds { double, <2 x float> }, { double, <2 x float> }* {{%.*}}, i32 0, i32 0 @@ -101,7 +101,7 @@ double Vec1F1DTest(__builtin_va_list ap) { vec1f1d vec = __builtin_va_arg(ap, vec1f1d); return vec.x + vec.z; } -// CHECK: define double @Vec1F1DTest +// CHECK: define dso_local double @Vec1F1DTest // CHECK: vaarg.in_reg: // CHECK: [[Vec1F1DLoad1:%.*]] = load float, float* // CHECK: [[Vec1F1DGEP1:%.*]] = getelementptr inbounds { float, double }, { float, double }* {{%.*}}, i32 0, i32 0 @@ -120,7 +120,7 @@ double Vec1D1FTest(__builtin_va_list ap) { vec1d1f vec = __builtin_va_arg(ap, vec1d1f); return vec.x + vec.z; } -// CHECK: define double @Vec1D1FTest +// CHECK: define dso_local double @Vec1D1FTest // CHECK: vaarg.in_reg: // CHECK: [[Vec1D1FLoad1:%.*]] = load double, double* // CHECK: [[Vec1D1FGEP1:%.*]] = getelementptr inbounds { double, float }, { double, float }* {{%.*}}, i32 0, i32 0 diff --git a/clang/test/CodeGen/x86_64-longdouble.c b/clang/test/CodeGen/x86_64-longdouble.c index 8aeddb47878e..739849e29f89 100644 --- a/clang/test/CodeGen/x86_64-longdouble.c +++ b/clang/test/CodeGen/x86_64-longdouble.c @@ -11,25 +11,25 @@ // Android uses fp128 for long double but other x86_64 targets use x86_fp80. long double dataLD = 1.0L; -// ANDROID: @dataLD = local_unnamed_addr global fp128 0xL00000000000000003FFF000000000000, align 16 -// GNU: @dataLD = local_unnamed_addr global x86_fp80 0xK3FFF8000000000000000, align 16 +// ANDROID: @dataLD = dso_local local_unnamed_addr global fp128 0xL00000000000000003FFF000000000000, align 16 +// GNU: @dataLD = dso_local local_unnamed_addr global x86_fp80 0xK3FFF8000000000000000, align 16 long double _Complex dataLDC = {1.0L, 1.0L}; -// ANDROID: @dataLDC = local_unnamed_addr global { fp128, fp128 } { fp128 0xL00000000000000003FFF000000000000, fp128 0xL00000000000000003FFF000000000000 }, align 16 -// GNU: @dataLDC = local_unnamed_addr global { x86_fp80, x86_fp80 } { x86_fp80 0xK3FFF8000000000000000, x86_fp80 0xK3FFF8000000000000000 }, align 16 +// ANDROID: @dataLDC = dso_local local_unnamed_addr global { fp128, fp128 } { fp128 0xL00000000000000003FFF000000000000, fp128 0xL00000000000000003FFF000000000000 }, align 16 +// GNU: @dataLDC = dso_local local_unnamed_addr global { x86_fp80, x86_fp80 } { x86_fp80 0xK3FFF8000000000000000, x86_fp80 0xK3FFF8000000000000000 }, align 16 long double TestLD(long double x) { return x * x; -// ANDROID: define fp128 @TestLD(fp128 %x) -// GNU: define x86_fp80 @TestLD(x86_fp80 %x) -// NACL: define double @TestLD(double %x) +// ANDROID: define dso_local fp128 @TestLD(fp128 %x) +// GNU: define dso_local x86_fp80 @TestLD(x86_fp80 %x) +// NACL: define dso_local double @TestLD(double %x) } long double _Complex TestLDC(long double _Complex x) { return x * x; -// ANDROID: define void @TestLDC({ fp128, fp128 }* {{.*}}, { fp128, fp128 }* {{.*}} %x) -// GNU: define { x86_fp80, x86_fp80 } @TestLDC({ x86_fp80, x86_fp80 }* {{.*}} %x) -// NACL: define { double, double } @TestLDC(double %x{{.*}}, double %x{{.*}}) +// ANDROID: define dso_local void @TestLDC({ fp128, fp128 }* {{.*}}, { fp128, fp128 }* {{.*}} %x) +// GNU: define dso_local { x86_fp80, x86_fp80 } @TestLDC({ x86_fp80, x86_fp80 }* {{.*}} %x) +// NACL: define dso_local { double, double } @TestLDC(double %x{{.*}}, double %x{{.*}}) } typedef __builtin_va_list va_list; @@ -37,7 +37,7 @@ typedef __builtin_va_list va_list; int TestGetVarInt(va_list ap) { return __builtin_va_arg(ap, int); // Since int can be passed in memory or register there are two branches. -// CHECK: define i32 @TestGetVarInt( +// CHECK: define dso_local i32 @TestGetVarInt( // CHECK: br label // CHECK: br label // CHECK: = phi @@ -47,7 +47,7 @@ int TestGetVarInt(va_list ap) { double TestGetVarDouble(va_list ap) { return __builtin_va_arg(ap, double); // Since double can be passed in memory or register there are two branches. -// CHECK: define double @TestGetVarDouble( +// CHECK: define dso_local double @TestGetVarDouble( // CHECK: br label // CHECK: br label // CHECK: = phi @@ -58,9 +58,9 @@ long double TestGetVarLD(va_list ap) { return __builtin_va_arg(ap, long double); // fp128 and double can be passed in memory or in register, but x86_fp80 is in // memory. -// ANDROID: define fp128 @TestGetVarLD( -// GNU: define x86_fp80 @TestGetVarLD( -// NACL: define double @TestGetVarLD( +// ANDROID: define dso_local fp128 @TestGetVarLD( +// GNU: define dso_local x86_fp80 @TestGetVarLD( +// NACL: define dso_local double @TestGetVarLD( // ANDROID: br label // ANDROID: br label // NACL: br @@ -75,10 +75,10 @@ long double TestGetVarLD(va_list ap) { long double _Complex TestGetVarLDC(va_list ap) { return __builtin_va_arg(ap, long double _Complex); // Pair of fp128 or x86_fp80 are passed as struct in memory. -// ANDROID: define void @TestGetVarLDC({ fp128, fp128 }* {{.*}}, %struct.__va_list_tag* -// GNU: define { x86_fp80, x86_fp80 } @TestGetVarLDC( +// ANDROID: define dso_local void @TestGetVarLDC({ fp128, fp128 }* {{.*}}, %struct.__va_list_tag* +// GNU: define dso_local { x86_fp80, x86_fp80 } @TestGetVarLDC( // Pair of double can go in SSE registers or memory -// NACL: define { double, double } @TestGetVarLDC( +// NACL: define dso_local { double, double } @TestGetVarLDC( // ANDROID-NOT: br // GNU-NOT: br // NACL: br @@ -94,42 +94,42 @@ void TestVarArg(const char *s, ...); void TestPassVarInt(int x) { TestVarArg("A", x); -// CHECK: define void @TestPassVarInt(i32 %x) +// CHECK: define dso_local void @TestPassVarInt(i32 %x) // CHECK: call {{.*}} @TestVarArg(i8* {{.*}}, i32 %x) } void TestPassVarFloat(float x) { TestVarArg("A", x); -// CHECK: define void @TestPassVarFloat(float %x) +// CHECK: define dso_local void @TestPassVarFloat(float %x) // CHECK: call {{.*}} @TestVarArg(i8* {{.*}}, double % } void TestPassVarDouble(double x) { TestVarArg("A", x); -// CHECK: define void @TestPassVarDouble(double %x) +// CHECK: define dso_local void @TestPassVarDouble(double %x) // CHECK: call {{.*}} @TestVarArg(i8* {{.*}}, double %x } void TestPassVarLD(long double x) { TestVarArg("A", x); -// ANDROID: define void @TestPassVarLD(fp128 %x) +// ANDROID: define dso_local void @TestPassVarLD(fp128 %x) // ANDROID: call {{.*}} @TestVarArg(i8* {{.*}}, fp128 %x -// GNU: define void @TestPassVarLD(x86_fp80 %x) +// GNU: define dso_local void @TestPassVarLD(x86_fp80 %x) // GNU: call {{.*}} @TestVarArg(i8* {{.*}}, x86_fp80 %x -// NACL: define void @TestPassVarLD(double %x) +// NACL: define dso_local void @TestPassVarLD(double %x) // NACL: call {{.*}} @TestVarArg(i8* {{.*}}, double %x } void TestPassVarLDC(long double _Complex x) { TestVarArg("A", x); -// ANDROID: define void @TestPassVarLDC({ fp128, fp128 }* {{.*}} %x) +// ANDROID: define dso_local void @TestPassVarLDC({ fp128, fp128 }* {{.*}} %x) // ANDROID: store fp128 %{{.*}}, fp128* % // ANDROID-NEXT: store fp128 %{{.*}}, fp128* % // ANDROID-NEXT: call {{.*}} @TestVarArg(i8* {{.*}}, { fp128, fp128 }* {{.*}} % -// GNU: define void @TestPassVarLDC({ x86_fp80, x86_fp80 }* {{.*}} %x) +// GNU: define dso_local void @TestPassVarLDC({ x86_fp80, x86_fp80 }* {{.*}} %x) // GNU: store x86_fp80 %{{.*}}, x86_fp80* % // GNU-NEXT: store x86_fp80 %{{.*}}, x86_fp80* % // GNU-NEXT: call {{.*}} @TestVarArg(i8* {{.*}}, { x86_fp80, x86_fp80 }* {{.*}} % -// NACL: define void @TestPassVarLDC(double %x{{.*}}, double %x{{.*}}) +// NACL: define dso_local void @TestPassVarLDC(double %x{{.*}}, double %x{{.*}}) // NACL: call {{.*}} @TestVarArg(i8* {{.*}}, double %x{{.*}}, double %x{{.*}}) } diff --git a/clang/test/CodeGen/xcore-abi.c b/clang/test/CodeGen/xcore-abi.c index 076c22cc5233..899d8a45216f 100644 --- a/clang/test/CodeGen/xcore-abi.c +++ b/clang/test/CodeGen/xcore-abi.c @@ -13,9 +13,9 @@ _Static_assert(_Alignof(double) == 4, "alignof double is wrong"); // CHECK: @cgx = external constant i32, section ".cp.rodata" extern const int cgx; int fcgx() { return cgx;} -// CHECK: @g1 = global i32 0, align 4 +// CHECK: @g1 = dso_local global i32 0, align 4 int g1; -// CHECK: @cg1 = constant i32 0, section ".cp.rodata", align 4 +// CHECK: @cg1 = dso_local constant i32 0, section ".cp.rodata", align 4 const int cg1; #include <stdarg.h> @@ -132,7 +132,7 @@ void testbuiltin (void) { res = __builtin_eh_return_data_regno(2); } -// CHECK-LABEL: define zeroext i8 @testchar() +// CHECK-LABEL: define dso_local zeroext i8 @testchar() // CHECK: ret i8 -1 char testchar (void) { return (char)-1; diff --git a/clang/test/CodeGen/xcore-abi.cpp b/clang/test/CodeGen/xcore-abi.cpp index 66ff33ad05a9..f87ad4a14bb1 100644 --- a/clang/test/CodeGen/xcore-abi.cpp +++ b/clang/test/CodeGen/xcore-abi.cpp @@ -9,9 +9,9 @@ // CHECK: @cgx = external constant i32 extern const int cgx; int fcgx() { return cgx;} -// CHECK: @g1 = global i32 0, align 4 +// CHECK: @g1 = dso_local global i32 0, align 4 int g1; -// CHECK: @cg1 = constant i32 0, align 4 +// CHECK: @cg1 = dso_local constant i32 0, align 4 extern const int cg1 = 0; // Regression test for a bug in lib/CodeGen/CodeGenModule.cpp which called diff --git a/clang/test/CodeGen/xray-always-instrument.cpp b/clang/test/CodeGen/xray-always-instrument.cpp index fb6690577f58..79d96d176ec4 100644 --- a/clang/test/CodeGen/xray-always-instrument.cpp +++ b/clang/test/CodeGen/xray-always-instrument.cpp @@ -16,8 +16,8 @@ void foo() {} void baz() {} -// CHECK: define void @_Z3foov() #[[ALWAYSATTR:[0-9]+]] { -// CHECK: define void @_Z3barv() #[[NEVERATTR:[0-9]+]] { -// CHECK: define void @_Z3bazv() #[[ALWAYSATTR:[0-9]+]] { +// CHECK: define dso_local void @_Z3foov() #[[ALWAYSATTR:[0-9]+]] { +// CHECK: define dso_local void @_Z3barv() #[[NEVERATTR:[0-9]+]] { +// CHECK: define dso_local void @_Z3bazv() #[[ALWAYSATTR:[0-9]+]] { // CHECK: attributes #[[ALWAYSATTR]] = {{.*}} "function-instrument"="xray-always" {{.*}} // CHECK: attributes #[[NEVERATTR]] = {{.*}} "function-instrument"="xray-never" {{.*}} diff --git a/clang/test/CodeGen/xray-attr-list.cpp b/clang/test/CodeGen/xray-attr-list.cpp index f2e48773e41a..91959d0d9d88 100644 --- a/clang/test/CodeGen/xray-attr-list.cpp +++ b/clang/test/CodeGen/xray-attr-list.cpp @@ -11,9 +11,9 @@ void never() {} [[clang::xray_never_instrument]] void alwaysNever() {} [[clang::xray_always_instrument]] void neverAlways() {} -// CHECK: define void @_Z6alwaysv() #[[ALWAYSATTR:[0-9]+]] { -// CHECK: define void @_Z5neverv() #[[NEVERATTR:[0-9]+]] { -// CHECK: define void @_Z11alwaysNeverv() #[[NEVERATTR]] { -// CHECK: define void @_Z11neverAlwaysv() #[[ALWAYSATTR]] { +// CHECK: define dso_local void @_Z6alwaysv() #[[ALWAYSATTR:[0-9]+]] { +// CHECK: define dso_local void @_Z5neverv() #[[NEVERATTR:[0-9]+]] { +// CHECK: define dso_local void @_Z11alwaysNeverv() #[[NEVERATTR]] { +// CHECK: define dso_local void @_Z11neverAlwaysv() #[[ALWAYSATTR]] { // CHECK: attributes #[[ALWAYSATTR]] = {{.*}} "function-instrument"="xray-always" {{.*}} // CHECK: attributes #[[NEVERATTR]] = {{.*}} "function-instrument"="xray-never" {{.*}} diff --git a/clang/test/CodeGen/xray-attributes-noxray-supported.cpp b/clang/test/CodeGen/xray-attributes-noxray-supported.cpp index ca5881fba380..60b22136be4e 100644 --- a/clang/test/CodeGen/xray-attributes-noxray-supported.cpp +++ b/clang/test/CodeGen/xray-attributes-noxray-supported.cpp @@ -18,11 +18,11 @@ // RUN: -triple powerpc64le-unknown-linux-gnu | FileCheck %s [[clang::xray_always_instrument]] void foo() { -// CHECK: define void @_Z3foov() #0 +// CHECK: define dso_local void @_Z3foov() #0 } [[clang::xray_never_instrument]] void bar() { -// CHECK: define void @_Z3barv() #1 +// CHECK: define dso_local void @_Z3barv() #1 } // CHECK-NOT: #0 = {{.*}}"function-instrument"="xray-always" diff --git a/clang/test/CodeGen/xray-attributes-supported.cpp b/clang/test/CodeGen/xray-attributes-supported.cpp index c2ee70822adb..98f1a030722b 100644 --- a/clang/test/CodeGen/xray-attributes-supported.cpp +++ b/clang/test/CodeGen/xray-attributes-supported.cpp @@ -39,11 +39,11 @@ // Make sure that the LLVM attribute for XRay-annotated functions do show up. [[clang::xray_always_instrument]] void foo() { -// CHECK: define void @_Z3foov() #0 +// CHECK: define dso_local void @_Z3foov() #0 }; [[clang::xray_never_instrument]] void bar() { -// CHECK: define void @_Z3barv() #1 +// CHECK: define dso_local void @_Z3barv() #1 }; // CHECK: #0 = {{.*}}"function-instrument"="xray-always" diff --git a/clang/test/CodeGen/xray-ignore-loops.cpp b/clang/test/CodeGen/xray-ignore-loops.cpp index 17ea2afbeece..9d1f846d8eeb 100644 --- a/clang/test/CodeGen/xray-ignore-loops.cpp +++ b/clang/test/CodeGen/xray-ignore-loops.cpp @@ -4,5 +4,5 @@ int foo() { return 1; } -// CHECK: define i32 @_Z3foov() #[[ATTRS:[0-9]+]] { +// CHECK: define dso_local i32 @_Z3foov() #[[ATTRS:[0-9]+]] { // CHECK-DAG: attributes #[[ATTRS]] = {{.*}} "xray-ignore-loops" {{.*}} diff --git a/clang/test/CodeGen/xray-imbue-arg1.cpp b/clang/test/CodeGen/xray-imbue-arg1.cpp index 083099ce582d..e085973dbe06 100644 --- a/clang/test/CodeGen/xray-imbue-arg1.cpp +++ b/clang/test/CodeGen/xray-imbue-arg1.cpp @@ -12,8 +12,8 @@ void foo() {} void arg1(void*) {} -// CHECK: define void @_Z3foov() #[[FOO:[0-9]+]] { -// CHECK: define void {{.*}}arg1{{.*}} #[[ALWAYSARG1:[0-9]+]] { +// CHECK: define dso_local void @_Z3foov() #[[FOO:[0-9]+]] { +// CHECK: define dso_local void {{.*}}arg1{{.*}} #[[ALWAYSARG1:[0-9]+]] { // CHECK: attributes #[[FOO]] = {{.*}} // CHECK: attributes #[[ALWAYSARG1]] = {{.*}} "function-instrument"="xray-always" {{.*}} "xray-log-args"="1" diff --git a/clang/test/CodeGen/xray-instruction-threshold.cpp b/clang/test/CodeGen/xray-instruction-threshold.cpp index b5f4489bd97e..c81bf60d1c69 100644 --- a/clang/test/CodeGen/xray-instruction-threshold.cpp +++ b/clang/test/CodeGen/xray-instruction-threshold.cpp @@ -8,7 +8,7 @@ int foo() { return 2; } -// CHECK: define i32 @_Z3foov() #[[THRESHOLD:[0-9]+]] { -// CHECK: define i32 @_Z3barv() #[[NEVERATTR:[0-9]+]] { +// CHECK: define dso_local i32 @_Z3foov() #[[THRESHOLD:[0-9]+]] { +// CHECK: define dso_local i32 @_Z3barv() #[[NEVERATTR:[0-9]+]] { // CHECK-DAG: attributes #[[THRESHOLD]] = {{.*}} "xray-instruction-threshold"="1" {{.*}} // CHECK-DAG: attributes #[[NEVERATTR]] = {{.*}} "function-instrument"="xray-never" {{.*}} diff --git a/clang/test/CodeGen/xray-instrumentation-bundles.cpp b/clang/test/CodeGen/xray-instrumentation-bundles.cpp index db046d157c70..77f5827e9d00 100644 --- a/clang/test/CodeGen/xray-instrumentation-bundles.cpp +++ b/clang/test/CodeGen/xray-instrumentation-bundles.cpp @@ -47,7 +47,7 @@ // RUN: -std=c++11 -triple x86_64-unknown-unknown -emit-llvm -o - %s \ // RUN: | FileCheck --check-prefixes CHECK,FUNCTION,NOCUSTOM,NOTYPED %s -// CHECK: define void @_Z16alwaysInstrumentv() #[[ALWAYSATTR:[0-9]+]] { +// CHECK: define dso_local void @_Z16alwaysInstrumentv() #[[ALWAYSATTR:[0-9]+]] { [[clang::xray_always_instrument]] void alwaysInstrument() { static constexpr char kPhase[] = "always"; __xray_customevent(kPhase, 6); diff --git a/clang/test/CodeGen/xray-log-args.cpp b/clang/test/CodeGen/xray-log-args.cpp index d4f4a1ba851b..2710b3cff479 100644 --- a/clang/test/CodeGen/xray-log-args.cpp +++ b/clang/test/CodeGen/xray-log-args.cpp @@ -2,11 +2,11 @@ // Make sure that the LLVM attribute for XRay-annotated functions do show up. [[clang::xray_always_instrument,clang::xray_log_args(1)]] void foo(int a) { -// CHECK: define void @_Z3fooi(i32 %a) #0 +// CHECK: define dso_local void @_Z3fooi(i32 %a) #0 }; [[clang::xray_log_args(1)]] void bar(int a) { -// CHECK: define void @_Z3bari(i32 %a) #1 +// CHECK: define dso_local void @_Z3bari(i32 %a) #1 }; // CHECK: #0 = {{.*}}"function-instrument"="xray-always"{{.*}}"xray-log-args"="1" diff --git a/clang/test/CodeGen/xray-never-instrument.cpp b/clang/test/CodeGen/xray-never-instrument.cpp index 4b20edc6ad60..a00193d908b6 100644 --- a/clang/test/CodeGen/xray-never-instrument.cpp +++ b/clang/test/CodeGen/xray-never-instrument.cpp @@ -16,9 +16,9 @@ void foo() {} void baz() {} -// CHECK: define void @_Z3foov() #[[NEVERATTR:[0-9]+]] { -// CHECK: define void @_Z3barv() #[[ALWAYSATTR:[0-9]+]] { -// CHECK: define void @_Z3bazv() #[[NEVERATTR:[0-9]+]] { +// CHECK: define dso_local void @_Z3foov() #[[NEVERATTR:[0-9]+]] { +// CHECK: define dso_local void @_Z3barv() #[[ALWAYSATTR:[0-9]+]] { +// CHECK: define dso_local void @_Z3bazv() #[[NEVERATTR:[0-9]+]] { // CHECK: attributes #[[NEVERATTR]] = {{.*}} "function-instrument"="xray-never" {{.*}} // CHECK: attributes #[[ALWAYSATTR]] = {{.*}} "function-instrument"="xray-always" {{.*}} diff --git a/clang/test/CodeGen/zvector.c b/clang/test/CodeGen/zvector.c index 58fb60e9187f..de5e536362e5 100644 --- a/clang/test/CodeGen/zvector.c +++ b/clang/test/CodeGen/zvector.c @@ -20,7 +20,7 @@ volatile vector double fd, fd2; volatile int cnt; -// CHECK-LABEL: define void @test_assign() #0 { +// CHECK-LABEL: define dso_local void @test_assign() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: store volatile <16 x i8> [[TMP0]], <16 x i8>* @sc, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @uc2, align 8 @@ -57,7 +57,7 @@ void test_assign(void) { fd = fd2; } -// CHECK-LABEL: define void @test_pos() #0 { +// CHECK-LABEL: define dso_local void @test_pos() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: store volatile <16 x i8> [[TMP0]], <16 x i8>* @sc, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @uc2, align 8 @@ -94,7 +94,7 @@ void test_pos(void) { fd = +fd2; } -// CHECK-LABEL: define void @test_neg() #0 { +// CHECK-LABEL: define dso_local void @test_neg() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[SUB:%.*]] = sub <16 x i8> zeroinitializer, [[TMP0]] // CHECK: store volatile <16 x i8> [[SUB]], <16 x i8>* @sc, align 8 @@ -120,7 +120,7 @@ void test_neg(void) { fd = -fd2; } -// CHECK-LABEL: define void @test_preinc() #0 { +// CHECK-LABEL: define dso_local void @test_preinc() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[INC:%.*]] = add <16 x i8> [[TMP0]], <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1> // CHECK: store volatile <16 x i8> [[INC]], <16 x i8>* @sc2, align 8 @@ -166,7 +166,7 @@ void test_preinc(void) { ++fd2; } -// CHECK-LABEL: define void @test_postinc() #0 { +// CHECK-LABEL: define dso_local void @test_postinc() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[INC:%.*]] = add <16 x i8> [[TMP0]], <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1> // CHECK: store volatile <16 x i8> [[INC]], <16 x i8>* @sc2, align 8 @@ -212,7 +212,7 @@ void test_postinc(void) { fd2++; } -// CHECK-LABEL: define void @test_predec() #0 { +// CHECK-LABEL: define dso_local void @test_predec() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[DEC:%.*]] = add <16 x i8> [[TMP0]], <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1> // CHECK: store volatile <16 x i8> [[DEC]], <16 x i8>* @sc2, align 8 @@ -258,7 +258,7 @@ void test_predec(void) { --fd2; } -// CHECK-LABEL: define void @test_postdec() #0 { +// CHECK-LABEL: define dso_local void @test_postdec() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[DEC:%.*]] = add <16 x i8> [[TMP0]], <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1> // CHECK: store volatile <16 x i8> [[DEC]], <16 x i8>* @sc2, align 8 @@ -304,7 +304,7 @@ void test_postdec(void) { fd2--; } -// CHECK-LABEL: define void @test_add() #0 { +// CHECK-LABEL: define dso_local void @test_add() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[ADD:%.*]] = add <16 x i8> [[TMP0]], [[TMP1]] @@ -439,7 +439,7 @@ void test_add(void) { fd = fd + fd2; } -// CHECK-LABEL: define void @test_add_assign() #0 { +// CHECK-LABEL: define dso_local void @test_add_assign() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[ADD:%.*]] = add <16 x i8> [[TMP1]], [[TMP0]] @@ -534,7 +534,7 @@ void test_add_assign(void) { fd += fd2; } -// CHECK-LABEL: define void @test_sub() #0 { +// CHECK-LABEL: define dso_local void @test_sub() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[SUB:%.*]] = sub <16 x i8> [[TMP0]], [[TMP1]] @@ -669,7 +669,7 @@ void test_sub(void) { fd = fd - fd2; } -// CHECK-LABEL: define void @test_sub_assign() #0 { +// CHECK-LABEL: define dso_local void @test_sub_assign() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[SUB:%.*]] = sub <16 x i8> [[TMP1]], [[TMP0]] @@ -764,7 +764,7 @@ void test_sub_assign(void) { fd -= fd2; } -// CHECK-LABEL: define void @test_mul() #0 { +// CHECK-LABEL: define dso_local void @test_mul() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[MUL:%.*]] = mul <16 x i8> [[TMP0]], [[TMP1]] @@ -819,7 +819,7 @@ void test_mul(void) { fd = fd * fd2; } -// CHECK-LABEL: define void @test_mul_assign() #0 { +// CHECK-LABEL: define dso_local void @test_mul_assign() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[MUL:%.*]] = mul <16 x i8> [[TMP1]], [[TMP0]] @@ -874,7 +874,7 @@ void test_mul_assign(void) { fd *= fd2; } -// CHECK-LABEL: define void @test_div() #0 { +// CHECK-LABEL: define dso_local void @test_div() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[DIV:%.*]] = sdiv <16 x i8> [[TMP0]], [[TMP1]] @@ -929,7 +929,7 @@ void test_div(void) { fd = fd / fd2; } -// CHECK-LABEL: define void @test_div_assign() #0 { +// CHECK-LABEL: define dso_local void @test_div_assign() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[DIV:%.*]] = sdiv <16 x i8> [[TMP1]], [[TMP0]] @@ -984,7 +984,7 @@ void test_div_assign(void) { fd /= fd2; } -// CHECK-LABEL: define void @test_rem() #0 { +// CHECK-LABEL: define dso_local void @test_rem() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[REM:%.*]] = srem <16 x i8> [[TMP0]], [[TMP1]] @@ -1033,7 +1033,7 @@ void test_rem(void) { ul = ul % ul2; } -// CHECK-LABEL: define void @test_rem_assign() #0 { +// CHECK-LABEL: define dso_local void @test_rem_assign() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[REM:%.*]] = srem <16 x i8> [[TMP1]], [[TMP0]] @@ -1082,7 +1082,7 @@ void test_rem_assign(void) { ul %= ul2; } -// CHECK-LABEL: define void @test_not() #0 { +// CHECK-LABEL: define dso_local void @test_not() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[NEG:%.*]] = xor <16 x i8> [[TMP0]], <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1> // CHECK: store volatile <16 x i8> [[NEG]], <16 x i8>* @sc, align 8 @@ -1139,7 +1139,7 @@ void test_not(void) { bl = ~bl2; } -// CHECK-LABEL: define void @test_and() #0 { +// CHECK-LABEL: define dso_local void @test_and() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[AND:%.*]] = and <16 x i8> [[TMP0]], [[TMP1]] @@ -1288,7 +1288,7 @@ void test_and(void) { bl = bl & bl2; } -// CHECK-LABEL: define void @test_and_assign() #0 { +// CHECK-LABEL: define dso_local void @test_and_assign() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[AND:%.*]] = and <16 x i8> [[TMP1]], [[TMP0]] @@ -1397,7 +1397,7 @@ void test_and_assign(void) { bl &= bl2; } -// CHECK-LABEL: define void @test_or() #0 { +// CHECK-LABEL: define dso_local void @test_or() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[OR:%.*]] = or <16 x i8> [[TMP0]], [[TMP1]] @@ -1546,7 +1546,7 @@ void test_or(void) { bl = bl | bl2; } -// CHECK-LABEL: define void @test_or_assign() #0 { +// CHECK-LABEL: define dso_local void @test_or_assign() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[OR:%.*]] = or <16 x i8> [[TMP1]], [[TMP0]] @@ -1655,7 +1655,7 @@ void test_or_assign(void) { bl |= bl2; } -// CHECK-LABEL: define void @test_xor() #0 { +// CHECK-LABEL: define dso_local void @test_xor() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[XOR:%.*]] = xor <16 x i8> [[TMP0]], [[TMP1]] @@ -1804,7 +1804,7 @@ void test_xor(void) { bl = bl ^ bl2; } -// CHECK-LABEL: define void @test_xor_assign() #0 { +// CHECK-LABEL: define dso_local void @test_xor_assign() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[XOR:%.*]] = xor <16 x i8> [[TMP1]], [[TMP0]] @@ -1913,7 +1913,7 @@ void test_xor_assign(void) { bl ^= bl2; } -// CHECK-LABEL: define void @test_sl() #0 { +// CHECK-LABEL: define dso_local void @test_sl() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[SHL:%.*]] = shl <16 x i8> [[TMP0]], [[TMP1]] @@ -2096,7 +2096,7 @@ void test_sl(void) { ul = ul << 5; } -// CHECK-LABEL: define void @test_sl_assign() #0 { +// CHECK-LABEL: define dso_local void @test_sl_assign() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[SHL:%.*]] = shl <16 x i8> [[TMP1]], [[TMP0]] @@ -2279,7 +2279,7 @@ void test_sl_assign(void) { ul <<= 5; } -// CHECK-LABEL: define void @test_sr() #0 { +// CHECK-LABEL: define dso_local void @test_sr() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[SHR:%.*]] = ashr <16 x i8> [[TMP0]], [[TMP1]] @@ -2462,7 +2462,7 @@ void test_sr(void) { ul = ul >> 5; } -// CHECK-LABEL: define void @test_sr_assign() #0 { +// CHECK-LABEL: define dso_local void @test_sr_assign() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[SHR:%.*]] = ashr <16 x i8> [[TMP1]], [[TMP0]] @@ -2646,7 +2646,7 @@ void test_sr_assign(void) { } -// CHECK-LABEL: define void @test_cmpeq() #0 { +// CHECK-LABEL: define dso_local void @test_cmpeq() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[CMP:%.*]] = icmp eq <16 x i8> [[TMP0]], [[TMP1]] @@ -2830,7 +2830,7 @@ void test_cmpeq(void) { bl = fd == fd2; } -// CHECK-LABEL: define void @test_cmpne() #0 { +// CHECK-LABEL: define dso_local void @test_cmpne() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[CMP:%.*]] = icmp ne <16 x i8> [[TMP0]], [[TMP1]] @@ -3014,7 +3014,7 @@ void test_cmpne(void) { bl = fd != fd2; } -// CHECK-LABEL: define void @test_cmpge() #0 { +// CHECK-LABEL: define dso_local void @test_cmpge() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[CMP:%.*]] = icmp sge <16 x i8> [[TMP0]], [[TMP1]] @@ -3102,7 +3102,7 @@ void test_cmpge(void) { bl = fd >= fd2; } -// CHECK-LABEL: define void @test_cmpgt() #0 { +// CHECK-LABEL: define dso_local void @test_cmpgt() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[CMP:%.*]] = icmp sgt <16 x i8> [[TMP0]], [[TMP1]] @@ -3190,7 +3190,7 @@ void test_cmpgt(void) { bl = fd > fd2; } -// CHECK-LABEL: define void @test_cmple() #0 { +// CHECK-LABEL: define dso_local void @test_cmple() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[CMP:%.*]] = icmp sle <16 x i8> [[TMP0]], [[TMP1]] @@ -3278,7 +3278,7 @@ void test_cmple(void) { bl = fd <= fd2; } -// CHECK-LABEL: define void @test_cmplt() #0 { +// CHECK-LABEL: define dso_local void @test_cmplt() #0 { // CHECK: [[TMP0:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc, align 8 // CHECK: [[TMP1:%.*]] = load volatile <16 x i8>, <16 x i8>* @sc2, align 8 // CHECK: [[CMP:%.*]] = icmp slt <16 x i8> [[TMP0]], [[TMP1]] diff --git a/clang/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp b/clang/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp index dd5fa3e08fc2..049a92380e03 100644 --- a/clang/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp +++ b/clang/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp @@ -3,7 +3,7 @@ int c(void) __attribute__((const)); int p(void) __attribute__((pure)); int t(void); -// CHECK: define i32 @_Z1fv() [[TF:#[0-9]+]] { +// CHECK: define dso_local i32 @_Z1fv() [[TF:#[0-9]+]] { int f(void) { // CHECK: call i32 @_Z1cv() [[NUW_RN_CALL:#[0-9]+]] // CHECK: call i32 @_Z1pv() [[NUW_RO_CALL:#[0-9]+]] diff --git a/clang/test/CodeGenCXX/2011-12-19-init-list-ctor.cpp b/clang/test/CodeGenCXX/2011-12-19-init-list-ctor.cpp index 41131373486d..18139406812c 100644 --- a/clang/test/CodeGenCXX/2011-12-19-init-list-ctor.cpp +++ b/clang/test/CodeGenCXX/2011-12-19-init-list-ctor.cpp @@ -4,7 +4,7 @@ struct A { A(const char *); }; -// CHECK: @arr = global [3 x %struct.S] zeroinitializer +// CHECK: @arr = dso_local global [3 x %struct.S] zeroinitializer // CHECK: @.str = {{.*}}constant [6 x i8] c"hello\00" // CHECK: @.str.1 = {{.*}}constant [6 x i8] c"world\00" // CHECK: @.str.2 = {{.*}}constant [8 x i8] c"goodbye\00" diff --git a/clang/test/CodeGenCXX/aarch64-arguments.cpp b/clang/test/CodeGenCXX/aarch64-arguments.cpp index 013051ccaea3..d5dbd626c0bb 100644 --- a/clang/test/CodeGenCXX/aarch64-arguments.cpp +++ b/clang/test/CodeGenCXX/aarch64-arguments.cpp @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple arm64-none-linux -emit-llvm -w -o - %s | FileCheck -check-prefix=PCS %s -// PCS: define void @{{.*}}(i8 %a +// PCS: define dso_local void @{{.*}}(i8 %a struct s0 {}; void f0(s0 a) {} diff --git a/clang/test/CodeGenCXX/alloca-align.cpp b/clang/test/CodeGenCXX/alloca-align.cpp index 079b55d2b03a..457d5cc425bd 100644 --- a/clang/test/CodeGenCXX/alloca-align.cpp +++ b/clang/test/CodeGenCXX/alloca-align.cpp @@ -6,19 +6,19 @@ struct s0 { int TheStores __attribute__((aligned(16))); }; -// CHECK-LABEL: define void @f0 +// CHECK-LABEL: define dso_local void @f0 // CHECK: alloca %struct.s0, align 16 extern "C" void f0() { (void) s0(); } -// CHECK-LABEL: define void @f1 +// CHECK-LABEL: define dso_local void @f1 // CHECK: alloca %struct.s0, align 16 extern "C" void f1() { (void) (struct s0) { 0, 0, 0, 0 }; } -// CHECK-LABEL: define i32 @f2 +// CHECK-LABEL: define dso_local i32 @f2 // CHECK: alloca %struct.s1, align 2 struct s1 { short x; short y; }; extern "C" struct s1 f2(int a, struct s1 *x, struct s1 *y) { diff --git a/clang/test/CodeGenCXX/amdgcn-automatic-variable.cpp b/clang/test/CodeGenCXX/amdgcn-automatic-variable.cpp index f96e288a97ed..6dbd11db2bdd 100644 --- a/clang/test/CodeGenCXX/amdgcn-automatic-variable.cpp +++ b/clang/test/CodeGenCXX/amdgcn-automatic-variable.cpp @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -O0 -triple amdgcn---amdgiz -emit-llvm %s -o - | FileCheck %s -// CHECK-LABEL: define void @_Z5func1Pi(i32* %x) +// CHECK-LABEL: define dso_local void @_Z5func1Pi(i32* %x) void func1(int *x) { // CHECK: %[[x_addr:.*]] = alloca i32*{{.*}}addrspace(5) // CHECK: %[[r0:.*]] = addrspacecast i32* addrspace(5)* %[[x_addr]] to i32** @@ -10,7 +10,7 @@ void func1(int *x) { *x = 1; } -// CHECK-LABEL: define void @_Z5func2v() +// CHECK-LABEL: define dso_local void @_Z5func2v() void func2(void) { // CHECK: %lv1 = alloca i32, align 4, addrspace(5) // CHECK: %[[r0:.*]] = addrspacecast i32 addrspace(5)* %lv1 to i32* @@ -63,7 +63,7 @@ public: } }; -// CHECK-LABEL: define void @_Z5func3v +// CHECK-LABEL: define dso_local void @_Z5func3v void func3() { // CHECK: %[[a:.*]] = alloca %class.A, align 4, addrspace(5) // CHECK: %[[r0:.*]] = addrspacecast %class.A addrspace(5)* %[[a]] to %class.A* @@ -72,7 +72,7 @@ void func3() { A a; } -// CHECK-LABEL: define void @_Z5func4i +// CHECK-LABEL: define dso_local void @_Z5func4i void func4(int x) { // CHECK: %[[x_addr:.*]] = alloca i32, align 4, addrspace(5) // CHECK: %[[r0:.*]] = addrspacecast i32 addrspace(5)* %[[x_addr]] to i32* @@ -81,19 +81,19 @@ void func4(int x) { func1(&x); } -// CHECK-LABEL: define void @_Z5func5v +// CHECK-LABEL: define dso_local void @_Z5func5v void func5() { return; int x = 0; } -// CHECK-LABEL: define void @_Z5func6v +// CHECK-LABEL: define dso_local void @_Z5func6v void func6() { return; int x; } -// CHECK-LABEL: define void @_Z5func7v +// CHECK-LABEL: define dso_local void @_Z5func7v extern void use(int *); void func7() { goto later; diff --git a/clang/test/CodeGenCXX/amdgcn-func-arg.cpp b/clang/test/CodeGenCXX/amdgcn-func-arg.cpp index 38f3e200f685..e449f6596593 100644 --- a/clang/test/CodeGenCXX/amdgcn-func-arg.cpp +++ b/clang/test/CodeGenCXX/amdgcn-func-arg.cpp @@ -17,7 +17,7 @@ B g_b; void func_with_ref_arg(A &a); void func_with_ref_arg(B &b); -// CHECK-LABEL: define void @_Z22func_with_indirect_arg1A(%class.A addrspace(5)* %a) +// CHECK-LABEL: define dso_local void @_Z22func_with_indirect_arg1A(%class.A addrspace(5)* %a) // CHECK: %p = alloca %class.A*, align 8, addrspace(5) // CHECK: %[[r1:.+]] = addrspacecast %class.A* addrspace(5)* %p to %class.A** // CHECK: %[[r0:.+]] = addrspacecast %class.A addrspace(5)* %a to %class.A* @@ -26,7 +26,7 @@ void func_with_indirect_arg(A a) { A *p = &a; } -// CHECK-LABEL: define void @_Z22test_indirect_arg_autov() +// CHECK-LABEL: define dso_local void @_Z22test_indirect_arg_autov() // CHECK: %a = alloca %class.A, align 4, addrspace(5) // CHECK: %[[r0:.+]] = addrspacecast %class.A addrspace(5)* %a to %class.A* // CHECK: %agg.tmp = alloca %class.A, align 4, addrspace(5) @@ -44,7 +44,7 @@ void test_indirect_arg_auto() { func_with_ref_arg(a); } -// CHECK: define void @_Z24test_indirect_arg_globalv() +// CHECK: define dso_local void @_Z24test_indirect_arg_globalv() // CHECK: %agg.tmp = alloca %class.A, align 4, addrspace(5) // CHECK: %[[r0:.+]] = addrspacecast %class.A addrspace(5)* %agg.tmp to %class.A* // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64 @@ -57,7 +57,7 @@ void test_indirect_arg_global() { func_with_ref_arg(g_a); } -// CHECK-LABEL: define void @_Z19func_with_byval_arg1B(%class.B addrspace(5)* byval(%class.B) align 4 %b) +// CHECK-LABEL: define dso_local void @_Z19func_with_byval_arg1B(%class.B addrspace(5)* byval(%class.B) align 4 %b) // CHECK: %p = alloca %class.B*, align 8, addrspace(5) // CHECK: %[[r1:.+]] = addrspacecast %class.B* addrspace(5)* %p to %class.B** // CHECK: %[[r0:.+]] = addrspacecast %class.B addrspace(5)* %b to %class.B* @@ -66,7 +66,7 @@ void func_with_byval_arg(B b) { B *p = &b; } -// CHECK-LABEL: define void @_Z19test_byval_arg_autov() +// CHECK-LABEL: define dso_local void @_Z19test_byval_arg_autov() // CHECK: %b = alloca %class.B, align 4, addrspace(5) // CHECK: %[[r0:.+]] = addrspacecast %class.B addrspace(5)* %b to %class.B* // CHECK: %agg.tmp = alloca %class.B, align 4, addrspace(5) @@ -81,7 +81,7 @@ void test_byval_arg_auto() { func_with_ref_arg(b); } -// CHECK-LABEL: define void @_Z21test_byval_arg_globalv() +// CHECK-LABEL: define dso_local void @_Z21test_byval_arg_globalv() // CHECK: %agg.tmp = alloca %class.B, align 4, addrspace(5) // CHECK: %[[r0:.+]] = addrspacecast %class.B addrspace(5)* %agg.tmp to %class.B* // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64 diff --git a/clang/test/CodeGenCXX/amdgcn-string-literal.cpp b/clang/test/CodeGenCXX/amdgcn-string-literal.cpp index 31480771653e..193f34089f02 100644 --- a/clang/test/CodeGenCXX/amdgcn-string-literal.cpp +++ b/clang/test/CodeGenCXX/amdgcn-string-literal.cpp @@ -1,8 +1,8 @@ // RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -emit-llvm %s -o - | FileCheck %s // CHECK: @.str = private unnamed_addr addrspace(4) constant [6 x i8] c"g_str\00", align 1 -// CHECK: @g_str = addrspace(1) global i8* addrspacecast (i8 addrspace(4)* getelementptr inbounds ([6 x i8], [6 x i8] addrspace(4)* @.str, i32 0, i32 0) to i8*), align 8 -// CHECK: @g_array = addrspace(1) global [8 x i8] c"g_array\00", align 1 +// CHECK: @g_str = dso_local addrspace(1) global i8* addrspacecast (i8 addrspace(4)* getelementptr inbounds ([6 x i8], [6 x i8] addrspace(4)* @.str, i32 0, i32 0) to i8*), align 8 +// CHECK: @g_array = dso_local addrspace(1) global [8 x i8] c"g_array\00", align 1 // CHECK: @.str.1 = private unnamed_addr addrspace(4) constant [6 x i8] c"l_str\00", align 1 // CHECK: @__const._Z1fv.l_array = private unnamed_addr addrspace(4) constant [8 x i8] c"l_array\00", align 1 @@ -11,7 +11,7 @@ char g_array[] = "g_array"; void g(const char* p); -// CHECK-LABEL: define void @_Z1fv() +// CHECK-LABEL: define dso_local void @_Z1fv() void f() { const char* l_str = "l_str"; @@ -27,7 +27,7 @@ void f() { g(p); } -// CHECK-LABEL: define void @_Z1ev +// CHECK-LABEL: define dso_local void @_Z1ev void e() { g("string literal"); g("string literal"); diff --git a/clang/test/CodeGenCXX/amdgcn_declspec_get.cpp b/clang/test/CodeGenCXX/amdgcn_declspec_get.cpp index 93f7a36af141..cae4ac942033 100644 --- a/clang/test/CodeGenCXX/amdgcn_declspec_get.cpp +++ b/clang/test/CodeGenCXX/amdgcn_declspec_get.cpp @@ -12,7 +12,7 @@ struct A { extern const A a; -// CHECK-LABEL: define void @_Z4testv() +// CHECK-LABEL: define dso_local void @_Z4testv() // CHECK: %i = alloca i32, align 4, addrspace(5) // CHECK: %[[ii:.*]] = addrspacecast i32 addrspace(5)* %i to i32* // CHECK: %[[cast:.*]] = bitcast i32 addrspace(5)* %i to i8 addrspace(5)* diff --git a/clang/test/CodeGenCXX/arm64-darwinpcs.cpp b/clang/test/CodeGenCXX/arm64-darwinpcs.cpp index 0a0ec3af49cf..b3d15b212c20 100644 --- a/clang/test/CodeGenCXX/arm64-darwinpcs.cpp +++ b/clang/test/CodeGenCXX/arm64-darwinpcs.cpp @@ -2,13 +2,13 @@ // RUN: %clang_cc1 -triple arm64-linux-gnu -emit-llvm -o - %s -target-abi darwinpcs | FileCheck %s --check-prefix=CHECK-DARWIN void test_extensions(bool a, char b, short c) {} -// CHECK: define void @_Z15test_extensionsbcs(i1 %a, i8 %b, i16 %c) -// CHECK-DARWIN: define void @_Z15test_extensionsbcs(i1 zeroext %a, i8 signext %b, i16 signext %c) +// CHECK: define dso_local void @_Z15test_extensionsbcs(i1 %a, i8 %b, i16 %c) +// CHECK-DARWIN: define dso_local void @_Z15test_extensionsbcs(i1 zeroext %a, i8 signext %b, i16 signext %c) struct Empty {}; void test_empty(Empty e) {} -// CHECK: define void @_Z10test_empty5Empty(i8 -// CHECK-DARWIN: define void @_Z10test_empty5Empty() +// CHECK: define dso_local void @_Z10test_empty5Empty(i8 +// CHECK-DARWIN: define dso_local void @_Z10test_empty5Empty() struct HFA { float a[3]; diff --git a/clang/test/CodeGenCXX/attr-callback.cpp b/clang/test/CodeGenCXX/attr-callback.cpp index a05b640b6013..aa585474fec9 100644 --- a/clang/test/CodeGenCXX/attr-callback.cpp +++ b/clang/test/CodeGenCXX/attr-callback.cpp @@ -15,19 +15,19 @@ struct Base { this_unknown_this(void (*callback)(Base *, Base *, Base *)); }; -// CHECK-DAG: define void @_ZN4Base9no_args_1EPFvvE({{[^!]*!callback}} ![[cid0:[0-9]+]] +// CHECK-DAG: define dso_local void @_ZN4Base9no_args_1EPFvvE({{[^!]*!callback}} ![[cid0:[0-9]+]] __attribute__((callback(1))) void Base::no_args_1(void (*callback)(void)) { } -// CHECK-DAG: define void @_ZN4Base9no_args_2EPFvvES1_({{[^!]*!callback}} ![[cid1:[0-9]+]] +// CHECK-DAG: define dso_local void @_ZN4Base9no_args_2EPFvvES1_({{[^!]*!callback}} ![[cid1:[0-9]+]] __attribute__((callback(2))) void Base::no_args_2(void (*callback1)(void), void (*callback2)(void)) { } -// CHECK-DAG: define void @_ZN4Base9no_args_3EPFvvES1_({{[^!]*!callback}} ![[cid1]] +// CHECK-DAG: define dso_local void @_ZN4Base9no_args_3EPFvvES1_({{[^!]*!callback}} ![[cid1]] __attribute__((callback(callback2))) void Base::no_args_3(void (*callback1)(void), void (*callback2)(void)) { } -// CHECK-DAG: define void @_ZN4Base17this_unknown_thisEPFvPS_S0_S0_E({{[^!]*!callback}} ![[cid2:[0-9]+]] +// CHECK-DAG: define dso_local void @_ZN4Base17this_unknown_thisEPFvPS_S0_S0_E({{[^!]*!callback}} ![[cid2:[0-9]+]] void Base::this_unknown_this(void (*callback)(Base *, Base *, Base *)) { } @@ -36,14 +36,14 @@ struct Derived_1 : public Base { virtual_1(void (*callback)(void)) override; }; -// CHECK-DAG: define void @_ZN9Derived_19virtual_1EPFvvE({{[^!]*!callback}} ![[cid0]] +// CHECK-DAG: define dso_local void @_ZN9Derived_19virtual_1EPFvvE({{[^!]*!callback}} ![[cid0]] void Derived_1::virtual_1(void (*callback)(void)) {} struct Derived_2 : public Base { void virtual_1(void (*callback)(void)) override; }; -// CHECK-DAG: define void @_ZN9Derived_29virtual_1EPFvvE +// CHECK-DAG: define dso_local void @_ZN9Derived_29virtual_1EPFvvE // CHECK-NOT: !callback void Derived_2::virtual_1(void (*callback)(void)) {} diff --git a/clang/test/CodeGenCXX/attr-cpuspecific.cpp b/clang/test/CodeGenCXX/attr-cpuspecific.cpp index efe6921ec11e..395c2f082186 100644 --- a/clang/test/CodeGenCXX/attr-cpuspecific.cpp +++ b/clang/test/CodeGenCXX/attr-cpuspecific.cpp @@ -13,13 +13,13 @@ void foo() { s.Func(); } -// LINUX: @_ZN1S4FuncEv = weak_odr alias void (%struct.S*), void (%struct.S*)* @_ZN1S4FuncEv.ifunc -// LINUX: @_ZN1S4FuncEv.ifunc = weak_odr ifunc void (%struct.S*), void (%struct.S*)* ()* @_ZN1S4FuncEv.resolver +// LINUX: @_ZN1S4FuncEv = weak_odr dso_local alias void (%struct.S*), void (%struct.S*)* @_ZN1S4FuncEv.ifunc +// LINUX: @_ZN1S4FuncEv.ifunc = weak_odr dso_local ifunc void (%struct.S*), void (%struct.S*)* ()* @_ZN1S4FuncEv.resolver // LINUX: define weak_odr void (%struct.S*)* @_ZN1S4FuncEv.resolver // LINUX: ret void (%struct.S*)* @_ZN1S4FuncEv.S // LINUX: ret void (%struct.S*)* @_ZN1S4FuncEv.O // LINUX: declare void @_ZN1S4FuncEv.S -// LINUX: define linkonce_odr void @_ZN1S4FuncEv.O +// LINUX: define linkonce_odr dso_local void @_ZN1S4FuncEv.O // WINDOWS: define weak_odr dso_local void @"?Func@S@@QEAAXXZ"(%struct.S* %0) comdat // WINDOWS: musttail call void @"?Func@S@@QEAAXXZ.S"(%struct.S* %0) diff --git a/clang/test/CodeGenCXX/attr-exclude_from_explicit_instantiation.dont_assume_extern_instantiation.cpp b/clang/test/CodeGenCXX/attr-exclude_from_explicit_instantiation.dont_assume_extern_instantiation.cpp index efbbb0cd6400..d200d007aa82 100644 --- a/clang/test/CodeGenCXX/attr-exclude_from_explicit_instantiation.dont_assume_extern_instantiation.cpp +++ b/clang/test/CodeGenCXX/attr-exclude_from_explicit_instantiation.dont_assume_extern_instantiation.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -O0 -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -O0 -o - %s -fsemantic-interposition | FileCheck %s // Test that we do not assume that entities marked with the // exclude_from_explicit_instantiation attribute are instantiated @@ -44,25 +44,25 @@ void use() { // An inline non-static member function marked with the attribute is not // part of the extern template declaration, so a definition must be emitted // in this TU. - // CHECK-DAG: define linkonce_odr void @_ZN3FooIiE27non_static_member_function1Ev + // CHECK-DAG: define linkonce_odr dso_local void @_ZN3FooIiE27non_static_member_function1Ev f.non_static_member_function1(); // A non-inline non-static member function marked with the attribute is // not part of the extern template declaration, so a definition must be // emitted in this TU. - // CHECK-DAG: define linkonce_odr void @_ZN3FooIiE27non_static_member_function2Ev + // CHECK-DAG: define linkonce_odr dso_local void @_ZN3FooIiE27non_static_member_function2Ev f.non_static_member_function2(); // An inline static member function marked with the attribute is not // part of the extern template declaration, so a definition must be // emitted in this TU. - // CHECK-DAG: define linkonce_odr void @_ZN3FooIiE23static_member_function1Ev + // CHECK-DAG: define linkonce_odr dso_local void @_ZN3FooIiE23static_member_function1Ev Foo<int>::static_member_function1(); // A non-inline static member function marked with the attribute is not // part of the extern template declaration, so a definition must be // emitted in this TU. - // CHECK-DAG: define linkonce_odr void @_ZN3FooIiE23static_member_function2Ev + // CHECK-DAG: define linkonce_odr dso_local void @_ZN3FooIiE23static_member_function2Ev Foo<int>::static_member_function2(); // A static data member marked with the attribute is not part of the diff --git a/clang/test/CodeGenCXX/attr-target-mv-func-ptrs.cpp b/clang/test/CodeGenCXX/attr-target-mv-func-ptrs.cpp index 6336e190426b..31a102106624 100644 --- a/clang/test/CodeGenCXX/attr-target-mv-func-ptrs.cpp +++ b/clang/test/CodeGenCXX/attr-target-mv-func-ptrs.cpp @@ -35,7 +35,7 @@ int bar() { // LINUX: @_Z3fooi.ifunc // LINUX: @_ZN1S3fooEi.ifunc -// LINUX: define i32 @_Z3barv() +// LINUX: define dso_local i32 @_Z3barv() // Store to Free of ifunc // LINUX: store i32 (i32)* @_Z3fooi.ifunc // Store to Member of ifunc diff --git a/clang/test/CodeGenCXX/attr-used-member-function-implicit-instantiation.cpp b/clang/test/CodeGenCXX/attr-used-member-function-implicit-instantiation.cpp index 7d2062f989d6..600ea2019916 100644 --- a/clang/test/CodeGenCXX/attr-used-member-function-implicit-instantiation.cpp +++ b/clang/test/CodeGenCXX/attr-used-member-function-implicit-instantiation.cpp @@ -13,7 +13,7 @@ struct S { void test() { // Check that InstantiateUsedMemberDefinition::S<int>::f() is defined // as a result of the S class template implicit instantiation - // CHECK: define linkonce_odr i32 @_ZN31InstantiateUsedMemberDefinition1SIiE1fEv + // CHECK: define linkonce_odr dso_local i32 @_ZN31InstantiateUsedMemberDefinition1SIiE1fEv S<int> inst; } } // namespace InstantiateUsedMemberDefinition diff --git a/clang/test/CodeGenCXX/attr-x86-interrupt.cpp b/clang/test/CodeGenCXX/attr-x86-interrupt.cpp index 30cf58b1e2e3..81347a7e2e91 100644 --- a/clang/test/CodeGenCXX/attr-x86-interrupt.cpp +++ b/clang/test/CodeGenCXX/attr-x86-interrupt.cpp @@ -18,13 +18,13 @@ struct St { static void foo9(int *a) __attribute__((interrupt)) {} }; // X86_64_LINUX: @llvm.used = appending global [3 x i8*] [i8* bitcast (void (i32*, i64)* @{{.*}}foo7{{.*}} to i8*), i8* bitcast (void (i32*)* @{{.*}}foo8{{.*}} to i8*), i8* bitcast (void (i32*)* @{{.*}}foo9{{.*}} to i8*)], section "llvm.metadata" -// X86_64_LINUX: define x86_intrcc void @{{.*}}foo7{{.*}}(i32* %{{.+}}, i64 %{{.+}}) -// X86_64_LINUX: define x86_intrcc void @{{.*}}foo8{{.*}}(i32* %{{.+}}) -// X86_64_LINUX: define linkonce_odr x86_intrcc void @{{.*}}foo9{{.*}}(i32* %{{.+}}) +// X86_64_LINUX: define dso_local x86_intrcc void @{{.*}}foo7{{.*}}(i32* %{{.+}}, i64 %{{.+}}) +// X86_64_LINUX: define dso_local x86_intrcc void @{{.*}}foo8{{.*}}(i32* %{{.+}}) +// X86_64_LINUX: define linkonce_odr dso_local x86_intrcc void @{{.*}}foo9{{.*}}(i32* %{{.+}}) // X86_LINUX: @llvm.used = appending global [3 x i8*] [i8* bitcast (void (i32*, i32)* @{{.*}}foo7{{.*}} to i8*), i8* bitcast (void (i32*)* @{{.*}}foo8{{.*}} to i8*), i8* bitcast (void (i32*)* @{{.*}}foo9{{.*}} to i8*)], section "llvm.metadata" -// X86_LINUX: define x86_intrcc void @{{.*}}foo7{{.*}}(i32* %{{.+}}, i32 %{{.+}}) -// X86_LINUX: define x86_intrcc void @{{.*}}foo8{{.*}}(i32* %{{.+}}) -// X86_LINUX: define linkonce_odr x86_intrcc void @{{.*}}foo9{{.*}}(i32* %{{.+}}) +// X86_LINUX: define dso_local x86_intrcc void @{{.*}}foo7{{.*}}(i32* %{{.+}}, i32 %{{.+}}) +// X86_LINUX: define dso_local x86_intrcc void @{{.*}}foo8{{.*}}(i32* %{{.+}}) +// X86_LINUX: define linkonce_odr dso_local x86_intrcc void @{{.*}}foo9{{.*}}(i32* %{{.+}}) // X86_64_WIN: @llvm.used = appending global [3 x i8*] [i8* bitcast (void (i32*, i64)* @{{.*}}foo7{{.*}} to i8*), i8* bitcast (void (i32*)* @{{.*}}foo8{{.*}} to i8*), i8* bitcast (void (i32*)* @{{.*}}foo9{{.*}} to i8*)], section "llvm.metadata" // X86_64_WIN: define dso_local x86_intrcc void @{{.*}}foo7{{.*}}(i32* %{{.+}}, i64 %{{.+}}) // X86_64_WIN: define dso_local x86_intrcc void @{{.*}}foo8{{.*}}(i32* %{{.+}}) diff --git a/clang/test/CodeGenCXX/attr.cpp b/clang/test/CodeGenCXX/attr.cpp index 7f5595f6f044..0212fe9805e9 100644 --- a/clang/test/CodeGenCXX/attr.cpp +++ b/clang/test/CodeGenCXX/attr.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -o - %s -fsemantic-interposition | FileCheck %s // CHECK: @test2 = alias i32 (), i32 ()* @_Z5test1v @@ -26,7 +26,7 @@ void C::bar3() { } void C::bar4() { } // PR6635 -// CHECK-LABEL: define i32 @_Z5test1v() +// CHECK-LABEL: define dso_local i32 @_Z5test1v() int test1() { return 10; } // CHECK at top of file extern "C" int test2() __attribute__((alias("_Z5test1v"))); diff --git a/clang/test/CodeGenCXX/auto-variable-template.cpp b/clang/test/CodeGenCXX/auto-variable-template.cpp index 265d81dd352a..d4439899ad2b 100644 --- a/clang/test/CodeGenCXX/auto-variable-template.cpp +++ b/clang/test/CodeGenCXX/auto-variable-template.cpp @@ -8,7 +8,7 @@ template <typename T> auto vtemplate = f{}; int main() { vtemplate<int>(); } -// CHECK: @_Z9vtemplateIiE = linkonce_odr global %struct.f undef, comdat +// CHECK: @_Z9vtemplateIiE = linkonce_odr dso_local global %struct.f undef, comdat -// CHECK: define i32 @main() +// CHECK: define dso_local i32 @main() // CHECK: call void @_ZNK1fclEv(%struct.f* @_Z9vtemplateIiE) diff --git a/clang/test/CodeGenCXX/bitfield.cpp b/clang/test/CodeGenCXX/bitfield.cpp index 7f55b4daa241..7316c01a8cb0 100644 --- a/clang/test/CodeGenCXX/bitfield.cpp +++ b/clang/test/CodeGenCXX/bitfield.cpp @@ -20,13 +20,13 @@ namespace N0 { unsigned b71 : 2; }; unsigned read00(S* s) { - // CHECK-X86-64-LABEL: define i32 @_ZN2N06read00 + // CHECK-X86-64-LABEL: define dso_local i32 @_ZN2N06read00 // CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64* // CHECK-X86-64: %[[val:.*]] = load i64, i64* %[[ptr]] // CHECK-X86-64: %[[and:.*]] = and i64 %[[val]], 16383 // CHECK-X86-64: %[[trunc:.*]] = trunc i64 %[[and]] to i32 // CHECK-X86-64: ret i32 %[[trunc]] - // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N06read00 + // CHECK-PPC64-LABEL: define dso_local zeroext i32 @_ZN2N06read00 // CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64* // CHECK-PPC64: %[[val:.*]] = load i64, i64* %[[ptr]] // CHECK-PPC64: %[[shr:.*]] = lshr i64 %[[val]], 50 @@ -35,14 +35,14 @@ namespace N0 { return s->b00; } unsigned read01(S* s) { - // CHECK-X86-64-LABEL: define i32 @_ZN2N06read01 + // CHECK-X86-64-LABEL: define dso_local i32 @_ZN2N06read01 // CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64* // CHECK-X86-64: %[[val:.*]] = load i64, i64* %[[ptr]] // CHECK-X86-64: %[[shr:.*]] = lshr i64 %[[val]], 14 // CHECK-X86-64: %[[and:.*]] = and i64 %[[shr]], 3 // CHECK-X86-64: %[[trunc:.*]] = trunc i64 %[[and]] to i32 // CHECK-X86-64: ret i32 %[[trunc]] - // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N06read01 + // CHECK-PPC64-LABEL: define dso_local zeroext i32 @_ZN2N06read01 // CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64* // CHECK-PPC64: %[[val:.*]] = load i64, i64* %[[ptr]] // CHECK-PPC64: %[[shr:.*]] = lshr i64 %[[val]], 48 @@ -52,14 +52,14 @@ namespace N0 { return s->b01; } unsigned read20(S* s) { - // CHECK-X86-64-LABEL: define i32 @_ZN2N06read20 + // CHECK-X86-64-LABEL: define dso_local i32 @_ZN2N06read20 // CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64* // CHECK-X86-64: %[[val:.*]] = load i64, i64* %[[ptr]] // CHECK-X86-64: %[[shr:.*]] = lshr i64 %[[val]], 16 // CHECK-X86-64: %[[and:.*]] = and i64 %[[shr]], 63 // CHECK-X86-64: %[[trunc:.*]] = trunc i64 %[[and]] to i32 // CHECK-X86-64: ret i32 %[[trunc]] - // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N06read20 + // CHECK-PPC64-LABEL: define dso_local zeroext i32 @_ZN2N06read20 // CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64* // CHECK-PPC64: %[[val:.*]] = load i64, i64* %[[ptr]] // CHECK-PPC64: %[[shr:.*]] = lshr i64 %[[val]], 42 @@ -69,14 +69,14 @@ namespace N0 { return s->b20; } unsigned read21(S* s) { - // CHECK-X86-64-LABEL: define i32 @_ZN2N06read21 + // CHECK-X86-64-LABEL: define dso_local i32 @_ZN2N06read21 // CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64* // CHECK-X86-64: %[[val:.*]] = load i64, i64* %[[ptr]] // CHECK-X86-64: %[[shr:.*]] = lshr i64 %[[val]], 22 // CHECK-X86-64: %[[and:.*]] = and i64 %[[shr]], 3 // CHECK-X86-64: %[[trunc:.*]] = trunc i64 %[[and]] to i32 // CHECK-X86-64: ret i32 %[[trunc]] - // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N06read21 + // CHECK-PPC64-LABEL: define dso_local zeroext i32 @_ZN2N06read21 // CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64* // CHECK-PPC64: %[[val:.*]] = load i64, i64* %[[ptr]] // CHECK-PPC64: %[[shr:.*]] = lshr i64 %[[val]], 40 @@ -86,14 +86,14 @@ namespace N0 { return s->b21; } unsigned read30(S* s) { - // CHECK-X86-64-LABEL: define i32 @_ZN2N06read30 + // CHECK-X86-64-LABEL: define dso_local i32 @_ZN2N06read30 // CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64* // CHECK-X86-64: %[[val:.*]] = load i64, i64* %[[ptr]] // CHECK-X86-64: %[[shr:.*]] = lshr i64 %[[val]], 24 // CHECK-X86-64: %[[and:.*]] = and i64 %[[shr]], 1073741823 // CHECK-X86-64: %[[trunc:.*]] = trunc i64 %[[and]] to i32 // CHECK-X86-64: ret i32 %[[trunc]] - // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N06read30 + // CHECK-PPC64-LABEL: define dso_local zeroext i32 @_ZN2N06read30 // CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64* // CHECK-PPC64: %[[val:.*]] = load i64, i64* %[[ptr]] // CHECK-PPC64: %[[shr:.*]] = lshr i64 %[[val]], 10 @@ -103,14 +103,14 @@ namespace N0 { return s->b30; } unsigned read31(S* s) { - // CHECK-X86-64-LABEL: define i32 @_ZN2N06read31 + // CHECK-X86-64-LABEL: define dso_local i32 @_ZN2N06read31 // CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64* // CHECK-X86-64: %[[val:.*]] = load i64, i64* %[[ptr]] // CHECK-X86-64: %[[shr:.*]] = lshr i64 %[[val]], 54 // CHECK-X86-64: %[[and:.*]] = and i64 %[[shr]], 3 // CHECK-X86-64: %[[trunc:.*]] = trunc i64 %[[and]] to i32 // CHECK-X86-64: ret i32 %[[trunc]] - // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N06read31 + // CHECK-PPC64-LABEL: define dso_local zeroext i32 @_ZN2N06read31 // CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64* // CHECK-PPC64: %[[val:.*]] = load i64, i64* %[[ptr]] // CHECK-PPC64: %[[shr:.*]] = lshr i64 %[[val]], 8 @@ -120,14 +120,14 @@ namespace N0 { return s->b31; } unsigned read70(S* s) { - // CHECK-X86-64-LABEL: define i32 @_ZN2N06read70 + // CHECK-X86-64-LABEL: define dso_local i32 @_ZN2N06read70 // CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64* // CHECK-X86-64: %[[val:.*]] = load i64, i64* %[[ptr]] // CHECK-X86-64: %[[shr:.*]] = lshr i64 %[[val]], 56 // CHECK-X86-64: %[[and:.*]] = and i64 %[[shr]], 63 // CHECK-X86-64: %[[trunc:.*]] = trunc i64 %[[and]] to i32 // CHECK-X86-64: ret i32 %[[trunc]] - // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N06read70 + // CHECK-PPC64-LABEL: define dso_local zeroext i32 @_ZN2N06read70 // CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64* // CHECK-PPC64: %[[val:.*]] = load i64, i64* %[[ptr]] // CHECK-PPC64: %[[shr:.*]] = lshr i64 %[[val]], 2 @@ -137,13 +137,13 @@ namespace N0 { return s->b70; } unsigned read71(S* s) { - // CHECK-X86-64-LABEL: define i32 @_ZN2N06read71 + // CHECK-X86-64-LABEL: define dso_local i32 @_ZN2N06read71 // CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64* // CHECK-X86-64: %[[val:.*]] = load i64, i64* %[[ptr]] // CHECK-X86-64: %[[shr:.*]] = lshr i64 %[[val]], 62 // CHECK-X86-64: %[[trunc:.*]] = trunc i64 %[[shr]] to i32 // CHECK-X86-64: ret i32 %[[trunc]] - // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N06read71 + // CHECK-PPC64-LABEL: define dso_local zeroext i32 @_ZN2N06read71 // CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64* // CHECK-PPC64: %[[val:.*]] = load i64, i64* %[[ptr]] // CHECK-PPC64: %[[and:.*]] = and i64 %[[val]], 3 @@ -166,13 +166,13 @@ namespace N1 { char c; }; unsigned read(S* s) { - // CHECK-X86-64-LABEL: define i32 @_ZN2N14read + // CHECK-X86-64-LABEL: define dso_local i32 @_ZN2N14read // CHECK-X86-64: %[[ptr:.*]] = getelementptr inbounds %{{.*}}, %{{.*}}* %{{.*}}, i32 0, i32 1 // CHECK-X86-64: %[[val:.*]] = load i8, i8* %[[ptr]] // CHECK-X86-64: %[[and:.*]] = and i8 %[[val]], 1 // CHECK-X86-64: %[[ext:.*]] = zext i8 %[[and]] to i32 // CHECK-X86-64: ret i32 %[[ext]] - // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N14read + // CHECK-PPC64-LABEL: define dso_local zeroext i32 @_ZN2N14read // CHECK-PPC64: %[[ptr:.*]] = getelementptr inbounds %{{.*}}, %{{.*}}* %{{.*}}, i32 0, i32 1 // CHECK-PPC64: %[[val:.*]] = load i8, i8* %[[ptr]] // CHECK-PPC64: %[[shr:.*]] = lshr i8 %[[val]], 7 @@ -181,7 +181,7 @@ namespace N1 { return s->b; } void write(S* s, unsigned x) { - // CHECK-X86-64-LABEL: define void @_ZN2N15write + // CHECK-X86-64-LABEL: define dso_local void @_ZN2N15write // CHECK-X86-64: %[[ptr:.*]] = getelementptr inbounds %{{.*}}, %{{.*}}* %{{.*}}, i32 0, i32 1 // CHECK-X86-64: %[[x_trunc:.*]] = trunc i32 %{{.*}} to i8 // CHECK-X86-64: %[[old:.*]] = load i8, i8* %[[ptr]] @@ -189,7 +189,7 @@ namespace N1 { // CHECK-X86-64: %[[old_and:.*]] = and i8 %[[old]], -2 // CHECK-X86-64: %[[new:.*]] = or i8 %[[old_and]], %[[x_and]] // CHECK-X86-64: store i8 %[[new]], i8* %[[ptr]] - // CHECK-PPC64-LABEL: define void @_ZN2N15write + // CHECK-PPC64-LABEL: define dso_local void @_ZN2N15write // CHECK-PPC64: %[[ptr:.*]] = getelementptr inbounds %{{.*}}, %{{.*}}* %{{.*}}, i32 0, i32 1 // CHECK-PPC64: %[[x_trunc:.*]] = trunc i32 %{{.*}} to i8 // CHECK-PPC64: %[[old:.*]] = load i8, i8* %[[ptr]] @@ -210,12 +210,12 @@ namespace N2 { void *p; }; unsigned read(S* s) { - // CHECK-X86-64-LABEL: define i32 @_ZN2N24read + // CHECK-X86-64-LABEL: define dso_local i32 @_ZN2N24read // CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i32* // CHECK-X86-64: %[[val:.*]] = load i32, i32* %[[ptr]] // CHECK-X86-64: %[[and:.*]] = and i32 %[[val]], 16777215 // CHECK-X86-64: ret i32 %[[and]] - // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N24read + // CHECK-PPC64-LABEL: define dso_local zeroext i32 @_ZN2N24read // CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i32* // CHECK-PPC64: %[[val:.*]] = load i32, i32* %[[ptr]] // CHECK-PPC64: %[[shr:.*]] = lshr i32 %[[val]], 8 @@ -223,14 +223,14 @@ namespace N2 { return s->b; } void write(S* s, unsigned x) { - // CHECK-X86-64-LABEL: define void @_ZN2N25write + // CHECK-X86-64-LABEL: define dso_local void @_ZN2N25write // CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i32* // CHECK-X86-64: %[[old:.*]] = load i32, i32* %[[ptr]] // CHECK-X86-64: %[[x_and:.*]] = and i32 %{{.*}}, 16777215 // CHECK-X86-64: %[[old_and:.*]] = and i32 %[[old]], -16777216 // CHECK-X86-64: %[[new:.*]] = or i32 %[[old_and]], %[[x_and]] // CHECK-X86-64: store i32 %[[new]], i32* %[[ptr]] - // CHECK-PPC64-LABEL: define void @_ZN2N25write + // CHECK-PPC64-LABEL: define dso_local void @_ZN2N25write // CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i32* // CHECK-PPC64: %[[old:.*]] = load i32, i32* %[[ptr]] // CHECK-PPC64: %[[x_and:.*]] = and i32 %{{.*}}, 16777215 @@ -249,12 +249,12 @@ namespace N3 { unsigned b : 24; }; unsigned read(S* s) { - // CHECK-X86-64-LABEL: define i32 @_ZN2N34read + // CHECK-X86-64-LABEL: define dso_local i32 @_ZN2N34read // CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i32* // CHECK-X86-64: %[[val:.*]] = load i32, i32* %[[ptr]] // CHECK-X86-64: %[[and:.*]] = and i32 %[[val]], 16777215 // CHECK-X86-64: ret i32 %[[and]] - // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N34read + // CHECK-PPC64-LABEL: define dso_local zeroext i32 @_ZN2N34read // CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i32* // CHECK-PPC64: %[[val:.*]] = load i32, i32* %[[ptr]] // CHECK-PPC64: %[[shr:.*]] = lshr i32 %[[val]], 8 @@ -262,14 +262,14 @@ namespace N3 { return s->b; } void write(S* s, unsigned x) { - // CHECK-X86-64-LABEL: define void @_ZN2N35write + // CHECK-X86-64-LABEL: define dso_local void @_ZN2N35write // CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i32* // CHECK-X86-64: %[[old:.*]] = load i32, i32* %[[ptr]] // CHECK-X86-64: %[[x_and:.*]] = and i32 %{{.*}}, 16777215 // CHECK-X86-64: %[[old_and:.*]] = and i32 %[[old]], -16777216 // CHECK-X86-64: %[[new:.*]] = or i32 %[[old_and]], %[[x_and]] // CHECK-X86-64: store i32 %[[new]], i32* %[[ptr]] - // CHECK-PPC64-LABEL: define void @_ZN2N35write + // CHECK-PPC64-LABEL: define dso_local void @_ZN2N35write // CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i32* // CHECK-PPC64: %[[old:.*]] = load i32, i32* %[[ptr]] // CHECK-PPC64: %[[x_and:.*]] = and i32 %{{.*}}, 16777215 @@ -300,13 +300,13 @@ namespace N4 { // FIXME: We should widen this load as long as the function isn't being // instrumented by ThreadSanitizer. // - // CHECK-X86-64-LABEL: define i32 @_ZN2N44read + // CHECK-X86-64-LABEL: define dso_local i32 @_ZN2N44read // CHECK-X86-64: %[[gep:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %{{.*}}, i32 0, i32 1 // CHECK-X86-64: %[[ptr:.*]] = bitcast [3 x i8]* %[[gep]] to i24* // CHECK-X86-64: %[[val:.*]] = load i24, i24* %[[ptr]] // CHECK-X86-64: %[[ext:.*]] = zext i24 %[[val]] to i32 // CHECK-X86-64: ret i32 %[[ext]] - // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N44read + // CHECK-PPC64-LABEL: define dso_local zeroext i32 @_ZN2N44read // CHECK-PPC64: %[[gep:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %{{.*}}, i32 0, i32 1 // CHECK-PPC64: %[[ptr:.*]] = bitcast [3 x i8]* %[[gep]] to i24* // CHECK-PPC64: %[[val:.*]] = load i24, i24* %[[ptr]] @@ -315,12 +315,12 @@ namespace N4 { return s->b; } void write(Base* s, unsigned x) { - // CHECK-X86-64-LABEL: define void @_ZN2N45write + // CHECK-X86-64-LABEL: define dso_local void @_ZN2N45write // CHECK-X86-64: %[[gep:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %{{.*}}, i32 0, i32 1 // CHECK-X86-64: %[[ptr:.*]] = bitcast [3 x i8]* %[[gep]] to i24* // CHECK-X86-64: %[[new:.*]] = trunc i32 %{{.*}} to i24 // CHECK-X86-64: store i24 %[[new]], i24* %[[ptr]] - // CHECK-PPC64-LABEL: define void @_ZN2N45write + // CHECK-PPC64-LABEL: define dso_local void @_ZN2N45write // CHECK-PPC64: %[[gep:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %{{.*}}, i32 0, i32 1 // CHECK-PPC64: %[[ptr:.*]] = bitcast [3 x i8]* %[[gep]] to i24* // CHECK-PPC64: %[[new:.*]] = trunc i32 %{{.*}} to i24 @@ -342,12 +342,12 @@ namespace N5 { struct Y { unsigned b : 24; } y; }; unsigned read(U* u) { - // CHECK-X86-64-LABEL: define i32 @_ZN2N54read + // CHECK-X86-64-LABEL: define dso_local i32 @_ZN2N54read // CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i32* // CHECK-X86-64: %[[val:.*]] = load i32, i32* %[[ptr]] // CHECK-X86-64: %[[and:.*]] = and i32 %[[val]], 16777215 // CHECK-X86-64: ret i32 %[[and]] - // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N54read + // CHECK-PPC64-LABEL: define dso_local zeroext i32 @_ZN2N54read // CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i32* // CHECK-PPC64: %[[val:.*]] = load i32, i32* %[[ptr]] // CHECK-PPC64: %[[shr:.*]] = lshr i32 %[[val]], 8 @@ -355,14 +355,14 @@ namespace N5 { return u->y.b; } void write(U* u, unsigned x) { - // CHECK-X86-64-LABEL: define void @_ZN2N55write + // CHECK-X86-64-LABEL: define dso_local void @_ZN2N55write // CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i32* // CHECK-X86-64: %[[old:.*]] = load i32, i32* %[[ptr]] // CHECK-X86-64: %[[x_and:.*]] = and i32 %{{.*}}, 16777215 // CHECK-X86-64: %[[old_and:.*]] = and i32 %[[old]], -16777216 // CHECK-X86-64: %[[new:.*]] = or i32 %[[old_and]], %[[x_and]] // CHECK-X86-64: store i32 %[[new]], i32* %[[ptr]] - // CHECK-PPC64-LABEL: define void @_ZN2N55write + // CHECK-PPC64-LABEL: define dso_local void @_ZN2N55write // CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i32* // CHECK-PPC64: %[[old:.*]] = load i32, i32* %[[ptr]] // CHECK-PPC64: %[[x_and:.*]] = and i32 %{{.*}}, 16777215 @@ -387,7 +387,7 @@ namespace N6 { unsigned char b2 : 8; }; unsigned read(S* s) { - // CHECK-X86-64-LABEL: define i32 @_ZN2N64read + // CHECK-X86-64-LABEL: define dso_local i32 @_ZN2N64read // CHECK-X86-64: %[[ptr1:.*]] = bitcast {{.*}}* %{{.*}} to i24* // CHECK-X86-64: %[[val1:.*]] = load i24, i24* %[[ptr1]] // CHECK-X86-64: %[[ext1:.*]] = zext i24 %[[val1]] to i32 @@ -396,7 +396,7 @@ namespace N6 { // CHECK-X86-64: %[[ext2:.*]] = zext i8 %[[val2]] to i32 // CHECK-X86-64: %[[add:.*]] = add nsw i32 %[[ext1]], %[[ext2]] // CHECK-X86-64: ret i32 %[[add]] - // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N64read + // CHECK-PPC64-LABEL: define dso_local zeroext i32 @_ZN2N64read // CHECK-PPC64: %[[ptr1:.*]] = bitcast {{.*}}* %{{.*}} to i24* // CHECK-PPC64: %[[val1:.*]] = load i24, i24* %[[ptr1]] // CHECK-PPC64: %[[ext1:.*]] = zext i24 %[[val1]] to i32 @@ -408,14 +408,14 @@ namespace N6 { return s->b1 + s->b2; } void write(S* s, unsigned x) { - // CHECK-X86-64-LABEL: define void @_ZN2N65write + // CHECK-X86-64-LABEL: define dso_local void @_ZN2N65write // CHECK-X86-64: %[[ptr1:.*]] = bitcast {{.*}}* %{{.*}} to i24* // CHECK-X86-64: %[[new1:.*]] = trunc i32 %{{.*}} to i24 // CHECK-X86-64: store i24 %[[new1]], i24* %[[ptr1]] // CHECK-X86-64: %[[new2:.*]] = trunc i32 %{{.*}} to i8 // CHECK-X86-64: %[[ptr2:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %{{.*}}, i32 0, i32 1 // CHECK-X86-64: store i8 %[[new2]], i8* %[[ptr2]] - // CHECK-PPC64-LABEL: define void @_ZN2N65write + // CHECK-PPC64-LABEL: define dso_local void @_ZN2N65write // CHECK-PPC64: %[[ptr1:.*]] = bitcast {{.*}}* %{{.*}} to i24* // CHECK-PPC64: %[[new1:.*]] = trunc i32 %{{.*}} to i24 // CHECK-PPC64: store i24 %[[new1]], i24* %[[ptr1]] @@ -450,13 +450,13 @@ namespace N7 { // FIXME: We should widen this load as long as the function isn't being // instrumented by ThreadSanitizer. // - // CHECK-X86-64-LABEL: define i32 @_ZN2N74read + // CHECK-X86-64-LABEL: define dso_local i32 @_ZN2N74read // CHECK-X86-64: %[[gep:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %{{.*}}, i32 0, i32 1 // CHECK-X86-64: %[[ptr:.*]] = bitcast [3 x i8]* %[[gep]] to i24* // CHECK-X86-64: %[[val:.*]] = load i24, i24* %[[ptr]] // CHECK-X86-64: %[[ext:.*]] = zext i24 %[[val]] to i32 // CHECK-X86-64: ret i32 %[[ext]] - // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N74read + // CHECK-PPC64-LABEL: define dso_local zeroext i32 @_ZN2N74read // CHECK-PPC64: %[[gep:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %{{.*}}, i32 0, i32 1 // CHECK-PPC64: %[[ptr:.*]] = bitcast [3 x i8]* %[[gep]] to i24* // CHECK-PPC64: %[[val:.*]] = load i24, i24* %[[ptr]] @@ -465,12 +465,12 @@ namespace N7 { return s->b; } void write(B2* s, unsigned x) { - // CHECK-X86-64-LABEL: define void @_ZN2N75write + // CHECK-X86-64-LABEL: define dso_local void @_ZN2N75write // CHECK-X86-64: %[[gep:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %{{.*}}, i32 0, i32 1 // CHECK-X86-64: %[[ptr:.*]] = bitcast [3 x i8]* %[[gep]] to i24* // CHECK-X86-64: %[[new:.*]] = trunc i32 %{{.*}} to i24 // CHECK-X86-64: store i24 %[[new]], i24* %[[ptr]] - // CHECK-PPC64-LABEL: define void @_ZN2N75write + // CHECK-PPC64-LABEL: define dso_local void @_ZN2N75write // CHECK-PPC64: %[[gep:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %{{.*}}, i32 0, i32 1 // CHECK-PPC64: %[[ptr:.*]] = bitcast [3 x i8]* %[[gep]] to i24* // CHECK-PPC64: %[[new:.*]] = trunc i32 %{{.*}} to i24 diff --git a/clang/test/CodeGenCXX/bool-bitfield.cpp b/clang/test/CodeGenCXX/bool-bitfield.cpp index a5a344ffb6ee..e789189b5674 100644 --- a/clang/test/CodeGenCXX/bool-bitfield.cpp +++ b/clang/test/CodeGenCXX/bool-bitfield.cpp @@ -9,6 +9,6 @@ void func1(bool b, A& a1) { if ((a1.m_sorted = b)) {} } -// CHECK-LABEL: define void @_Z5func1bR1A +// CHECK-LABEL: define dso_local void @_Z5func1bR1A // CHECK: br i1 // CHECK: ret void diff --git a/clang/test/CodeGenCXX/builtin-calling-conv.cpp b/clang/test/CodeGenCXX/builtin-calling-conv.cpp index f7759e3e8cad..4a4d06b4419a 100644 --- a/clang/test/CodeGenCXX/builtin-calling-conv.cpp +++ b/clang/test/CodeGenCXX/builtin-calling-conv.cpp @@ -26,7 +26,7 @@ void user() { foo(); } -// LINUX: define void @_Z4userv() +// LINUX: define dso_local void @_Z4userv() // LINUX: call i8* @_Znwm // LINUX: call float @atan2f // LINUX: call void @_Z3foov @@ -34,7 +34,7 @@ void user() { // LINUX: declare float @atan2f(float, float) // LINUX: declare void @_Z3foov() -// SPIR: define spir_func void @_Z4userv() +// SPIR: define dso_local spir_func void @_Z4userv() // SPIR: call spir_func i8* @_Znwj // SPIR: call spir_func float @atan2f // SPIR: call spir_func void @_Z3foov diff --git a/clang/test/CodeGenCXX/builtin-is-constant-evaluated.cpp b/clang/test/CodeGenCXX/builtin-is-constant-evaluated.cpp index 74f414d2378f..a022a4165002 100644 --- a/clang/test/CodeGenCXX/builtin-is-constant-evaluated.cpp +++ b/clang/test/CodeGenCXX/builtin-is-constant-evaluated.cpp @@ -19,13 +19,13 @@ inline constexpr bool is_constant_evaluated() noexcept { } } // namespace std -// CHECK-FN-CG-LABEL: define zeroext i1 @_Z3foov() +// CHECK-FN-CG-LABEL: define dso_local zeroext i1 @_Z3foov() // CHECK-FN-CG: ret i1 false bool foo() { return __builtin_is_constant_evaluated(); } -// CHECK-FN-CG-LABEL: define linkonce_odr i32 @_Z1fv() +// CHECK-FN-CG-LABEL: define linkonce_odr dso_local i32 @_Z1fv() constexpr int f() { // CHECK-FN-CG: store i32 13, i32* %n, align 4 // CHECK-FN-CG: store i32 17, i32* %m, align 4 @@ -38,9 +38,9 @@ constexpr int f() { return m + int(sizeof(arr)); } -// CHECK-STATIC-DAG: @p = global i32 26, +// CHECK-STATIC-DAG: @p = dso_local global i32 26, CONSTINIT int p = f(); // f().m == 13; initialized to 26 -// CHECK-STATIC-DAG: @p2 = global i32 26, +// CHECK-STATIC-DAG: @p2 = dso_local global i32 26, int p2 = f(); // same result without CONSTINIT // CHECK-DYN-LABEL: define internal void @__cxx_global_var_init() @@ -53,7 +53,7 @@ int q = p + f(); // m == 17 for this call; initialized to 56 int y; -// CHECK-STATIC-DAG: @b = global i32 2, +// CHECK-STATIC-DAG: @b = dso_local global i32 2, CONSTINIT int b = __builtin_is_constant_evaluated() ? 2 : y; // static initialization to 2 // CHECK-DYN-LABEL: define internal void @__cxx_global_var_init.1() @@ -69,7 +69,7 @@ int c = y + (__builtin_is_constant_evaluated() ? 2 : y); // dynamic initializati const int a = __builtin_is_constant_evaluated() ? y : 1; // dynamic initialization to 1 const int *a_sink = &a; -// CHECK-ARR-LABEL: define void @_Z13test_arr_exprv +// CHECK-ARR-LABEL: define dso_local void @_Z13test_arr_exprv void test_arr_expr() { // CHECK-ARR: %x1 = alloca [101 x i8], char x1[std::is_constant_evaluated() && __builtin_is_constant_evaluated() ? 101 : 1]; @@ -82,7 +82,7 @@ void test_arr_expr() { char x3[std::is_constant_evaluated() || __builtin_is_constant_evaluated() ? RANDU() : 13]; } -// CHECK-ARR-LABEL: define void @_Z17test_new_arr_exprv +// CHECK-ARR-LABEL: define dso_local void @_Z17test_new_arr_exprv void test_new_arr_expr() { // CHECK-ARR: call i8* @_Znam(i64 17) new char[std::is_constant_evaluated() || __builtin_is_constant_evaluated() ? 1 : 17]; @@ -97,7 +97,7 @@ bool test_constant_initialized_local(int k) { return *p; } -// CHECK-FOLD-LABEL: define void @_Z21test_ir_constant_foldv() +// CHECK-FOLD-LABEL: define dso_local void @_Z21test_ir_constant_foldv() void test_ir_constant_fold() { // CHECK-FOLD-NEXT: entry: // CHECK-FOLD-NEXT: call void @OK() @@ -111,7 +111,7 @@ void test_ir_constant_fold() { std::is_constant_evaluated() ? BOOM() : OK(); } -// CHECK-STATIC-DAG: @ir = constant i32* @i_constant, +// CHECK-STATIC-DAG: @ir = dso_local constant i32* @i_constant, int i_constant; int i_not_constant; int &ir = __builtin_is_constant_evaluated() ? i_constant : i_not_constant; diff --git a/clang/test/CodeGenCXX/builtin-launder.cpp b/clang/test/CodeGenCXX/builtin-launder.cpp index b3d849c8aec9..83242f74b858 100644 --- a/clang/test/CodeGenCXX/builtin-launder.cpp +++ b/clang/test/CodeGenCXX/builtin-launder.cpp @@ -11,7 +11,7 @@ struct TestVirtualFn { virtual void foo() {} }; -// CHECK-LABEL: define void @test_builtin_launder_virtual_fn +// CHECK-LABEL: define dso_local void @test_builtin_launder_virtual_fn extern "C" void test_builtin_launder_virtual_fn(TestVirtualFn *p) { // CHECK: store [[TYPE:%[^ ]+]] %p, [[TYPE]]* %p.addr // CHECK-NEXT: [[TMP0:%.*]] = load [[TYPE]], [[TYPE]]* %p.addr @@ -30,7 +30,7 @@ extern "C" void test_builtin_launder_virtual_fn(TestVirtualFn *p) { struct TestPolyBase : TestVirtualFn { }; -// CHECK-LABEL: define void @test_builtin_launder_poly_base +// CHECK-LABEL: define dso_local void @test_builtin_launder_poly_base extern "C" void test_builtin_launder_poly_base(TestPolyBase *p) { // CHECK-STRICT-NOT: ret void // CHECK-STRICT: @llvm.launder.invariant.group @@ -44,7 +44,7 @@ extern "C" void test_builtin_launder_poly_base(TestPolyBase *p) { struct TestBase {}; struct TestVirtualBase : virtual TestBase {}; -// CHECK-LABEL: define void @test_builtin_launder_virtual_base +// CHECK-LABEL: define dso_local void @test_builtin_launder_virtual_base extern "C" void test_builtin_launder_virtual_base(TestVirtualBase *p) { // CHECK-STRICT-NOT: ret void // CHECK-STRICT: @llvm.launder.invariant.group @@ -59,7 +59,7 @@ extern "C" void test_builtin_launder_virtual_base(TestVirtualBase *p) { // Negative Cases //===----------------------------------------------------------------------===// -// CHECK-LABEL: define void @test_builtin_launder_ommitted_one +// CHECK-LABEL: define dso_local void @test_builtin_launder_ommitted_one extern "C" void test_builtin_launder_ommitted_one(int *p) { // CHECK: entry // CHECK-NEXT: %p.addr = alloca i32* @@ -75,7 +75,7 @@ struct TestNoInvariant { int x; }; -// CHECK-LABEL: define void @test_builtin_launder_ommitted_two +// CHECK-LABEL: define dso_local void @test_builtin_launder_ommitted_two extern "C" void test_builtin_launder_ommitted_two(TestNoInvariant *p) { // CHECK: entry // CHECK-NOT: llvm.launder.invariant.group @@ -92,7 +92,7 @@ struct TestVirtualMember { TestVirtualFn member; }; -// CHECK-LABEL: define void @test_builtin_launder_virtual_member +// CHECK-LABEL: define dso_local void @test_builtin_launder_virtual_member extern "C" void test_builtin_launder_virtual_member(TestVirtualMember *p) { // CHECK: entry // CHECK-NONSTRICT-NOT: @llvm.launder.invariant.group @@ -105,7 +105,7 @@ struct TestVirtualMemberDepth2 { TestVirtualMember member; }; -// CHECK-LABEL: define void @test_builtin_launder_virtual_member_depth_2 +// CHECK-LABEL: define dso_local void @test_builtin_launder_virtual_member_depth_2 extern "C" void test_builtin_launder_virtual_member_depth_2(TestVirtualMemberDepth2 *p) { // CHECK: entry // CHECK-NONSTRICT-NOT: @llvm.launder.invariant.group @@ -118,7 +118,7 @@ struct TestVirtualReferenceMember { TestVirtualFn &member; }; -// CHECK-LABEL: define void @test_builtin_launder_virtual_reference_member +// CHECK-LABEL: define dso_local void @test_builtin_launder_virtual_reference_member extern "C" void test_builtin_launder_virtual_reference_member(TestVirtualReferenceMember *p) { // CHECK: entry // CHECK-NOT: @llvm.launder.invariant.group @@ -131,7 +131,7 @@ struct TestRecursiveMember { TestRecursiveMember &member; }; -// CHECK-LABEL: define void @test_builtin_launder_recursive_member +// CHECK-LABEL: define dso_local void @test_builtin_launder_recursive_member extern "C" void test_builtin_launder_recursive_member(TestRecursiveMember *p) { // CHECK: entry // CHECK-NOT: @llvm.launder.invariant.group @@ -145,7 +145,7 @@ struct TestVirtualRecursiveMember { virtual void foo(); }; -// CHECK-LABEL: define void @test_builtin_launder_virtual_recursive_member +// CHECK-LABEL: define dso_local void @test_builtin_launder_virtual_recursive_member extern "C" void test_builtin_launder_virtual_recursive_member(TestVirtualRecursiveMember *p) { // CHECK: entry // CHECK-NONSTRICT-NOT: @llvm.launder.invariant.group @@ -154,7 +154,7 @@ extern "C" void test_builtin_launder_virtual_recursive_member(TestVirtualRecursi TestVirtualRecursiveMember *d = __builtin_launder(p); } -// CHECK-LABEL: define void @test_builtin_launder_array( +// CHECK-LABEL: define dso_local void @test_builtin_launder_array( extern "C" void test_builtin_launder_array(TestVirtualFn (&Arr)[5]) { // CHECK: entry // CHECK-NONSTRICT-NOT: @llvm.launder.invariant.group @@ -163,7 +163,7 @@ extern "C" void test_builtin_launder_array(TestVirtualFn (&Arr)[5]) { TestVirtualFn *d = __builtin_launder(Arr); } -// CHECK-LABEL: define void @test_builtin_launder_array_nested( +// CHECK-LABEL: define dso_local void @test_builtin_launder_array_nested( extern "C" void test_builtin_launder_array_nested(TestVirtualFn (&Arr)[5][2]) { // CHECK: entry // CHECK-NONSTRICT-NOT: @llvm.launder.invariant.group @@ -173,7 +173,7 @@ extern "C" void test_builtin_launder_array_nested(TestVirtualFn (&Arr)[5][2]) { RetTy d = __builtin_launder(Arr); } -// CHECK-LABEL: define void @test_builtin_launder_array_no_invariant( +// CHECK-LABEL: define dso_local void @test_builtin_launder_array_no_invariant( extern "C" void test_builtin_launder_array_no_invariant(TestNoInvariant (&Arr)[5]) { // CHECK: entry // CHECK-NOT: @llvm.launder.invariant.group @@ -181,7 +181,7 @@ extern "C" void test_builtin_launder_array_no_invariant(TestNoInvariant (&Arr)[5 TestNoInvariant *d = __builtin_launder(Arr); } -// CHECK-LABEL: define void @test_builtin_launder_array_nested_no_invariant( +// CHECK-LABEL: define dso_local void @test_builtin_launder_array_nested_no_invariant( extern "C" void test_builtin_launder_array_nested_no_invariant(TestNoInvariant (&Arr)[5][2]) { // CHECK: entry // CHECK-NOT: @llvm.launder.invariant.group @@ -197,7 +197,7 @@ struct WithMember { template struct WithMember<TestVirtualFn[5]>; -// CHECK-LABEL: define void @test_builtin_launder_member_array( +// CHECK-LABEL: define dso_local void @test_builtin_launder_member_array( extern "C" void test_builtin_launder_member_array(WithMember<TestVirtualFn[5]> *p) { // CHECK: entry // CHECK-NONSTRICT-NOT: @llvm.launder.invariant.group @@ -208,7 +208,7 @@ extern "C" void test_builtin_launder_member_array(WithMember<TestVirtualFn[5]> * template struct WithMember<TestVirtualFn[5][2]>; -// CHECK-LABEL: define void @test_builtin_launder_member_array_nested( +// CHECK-LABEL: define dso_local void @test_builtin_launder_member_array_nested( extern "C" void test_builtin_launder_member_array_nested(WithMember<TestVirtualFn[5][2]> *p) { // CHECK: entry // CHECK-NONSTRICT-NOT: @llvm.launder.invariant.group @@ -219,7 +219,7 @@ extern "C" void test_builtin_launder_member_array_nested(WithMember<TestVirtualF template struct WithMember<TestNoInvariant[5]>; -// CHECK-LABEL: define void @test_builtin_launder_member_array_no_invariant( +// CHECK-LABEL: define dso_local void @test_builtin_launder_member_array_no_invariant( extern "C" void test_builtin_launder_member_array_no_invariant(WithMember<TestNoInvariant[5]> *p) { // CHECK: entry // CHECK-NOT: @llvm.launder.invariant.group @@ -229,7 +229,7 @@ extern "C" void test_builtin_launder_member_array_no_invariant(WithMember<TestNo template struct WithMember<TestNoInvariant[5][2]>; -// CHECK-LABEL: define void @test_builtin_launder_member_array_nested_no_invariant( +// CHECK-LABEL: define dso_local void @test_builtin_launder_member_array_nested_no_invariant( extern "C" void test_builtin_launder_member_array_nested_no_invariant(WithMember<TestNoInvariant[5][2]> *p) { // CHECK: entry // CHECK-NOT: @llvm.launder.invariant.group @@ -242,7 +242,7 @@ struct WithBase : T {}; template struct WithBase<TestNoInvariant>; -// CHECK-LABEL: define void @test_builtin_launder_base_no_invariant( +// CHECK-LABEL: define dso_local void @test_builtin_launder_base_no_invariant( extern "C" void test_builtin_launder_base_no_invariant(WithBase<TestNoInvariant> *p) { // CHECK: entry // CHECK-NOT: @llvm.launder.invariant.group @@ -252,7 +252,7 @@ extern "C" void test_builtin_launder_base_no_invariant(WithBase<TestNoInvariant> template struct WithBase<TestVirtualFn>; -// CHECK-LABEL: define void @test_builtin_launder_base( +// CHECK-LABEL: define dso_local void @test_builtin_launder_base( extern "C" void test_builtin_launder_base(WithBase<TestVirtualFn> *p) { // CHECK: entry // CHECK-NONSTRICT-NOT: @llvm.launder.invariant.group @@ -274,7 +274,7 @@ struct TestConstMember { const int x; }; -// CHECK-LABEL: define void @test_builtin_launder_const_member +// CHECK-LABEL: define dso_local void @test_builtin_launder_const_member extern "C" void test_builtin_launder_const_member(TestConstMember *p) { // CHECK: entry // CHECK-NOT: @llvm.launder.invariant.group @@ -286,7 +286,7 @@ struct TestConstSubobject { TestConstMember x; }; -// CHECK-LABEL: define void @test_builtin_launder_const_subobject +// CHECK-LABEL: define dso_local void @test_builtin_launder_const_subobject extern "C" void test_builtin_launder_const_subobject(TestConstSubobject *p) { // CHECK: entry // CHECK-NOT: @llvm.launder.invariant.group @@ -298,7 +298,7 @@ struct TestConstObject { const struct TestConstMember x; }; -// CHECK-LABEL: define void @test_builtin_launder_const_object +// CHECK-LABEL: define dso_local void @test_builtin_launder_const_object extern "C" void test_builtin_launder_const_object(TestConstObject *p) { // CHECK: entry // CHECK-NOT: @llvm.launder.invariant.group @@ -310,7 +310,7 @@ struct TestReferenceMember { int &x; }; -// CHECK-LABEL: define void @test_builtin_launder_reference_member +// CHECK-LABEL: define dso_local void @test_builtin_launder_reference_member extern "C" void test_builtin_launder_reference_member(TestReferenceMember *p) { // CHECK: entry // CHECK-NOT: @llvm.launder.invariant.group diff --git a/clang/test/CodeGenCXX/builtin-operator-new-delete.cpp b/clang/test/CodeGenCXX/builtin-operator-new-delete.cpp index 712805a62390..b81849dac3ef 100644 --- a/clang/test/CodeGenCXX/builtin-operator-new-delete.cpp +++ b/clang/test/CodeGenCXX/builtin-operator-new-delete.cpp @@ -35,7 +35,7 @@ void *operator new(size_t, void*, bool) throw(); void *operator new[](size_t, void*, bool) throw(); -// CHECK-LABEL: define void @test_basic( +// CHECK-LABEL: define dso_local void @test_basic( extern "C" void test_basic() { // CHECK: call i8* @_Znwm(i64 4) [[ATTR_BUILTIN_NEW:#[^ ]*]] // CHECK: call void @_ZdlPv({{.*}}) [[ATTR_BUILTIN_DELETE:#[^ ]*]] @@ -45,7 +45,7 @@ extern "C" void test_basic() { // CHECK: declare noalias i8* @_Znwm(i64) [[ATTR_NOBUILTIN:#[^ ]*]] // CHECK: declare void @_ZdlPv(i8*) [[ATTR_NOBUILTIN_NOUNWIND:#[^ ]*]] -// CHECK-LABEL: define void @test_aligned_alloc( +// CHECK-LABEL: define dso_local void @test_aligned_alloc( extern "C" void test_aligned_alloc() { // CHECK: call i8* @_ZnwmSt11align_val_t(i64 4, i64 4) [[ATTR_BUILTIN_NEW:#[^ ]*]] // CHECK: call void @_ZdlPvSt11align_val_t({{.*}}, i64 4) [[ATTR_BUILTIN_DELETE:#[^ ]*]] @@ -55,7 +55,7 @@ extern "C" void test_aligned_alloc() { // CHECK: declare void @_ZdlPvSt11align_val_t(i8*, i64) [[ATTR_NOBUILTIN_NOUNWIND:#[^ ]*]] -// CHECK-LABEL: define void @test_sized_delete( +// CHECK-LABEL: define dso_local void @test_sized_delete( extern "C" void test_sized_delete() { // CHECK: call i8* @_Znwm(i64 4) [[ATTR_BUILTIN_NEW:#[^ ]*]] // CHECK: call void @_ZdlPvm({{.*}}, i64 4) [[ATTR_BUILTIN_DELETE:#[^ ]*]] diff --git a/clang/test/CodeGenCXX/builtin_LINE.cpp b/clang/test/CodeGenCXX/builtin_LINE.cpp index 138ff602e48a..de078a34fda1 100644 --- a/clang/test/CodeGenCXX/builtin_LINE.cpp +++ b/clang/test/CodeGenCXX/builtin_LINE.cpp @@ -24,9 +24,9 @@ int get_line(int l = __builtin_LINE()) { int get_line2(int l = get_line()) { return l; } -// CHECK: @global_one = global i32 [[@LINE+1]], align 4 +// CHECK: @global_one = dso_local global i32 [[@LINE+1]], align 4 int global_one = __builtin_LINE(); -// CHECK-NEXT: @global_two = global i32 [[@LINE+1]], align 4 +// CHECK-NEXT: @global_two = dso_local global i32 [[@LINE+1]], align 4 int global_two = get_line_constexpr(); // CHECK: @_ZL12global_three = internal constant i32 [[@LINE+1]], align 4 const int global_three(get_line_constexpr()); @@ -47,7 +47,7 @@ struct InClassInit { static void test_class(); }; -// CHECK-LABEL: define void @_ZN11InClassInit10test_classEv() +// CHECK-LABEL: define dso_local void @_ZN11InClassInit10test_classEv() void InClassInit::test_class() { // CHECK: call void @_ZN11InClassInitC1Ev(%struct.InClassInit* %test_one) InClassInit test_one; @@ -63,7 +63,7 @@ void InClassInit::test_class() { InClassInit test_five(Tag4{}); } -// CHECK-LABEL: define void @_ZN11InClassInitC2Ev +// CHECK-LABEL: define dso_local void @_ZN11InClassInitC2Ev // CHECK: store i32 [[@LINE+4]], i32* %Init, align 4 // CHECK: %call = call i32 @_Z8get_linei(i32 [[@LINE+3]]) // CHECK-NEXT: %call2 = call i32 @_Z9get_line2i(i32 %call) @@ -72,7 +72,7 @@ InClassInit::InClassInit() = default; InClassInit::InClassInit(Tag3, int l) : Init(l) {} -// CHECK-LABEL: define void @_ZN11InClassInitC2E4Tag4i(%struct.InClassInit* %this, i32 %arg) +// CHECK-LABEL: define dso_local void @_ZN11InClassInitC2E4Tag4i(%struct.InClassInit* %this, i32 %arg) // CHECK: %[[TEMP:.+]] = load i32, i32* %arg.addr, align 4 // CHECK-NEXT: store i32 %[[TEMP]], i32* %Init, align 4 // CHECK: %[[CALL:.+]] = call i32 @_Z8get_linei(i32 [[@LINE+3]]) @@ -80,7 +80,7 @@ InClassInit::InClassInit(Tag3, int l) : Init(l) {} // CHECK-NEXT: store i32 %[[CALL2]], i32* %Init2, align 4 InClassInit::InClassInit(Tag4, int arg) : Init(arg) {} -// CHECK-LABEL: define void @_Z13get_line_testv() +// CHECK-LABEL: define dso_local void @_Z13get_line_testv() void get_line_test() { // CHECK: %[[CALL:.+]] = call i32 @_Z8get_linei(i32 [[@LINE+2]]) // CHECK-NEXT: store i32 %[[CALL]], i32* @sink, align 4 diff --git a/clang/test/CodeGenCXX/catch-nullptr-and-nonzero-offset-in-offsetof-idiom.cpp b/clang/test/CodeGenCXX/catch-nullptr-and-nonzero-offset-in-offsetof-idiom.cpp index 9dc8b90b5dcb..6c5fc68e5347 100644 --- a/clang/test/CodeGenCXX/catch-nullptr-and-nonzero-offset-in-offsetof-idiom.cpp +++ b/clang/test/CodeGenCXX/catch-nullptr-and-nonzero-offset-in-offsetof-idiom.cpp @@ -7,7 +7,7 @@ struct S { int x, y; }; -// CHECK-LABEL: define i64 @{{.*}}get_offset_of_y_naively{{.*}}( +// CHECK-LABEL: define dso_local i64 @{{.*}}get_offset_of_y_naively{{.*}}( uintptr_t get_offset_of_y_naively() { // CHECK: [[ENTRY:.*]]: // CHECK-NEXT: ret i64 ptrtoint (i32* getelementptr (i32, i32* null, i32 1) to i64) @@ -15,7 +15,7 @@ uintptr_t get_offset_of_y_naively() { return ((uintptr_t)(&(((S *)nullptr)->y))); } -// CHECK-LABEL: define i64 @{{.*}}get_offset_of_y_via_builtin{{.*}}( +// CHECK-LABEL: define dso_local i64 @{{.*}}get_offset_of_y_via_builtin{{.*}}( uintptr_t get_offset_of_y_via_builtin() { // CHECK: [[ENTRY:.*]]: // CHECK-NEXT: ret i64 4 diff --git a/clang/test/CodeGenCXX/catch-undef-behavior.cpp b/clang/test/CodeGenCXX/catch-undef-behavior.cpp index c5aec53ad724..74b820d5bcdb 100644 --- a/clang/test/CodeGenCXX/catch-undef-behavior.cpp +++ b/clang/test/CodeGenCXX/catch-undef-behavior.cpp @@ -367,7 +367,7 @@ class C : public A, public B // align=16 // offset. The pointer before subtraction doesn't need to be aligned for // the destination type. -// CHECK-LABEL: define void @_Z16downcast_pointerP1B(%class.B* %b) +// CHECK-LABEL: define dso_local void @_Z16downcast_pointerP1B(%class.B* %b) void downcast_pointer(B *b) { (void) static_cast<C*>(b); // Alignment check from EmitTypeCheck(TCK_DowncastPointer, ...) @@ -384,7 +384,7 @@ void downcast_pointer(B *b) { // CHECK-NEXT: br i1 [[AND]] } -// CHECK-LABEL: define void @_Z18downcast_referenceR1B(%class.B* dereferenceable({{[0-9]+}}) %b) +// CHECK-LABEL: define dso_local void @_Z18downcast_referenceR1B(%class.B* dereferenceable({{[0-9]+}}) %b) void downcast_reference(B &b) { (void) static_cast<C&>(b); // Alignment check from EmitTypeCheck(TCK_DowncastReference, ...) @@ -473,34 +473,34 @@ void force_irgen() { B::q(); } -// CHECK-LABEL: define void @_ZN29FunctionSanitizerVirtualCalls1B1fEv +// CHECK-LABEL: define dso_local void @_ZN29FunctionSanitizerVirtualCalls1B1fEv // CHECK-NOT: prologue // -// CHECK-LABEL: define void @_ZTv0_n24_N29FunctionSanitizerVirtualCalls1B1fEv +// CHECK-LABEL: define dso_local void @_ZTv0_n24_N29FunctionSanitizerVirtualCalls1B1fEv // CHECK-NOT: prologue // -// CHECK-LABEL: define void @_ZN29FunctionSanitizerVirtualCalls11force_irgenEv() +// CHECK-LABEL: define dso_local void @_ZN29FunctionSanitizerVirtualCalls11force_irgenEv() // CHECK: prologue // -// CHECK-LABEL: define linkonce_odr void @_ZN29FunctionSanitizerVirtualCalls1AC1Ev +// CHECK-LABEL: define linkonce_odr dso_local void @_ZN29FunctionSanitizerVirtualCalls1AC1Ev // CHECK-NOT: prologue // -// CHECK-LABEL: define linkonce_odr void @_ZN29FunctionSanitizerVirtualCalls1A1gEv +// CHECK-LABEL: define linkonce_odr dso_local void @_ZN29FunctionSanitizerVirtualCalls1A1gEv // CHECK-NOT: prologue // -// CHECK-LABEL: define linkonce_odr void @_ZN29FunctionSanitizerVirtualCalls1A1hEv +// CHECK-LABEL: define linkonce_odr dso_local void @_ZN29FunctionSanitizerVirtualCalls1A1hEv // CHECK-NOT: prologue // -// CHECK-LABEL: define linkonce_odr void @_ZN29FunctionSanitizerVirtualCalls1BC1Ev +// CHECK-LABEL: define linkonce_odr dso_local void @_ZN29FunctionSanitizerVirtualCalls1BC1Ev // CHECK-NOT: prologue // -// CHECK-LABEL: define linkonce_odr void @_ZN29FunctionSanitizerVirtualCalls1B1bEv +// CHECK-LABEL: define linkonce_odr dso_local void @_ZN29FunctionSanitizerVirtualCalls1B1bEv // CHECK-NOT: prologue // -// CHECK-LABEL: define linkonce_odr void @_ZN29FunctionSanitizerVirtualCalls1B1gEv +// CHECK-LABEL: define linkonce_odr dso_local void @_ZN29FunctionSanitizerVirtualCalls1B1gEv // CHECK-NOT: prologue // -// CHECK-LABEL: define linkonce_odr void @_ZN29FunctionSanitizerVirtualCalls1B1qEv +// CHECK-LABEL: define linkonce_odr dso_local void @_ZN29FunctionSanitizerVirtualCalls1B1qEv // CHECK: prologue } diff --git a/clang/test/CodeGenCXX/char8_t.cpp b/clang/test/CodeGenCXX/char8_t.cpp index 1016d6346ba2..c9c4d1f9dc4e 100644 --- a/clang/test/CodeGenCXX/char8_t.cpp +++ b/clang/test/CodeGenCXX/char8_t.cpp @@ -1,11 +1,11 @@ // RUN: %clang_cc1 -std=c++17 -emit-llvm -fchar8_t -triple x86_64-linux %s -o - | FileCheck %s --check-prefix=ITANIUM // RUN: %clang_cc1 -std=c++17 -emit-llvm -fchar8_t -triple x86_64-windows %s -o - | FileCheck %s --check-prefix=MSABI -// ITANIUM: define void @_Z1fDu( +// ITANIUM: define dso_local void @_Z1fDu( // MSABI: define {{.*}}void @"?f@@YAX_Q@Z"( void f(char8_t c) {} -// ITANIUM: define weak_odr void @_Z1gIiEvDTplplcvT__ELA4_KDuELDu114EE( +// ITANIUM: define weak_odr dso_local void @_Z1gIiEvDTplplcvT__ELA4_KDuELDu114EE( // MSABI: define weak_odr {{.*}}void @"??$g@H@@YAXPEB_Q@Z"( template<typename T> void g(decltype(T() + u8"foo" + u8'r')) {} template void g<int>(const char8_t*); diff --git a/clang/test/CodeGenCXX/clang-sections-tentative.c b/clang/test/CodeGenCXX/clang-sections-tentative.c index e663079b9aa4..2665d0e5232f 100644 --- a/clang/test/CodeGenCXX/clang-sections-tentative.c +++ b/clang/test/CodeGenCXX/clang-sections-tentative.c @@ -28,12 +28,12 @@ const int cz; // not assigned a rodata section attribute const int cx; // stays in .rodata.1 const int cy; // .rodata.2 -// CHECK: @x = global i32 0, align 4 #0 -// CHECK: @y = global i32 0, align 4 #1 -// CHECK: @z = common global i32 0, align 4 -// CHECK: @cx = constant i32 0, align 4 #2 -// CHECK: @cy = constant i32 0, align 4 #3 -// CHECK: @cz = constant i32 0, align 4 #1 +// CHECK: @x = dso_local global i32 0, align 4 #0 +// CHECK: @y = dso_local global i32 0, align 4 #1 +// CHECK: @z = common dso_local global i32 0, align 4 +// CHECK: @cx = dso_local constant i32 0, align 4 #2 +// CHECK: @cy = dso_local constant i32 0, align 4 #3 +// CHECK: @cz = dso_local constant i32 0, align 4 #1 // CHECK: attributes #0 = { "bss-section"=".bss.1" } // CHECK: attributes #1 = { "bss-section"=".bss.2" } diff --git a/clang/test/CodeGenCXX/clang-sections.cpp b/clang/test/CodeGenCXX/clang-sections.cpp index 59faf27679c0..5afc0b93879e 100644 --- a/clang/test/CodeGenCXX/clang-sections.cpp +++ b/clang/test/CodeGenCXX/clang-sections.cpp @@ -45,32 +45,32 @@ int hoo(void) { return b + fptrs[f](); } } -//CHECK: @a = global i32 0, align 4 #0 -//CHECK: @b = global i32 1, align 4 #0 -//CHECK: @c = global [4 x i32] zeroinitializer, align 4 #0 -//CHECK: @d = global [5 x i16] zeroinitializer, align 2 #0 -//CHECK: @e = global [6 x i16] [i16 0, i16 0, i16 1, i16 0, i16 0, i16 0], align 2 #0 -//CHECK: @f = constant i32 2, align 4 #0 +//CHECK: @a = dso_local global i32 0, align 4 #0 +//CHECK: @b = dso_local global i32 1, align 4 #0 +//CHECK: @c = dso_local global [4 x i32] zeroinitializer, align 4 #0 +//CHECK: @d = dso_local global [5 x i16] zeroinitializer, align 2 #0 +//CHECK: @e = dso_local global [6 x i16] [i16 0, i16 0, i16 1, i16 0, i16 0, i16 0], align 2 #0 +//CHECK: @f = dso_local constant i32 2, align 4 #0 -//CHECK: @h = global i32 0, align 4 #1 -//CHECK: @i = global i32 0, align 4 #2 -//CHECK: @j = constant i32 4, align 4 #2 -//CHECK: @k = global i32 0, align 4 #2 +//CHECK: @h = dso_local global i32 0, align 4 #1 +//CHECK: @i = dso_local global i32 0, align 4 #2 +//CHECK: @j = dso_local constant i32 4, align 4 #2 +//CHECK: @k = dso_local global i32 0, align 4 #2 //CHECK: @_ZZ3gooE7lstat_h = internal global i32 0, align 4 #2 //CHECK: @_ZL1g = internal global [2 x i32] zeroinitializer, align 4 #0 -//CHECK: @l = global i32 5, align 4 #3 -//CHECK: @m = constant i32 6, align 4 #3 +//CHECK: @l = dso_local global i32 5, align 4 #3 +//CHECK: @m = dso_local constant i32 6, align 4 #3 -//CHECK: @n = global i32 0, align 4 -//CHECK: @o = global i32 6, align 4 -//CHECK: @p = constant i32 7, align 4 +//CHECK: @n = dso_local global i32 0, align 4 +//CHECK: @o = dso_local global i32 6, align 4 +//CHECK: @p = dso_local constant i32 7, align 4 //CHECK: @_ZL5fptrs = internal constant [2 x i32 ()*] [i32 ()* @foo, i32 ()* @goo], align 4 #3 -//CHECK: define i32 @foo() #5 { -//CHECK: define i32 @goo() #6 { +//CHECK: define dso_local i32 @foo() #5 { +//CHECK: define dso_local i32 @goo() #6 { //CHECK: declare i32 @zoo(i32*, i32*) #7 -//CHECK: define i32 @hoo() #8 { +//CHECK: define dso_local i32 @hoo() #8 { //CHECK: attributes #0 = { "bss-section"="my_bss.1" "data-section"="my_data.1" "rodata-section"="my_rodata.1" } //CHECK: attributes #1 = { "data-section"="my_data.1" "rodata-section"="my_rodata.1" } diff --git a/clang/test/CodeGenCXX/compound-literals.cpp b/clang/test/CodeGenCXX/compound-literals.cpp index a9882bc6d241..a18507c5b581 100644 --- a/clang/test/CodeGenCXX/compound-literals.cpp +++ b/clang/test/CodeGenCXX/compound-literals.cpp @@ -13,9 +13,9 @@ struct Y { }; // CHECK: @.compoundliteral = internal global [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5], align 4 -// CHECK: @q = global i32* getelementptr inbounds ([5 x i32], [5 x i32]* @.compoundliteral, i32 0, i32 0), align 4 +// CHECK: @q = dso_local global i32* getelementptr inbounds ([5 x i32], [5 x i32]* @.compoundliteral, i32 0, i32 0), align 4 -// CHECK-LABEL: define i32 @_Z1fv() +// CHECK-LABEL: define dso_local i32 @_Z1fv() int f() { // CHECK: [[LVALUE:%[a-z0-9.]+]] = alloca // CHECK-NEXT: [[I:%[a-z0-9]+]] = getelementptr inbounds {{.*}}, {{.*}}* [[LVALUE]], i32 0, i32 0 @@ -29,7 +29,7 @@ int f() { return ((Y){17, "seventeen"}).i; } -// CHECK-LABEL: define i32 @_Z1gv() +// CHECK-LABEL: define dso_local i32 @_Z1gv() int g() { // CHECK: store [2 x i32]* %{{[a-z0-9.]+}}, [2 x i32]** [[V:%[a-z0-9.]+]] const int (&v)[2] = (int [2]) {1,2}; diff --git a/clang/test/CodeGenCXX/conditional-gnu-ext.cpp b/clang/test/CodeGenCXX/conditional-gnu-ext.cpp index 613dd65ee7c9..3767c36506f3 100644 --- a/clang/test/CodeGenCXX/conditional-gnu-ext.cpp +++ b/clang/test/CodeGenCXX/conditional-gnu-ext.cpp @@ -77,7 +77,7 @@ namespace test3 { }; B test0(B &x) { - // CHECK-LABEL: define void @_ZN5test35test0ERNS_1BE( + // CHECK-LABEL: define dso_local void @_ZN5test35test0ERNS_1BE( // CHECK: [[X:%.*]] = alloca [[B:%.*]]*, // CHECK: store [[B]]* {{%.*}}, [[B]]** [[X]] // CHECK-NEXT: [[T0:%.*]] = load [[B]]*, [[B]]** [[X]] @@ -92,7 +92,7 @@ namespace test3 { } B test1() { - // CHECK-LABEL: define void @_ZN5test35test1Ev( + // CHECK-LABEL: define dso_local void @_ZN5test35test1Ev( // CHECK: [[TEMP:%.*]] = alloca [[B]], // CHECK: call void @_ZN5test312test1_helperEv([[B]]* sret [[TEMP]]) // CHECK-NEXT: [[BOOL:%.*]] = call zeroext i1 @_ZN5test31BcvbEv([[B]]* [[TEMP]]) @@ -109,7 +109,7 @@ namespace test3 { A test2(B &x) { - // CHECK-LABEL: define void @_ZN5test35test2ERNS_1BE( + // CHECK-LABEL: define dso_local void @_ZN5test35test2ERNS_1BE( // CHECK: [[X:%.*]] = alloca [[B]]*, // CHECK: store [[B]]* {{%.*}}, [[B]]** [[X]] // CHECK-NEXT: [[T0:%.*]] = load [[B]]*, [[B]]** [[X]] @@ -124,7 +124,7 @@ namespace test3 { } A test3() { - // CHECK-LABEL: define void @_ZN5test35test3Ev( + // CHECK-LABEL: define dso_local void @_ZN5test35test3Ev( // CHECK: [[TEMP:%.*]] = alloca [[B]], // CHECK: call void @_ZN5test312test3_helperEv([[B]]* sret [[TEMP]]) // CHECK-NEXT: [[BOOL:%.*]] = call zeroext i1 @_ZN5test31BcvbEv([[B]]* [[TEMP]]) diff --git a/clang/test/CodeGenCXX/conditional-temporaries.cpp b/clang/test/CodeGenCXX/conditional-temporaries.cpp index c0a122ad1b2f..a184eab41f6a 100644 --- a/clang/test/CodeGenCXX/conditional-temporaries.cpp +++ b/clang/test/CodeGenCXX/conditional-temporaries.cpp @@ -42,7 +42,7 @@ Checker c; } -// CHECK-OPT-LABEL: define i32 @_Z12getCtorCallsv() +// CHECK-OPT-LABEL: define dso_local i32 @_Z12getCtorCallsv() int getCtorCalls() { // CHECK-LEGACY-OPT: ret i32 5 // X64-NEWPM-OPT: ret i32 5 diff --git a/clang/test/CodeGenCXX/const-init-cxx11.cpp b/clang/test/CodeGenCXX/const-init-cxx11.cpp index 087348609334..19412d0e6c51 100644 --- a/clang/test/CodeGenCXX/const-init-cxx11.cpp +++ b/clang/test/CodeGenCXX/const-init-cxx11.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -w -fmerge-all-constants -triple x86_64-elf-gnu -emit-llvm -o - %s -std=c++11 | FileCheck %s +// RUN: %clang_cc1 -w -fmerge-all-constants -triple x86_64-elf-gnu -emit-llvm -o - %s -std=c++11 -fsemantic-interposition | FileCheck %s // FIXME: The padding in all these objects should be zero-initialized. namespace StructUnion { diff --git a/clang/test/CodeGenCXX/const-init-cxx2a.cpp b/clang/test/CodeGenCXX/const-init-cxx2a.cpp index 1195b912c255..9a6571e096e2 100644 --- a/clang/test/CodeGenCXX/const-init-cxx2a.cpp +++ b/clang/test/CodeGenCXX/const-init-cxx2a.cpp @@ -1,9 +1,9 @@ -// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - %s -std=c++2a | FileCheck %s --implicit-check-not=cxx_global_var_init --implicit-check-not=cxa_atexit +// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - %s -std=c++2a -fsemantic-interposition | FileCheck %s --implicit-check-not=cxx_global_var_init --implicit-check-not=cxa_atexit // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-pch -o %t.pch %s -std=c++2a -// RUN: %clang_cc1 -triple x86_64-linux-gnu -include-pch %t.pch -x c++ /dev/null -emit-llvm -o - -std=c++2a | FileCheck %s --implicit-check-not=cxx_global_var_init --implicit-check-not=cxa_atexit +// RUN: %clang_cc1 -triple x86_64-linux-gnu -include-pch %t.pch -x c++ /dev/null -emit-llvm -o - -std=c++2a -fsemantic-interposition | FileCheck %s --implicit-check-not=cxx_global_var_init --implicit-check-not=cxa_atexit -// CHECK: @a = global i32 123, +// CHECK: @a = dso_local global i32 123, int a = (delete new int, 123); struct B { @@ -11,7 +11,7 @@ struct B { constexpr ~B() { n *= 5; } int n = 123; }; -// CHECK: @b = global {{.*}} i32 123 +// CHECK: @b = dso_local global {{.*}} i32 123 extern constexpr B b = B(); // CHECK: @_ZL1c = internal global {{.*}} i32 123 @@ -23,13 +23,13 @@ struct D { constexpr ~D() {} }; D d; -// CHECK: @d = global {{.*}} zeroinitializer +// CHECK: @d = dso_local global {{.*}} zeroinitializer D d_arr[3]; -// CHECK: @d_arr = global {{.*}} zeroinitializer +// CHECK: @d_arr = dso_local global {{.*}} zeroinitializer thread_local D d_tl; -// CHECK: @d_tl = thread_local global {{.*}} zeroinitializer +// CHECK: @d_tl = thread_local dso_local global {{.*}} zeroinitializer // CHECK-NOT: @llvm.global_ctors diff --git a/clang/test/CodeGenCXX/constructor-alias.cpp b/clang/test/CodeGenCXX/constructor-alias.cpp index ee2e57b711c9..7959af16ccf7 100644 --- a/clang/test/CodeGenCXX/constructor-alias.cpp +++ b/clang/test/CodeGenCXX/constructor-alias.cpp @@ -9,4 +9,4 @@ struct B { B::B() { } -// CHECK: @_ZN1BC1Ev = unnamed_addr alias void (%struct.B*), void (%struct.B*)* @_ZN1BC2Ev +// CHECK: @_ZN1BC1Ev = dso_local unnamed_addr alias void (%struct.B*), void (%struct.B*)* @_ZN1BC2Ev diff --git a/clang/test/CodeGenCXX/constructor-destructor-return-this.cpp b/clang/test/CodeGenCXX/constructor-destructor-return-this.cpp index 7ef9e116df8b..659a577dec7e 100644 --- a/clang/test/CodeGenCXX/constructor-destructor-return-this.cpp +++ b/clang/test/CodeGenCXX/constructor-destructor-return-this.cpp @@ -32,10 +32,10 @@ private: B::B(int *i) : i_(i) { } B::~B() { } -// CHECKGEN-LABEL: define void @_ZN1BC2EPi(%class.B* %this, i32* %i) -// CHECKGEN-LABEL: define void @_ZN1BC1EPi(%class.B* %this, i32* %i) -// CHECKGEN-LABEL: define void @_ZN1BD2Ev(%class.B* %this) -// CHECKGEN-LABEL: define void @_ZN1BD1Ev(%class.B* %this) +// CHECKGEN-LABEL: define dso_local void @_ZN1BC2EPi(%class.B* %this, i32* %i) +// CHECKGEN-LABEL: define dso_local void @_ZN1BC1EPi(%class.B* %this, i32* %i) +// CHECKGEN-LABEL: define dso_local void @_ZN1BD2Ev(%class.B* %this) +// CHECKGEN-LABEL: define dso_local void @_ZN1BD1Ev(%class.B* %this) // CHECKARM-LABEL: define %class.B* @_ZN1BC2EPi(%class.B* returned %this, i32* %i) // CHECKARM-LABEL: define %class.B* @_ZN1BC1EPi(%class.B* returned %this, i32* %i) @@ -47,10 +47,10 @@ B::~B() { } // CHECKIOS5-LABEL: define %class.B* @_ZN1BD2Ev(%class.B* %this) // CHECKIOS5-LABEL: define %class.B* @_ZN1BD1Ev(%class.B* %this) -// CHECKFUCHSIA-LABEL: define %class.B* @_ZN1BC2EPi(%class.B* returned %this, i32* %i) -// CHECKFUCHSIA-LABEL: define %class.B* @_ZN1BC1EPi(%class.B* returned %this, i32* %i) -// CHECKFUCHSIA-LABEL: define %class.B* @_ZN1BD2Ev(%class.B* returned %this) -// CHECKFUCHSIA-LABEL: define %class.B* @_ZN1BD1Ev(%class.B* returned %this) +// CHECKFUCHSIA-LABEL: define dso_local %class.B* @_ZN1BC2EPi(%class.B* returned %this, i32* %i) +// CHECKFUCHSIA-LABEL: define dso_local %class.B* @_ZN1BC1EPi(%class.B* returned %this, i32* %i) +// CHECKFUCHSIA-LABEL: define dso_local %class.B* @_ZN1BD2Ev(%class.B* returned %this) +// CHECKFUCHSIA-LABEL: define dso_local %class.B* @_ZN1BD1Ev(%class.B* returned %this) // CHECKMS-LABEL: define dso_local x86_thiscallcc %class.B* @"??0B@@QAE@PAH@Z"(%class.B* returned %this, i32* %i) // CHECKMS-LABEL: define dso_local x86_thiscallcc void @"??1B@@UAE@XZ"(%class.B* %this) @@ -66,13 +66,13 @@ private: C::C(int *i, char *c) : B(i), c_(c) { } C::~C() { } -// CHECKGEN-LABEL: define void @_ZN1CC2EPiPc(%class.C* %this, i32* %i, i8* %c) -// CHECKGEN-LABEL: define void @_ZN1CC1EPiPc(%class.C* %this, i32* %i, i8* %c) -// CHECKGEN-LABEL: define void @_ZN1CD2Ev(%class.C* %this) -// CHECKGEN-LABEL: define void @_ZN1CD1Ev(%class.C* %this) -// CHECKGEN-LABEL: define void @_ZThn8_N1CD1Ev(%class.C* %this) -// CHECKGEN-LABEL: define void @_ZN1CD0Ev(%class.C* %this) -// CHECKGEN-LABEL: define void @_ZThn8_N1CD0Ev(%class.C* %this) +// CHECKGEN-LABEL: define dso_local void @_ZN1CC2EPiPc(%class.C* %this, i32* %i, i8* %c) +// CHECKGEN-LABEL: define dso_local void @_ZN1CC1EPiPc(%class.C* %this, i32* %i, i8* %c) +// CHECKGEN-LABEL: define dso_local void @_ZN1CD2Ev(%class.C* %this) +// CHECKGEN-LABEL: define dso_local void @_ZN1CD1Ev(%class.C* %this) +// CHECKGEN-LABEL: define dso_local void @_ZThn8_N1CD1Ev(%class.C* %this) +// CHECKGEN-LABEL: define dso_local void @_ZN1CD0Ev(%class.C* %this) +// CHECKGEN-LABEL: define dso_local void @_ZThn8_N1CD0Ev(%class.C* %this) // CHECKARM-LABEL: define %class.C* @_ZN1CC2EPiPc(%class.C* returned %this, i32* %i, i8* %c) // CHECKARM-LABEL: define %class.C* @_ZN1CC1EPiPc(%class.C* returned %this, i32* %i, i8* %c) @@ -90,13 +90,13 @@ C::~C() { } // CHECKIOS5-LABEL: define void @_ZN1CD0Ev(%class.C* %this) // CHECKIOS5-LABEL: define void @_ZThn8_N1CD0Ev(%class.C* %this) -// CHECKFUCHSIA-LABEL: define %class.C* @_ZN1CC2EPiPc(%class.C* returned %this, i32* %i, i8* %c) -// CHECKFUCHSIA-LABEL: define %class.C* @_ZN1CC1EPiPc(%class.C* returned %this, i32* %i, i8* %c) -// CHECKFUCHSIA-LABEL: define %class.C* @_ZN1CD2Ev(%class.C* returned %this) -// CHECKFUCHSIA-LABEL: define %class.C* @_ZN1CD1Ev(%class.C* returned %this) -// CHECKFUCHSIA-LABEL: define %class.C* @_ZThn16_N1CD1Ev(%class.C* %this) -// CHECKFUCHSIA-LABEL: define void @_ZN1CD0Ev(%class.C* %this) -// CHECKFUCHSIA-LABEL: define void @_ZThn16_N1CD0Ev(%class.C* %this) +// CHECKFUCHSIA-LABEL: define dso_local %class.C* @_ZN1CC2EPiPc(%class.C* returned %this, i32* %i, i8* %c) +// CHECKFUCHSIA-LABEL: define dso_local %class.C* @_ZN1CC1EPiPc(%class.C* returned %this, i32* %i, i8* %c) +// CHECKFUCHSIA-LABEL: define dso_local %class.C* @_ZN1CD2Ev(%class.C* returned %this) +// CHECKFUCHSIA-LABEL: define dso_local %class.C* @_ZN1CD1Ev(%class.C* returned %this) +// CHECKFUCHSIA-LABEL: define dso_local %class.C* @_ZThn16_N1CD1Ev(%class.C* %this) +// CHECKFUCHSIA-LABEL: define dso_local void @_ZN1CD0Ev(%class.C* %this) +// CHECKFUCHSIA-LABEL: define dso_local void @_ZThn16_N1CD0Ev(%class.C* %this) // CHECKMS-LABEL: define dso_local x86_thiscallcc %class.C* @"??0C@@QAE@PAHPAD@Z"(%class.C* returned %this, i32* %i, i8* %c) // CHECKMS-LABEL: define dso_local x86_thiscallcc void @"??1C@@UAE@XZ"(%class.C* %this) @@ -110,10 +110,10 @@ public: D::D() { } D::~D() { } -// CHECKGEN-LABEL: define void @_ZN1DC2Ev(%class.D* %this, i8** %vtt) -// CHECKGEN-LABEL: define void @_ZN1DC1Ev(%class.D* %this) -// CHECKGEN-LABEL: define void @_ZN1DD2Ev(%class.D* %this, i8** %vtt) -// CHECKGEN-LABEL: define void @_ZN1DD1Ev(%class.D* %this) +// CHECKGEN-LABEL: define dso_local void @_ZN1DC2Ev(%class.D* %this, i8** %vtt) +// CHECKGEN-LABEL: define dso_local void @_ZN1DC1Ev(%class.D* %this) +// CHECKGEN-LABEL: define dso_local void @_ZN1DD2Ev(%class.D* %this, i8** %vtt) +// CHECKGEN-LABEL: define dso_local void @_ZN1DD1Ev(%class.D* %this) // CHECKARM-LABEL: define %class.D* @_ZN1DC2Ev(%class.D* returned %this, i8** %vtt) // CHECKARM-LABEL: define %class.D* @_ZN1DC1Ev(%class.D* returned %this) @@ -125,10 +125,10 @@ D::~D() { } // CHECKIOS5-LABEL: define %class.D* @_ZN1DD2Ev(%class.D* %this, i8** %vtt) // CHECKIOS5-LABEL: define %class.D* @_ZN1DD1Ev(%class.D* %this) -// CHECKFUCHSIA-LABEL: define %class.D* @_ZN1DC2Ev(%class.D* returned %this, i8** %vtt) -// CHECKFUCHSIA-LABEL: define %class.D* @_ZN1DC1Ev(%class.D* returned %this) -// CHECKFUCHSIA-LABEL: define %class.D* @_ZN1DD2Ev(%class.D* returned %this, i8** %vtt) -// CHECKFUCHSIA-LABEL: define %class.D* @_ZN1DD1Ev(%class.D* returned %this) +// CHECKFUCHSIA-LABEL: define dso_local %class.D* @_ZN1DC2Ev(%class.D* returned %this, i8** %vtt) +// CHECKFUCHSIA-LABEL: define dso_local %class.D* @_ZN1DC1Ev(%class.D* returned %this) +// CHECKFUCHSIA-LABEL: define dso_local %class.D* @_ZN1DD2Ev(%class.D* returned %this, i8** %vtt) +// CHECKFUCHSIA-LABEL: define dso_local %class.D* @_ZN1DD1Ev(%class.D* returned %this) // CHECKMS-LABEL: define dso_local x86_thiscallcc %class.D* @"??0D@@QAE@XZ"(%class.D* returned %this, i32 %is_most_derived) // CHECKMS-LABEL: define dso_local x86_thiscallcc void @"??1D@@UAE@XZ"(%class.D* %this) @@ -147,7 +147,7 @@ void test_destructor() { e2->~E(); } -// CHECKARM-LABEL,CHECKFUCHSIA-LABEL: define void @_Z15test_destructorv() +// CHECKARM-LABEL,CHECKFUCHSIA-LABEL: define dso_local void @_Z15test_destructorv() // Verify that virtual calls to destructors are not marked with a 'returned' // this parameter at the call site... diff --git a/clang/test/CodeGenCXX/copy-constructor-elim-2.cpp b/clang/test/CodeGenCXX/copy-constructor-elim-2.cpp index 26b6b4851f5a..860e9e7cbc41 100644 --- a/clang/test/CodeGenCXX/copy-constructor-elim-2.cpp +++ b/clang/test/CodeGenCXX/copy-constructor-elim-2.cpp @@ -2,7 +2,7 @@ struct A { int x; A(int); ~A(); }; A f() { return A(0); } -// CHECK-LABEL: define void @_Z1fv +// CHECK-LABEL: define dso_local void @_Z1fv // CHECK: call {{.*}} @_ZN1AC1Ei // CHECK-NEXT: ret void @@ -63,7 +63,7 @@ namespace PR12139 { static A makeA() { A a; a.value = 2; return a; } }; - // CHECK-LABEL: define i32 @_ZN7PR121394testEv + // CHECK-LABEL: define dso_local i32 @_ZN7PR121394testEv int test() { // CHECK: call void @_ZN7PR121391A5makeAEv // CHECK-NEXT: call %"struct.PR12139::A"* @_ZN7PR121391AC1ERKS0_i @@ -87,7 +87,7 @@ namespace ElidableCallIsNotCopyCtor { // elidable, but we don't have an AST representation for the case where we // must elide not only a constructor call but also some argument // conversions, so we don't elide it. - // CHECK-LABEL: define void @_ZN25ElidableCallIsNotCopyCtor1fEv( + // CHECK-LABEL: define dso_local void @_ZN25ElidableCallIsNotCopyCtor1fEv( // CHECK: call {{.*}} @_ZN25ElidableCallIsNotCopyCtor1BC1Ei( // CHECK: call {{.*}} @_ZN25ElidableCallIsNotCopyCtor1AC1ERKS0_( // CHECK: call {{.*}} @_ZN25ElidableCallIsNotCopyCtor1BC1ENS_1AE( diff --git a/clang/test/CodeGenCXX/ctor-dtor-alias.cpp b/clang/test/CodeGenCXX/ctor-dtor-alias.cpp index 89244cc105b2..73ffd7324385 100644 --- a/clang/test/CodeGenCXX/ctor-dtor-alias.cpp +++ b/clang/test/CodeGenCXX/ctor-dtor-alias.cpp @@ -81,7 +81,7 @@ namespace test4 { // see both destructors. // NOOPT: define internal void @__cxx_global_var_init.2() // NOOPT: call i32 @__cxa_atexit{{.*}}@_ZN5test41BD2Ev - // NOOPT: define linkonce_odr void @_ZN5test41BD2Ev({{.*}} comdat align + // NOOPT: define linkonce_odr dso_local void @_ZN5test41BD2Ev({{.*}} comdat align struct A { virtual ~A() {} }; diff --git a/clang/test/CodeGenCXX/cxx0x-delegating-ctors.cpp b/clang/test/CodeGenCXX/cxx0x-delegating-ctors.cpp index 8aef01035a19..5173e6be3d92 100644 --- a/clang/test/CodeGenCXX/cxx0x-delegating-ctors.cpp +++ b/clang/test/CodeGenCXX/cxx0x-delegating-ctors.cpp @@ -89,7 +89,7 @@ namespace PR14588 { virtual void squawk() { other(); } }; - // CHECK-LABEL: define void @_ZN7PR145883FooC1Ev(%"class.PR14588::Foo"* + // CHECK-LABEL: define dso_local void @_ZN7PR145883FooC1Ev(%"class.PR14588::Foo"* // CHECK: call void @_ZN7PR145883FooC1EPKv( // CHECK: invoke void @_ZN7PR145885otherEv() // CHECK: call void @_ZN7PR145883FooD1Ev diff --git a/clang/test/CodeGenCXX/cxx0x-initializer-array.cpp b/clang/test/CodeGenCXX/cxx0x-initializer-array.cpp index 4a7e452304cc..0dd33936b455 100644 --- a/clang/test/CodeGenCXX/cxx0x-initializer-array.cpp +++ b/clang/test/CodeGenCXX/cxx0x-initializer-array.cpp @@ -6,7 +6,7 @@ struct A { int a[1]; }; typedef A x[]; int f() { x{{{1}}}; - // CHECK-LABEL: define i32 @_Z1fv + // CHECK-LABEL: define dso_local i32 @_Z1fv // CHECK: store i32 1 // (It's okay if the output changes here, as long as we don't crash.) return 0; @@ -33,7 +33,7 @@ namespace ValueInitArrayOfMemPtr { S1(); }; - // CHECK-LABEL: define void @_ZN22ValueInitArrayOfMemPtr1fEi + // CHECK-LABEL: define dso_local void @_ZN22ValueInitArrayOfMemPtr1fEi void f(int n) { Agg1 a = { n }; // CHECK: store i32 -1, @@ -43,7 +43,7 @@ namespace ValueInitArrayOfMemPtr { } // Test dynamic initialization. - // CHECK-LABEL: define void @_ZN22ValueInitArrayOfMemPtr1gEMNS_1SEi + // CHECK-LABEL: define dso_local void @_ZN22ValueInitArrayOfMemPtr1gEMNS_1SEi void g(p ptr) { // CHECK: store i32 -1, f(a{ptr}); @@ -55,7 +55,7 @@ namespace array_dtor { using T = S[3]; void f(const T &); void f(T *); - // CHECK-LABEL: define void @_ZN10array_dtor1gEv( + // CHECK-LABEL: define dso_local void @_ZN10array_dtor1gEv( void g() { // CHECK: %[[ARRAY:.*]] = alloca [3 x // CHECK: br @@ -74,7 +74,7 @@ namespace array_dtor { // CHECK: ret void } - // CHECK-LABEL: define void @_ZN10array_dtor1hEv( + // CHECK-LABEL: define dso_local void @_ZN10array_dtor1hEv( void h() { // CHECK: %[[ARRAY:.*]] = alloca [3 x // CHECK: br @@ -92,7 +92,7 @@ namespace array_dtor { // CHECK: ret void } - // CHECK-LABEL: define void @_ZN10array_dtor1iEv( + // CHECK-LABEL: define dso_local void @_ZN10array_dtor1iEv( void i() { // CHECK: %[[ARRAY:.*]] = alloca [3 x // CHECK: br diff --git a/clang/test/CodeGenCXX/cxx0x-initializer-constructors.cpp b/clang/test/CodeGenCXX/cxx0x-initializer-constructors.cpp index f60536e92094..57077739ea9d 100644 --- a/clang/test/CodeGenCXX/cxx0x-initializer-constructors.cpp +++ b/clang/test/CodeGenCXX/cxx0x-initializer-constructors.cpp @@ -6,21 +6,21 @@ struct S { }; void fn1() { - // CHECK-LABEL: define void @_Z3fn1v + // CHECK-LABEL: define dso_local void @_Z3fn1v S s { 1 }; // CHECK: alloca %struct.S, align 1 // CHECK: call void @_ZN1SC1Ei(%struct.S* %s, i32 1) } void fn2() { - // CHECK-LABEL: define void @_Z3fn2v + // CHECK-LABEL: define dso_local void @_Z3fn2v S s { 1, 2.0, 3.0 }; // CHECK: alloca %struct.S, align 1 // CHECK: call void @_ZN1SC1Eidd(%struct.S* %s, i32 1, double 2.000000e+00, double 3.000000e+00) } void fn3() { - // CHECK-LABEL: define void @_Z3fn3v + // CHECK-LABEL: define dso_local void @_Z3fn3v S sa[] { { 1 }, { 2 }, { 3 } }; // CHECK: alloca [3 x %struct.S], align 1 // CHECK: call void @_ZN1SC1Ei(%struct.S* %{{.+}}, i32 1) @@ -29,7 +29,7 @@ void fn3() { } void fn4() { - // CHECK-LABEL: define void @_Z3fn4v + // CHECK-LABEL: define dso_local void @_Z3fn4v S sa[] { { 1, 2.0, 3.0 }, { 4, 5.0, 6.0 } }; // CHECK: alloca [2 x %struct.S], align 1 // CHECK: call void @_ZN1SC1Eidd(%struct.S* %{{.+}}, i32 1, double 2.000000e+00, double 3.000000e+00) diff --git a/clang/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist-startend.cpp b/clang/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist-startend.cpp index 46ad686b396b..e02c9f081ea7 100644 --- a/clang/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist-startend.cpp +++ b/clang/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist-startend.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++11 -S -triple x86_64-none-linux-gnu -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -std=c++11 -S -triple x86_64-none-linux-gnu -emit-llvm -o - %s -fsemantic-interposition | FileCheck %s namespace std { typedef decltype(sizeof(int)) size_t; @@ -37,7 +37,7 @@ namespace std { std::initializer_list<int> globalInitList1 = {1, 2, 3}; void fn1(int i) { - // CHECK-LABEL: define void @_Z3fn1i + // CHECK-LABEL: define dso_local void @_Z3fn1i // temporary array // CHECK: [[array:%[^ ]+]] = alloca [3 x i32] // CHECK: getelementptr inbounds [3 x i32], [3 x i32]* [[array]], i{{32|64}} 0 @@ -66,7 +66,7 @@ struct destroyme2 { void fn2() { - // CHECK-LABEL: define void @_Z3fn2v + // CHECK-LABEL: define dso_local void @_Z3fn2v void target(std::initializer_list<destroyme1>); // objects should be destroyed before dm2, after call returns target({ destroyme1(), destroyme1() }); @@ -76,7 +76,7 @@ void fn2() { } void fn3() { - // CHECK-LABEL: define void @_Z3fn3v + // CHECK-LABEL: define dso_local void @_Z3fn3v // objects should be destroyed after dm2 auto list = { destroyme1(), destroyme1() }; destroyme2 dm2; diff --git a/clang/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp b/clang/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp index e3c7e26afa81..e89a1974c21c 100644 --- a/clang/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp +++ b/clang/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -std=c++11 -triple x86_64-none-linux-gnu -fmerge-all-constants -emit-llvm -o - %s | FileCheck -check-prefixes=X86,CHECK %s -// RUN: %clang_cc1 -std=c++11 -triple amdgcn-amd-amdhsa -DNO_TLS -fmerge-all-constants -emit-llvm -o - %s | FileCheck -check-prefixes=AMDGCN,CHECK %s +// RUN: %clang_cc1 -std=c++11 -triple x86_64-none-linux-gnu -fmerge-all-constants -emit-llvm -o - %s -fsemantic-interposition | FileCheck -check-prefixes=X86,CHECK %s +// RUN: %clang_cc1 -std=c++11 -triple amdgcn-amd-amdhsa -DNO_TLS -fmerge-all-constants -emit-llvm -o - %s -fsemantic-interposition | FileCheck -check-prefixes=AMDGCN,CHECK %s namespace std { typedef decltype(sizeof(int)) size_t; @@ -118,7 +118,7 @@ std::initializer_list<witharg1> globalInitList2 = { }; void fn1(int i) { - // CHECK-LABEL: define void @_Z3fn1i + // CHECK-LABEL: define dso_local void @_Z3fn1i // temporary array // X86: [[array:%[^ ]+]] = alloca [3 x i32] // AMDGCN: [[alloca:%[^ ]+]] = alloca [3 x i32], align 4, addrspace(5) @@ -140,7 +140,7 @@ void fn1(int i) { } void fn2() { - // CHECK-LABEL: define void @_Z3fn2v + // CHECK-LABEL: define dso_local void @_Z3fn2v void target(std::initializer_list<destroyme1>); // objects should be destroyed before dm2, after call returns // CHECK: call void @_Z6targetSt16initializer_listI10destroyme1E @@ -151,7 +151,7 @@ void fn2() { } void fn3() { - // CHECK-LABEL: define void @_Z3fn3v + // CHECK-LABEL: define dso_local void @_Z3fn3v // objects should be destroyed after dm2 auto list = { destroyme1(), destroyme1() }; destroyme2 dm2; @@ -160,7 +160,7 @@ void fn3() { } void fn4() { - // CHECK-LABEL: define void @_Z3fn4v + // CHECK-LABEL: define dso_local void @_Z3fn4v void target(std::initializer_list<witharg1>); // objects should be destroyed before dm2, after call returns // CHECK: call void @_ZN8witharg1C1ERK10destroyme1 @@ -173,7 +173,7 @@ void fn4() { } void fn5() { - // CHECK-LABEL: define void @_Z3fn5v + // CHECK-LABEL: define dso_local void @_Z3fn5v // temps should be destroyed before dm2 // objects should be destroyed after dm2 // CHECK: call void @_ZN8witharg1C1ERK10destroyme1 @@ -185,7 +185,7 @@ void fn5() { } void fn6() { - // CHECK-LABEL: define void @_Z3fn6v + // CHECK-LABEL: define dso_local void @_Z3fn6v void target(const wantslist1&); // objects should be destroyed before dm2, after call returns // CHECK: call void @_ZN10wantslist1C1ESt16initializer_listI10destroyme1E @@ -197,7 +197,7 @@ void fn6() { // CHECK: call void @_ZN10destroyme2D1Ev } void fn7() { - // CHECK-LABEL: define void @_Z3fn7v + // CHECK-LABEL: define dso_local void @_Z3fn7v // temps should be destroyed before dm2 // object should be destroyed after dm2 // CHECK: call void @_ZN10wantslist1C1ESt16initializer_listI10destroyme1E @@ -209,7 +209,7 @@ void fn7() { } void fn8() { - // CHECK-LABEL: define void @_Z3fn8v + // CHECK-LABEL: define dso_local void @_Z3fn8v void target(std::initializer_list<std::initializer_list<destroyme1>>); // objects should be destroyed before dm2, after call returns // CHECK: call void @_Z6targetSt16initializer_listIS_I10destroyme1EE @@ -223,7 +223,7 @@ void fn8() { } void fn9() { - // CHECK-LABEL: define void @_Z3fn9v + // CHECK-LABEL: define dso_local void @_Z3fn9v // objects should be destroyed after dm2 std::initializer_list<destroyme1> inner; std::initializer_list<std::initializer_list<destroyme1>> list = @@ -237,7 +237,7 @@ void fn9() { } void fn10(int i) { - // CHECK-LABEL: define void @_Z4fn10i + // CHECK-LABEL: define dso_local void @_Z4fn10i // CHECK: alloca [3 x i32] // CHECK: call i8* @_Znw{{[jm]}} // CHECK: store i32 % @@ -248,7 +248,7 @@ void fn10(int i) { } void fn11() { - // CHECK-LABEL: define void @_Z4fn11v + // CHECK-LABEL: define dso_local void @_Z4fn11v (void) new std::initializer_list<destroyme1> {destroyme1(), destroyme1()}; // CHECK: call void @_ZN10destroyme1D1Ev destroyme2 dm2; @@ -276,7 +276,7 @@ namespace PR12178 { namespace rdar13325066 { struct X { ~X(); }; - // CHECK-LABEL: define void @_ZN12rdar133250664loopERNS_1XES1_ + // CHECK-LABEL: define dso_local void @_ZN12rdar133250664loopERNS_1XES1_ void loop(X &x1, X &x2) { // CHECK: br label // CHECK: br i1 @@ -299,7 +299,7 @@ namespace dtors { }; void z(); - // CHECK-LABEL: define void @_ZN5dtors1fEv( + // CHECK-LABEL: define dso_local void @_ZN5dtors1fEv( void f() { // CHECK: call void @_ZN5dtors1SC1Ev( // CHECK: call void @_ZN5dtors1SC1Ev( @@ -316,7 +316,7 @@ namespace dtors { // CHECK-NOT: call void @_ZN5dtors1SD1Ev( } - // CHECK-LABEL: define void @_ZN5dtors1gEv( + // CHECK-LABEL: define dso_local void @_ZN5dtors1gEv( void g() { // CHECK: call void @_ZN5dtors1SC1Ev( // CHECK: call void @_ZN5dtors1SC1Ev( @@ -333,7 +333,7 @@ namespace dtors { // CHECK-NOT: call void @_ZN5dtors1SD1Ev( } - // CHECK-LABEL: define void @_ZN5dtors1hEv( + // CHECK-LABEL: define dso_local void @_ZN5dtors1hEv( void h() { // CHECK: call void @_ZN5dtors1SC1Ev( // CHECK: call void @_ZN5dtors1SC1Ev( @@ -391,7 +391,7 @@ namespace nested { struct B { const A &a; ~B(); }; struct C { std::initializer_list<B> b; ~C(); }; void f(); - // CHECK-LABEL: define void @_ZN6nested1gEv( + // CHECK-LABEL: define dso_local void @_ZN6nested1gEv( void g() { // CHECK: call void @_ZN6nested1AC1Ev( // CHECK-NOT: call diff --git a/clang/test/CodeGenCXX/cxx11-extern-constexpr.cpp b/clang/test/CodeGenCXX/cxx11-extern-constexpr.cpp index 0688d7bead08..8e6ceb7d4268 100644 --- a/clang/test/CodeGenCXX/cxx11-extern-constexpr.cpp +++ b/clang/test/CodeGenCXX/cxx11-extern-constexpr.cpp @@ -6,8 +6,8 @@ struct A { static const int Foo = 123; }; -// X86: @_ZN1A3FooE = constant i32 123, align 4 -// AMD: @_ZN1A3FooE = addrspace(4) constant i32 123, align 4 +// X86: @_ZN1A3FooE = dso_local constant i32 123, align 4 +// AMD: @_ZN1A3FooE = addrspace(4) dso_local constant i32 123, align 4 const int *p = &A::Foo; // emit available_externally const int A::Foo; // convert to full definition @@ -35,7 +35,7 @@ struct MutableBar { struct Foo { // CXX11X86: @_ZN3Foo21ConstexprStaticMemberE = available_externally constant i32 42, - // CXX17X86: @_ZN3Foo21ConstexprStaticMemberE = linkonce_odr constant i32 42, + // CXX17X86: @_ZN3Foo21ConstexprStaticMemberE = linkonce_odr dso_local constant i32 42, // CXX11AMD: @_ZN3Foo21ConstexprStaticMemberE = available_externally addrspace(4) constant i32 42, // CXX17AMD: @_ZN3Foo21ConstexprStaticMemberE = linkonce_odr addrspace(4) constant i32 42, static constexpr int ConstexprStaticMember = 42; @@ -44,13 +44,13 @@ struct Foo { static const int ConstStaticMember = 43; // CXX11X86: @_ZN3Foo23ConstStaticStructMemberE = available_externally constant %struct.Bar { i32 44 }, - // CXX17X86: @_ZN3Foo23ConstStaticStructMemberE = linkonce_odr constant %struct.Bar { i32 44 }, + // CXX17X86: @_ZN3Foo23ConstStaticStructMemberE = linkonce_odr dso_local constant %struct.Bar { i32 44 }, // CXX11AMD: @_ZN3Foo23ConstStaticStructMemberE = available_externally addrspace(1) constant %struct.Bar { i32 44 }, // CXX17AMD: @_ZN3Foo23ConstStaticStructMemberE = linkonce_odr addrspace(1) constant %struct.Bar { i32 44 }, static constexpr Bar ConstStaticStructMember = {44}; // CXX11X86: @_ZN3Foo34ConstexprStaticMutableStructMemberE = external global %struct.MutableBar, - // CXX17X86: @_ZN3Foo34ConstexprStaticMutableStructMemberE = linkonce_odr global %struct.MutableBar { i32 45 }, + // CXX17X86: @_ZN3Foo34ConstexprStaticMutableStructMemberE = linkonce_odr dso_local global %struct.MutableBar { i32 45 }, // CXX11AMD: @_ZN3Foo34ConstexprStaticMutableStructMemberE = external addrspace(1) global %struct.MutableBar, // CXX17AMD: @_ZN3Foo34ConstexprStaticMutableStructMemberE = linkonce_odr addrspace(1) global %struct.MutableBar { i32 45 }, static constexpr MutableBar ConstexprStaticMutableStructMember = {45}; diff --git a/clang/test/CodeGenCXX/cxx11-initializer-aggregate.cpp b/clang/test/CodeGenCXX/cxx11-initializer-aggregate.cpp index 325607f69fb5..0cbbfe52fd73 100644 --- a/clang/test/CodeGenCXX/cxx11-initializer-aggregate.cpp +++ b/clang/test/CodeGenCXX/cxx11-initializer-aggregate.cpp @@ -1,18 +1,18 @@ -// RUN: %clang_cc1 -std=c++11 -S -emit-llvm -o - %s -triple x86_64-linux-gnu | FileCheck %s +// RUN: %clang_cc1 -std=c++11 -S -emit-llvm -o - %s -triple x86_64-linux-gnu -fsemantic-interposition | FileCheck %s struct A { int a, b; int f(); }; namespace NonAggregateCopyInAggregateInit { // PR32044 struct A { constexpr A(int n) : x(n), y() {} int x, y; } extern a; - // CHECK-DAG: @_ZN31NonAggregateCopyInAggregateInit1bE = global %{{.*}} { %[[A:.*]]* @_ZN31NonAggregateCopyInAggregateInit1aE } + // CHECK-DAG: @_ZN31NonAggregateCopyInAggregateInit1bE = dso_local global %{{.*}} { %[[A:.*]]* @_ZN31NonAggregateCopyInAggregateInit1aE } struct B { A &p; } b{{a}}; // CHECK-DAG: @_ZGRN31NonAggregateCopyInAggregateInit1cE_ = internal global %[[A]] { i32 1, i32 0 } - // CHECK-DAG: @_ZN31NonAggregateCopyInAggregateInit1cE = global %{{.*}} { %{{.*}}* @_ZGRN31NonAggregateCopyInAggregateInit1cE_ } + // CHECK-DAG: @_ZN31NonAggregateCopyInAggregateInit1cE = dso_local global %{{.*}} { %{{.*}}* @_ZGRN31NonAggregateCopyInAggregateInit1cE_ } struct C { A &&p; } c{{1}}; } namespace NearlyZeroInit { - // CHECK-DAG: @_ZN14NearlyZeroInit1aE = global {{.*}} <{ i32 1, i32 2, i32 3, [120 x i32] zeroinitializer }> + // CHECK-DAG: @_ZN14NearlyZeroInit1aE = dso_local global {{.*}} <{ i32 1, i32 2, i32 3, [120 x i32] zeroinitializer }> int a[123] = {1, 2, 3}; // CHECK-DAG: @_ZN14NearlyZeroInit1bE = global {{.*}} { i32 1, <{ i32, [2147483647 x i32] }> <{ i32 2, [2147483647 x i32] zeroinitializer }> } struct B { int n; int arr[1024 * 1024 * 1024 * 2u]; } b = {1, {2}}; diff --git a/clang/test/CodeGenCXX/cxx11-thread-local-reference.cpp b/clang/test/CodeGenCXX/cxx11-thread-local-reference.cpp index 4177d3e8942d..cc77f8c7c9f1 100644 --- a/clang/test/CodeGenCXX/cxx11-thread-local-reference.cpp +++ b/clang/test/CodeGenCXX/cxx11-thread-local-reference.cpp @@ -1,9 +1,9 @@ -// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck --check-prefix=CHECK --check-prefix=LINUX %s +// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple x86_64-linux-gnu -fsemantic-interposition | FileCheck --check-prefix=CHECK --check-prefix=LINUX %s // RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple x86_64-apple-darwin12 | FileCheck --check-prefix=CHECK --check-prefix=DARWIN %s int &f(); -// LINUX: @r = thread_local global i32* null +// LINUX: @r = thread_local dso_local global i32* null // DARWIN: @r = internal thread_local global i32* null thread_local int &r = f(); @@ -16,7 +16,7 @@ int &g() { return r; } // CHECK: call dereferenceable({{[0-9]+}}) i32* @_Z1fv() // CHECK: store i32* %{{.*}}, i32** @r, align 8 -// CHECK-LABEL: define dereferenceable({{[0-9]+}}) i32* @_Z1gv() +// CHECK-LABEL: define dso_local dereferenceable({{[0-9]+}}) i32* @_Z1gv() // LINUX: call i32* @_ZTW1r() // DARWIN: call cxx_fast_tlscc i32* @_ZTW1r() // CHECK: ret i32* %{{.*}} diff --git a/clang/test/CodeGenCXX/cxx11-thread-local-visibility.cpp b/clang/test/CodeGenCXX/cxx11-thread-local-visibility.cpp index b46d41d7c960..d8056ae3c698 100644 --- a/clang/test/CodeGenCXX/cxx11-thread-local-visibility.cpp +++ b/clang/test/CodeGenCXX/cxx11-thread-local-visibility.cpp @@ -3,7 +3,7 @@ // Regression test for PR40327 -// LINUX: @default_tls = thread_local global i32 +// LINUX: @default_tls = thread_local dso_local global i32 // LINUX: @hidden_tls = hidden thread_local global i32 // LINUX: define weak_odr hidden i32* @_ZTW11default_tls() // LINUX: define weak_odr hidden i32* @_ZTW10hidden_tls() diff --git a/clang/test/CodeGenCXX/cxx11-thread-local.cpp b/clang/test/CodeGenCXX/cxx11-thread-local.cpp index 17a9542c9e10..fd8226233ff9 100644 --- a/clang/test/CodeGenCXX/cxx11-thread-local.cpp +++ b/clang/test/CodeGenCXX/cxx11-thread-local.cpp @@ -1,12 +1,12 @@ -// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck --check-prefix=CHECK --check-prefix=LINUX %s -// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -O2 -disable-llvm-passes -o - -triple x86_64-linux-gnu | FileCheck --check-prefix=CHECK --check-prefix=LINUX --check-prefix=CHECK-OPT %s -// RUN: %clang_cc1 -std=c++11 -femulated-tls -emit-llvm %s -o - \ +// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple x86_64-linux-gnu -fsemantic-interposition | FileCheck --check-prefix=CHECK --check-prefix=LINUX %s +// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -O2 -disable-llvm-passes -o - -triple x86_64-linux-gnu -fsemantic-interposition | FileCheck --check-prefix=CHECK --check-prefix=LINUX --check-prefix=CHECK-OPT %s +// RUN: %clang_cc1 -std=c++11 -femulated-tls -emit-llvm %s -o - -fsemantic-interposition \ // RUN: -triple x86_64-linux-gnu 2>&1 | FileCheck --check-prefix=CHECK --check-prefix=LINUX %s // RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple x86_64-apple-darwin12 | FileCheck --check-prefix=CHECK --check-prefix=DARWIN %s -// RUN: %clang_cc1 -std=c++11 -fno-use-cxa-atexit -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck --check-prefix=CHECK --check-prefix=LINUX %s -// RUN: %clang_cc1 -std=c++11 -fno-use-cxa-atexit -emit-llvm %s -O2 -disable-llvm-passes -o - -triple x86_64-linux-gnu | FileCheck --check-prefix=CHECK --check-prefix=LINUX --check-prefix=CHECK-OPT %s -// RUN: %clang_cc1 -std=c++11 -fno-use-cxa-atexit -femulated-tls -emit-llvm %s -o - \ +// RUN: %clang_cc1 -std=c++11 -fno-use-cxa-atexit -emit-llvm %s -o - -triple x86_64-linux-gnu -fsemantic-interposition | FileCheck --check-prefix=CHECK --check-prefix=LINUX %s +// RUN: %clang_cc1 -std=c++11 -fno-use-cxa-atexit -emit-llvm %s -O2 -disable-llvm-passes -o - -triple x86_64-linux-gnu -fsemantic-interposition | FileCheck --check-prefix=CHECK --check-prefix=LINUX --check-prefix=CHECK-OPT %s +// RUN: %clang_cc1 -std=c++11 -fno-use-cxa-atexit -femulated-tls -emit-llvm %s -o - -fsemantic-interposition \ // RUN: -triple x86_64-linux-gnu 2>&1 | FileCheck --check-prefix=CHECK --check-prefix=LINUX %s // RUN: %clang_cc1 -std=c++11 -fno-use-cxa-atexit -emit-llvm %s -o - -triple x86_64-apple-darwin12 | FileCheck --check-prefix=CHECK --check-prefix=DARWIN %s diff --git a/clang/test/CodeGenCXX/cxx1y-deduced-return-type.cpp b/clang/test/CodeGenCXX/cxx1y-deduced-return-type.cpp index 6d15a2246df0..67fdcaba8b01 100644 --- a/clang/test/CodeGenCXX/cxx1y-deduced-return-type.cpp +++ b/clang/test/CodeGenCXX/cxx1y-deduced-return-type.cpp @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -std=c++1y -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s -// CHECK: @x = global {{.*}} zeroinitializer +// CHECK: @x = dso_local global {{.*}} zeroinitializer // CHECK: define {{.*}} @_Z1fv inline auto f() { diff --git a/clang/test/CodeGenCXX/cxx1y-init-captures-eh.cpp b/clang/test/CodeGenCXX/cxx1y-init-captures-eh.cpp index 70103dccb150..c2b6d211896a 100644 --- a/clang/test/CodeGenCXX/cxx1y-init-captures-eh.cpp +++ b/clang/test/CodeGenCXX/cxx1y-init-captures-eh.cpp @@ -11,7 +11,7 @@ struct T { int n; }; -// CHECK-LABEL: define void @_Z1fv( +// CHECK-LABEL: define dso_local void @_Z1fv( void f() { // CHECK: call void @_ZN1SC1Ev( // CHECK: invoke void @__cxa_throw @@ -28,7 +28,7 @@ void f() { // CHECK: } } -// CHECK-LABEL: define void @_Z1gv( +// CHECK-LABEL: define dso_local void @_Z1gv( void g() { // CHECK: call void @_ZN1SC1Ev( // CHECK: invoke void @__cxa_throw @@ -48,7 +48,7 @@ void g() { void x() noexcept; void y() noexcept; -// CHECK-LABEL: define void @_Z1hbb( +// CHECK-LABEL: define dso_local void @_Z1hbb( void h(bool b1, bool b2) { // CHECK: {{.*}} = alloca i1, // CHECK: %[[S_ISACTIVE:.*]] = alloca i1, diff --git a/clang/test/CodeGenCXX/cxx1y-init-captures.cpp b/clang/test/CodeGenCXX/cxx1y-init-captures.cpp index c76180c5bf43..7432c05e2040 100644 --- a/clang/test/CodeGenCXX/cxx1y-init-captures.cpp +++ b/clang/test/CodeGenCXX/cxx1y-init-captures.cpp @@ -10,7 +10,7 @@ void f() { (void) [s(S{})] {}; } -// CHECK-LABEL: define void @_Z1fv( +// CHECK-LABEL: define dso_local void @_Z1fv( // CHECK: call void @_ZN1SC1Ev( // CHECK: call void @"_ZZ1fvEN3$_0D1Ev"( @@ -23,7 +23,7 @@ void g() { [a(1), b(2)] { return a + b; } (); } -// CHECK-LABEL: define void @_Z1gv( +// CHECK-LABEL: define dso_local void @_Z1gv( // CHECK: getelementptr inbounds {{.*}}, i32 0, i32 0 // CHECK: store i32 1, i32* // CHECK: getelementptr inbounds {{.*}}, i32 0, i32 1 @@ -38,7 +38,7 @@ void g() { // CHECK: add nsw i32 -// CHECK-LABEL: define void @_Z18init_capture_dtorsv +// CHECK-LABEL: define dso_local void @_Z18init_capture_dtorsv void init_capture_dtors() { // Ensure that init-captures are not treated as separate full-expressions. struct HasDtor { ~HasDtor() {} }; @@ -52,7 +52,7 @@ void init_capture_dtors() { } int h(int a) { - // CHECK-LABEL: define i32 @_Z1hi( + // CHECK-LABEL: define dso_local i32 @_Z1hi( // CHECK: %[[A_ADDR:.*]] = alloca i32, // CHECK: %[[OUTER:.*]] = alloca // CHECK: store i32 {{.*}}, i32* %[[A_ADDR]], diff --git a/clang/test/CodeGenCXX/cxx1y-initializer-aggregate.cpp b/clang/test/CodeGenCXX/cxx1y-initializer-aggregate.cpp index 6d0ae8a09e65..ac023fe485f6 100644 --- a/clang/test/CodeGenCXX/cxx1y-initializer-aggregate.cpp +++ b/clang/test/CodeGenCXX/cxx1y-initializer-aggregate.cpp @@ -25,16 +25,16 @@ A b { 4, "bazquux", .x = 42, .c = 9 }; A c { 1, 0, 'A', f(), { 3 } }; // CHECK: @[[STR_A:.*]] = {{.*}} [7 x i8] c"foobar\00" -// CHECK: @a = global {{.*}} zeroinitializer +// CHECK: @a = dso_local global {{.*}} zeroinitializer // @b has a constant initializer // CHECK: @[[STR_B:.*]] = {{.*}} [8 x i8] c"bazquux\00" -// CHECK: @b = global {{.*}} i32 4, {{.*}} @[[STR_B]], {{.*}} i8 117, i32 42, {{.*}} i8 9 +// CHECK: @b = dso_local global {{.*}} i32 4, {{.*}} @[[STR_B]], {{.*}} i8 117, i32 42, {{.*}} i8 9 B x; B y {}; B z { 1 }; -// CHECK: @z = global {{.*}} { i32 1 } +// CHECK: @z = dso_local global {{.*}} { i32 1 } // Brace initialization should initialize the first field even though it is // unnamed. @@ -45,7 +45,7 @@ union C { }; C n{}; -// CHECK: @n = global %union.C { %struct.anon { i64 -1 } }, align 8 +// CHECK: @n = dso_local global %union.C { %struct.anon { i64 -1 } }, align 8 // Initialization of 'a': diff --git a/clang/test/CodeGenCXX/cxx1y-sized-deallocation.cpp b/clang/test/CodeGenCXX/cxx1y-sized-deallocation.cpp index 78cc71325436..18898fe623c7 100644 --- a/clang/test/CodeGenCXX/cxx1y-sized-deallocation.cpp +++ b/clang/test/CodeGenCXX/cxx1y-sized-deallocation.cpp @@ -49,7 +49,7 @@ template void del<F>(); D::D() {} -// CHECK-LABEL: define weak_odr void @_Z3delIiEvv() +// CHECK-LABEL: define weak_odr dso_local void @_Z3delIiEvv() // CHECK: call void @_ZdlPvm(i8* %{{[^ ]*}}, i64 4) // CHECK: call void @_ZdaPv(i8* %{{[^ ]*}}) // @@ -58,14 +58,14 @@ D::D() {} // CHECK-LABEL: declare void @_ZdlPvm(i8* -// CHECK-LABEL: define weak_odr void @_Z3delI1BEvv() +// CHECK-LABEL: define weak_odr dso_local void @_Z3delI1BEvv() // CHECK: call void @_ZdlPvm(i8* %{{[^ ]*}}, i64 4) // CHECK: call void @_ZdaPv(i8* %{{[^ ]*}}) // // CHECK: call void @_ZdlPvm(i8* %{{[^ ]*}}, i64 4) // CHECK: call void @_ZdaPv(i8* %{{[^ ]*}}) -// CHECK-LABEL: define weak_odr void @_Z3delI1CEvv() +// CHECK-LABEL: define weak_odr dso_local void @_Z3delI1CEvv() // CHECK: call void @_ZdlPvm(i8* %{{[^ ]*}}, i64 1) // CHECK: mul i64 1, %{{[^ ]*}} // CHECK: add i64 %{{[^ ]*}}, 8 @@ -78,7 +78,7 @@ D::D() {} // CHECK-LABEL: declare void @_ZdaPvm(i8* -// CHECK-LABEL: define weak_odr void @_Z3delI1DEvv() +// CHECK-LABEL: define weak_odr dso_local void @_Z3delI1DEvv() // CHECK: call void @_ZdlPvm(i8* %{{[^ ]*}}, i64 8) // CHECK: mul i64 8, %{{[^ ]*}} // CHECK: add i64 %{{[^ ]*}}, 8 @@ -91,14 +91,14 @@ D::D() {} // CHECK: add i64 %{{[^ ]*}}, 8 // CHECK: call void @_ZdaPvm(i8* %{{[^ ]*}}, i64 %{{[^ ]*}}) -// CHECK-LABEL: define weak_odr void @_Z3delI1EEvv() +// CHECK-LABEL: define weak_odr dso_local void @_Z3delI1EEvv() // CHECK: call void @_ZdlPvm(i8* %{{[^ ]*}}, i64 1) // CHECK: call void @_ZdaPv(i8* %{{[^ ]*}}) // // CHECK: call void @_ZN1EdlEPv(i8* %{{[^ ]*}}) // CHECK: call void @_ZN1EdaEPv(i8* %{{[^ ]*}}) -// CHECK-LABEL: define weak_odr void @_Z3delI1FEvv() +// CHECK-LABEL: define weak_odr dso_local void @_Z3delI1FEvv() // CHECK: call void @_ZdlPvm(i8* %{{[^ ]*}}, i64 1) // CHECK: mul i64 1, %{{[^ ]*}} // CHECK: add i64 %{{[^ ]*}}, 8 @@ -110,5 +110,5 @@ D::D() {} // CHECK: call void @_ZN1FdaEPvm(i8* %{{[^ ]*}}, i64 %{{[^ ]*}}) -// CHECK-LABEL: define linkonce_odr void @_ZN1DD0Ev(%{{[^ ]*}}* %this) +// CHECK-LABEL: define linkonce_odr dso_local void @_ZN1DD0Ev(%{{[^ ]*}}* %this) // CHECK: call void @_ZdlPvm(i8* %{{[^ ]*}}, i64 8) diff --git a/clang/test/CodeGenCXX/cxx1y-variable-template.cpp b/clang/test/CodeGenCXX/cxx1y-variable-template.cpp index 51d1b54b37a7..538494fc74b7 100644 --- a/clang/test/CodeGenCXX/cxx1y-variable-template.cpp +++ b/clang/test/CodeGenCXX/cxx1y-variable-template.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++1y -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -std=c++1y -triple x86_64-linux-gnu -emit-llvm -o - %s -fsemantic-interposition | FileCheck %s // Check that we keep the 'extern' when we instantiate the definition of this // variable template specialization. diff --git a/clang/test/CodeGenCXX/cxx1z-decomposition.cpp b/clang/test/CodeGenCXX/cxx1z-decomposition.cpp index 31ade6f5fdb2..ba9851ff7c1a 100644 --- a/clang/test/CodeGenCXX/cxx1z-decomposition.cpp +++ b/clang/test/CodeGenCXX/cxx1z-decomposition.cpp @@ -30,19 +30,19 @@ using E = _Complex int; template<typename T> T &make(); -// CHECK: @_ZDC2a12a2E = global {{.*}} zeroinitializer, align 4 +// CHECK: @_ZDC2a12a2E = dso_local global {{.*}} zeroinitializer, align 4 auto [a1, a2] = make<A>(); -// CHECK: @_ZDC2b12b2E = global {{.*}} zeroinitializer, align 1 -// CHECK: @b1 = global {{.*}}* null, align 8 +// CHECK: @_ZDC2b12b2E = dso_local global {{.*}} zeroinitializer, align 1 +// CHECK: @b1 = dso_local global {{.*}}* null, align 8 // CHECK: @_ZGR2b1_ = internal global {{.*}} zeroinitializer, align 1 -// CHECK: @b2 = global i32* null, align 8 +// CHECK: @b2 = dso_local global i32* null, align 8 // CHECK: @_ZGR2b2_ = internal global i32 0, align 4 auto [b1, b2] = make<B>(); -// CHECK: @_ZDC2c12c2E = global [2 x i32]* null, align 8 +// CHECK: @_ZDC2c12c2E = dso_local global [2 x i32]* null, align 8 auto &[c1, c2] = make<C>(); -// CHECK: @_ZDC2d12d2E = global <2 x i32> zeroinitializer, align 8 +// CHECK: @_ZDC2d12d2E = dso_local global <2 x i32> zeroinitializer, align 8 auto [d1, d2] = make<D>(); -// CHECK: @_ZDC2e12e2E = global { i32, i32 } zeroinitializer, align 4 +// CHECK: @_ZDC2e12e2E = dso_local global { i32, i32 } zeroinitializer, align 4 auto [e1, e2] = make<E>(); // CHECK: call {{.*}}* @_Z4makeI1AERT_v() @@ -69,7 +69,7 @@ auto [e1, e2] = make<E>(); // CHECK: store i32 %{{.*}}, i32* getelementptr inbounds ({ i32, i32 }, { i32, i32 }* @_ZDC2e12e2E, i32 0, i32 0) // CHECK: store i32 %{{.*}}, i32* getelementptr inbounds ({ i32, i32 }, { i32, i32 }* @_ZDC2e12e2E, i32 0, i32 1) -// CHECK: define i32 @_Z12test_globalsv() +// CHECK: define dso_local i32 @_Z12test_globalsv() int test_globals() { return a2 + b2 + c2 + d2 + e2; // CHECK: load i8, i8* getelementptr inbounds (%struct.A, %struct.A* @_ZDC2a12a2E, i32 0, i32 1) @@ -87,7 +87,7 @@ int test_globals() { // CHECK: load i32, i32* getelementptr inbounds ({ i32, i32 }, { i32, i32 }* @_ZDC2e12e2E, i32 0, i32 1) } -// CHECK: define i32 @_Z11test_localsv() +// CHECK: define dso_local i32 @_Z11test_localsv() int test_locals() { auto [b1, b2] = make<B>(); @@ -107,7 +107,7 @@ int test_locals() { // CHECK: call {{.*}}@_ZN1XD1Ev({{.*}}%[[b1]]) } -// CHECK: define void @_Z13test_bitfieldR1A( +// CHECK: define dso_local void @_Z13test_bitfieldR1A( void test_bitfield(A &a) { auto &[a1, a2] = a; a1 = 5; diff --git a/clang/test/CodeGenCXX/cxx1z-initializer-aggregate.cpp b/clang/test/CodeGenCXX/cxx1z-initializer-aggregate.cpp index f59ec51136fe..c4a303c71a70 100644 --- a/clang/test/CodeGenCXX/cxx1z-initializer-aggregate.cpp +++ b/clang/test/CodeGenCXX/cxx1z-initializer-aggregate.cpp @@ -17,16 +17,16 @@ namespace Constant { C c1 = {}; C c2 = {1}; - // CHECK: @_ZN8Constant2c1E = global { i8 } zeroinitializer, align 1 - // CHECK: @_ZN8Constant2c2E = global { i8 } { i8 1 }, align 1 + // CHECK: @_ZN8Constant2c1E = dso_local global { i8 } zeroinitializer, align 1 + // CHECK: @_ZN8Constant2c2E = dso_local global { i8 } { i8 1 }, align 1 // Test packing bases into tail padding. D d1 = {}; D d2 = {1, 2, 3}; D d3 = {1}; - // CHECK: @_ZN8Constant2d1E = global { i32, i8, i8 } zeroinitializer, align 4 - // CHECK: @_ZN8Constant2d2E = global { i32, i8, i8 } { i32 1, i8 2, i8 3 }, align 4 - // CHECK: @_ZN8Constant2d3E = global { i32, i8, i8 } { i32 1, i8 0, i8 0 }, align 4 + // CHECK: @_ZN8Constant2d1E = dso_local global { i32, i8, i8 } zeroinitializer, align 4 + // CHECK: @_ZN8Constant2d2E = dso_local global { i32, i8, i8 } { i32 1, i8 2, i8 3 }, align 4 + // CHECK: @_ZN8Constant2d3E = dso_local global { i32, i8, i8 } { i32 1, i8 0, i8 0 }, align 4 // CHECK-LABEL: define {{.*}}global_var_init // CHECK: call {{.*}} @__cxa_atexit({{.*}} @_ZN8Constant1DD1Ev {{.*}} @_ZN8Constant2d1E diff --git a/clang/test/CodeGenCXX/cxx1z-inline-variables.cpp b/clang/test/CodeGenCXX/cxx1z-inline-variables.cpp index 938ebbbeb3ab..b55ff376c206 100644 --- a/clang/test/CodeGenCXX/cxx1z-inline-variables.cpp +++ b/clang/test/CodeGenCXX/cxx1z-inline-variables.cpp @@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -std=c++1z %s -emit-llvm -o - -triple x86_64-linux-gnu | FileCheck %s +// RUN: %clang_cc1 -std=c++1z %s -emit-llvm -o - -triple x86_64-linux-gnu -fsemantic-interposition | FileCheck %s struct Q { - // CHECK: @_ZN1Q1kE = linkonce_odr constant i32 5, comdat + // CHECK: @_ZN1Q1kE = linkonce_odr dso_local constant i32 5, comdat static constexpr int k = 5; }; const int &r = Q::k; @@ -9,7 +9,7 @@ const int &r = Q::k; int f(); // const does not imply internal linkage. -// CHECK: @external_inline = linkonce_odr constant i32 5, comdat +// CHECK: @external_inline = linkonce_odr dso_local constant i32 5, comdat inline const int external_inline = 5; const int &use1 = external_inline; @@ -19,8 +19,8 @@ static inline const int internal_inline = 5; const int &use2 = internal_inline; int a = f(); -// CHECK: @b = linkonce_odr global i32 0, comdat -// CHECK: @_ZGV1b = linkonce_odr global i64 0, comdat($b) +// CHECK: @b = linkonce_odr dso_local global i32 0, comdat +// CHECK: @_ZGV1b = linkonce_odr dso_local global i64 0, comdat($b) inline int b = f(); int c = f(); @@ -46,13 +46,13 @@ constexpr inline int compat::g; const int &compat_use_after_redecl1 = compat::c; const int &compat_use_after_redecl2 = compat::d; const int &compat_use_after_redecl3 = compat::g; -// CHECK-DAG: @_ZN6compat1bE = weak_odr constant i32 2 -// CHECK-DAG: @_ZN6compat1aE = weak_odr constant i32 1 -// CHECK-DAG: @_ZN6compat1cE = weak_odr constant i32 3 -// CHECK-DAG: @_ZN6compat1dE = linkonce_odr constant i32 4 -// CHECK-DAG: @_ZN6compat1eE = constant i32 5 -// CHECK-DAG: @_ZN6compat1fE = weak_odr constant i32 6 -// CHECK-DAG: @_ZN6compat1gE = linkonce_odr constant i32 7 +// CHECK-DAG: @_ZN6compat1bE = weak_odr dso_local constant i32 2 +// CHECK-DAG: @_ZN6compat1aE = weak_odr dso_local constant i32 1 +// CHECK-DAG: @_ZN6compat1cE = weak_odr dso_local constant i32 3 +// CHECK-DAG: @_ZN6compat1dE = linkonce_odr dso_local constant i32 4 +// CHECK-DAG: @_ZN6compat1eE = dso_local constant i32 5 +// CHECK-DAG: @_ZN6compat1fE = weak_odr dso_local constant i32 6 +// CHECK-DAG: @_ZN6compat1gE = linkonce_odr dso_local constant i32 7 template<typename T> struct X { static int a; @@ -61,11 +61,11 @@ template<typename T> struct X { static const int d; static int e; }; -// CHECK: @_ZN1XIiE1aE = linkonce_odr global i32 10 -// CHECK: @_ZN1XIiE1bE = global i32 20 +// CHECK: @_ZN1XIiE1aE = linkonce_odr dso_local global i32 10 +// CHECK: @_ZN1XIiE1bE = dso_local global i32 20 // CHECK-NOT: @_ZN1XIiE1cE -// CHECK: @_ZN1XIiE1dE = linkonce_odr constant i32 40 -// CHECK: @_ZN1XIiE1eE = linkonce_odr global i32 50 +// CHECK: @_ZN1XIiE1dE = linkonce_odr dso_local constant i32 40 +// CHECK: @_ZN1XIiE1eE = linkonce_odr dso_local global i32 50 template<> inline int X<int>::a = 10; int &use3 = X<int>::a; template<> int X<int>::b = 20; diff --git a/clang/test/CodeGenCXX/cxx2a-destroying-delete.cpp b/clang/test/CodeGenCXX/cxx2a-destroying-delete.cpp index 60c5970cb94f..3343c38f207a 100644 --- a/clang/test/CodeGenCXX/cxx2a-destroying-delete.cpp +++ b/clang/test/CodeGenCXX/cxx2a-destroying-delete.cpp @@ -108,7 +108,7 @@ void call_in_dtor(); struct H : G { virtual ~H(); } h; H::~H() { call_in_dtor(); } -// CHECK-ITANIUM-LABEL: define void @_ZN1HD0Ev( +// CHECK-ITANIUM-LABEL: define dso_local void @_ZN1HD0Ev( // CHECK-ITANIUM-NOT: call // CHECK-ITANIUM: getelementptr {{.*}}, i64 24 // CHECK-ITANIUM-NOT: call @@ -135,7 +135,7 @@ H::~H() { call_in_dtor(); } struct I : H { virtual ~I(); alignas(32) char buffer[32]; } i; I::~I() { call_in_dtor(); } -// CHECK-ITANIUM-LABEL: define void @_ZN1ID0Ev( +// CHECK-ITANIUM-LABEL: define dso_local void @_ZN1ID0Ev( // CHECK-ITANIUM-NOT: call // CHECK-ITANIUM: getelementptr {{.*}}, i64 24 // CHECK-ITANIUM-NOT: call diff --git a/clang/test/CodeGenCXX/cxx2a-thread-local-constinit.cpp b/clang/test/CodeGenCXX/cxx2a-thread-local-constinit.cpp index af46a92c7dc2..b9d6e9c5ea43 100644 --- a/clang/test/CodeGenCXX/cxx2a-thread-local-constinit.cpp +++ b/clang/test/CodeGenCXX/cxx2a-thread-local-constinit.cpp @@ -6,7 +6,7 @@ extern thread_local int a; // CHECK-DAG: @b = external thread_local global i32 extern thread_local constinit int b; -// CHECK-LABEL: define i32 @_Z1fv() +// CHECK-LABEL: define dso_local i32 @_Z1fv() // CHECK: call i32* @_ZTW1a() // CHECK: } int f() { return a; } @@ -16,7 +16,7 @@ int f() { return a; } // CHECK: call void @_ZTH1a() // CHECK: } -// CHECK-LABEL: define i32 @_Z1gv() +// CHECK-LABEL: define dso_local i32 @_Z1gv() // CHECK-NOT: call // CHECK: load i32, i32* @b // CHECK-NOT: call @@ -27,7 +27,7 @@ int g() { return b; } extern thread_local int c; -// CHECK-LABEL: define i32 @_Z1hv() +// CHECK-LABEL: define dso_local i32 @_Z1hv() // CHECK: call i32* @_ZTW1c() // CHECK: load i32, i32* % // CHECK: } @@ -55,7 +55,7 @@ struct Destructed { }; extern thread_local constinit Destructed e; -// CHECK-LABEL: define i32 @_Z1iv() +// CHECK-LABEL: define dso_local i32 @_Z1iv() // CHECK: call {{.*}}* @_ZTW1e() // CHECK: } int i() { return e.n; } diff --git a/clang/test/CodeGenCXX/debug-info.cpp b/clang/test/CodeGenCXX/debug-info.cpp index 8ac4016493c5..4379659f11d7 100644 --- a/clang/test/CodeGenCXX/debug-info.cpp +++ b/clang/test/CodeGenCXX/debug-info.cpp @@ -1,9 +1,9 @@ // RUN: %clang_cc1 -triple x86_64-none-linux-gnu -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=BOTH // RUN: %clang_cc1 -triple i686-pc-windows-msvc -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s --check-prefix=MSVC --check-prefix=BOTH -// CHECK: @_ZN6pr96081xE = global [3 x i8]* null, align 8, !dbg [[X:![0-9]+]] +// CHECK: @_ZN6pr96081xE = dso_local global [3 x i8]* null, align 8, !dbg [[X:![0-9]+]] -// CHECK: define void @_ZN7pr147634funcENS_3fooE +// CHECK: define dso_local void @_ZN7pr147634funcENS_3fooE // CHECK: call void @llvm.dbg.declare({{.*}}, metadata ![[F:[0-9]+]], metadata !DIExpression()) // !llvm.dbg.cu pulls in globals and their types first. diff --git a/clang/test/CodeGenCXX/default_calling_conv.cpp b/clang/test/CodeGenCXX/default_calling_conv.cpp index b5b0f47ceb98..535d12d48339 100644 --- a/clang/test/CodeGenCXX/default_calling_conv.cpp +++ b/clang/test/CodeGenCXX/default_calling_conv.cpp @@ -5,37 +5,37 @@ // RUN: %clang_cc1 -triple i986-unknown-linux-gnu -fdefault-calling-conv=vectorcall -emit-llvm -o - %s | FileCheck %s --check-prefix=VECTORCALL --check-prefix=ALL // RUN: %clang_cc1 -triple i986-unknown-linux-gnu -fdefault-calling-conv=regcall -emit-llvm -o - %s | FileCheck %s --check-prefix=REGCALL --check-prefix=ALL -// CDECL: define void @_Z5test1v -// FASTCALL: define x86_fastcallcc void @_Z5test1v -// STDCALL: define x86_stdcallcc void @_Z5test1v -// VECTORCALL: define x86_vectorcallcc void @_Z5test1v -// REGCALL: define x86_regcallcc void @_Z17__regcall3__test1v +// CDECL: define dso_local void @_Z5test1v +// FASTCALL: define dso_local x86_fastcallcc void @_Z5test1v +// STDCALL: define dso_local x86_stdcallcc void @_Z5test1v +// VECTORCALL: define dso_local x86_vectorcallcc void @_Z5test1v +// REGCALL: define dso_local x86_regcallcc void @_Z17__regcall3__test1v void test1() {} // fastcall, stdcall, vectorcall and regcall do not support variadic functions. -// CDECL: define void @_Z12testVariadicz -// FASTCALL: define void @_Z12testVariadicz -// STDCALL: define void @_Z12testVariadicz -// VECTORCALL: define void @_Z12testVariadicz -// REGCALL: define void @_Z12testVariadicz +// CDECL: define dso_local void @_Z12testVariadicz +// FASTCALL: define dso_local void @_Z12testVariadicz +// STDCALL: define dso_local void @_Z12testVariadicz +// VECTORCALL: define dso_local void @_Z12testVariadicz +// REGCALL: define dso_local void @_Z12testVariadicz void testVariadic(...){} -// ALL: define void @_Z5test2v +// ALL: define dso_local void @_Z5test2v void __attribute__((cdecl)) test2() {} -// ALL: define x86_fastcallcc void @_Z5test3v +// ALL: define dso_local x86_fastcallcc void @_Z5test3v void __attribute__((fastcall)) test3() {} -// ALL: define x86_stdcallcc void @_Z5test4v +// ALL: define dso_local x86_stdcallcc void @_Z5test4v void __attribute__((stdcall)) test4() {} -// ALL: define x86_vectorcallcc void @_Z5test5v +// ALL: define dso_local x86_vectorcallcc void @_Z5test5v void __attribute__((vectorcall)) test5() {} -// ALL: define x86_regcallcc void @_Z17__regcall3__test6v +// ALL: define dso_local x86_regcallcc void @_Z17__regcall3__test6v void __attribute__((regcall)) test6() {} -// ALL: define linkonce_odr void @_ZN1A11test_memberEv +// ALL: define linkonce_odr dso_local void @_ZN1A11test_memberEv class A { public: void test_member() {} @@ -46,7 +46,7 @@ void test() { a.test_member(); } -// ALL: define i32 @main +// ALL: define dso_local i32 @main int main() { return 1; } diff --git a/clang/test/CodeGenCXX/delete-two-arg.cpp b/clang/test/CodeGenCXX/delete-two-arg.cpp index 68a6fa6736eb..c00bf38d488a 100644 --- a/clang/test/CodeGenCXX/delete-two-arg.cpp +++ b/clang/test/CodeGenCXX/delete-two-arg.cpp @@ -6,7 +6,7 @@ typedef __typeof(sizeof(int)) size_t; namespace test1 { struct A { void operator delete(void*,size_t); int x; }; - // CHECK-LABEL: define void @_ZN5test11aEPNS_1AE( + // CHECK-LABEL: define dso_local void @_ZN5test11aEPNS_1AE( void a(A *x) { // CHECK: load // CHECK-NEXT: icmp eq {{.*}}, null @@ -25,7 +25,7 @@ namespace test2 { void operator delete[](void *, size_t); }; - // CHECK: define [[A:%.*]]* @_ZN5test24testEv() + // CHECK: define dso_local [[A:%.*]]* @_ZN5test24testEv() A *test() { // CHECK: [[NEW:%.*]] = call i8* @_Znaj(i32 44) // CHECK-NEXT: [[T0:%.*]] = bitcast i8* [[NEW]] to i32* @@ -36,7 +36,7 @@ namespace test2 { return ::new A[10]; } - // CHECK-LABEL: define void @_ZN5test24testEPNS_1AE( + // CHECK-LABEL: define dso_local void @_ZN5test24testEPNS_1AE( void test(A *p) { // CHECK: [[P:%.*]] = alloca [[A]]*, align 4 // CHECK-NEXT: store [[A]]* {{%.*}}, [[A]]** [[P]], align 4 @@ -61,7 +61,7 @@ namespace test3 { }; struct B : A {}; - // CHECK-LABEL: define void @_ZN5test34testEv() + // CHECK-LABEL: define dso_local void @_ZN5test34testEv() void test() { // CHECK: call i8* @_Znaj(i32 24) // CHECK-NEXT: bitcast diff --git a/clang/test/CodeGenCXX/derived-cast.cpp b/clang/test/CodeGenCXX/derived-cast.cpp index bf2b258c5e9f..ba5fc2242195 100644 --- a/clang/test/CodeGenCXX/derived-cast.cpp +++ b/clang/test/CodeGenCXX/derived-cast.cpp @@ -19,7 +19,7 @@ class X : public A, public B { A *B::getAsA() { return static_cast<X*>(this); - // CHECK-LABEL: define %class.A* @_ZN1B6getAsAEv + // CHECK-LABEL: define dso_local %class.A* @_ZN1B6getAsAEv // CHECK: %[[THIS:.*]] = load %class.B*, %class.B** // CHECK-NEXT: %[[BC:.*]] = bitcast %class.B* %[[THIS]] to i8* // CHECK-NEXT: getelementptr inbounds i8, i8* %[[BC]], i64 -4 diff --git a/clang/test/CodeGenCXX/designated-init.cpp b/clang/test/CodeGenCXX/designated-init.cpp index 0b483296b4cb..aba7892e6788 100644 --- a/clang/test/CodeGenCXX/designated-init.cpp +++ b/clang/test/CodeGenCXX/designated-init.cpp @@ -4,7 +4,7 @@ struct A { int x, y[3]; }; struct B { A a; }; -// CHECK: @b = global %{{[^ ]*}} { %{{[^ ]*}} { i32 1, [3 x i32] [i32 2, i32 5, i32 4] } } +// CHECK: @b = dso_local global %{{[^ ]*}} { %{{[^ ]*}} { i32 1, [3 x i32] [i32 2, i32 5, i32 4] } } B b = {(A){1, 2, 3, 4}, .a.y[1] = 5}; union U { @@ -52,7 +52,7 @@ struct LargeArray { struct WithLargeArray { LargeArray arr; }; -// CHECK: @large = global { { <{ [11 x i32], [4085 x i32] }> } } { { <{ [11 x i32], [4085 x i32] }> } { <{ [11 x i32], [4085 x i32] }> <{ [11 x i32] [i32 1, i32 2, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 10], [4085 x i32] zeroinitializer }> } } +// CHECK: @large = dso_local global { { <{ [11 x i32], [4085 x i32] }> } } { { <{ [11 x i32], [4085 x i32] }> } { <{ [11 x i32], [4085 x i32] }> <{ [11 x i32] [i32 1, i32 2, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 10], [4085 x i32] zeroinitializer }> } } WithLargeArray large = {(LargeArray){1, 2, 3}, .arr.arr[10] = 10}; union OverwritePaddingWithBitfield { @@ -62,5 +62,5 @@ union OverwritePaddingWithBitfield { struct WithOverwritePaddingWithBitfield { OverwritePaddingWithBitfield a; }; -// CHECK: @overwrite_padding = global { { i8, i8 } } { { i8, i8 } { i8 3, i8 1 } } +// CHECK: @overwrite_padding = dso_local global { { i8, i8 } } { { i8, i8 } { i8 3, i8 1 } } WithOverwritePaddingWithBitfield overwrite_padding = {(OverwritePaddingWithBitfield){1}, .a.bitfield = 3}; diff --git a/clang/test/CodeGenCXX/devirtualize-dtor-final.cpp b/clang/test/CodeGenCXX/devirtualize-dtor-final.cpp index ea11be773f26..1dd71c4a3687 100644 --- a/clang/test/CodeGenCXX/devirtualize-dtor-final.cpp +++ b/clang/test/CodeGenCXX/devirtualize-dtor-final.cpp @@ -5,17 +5,17 @@ namespace Test1 { struct B final : A {}; struct C : A { virtual ~C() final {} }; struct D { virtual ~D() final = 0; }; - // CHECK-LABEL: define void @_ZN5Test13fooEPNS_1BE + // CHECK-LABEL: define dso_local void @_ZN5Test13fooEPNS_1BE void foo(B *b) { // CHECK: call void @_ZN5Test11BD1Ev delete b; } - // CHECK-LABEL: define void @_ZN5Test14foo2EPNS_1CE + // CHECK-LABEL: define dso_local void @_ZN5Test14foo2EPNS_1CE void foo2(C *c) { // CHECK: call void @_ZN5Test11CD1Ev delete c; } - // CHECK-LABEL: define void @_ZN5Test14evilEPNS_1DE + // CHECK-LABEL: define dso_local void @_ZN5Test14evilEPNS_1DE void evil(D *p) { // CHECK-NOT: call void @_ZN5Test11DD1Ev delete p; diff --git a/clang/test/CodeGenCXX/devirtualize-virtual-function-calls-final.cpp b/clang/test/CodeGenCXX/devirtualize-virtual-function-calls-final.cpp index 6f5e844b587e..9eed8fbb3790 100644 --- a/clang/test/CodeGenCXX/devirtualize-virtual-function-calls-final.cpp +++ b/clang/test/CodeGenCXX/devirtualize-virtual-function-calls-final.cpp @@ -5,7 +5,7 @@ namespace Test1 { virtual int f() final; }; - // CHECK-LABEL: define i32 @_ZN5Test11fEPNS_1AE + // CHECK-LABEL: define dso_local i32 @_ZN5Test11fEPNS_1AE int f(A *a) { // CHECK: call i32 @_ZN5Test11A1fEv return a->f(); @@ -17,7 +17,7 @@ namespace Test2 { virtual int f(); }; - // CHECK-LABEL: define i32 @_ZN5Test21fEPNS_1AE + // CHECK-LABEL: define dso_local i32 @_ZN5Test21fEPNS_1AE int f(A *a) { // CHECK: call i32 @_ZN5Test21A1fEv return a->f(); @@ -30,7 +30,7 @@ namespace Test2a { virtual int f(); }; - // CHECK-LABEL: define i32 @_ZN6Test2a1fEPNS_1AE + // CHECK-LABEL: define dso_local i32 @_ZN6Test2a1fEPNS_1AE int f(A *a) { // CHECK: call i32 @_ZN6Test2a1A1fEv return a->f(); @@ -44,19 +44,19 @@ namespace Test3 { struct B final : A { }; - // CHECK-LABEL: define i32 @_ZN5Test31fEPNS_1BE + // CHECK-LABEL: define dso_local i32 @_ZN5Test31fEPNS_1BE int f(B *b) { // CHECK: call i32 @_ZN5Test31A1fEv return b->f(); } - // CHECK-LABEL: define i32 @_ZN5Test31fERNS_1BE + // CHECK-LABEL: define dso_local i32 @_ZN5Test31fERNS_1BE int f(B &b) { // CHECK: call i32 @_ZN5Test31A1fEv return b.f(); } - // CHECK-LABEL: define i32 @_ZN5Test31fEPv + // CHECK-LABEL: define dso_local i32 @_ZN5Test31fEPv int f(void *v) { // CHECK: call i32 @_ZN5Test31A1fEv return static_cast<B*>(v)->f(); @@ -74,7 +74,7 @@ namespace Test4 { virtual int operator-(); }; - // CHECK-LABEL: define void @_ZN5Test41fEPNS_1BE + // CHECK-LABEL: define dso_local void @_ZN5Test41fEPNS_1BE void f(B* d) { // CHECK: call void @_ZN5Test41B1fEv static_cast<A*>(d)->f(); @@ -97,7 +97,7 @@ namespace Test5 { struct C final : B { }; - // CHECK-LABEL: define void @_ZN5Test51fEPNS_1CE + // CHECK-LABEL: define dso_local void @_ZN5Test51fEPNS_1CE void f(C* d) { // FIXME: It should be possible to devirtualize this case, but that is // not implemented yet. @@ -106,7 +106,7 @@ namespace Test5 { // CHECK-NEXT: call void %[[FUNC]] static_cast<A*>(d)->f(); } - // CHECK-LABEL: define void @_ZN5Test53fopEPNS_1CE + // CHECK-LABEL: define dso_local void @_ZN5Test53fopEPNS_1CE void fop(C* d) { // FIXME: It should be possible to devirtualize this case, but that is // not implemented yet. @@ -133,7 +133,7 @@ namespace Test6 { struct D final : public C, public B { }; - // CHECK-LABEL: define void @_ZN5Test61fEPNS_1DE + // CHECK-LABEL: define dso_local void @_ZN5Test61fEPNS_1DE void f(D* d) { // CHECK: call void @_ZN5Test61DD1Ev static_cast<A*>(d)->~A(); @@ -154,7 +154,7 @@ namespace Test7 { virtual int f() {return z;} }; - // CHECK-LABEL: define i32 @_ZN5Test71fEPNS_3zedE + // CHECK-LABEL: define dso_local i32 @_ZN5Test71fEPNS_3zedE int f(zed *z) { // CHECK: alloca // CHECK-NEXT: store @@ -172,7 +172,7 @@ namespace Test8 { virtual int foo() { return b; } }; struct C final : A, B { }; - // CHECK-LABEL: define i32 @_ZN5Test84testEPNS_1CE + // CHECK-LABEL: define dso_local i32 @_ZN5Test84testEPNS_1CE int test(C *c) { // CHECK: %[[THIS:.*]] = phi // CHECK-NEXT: call i32 @_ZN5Test81B3fooEv(%"struct.Test8::B"* %[[THIS]]) @@ -248,7 +248,7 @@ namespace Test10 { int f() final; }; - // CHECK-LABEL: define i32 @_ZN6Test101fEPNS_1BE + // CHECK-LABEL: define dso_local i32 @_ZN6Test101fEPNS_1BE int f(B *b) { // CHECK: call i32 @_ZN6Test101B1fEv return static_cast<A *>(b)->f(); @@ -301,15 +301,15 @@ namespace TestVBase { namespace Test11 { // Check that the definitions of Derived's operators are emitted. - // CHECK-LABEL: define linkonce_odr void @_ZN6Test111SIiE4foo1Ev( + // CHECK-LABEL: define linkonce_odr dso_local void @_ZN6Test111SIiE4foo1Ev( // CHECK: call void @_ZN6Test111SIiE7DerivedclEv( // CHECK: call zeroext i1 @_ZN6Test111SIiE7DerivedeqERKNS_4BaseE( // CHECK: call zeroext i1 @_ZN6Test111SIiE7DerivedntEv( // CHECK: call dereferenceable(4) %"class.Test11::Base"* @_ZN6Test111SIiE7DerivedixEi( - // CHECK: define linkonce_odr void @_ZN6Test111SIiE7DerivedclEv( - // CHECK: define linkonce_odr zeroext i1 @_ZN6Test111SIiE7DerivedeqERKNS_4BaseE( - // CHECK: define linkonce_odr zeroext i1 @_ZN6Test111SIiE7DerivedntEv( - // CHECK: define linkonce_odr dereferenceable(4) %"class.Test11::Base"* @_ZN6Test111SIiE7DerivedixEi( + // CHECK: define linkonce_odr dso_local void @_ZN6Test111SIiE7DerivedclEv( + // CHECK: define linkonce_odr dso_local zeroext i1 @_ZN6Test111SIiE7DerivedeqERKNS_4BaseE( + // CHECK: define linkonce_odr dso_local zeroext i1 @_ZN6Test111SIiE7DerivedntEv( + // CHECK: define linkonce_odr dso_local dereferenceable(4) %"class.Test11::Base"* @_ZN6Test111SIiE7DerivedixEi( class Base { public: virtual void operator()() {} diff --git a/clang/test/CodeGenCXX/devirtualize-virtual-function-calls.cpp b/clang/test/CodeGenCXX/devirtualize-virtual-function-calls.cpp index b4c39f3fcff5..c0a86e6fb643 100644 --- a/clang/test/CodeGenCXX/devirtualize-virtual-function-calls.cpp +++ b/clang/test/CodeGenCXX/devirtualize-virtual-function-calls.cpp @@ -140,7 +140,7 @@ namespace test3 { struct D : public B { }; void f(D d) { - // CHECK-LABEL: define void @_ZN5test31fENS_1DE + // CHECK-LABEL: define dso_local void @_ZN5test31fENS_1DE d.B::~B(); } } diff --git a/clang/test/CodeGenCXX/exceptions.cpp b/clang/test/CodeGenCXX/exceptions.cpp index 302488aa568d..8e5c46d9d565 100644 --- a/clang/test/CodeGenCXX/exceptions.cpp +++ b/clang/test/CodeGenCXX/exceptions.cpp @@ -30,7 +30,7 @@ namespace test1 { struct A { A(int); A(int, int); ~A(); void *p; }; A *a() { - // CHECK: define [[A:%.*]]* @_ZN5test11aEv() + // CHECK: define dso_local [[A:%.*]]* @_ZN5test11aEv() // CHECK: [[NEW:%.*]] = call i8* @_Znwm(i64 8) // CHECK-NEXT: [[CAST:%.*]] = bitcast i8* [[NEW]] to [[A]]* // CHECK-NEXT: invoke void @_ZN5test11AC1Ei([[A]]* [[CAST]], i32 5) @@ -40,7 +40,7 @@ namespace test1 { } A *b() { - // CHECK: define [[A:%.*]]* @_ZN5test11bEv() + // CHECK: define dso_local [[A:%.*]]* @_ZN5test11bEv() // CHECK: [[NEW:%.*]] = call i8* @_Znwm(i64 8) // CHECK-NEXT: [[CAST:%.*]] = bitcast i8* [[NEW]] to [[A]]* // CHECK-NEXT: [[FOO:%.*]] = invoke i32 @_ZN5test13fooEv() @@ -55,7 +55,7 @@ namespace test1 { B makeB(); A *c() { - // CHECK: define [[A:%.*]]* @_ZN5test11cEv() + // CHECK: define dso_local [[A:%.*]]* @_ZN5test11cEv() // CHECK: [[ACTIVE:%.*]] = alloca i1 // CHECK-NEXT: [[NEW:%.*]] = call i8* @_Znwm(i64 8) // CHECK-NEXT: store i1 true, i1* [[ACTIVE]] @@ -84,7 +84,7 @@ namespace test1 { // CHECK98-NEXT: unreachable A *d() { - // CHECK: define [[A:%.*]]* @_ZN5test11dEv() + // CHECK: define dso_local [[A:%.*]]* @_ZN5test11dEv() // CHECK: [[ACTIVE:%.*]] = alloca i1 // CHECK-NEXT: [[NEW:%.*]] = call i8* @_Znwm(i64 8) // CHECK-NEXT: store i1 true, i1* [[ACTIVE]] @@ -105,7 +105,7 @@ namespace test1 { } A *e() { - // CHECK: define [[A:%.*]]* @_ZN5test11eEv() + // CHECK: define dso_local [[A:%.*]]* @_ZN5test11eEv() // CHECK: [[ACTIVE:%.*]] = alloca i1 // CHECK-NEXT: [[NEW:%.*]] = call i8* @_Znwm(i64 8) // CHECK-NEXT: store i1 true, i1* [[ACTIVE]] @@ -140,7 +140,7 @@ namespace test1 { } A *i() { - // CHECK: define [[A:%.*]]* @_ZN5test11iEv() + // CHECK: define dso_local [[A:%.*]]* @_ZN5test11iEv() // CHECK: [[X:%.*]] = alloca [[A]]*, align 8 // CHECK: [[ACTIVE:%.*]] = alloca i1 // CHECK: [[NEW:%.*]] = call i8* @_Znwm(i64 8) @@ -178,7 +178,7 @@ namespace test2 { }; A *a() { - // CHECK: define [[A:%.*]]* @_ZN5test21aEv() + // CHECK: define dso_local [[A:%.*]]* @_ZN5test21aEv() // CHECK: [[NEW:%.*]] = call i8* @_ZN5test21AnwEm(i64 8) // CHECK-NEXT: [[CAST:%.*]] = bitcast i8* [[NEW]] to [[A]]* // CHECK-NEXT: invoke void @_ZN5test21AC1Ei([[A]]* [[CAST]], i32 5) @@ -205,7 +205,7 @@ namespace test3 { A makeA(), *makeAPtr(); A *a() { - // CHECK: define [[A:%.*]]* @_ZN5test31aEv() + // CHECK: define dso_local [[A:%.*]]* @_ZN5test31aEv() // CHECK: [[FOO:%.*]] = call i8* @_ZN5test33fooEv() // CHECK: [[BAR:%.*]] = call double @_ZN5test33barEv() // CHECK: [[NEW:%.*]] = call i8* @_ZN5test31AnwEmPvd(i64 8, i8* [[FOO]], double [[BAR]]) @@ -223,7 +223,7 @@ namespace test3 { // rdar://problem/8439196 A *b(bool cond) { - // CHECK: define [[A:%.*]]* @_ZN5test31bEb(i1 zeroext + // CHECK: define dso_local [[A:%.*]]* @_ZN5test31bEb(i1 zeroext // CHECK: [[SAVED0:%.*]] = alloca i8* // CHECK-NEXT: [[SAVED1:%.*]] = alloca i8* // CHECK-NEXT: [[CLEANUPACTIVE:%.*]] = alloca i1 @@ -273,7 +273,7 @@ namespace test4 { }; A *a() { - // CHECK: define [[A:%.*]]* @_ZN5test41aEv() + // CHECK: define dso_local [[A:%.*]]* @_ZN5test41aEv() // CHECK: [[FOO:%.*]] = call i8* @_ZN5test43fooEv() // CHECK-NEXT: [[BAR:%.*]] = call i8* @_ZN5test43barEv() // CHECK-NEXT: [[NEW:%.*]] = call i8* @_ZN5test41AnwEmPvS1_(i64 8, i8* [[FOO]], i8* [[BAR]]) @@ -297,7 +297,7 @@ namespace test5 { void foo(); - // CHECK-LABEL: define void @_ZN5test54testEv() + // CHECK-LABEL: define dso_local void @_ZN5test54testEv() // CHECK: [[EXNSLOT:%.*]] = alloca i8* // CHECK-NEXT: [[SELECTORSLOT:%.*]] = alloca i32 // CHECK-NEXT: [[A:%.*]] = alloca [[A_T:%.*]], align 1 @@ -349,7 +349,7 @@ namespace test7 { }; B *test() { - // CHECK: define [[B:%.*]]* @_ZN5test74testEv() + // CHECK: define dso_local [[B:%.*]]* @_ZN5test74testEv() // CHECK: [[OUTER_NEW:%.*]] = alloca i1 // CHECK-NEXT: alloca [[A:%.*]], // CHECK-NEXT: alloca i8* @@ -439,7 +439,7 @@ namespace test8 { void test() { throw makeA(); } - // CHECK-LABEL: define void @_ZN5test84testEv + // CHECK-LABEL: define dso_local void @_ZN5test84testEv } // Make sure we generate the correct code for the delete[] call which @@ -454,7 +454,7 @@ namespace test9 { A* test() { return new A[10]; } - // CHECK: define {{%.*}}* @_ZN5test94testEv + // CHECK: define dso_local {{%.*}}* @_ZN5test94testEv // CHECK: [[TEST9_NEW:%.*]] = call i8* @_Znam // CHECK: call void @_ZdaPv(i8* [[TEST9_NEW]]) } @@ -468,14 +468,14 @@ namespace test10 { struct A { ~A(); }; A::~A() try { cleanup(); } catch (...) { return; } - // CHECK-LABEL: define void @_ZN6test101AD1Ev( + // CHECK-LABEL: define dso_local void @_ZN6test101AD1Ev( // CHECK: invoke void @_ZN6test107cleanupEv() // CHECK-NOT: rethrow // CHECK: ret void struct B { ~B(); }; B::~B() try { cleanup(); } catch (...) {} - // CHECK-LABEL: define void @_ZN6test101BD1Ev( + // CHECK-LABEL: define dso_local void @_ZN6test101BD1Ev( // CHECK: invoke void @_ZN6test107cleanupEv() // CHECK: call i8* @__cxa_begin_catch // CHECK-NEXT: invoke void @__cxa_rethrow() @@ -483,7 +483,7 @@ namespace test10 { struct C { ~C(); }; C::~C() try { cleanup(); } catch (...) { if (suppress) return; } - // CHECK-LABEL: define void @_ZN6test101CD1Ev( + // CHECK-LABEL: define dso_local void @_ZN6test101CD1Ev( // CHECK: invoke void @_ZN6test107cleanupEv() // CHECK: call i8* @__cxa_begin_catch // CHECK-NEXT: load i8, i8* @_ZN6test108suppressE, align 1 @@ -517,7 +517,7 @@ namespace test11 { C::C() { throw 0; } - // CHECK-LABEL: define void @_ZN6test111CC2Ev( + // CHECK-LABEL: define dso_local void @_ZN6test111CC2Ev( // CHECK: [[THIS:%.*]] = load [[C:%.*]]*, [[C:%.*]]** {{%.*}} // Construct single. // CHECK-NEXT: [[SINGLE:%.*]] = getelementptr inbounds [[C]], [[C]]* [[THIS]], i32 0, i32 0 diff --git a/clang/test/CodeGenCXX/explicit-instantiation.cpp b/clang/test/CodeGenCXX/explicit-instantiation.cpp index 07c5f7265acd..8f8b941f670d 100644 --- a/clang/test/CodeGenCXX/explicit-instantiation.cpp +++ b/clang/test/CodeGenCXX/explicit-instantiation.cpp @@ -3,7 +3,7 @@ // RUN: %clang_cc1 -emit-llvm -triple i686-pc-win32 -std=c++1y -o - %s | FileCheck %s --check-prefix=CHECK-MS // This check logically is attached to 'template int S<int>::i;' below. -// CHECK: @_ZN1SIiE1iE = weak_odr global i32 +// CHECK: @_ZN1SIiE1iE = weak_odr dso_local global i32 // This check is logically attached to 'template int ExportedStaticLocal::f<int>()' below. // CHECK-OPT: @_ZZN19ExportedStaticLocal1fIiEEvvE1i = linkonce_odr global @@ -18,7 +18,7 @@ Result plus<T, U, Result>::operator()(const T& t, const U& u) const { return t + u; } -// CHECK-LABEL: define weak_odr i32 @_ZNK4plusIillEclERKiRKl +// CHECK-LABEL: define weak_odr dso_local i32 @_ZNK4plusIillEclERKiRKl template struct plus<int, long, long>; namespace EarlyInstantiation { @@ -38,10 +38,10 @@ namespace EarlyInstantiation { constexpr int c = S<int>().constexpr_function(); int d = S<int>().deduced_return_type(); - // CHECK: define weak_odr i32 @_ZN18EarlyInstantiation1SIcE18constexpr_functionEv( - // CHECK: define weak_odr i32 @_ZN18EarlyInstantiation1SIcE19deduced_return_typeEv( - // CHECK: define weak_odr i32 @_ZN18EarlyInstantiation1SIiE18constexpr_functionEv( - // CHECK: define weak_odr i32 @_ZN18EarlyInstantiation1SIiE19deduced_return_typeEv( + // CHECK: define weak_odr dso_local i32 @_ZN18EarlyInstantiation1SIcE18constexpr_functionEv( + // CHECK: define weak_odr dso_local i32 @_ZN18EarlyInstantiation1SIcE19deduced_return_typeEv( + // CHECK: define weak_odr dso_local i32 @_ZN18EarlyInstantiation1SIiE18constexpr_functionEv( + // CHECK: define weak_odr dso_local i32 @_ZN18EarlyInstantiation1SIiE19deduced_return_typeEv( template struct S<char>; template struct S<int>; @@ -59,9 +59,9 @@ namespace EarlyInstantiation { int h = deduced_return_type<int>(); // The FIXMEs below are for PR19551. - // CHECK: define weak_odr i32 @_ZN18EarlyInstantiation18constexpr_functionIcEEiv( + // CHECK: define weak_odr dso_local i32 @_ZN18EarlyInstantiation18constexpr_functionIcEEiv( // FIXME: define weak_odr i32 @_ZN18EarlyInstantiation19deduced_return_typeIcEEiv( - // CHECK: define weak_odr i32 @_ZN18EarlyInstantiation18constexpr_functionIiEEiv( + // CHECK: define weak_odr dso_local i32 @_ZN18EarlyInstantiation18constexpr_functionIiEEiv( // FIXME: define weak_odr i32 @_ZN18EarlyInstantiation19deduced_return_typeIiEEiv( template int constexpr_function<char>(); // FIXME template auto deduced_return_type<char>(); @@ -86,8 +86,8 @@ namespace LateInstantiation { // Check that we declare, define, or provide an available-externally // definition as appropriate. - // CHECK: define linkonce_odr i32 @_ZN17LateInstantiation1SIcE1fEv( - // CHECK: define linkonce_odr i32 @_ZN17LateInstantiation1fIcEEiv( + // CHECK: define linkonce_odr dso_local i32 @_ZN17LateInstantiation1SIcE1fEv( + // CHECK: define linkonce_odr dso_local i32 @_ZN17LateInstantiation1fIcEEiv( // CHECK-NO-OPT: declare i32 @_ZN17LateInstantiation1SIiE1fEv( // CHECK-NO-OPT: declare i32 @_ZN17LateInstantiation1fIiEEiv( // CHECK-OPT: define available_externally i32 @_ZN17LateInstantiation1SIiE1fEv( @@ -100,7 +100,7 @@ namespace PR21718 { // same function twice. template <typename T> struct S { -// CHECK-LABEL: define weak_odr i32 @_ZN7PR217181SIiE1fEv +// CHECK-LABEL: define weak_odr dso_local i32 @_ZN7PR217181SIiE1fEv __attribute__((used)) constexpr int f() { return 0; } }; int g() { return S<int>().f(); } @@ -118,7 +118,7 @@ namespace NestedClasses { // Explicit instantiation definition of Outer causes explicit instantiation // definition of Inner. template struct Outer<int>; - // CHECK: define weak_odr void @_ZN13NestedClasses5OuterIiE5Inner1fEv + // CHECK: define weak_odr dso_local void @_ZN13NestedClasses5OuterIiE5Inner1fEv // CHECK-MS: define weak_odr dso_local x86_thiscallcc void @"?f@Inner@?$Outer@H@NestedClasses@@QAEXXZ" // Explicit instantiation declaration of Outer causes explicit instantiation @@ -140,16 +140,16 @@ template <typename T> struct S { }; }; -// CHECK-LABEL: define weak_odr void @_ZN1SIiE1fEv +// CHECK-LABEL: define weak_odr dso_local void @_ZN1SIiE1fEv template void S<int>::f(); -// CHECK-LABEL: define weak_odr void @_ZN1SIiE1gEv +// CHECK-LABEL: define weak_odr dso_local void @_ZN1SIiE1gEv template void S<int>::g(); // See the check line at the top of the file. template int S<int>::i; -// CHECK-LABEL: define weak_odr void @_ZN1SIiE2S21hEv +// CHECK-LABEL: define weak_odr dso_local void @_ZN1SIiE2S21hEv template void S<int>::S2::h(); template <typename T> void S<T>::f() {} diff --git a/clang/test/CodeGenCXX/extern-section-attribute.cpp b/clang/test/CodeGenCXX/extern-section-attribute.cpp index fa0227e6fe1a..3c04d0e3973d 100644 --- a/clang/test/CodeGenCXX/extern-section-attribute.cpp +++ b/clang/test/CodeGenCXX/extern-section-attribute.cpp @@ -4,7 +4,7 @@ extern int aa __attribute__((section(".sdata"))); // CHECK-DAG: @aa = external global i32, section ".sdata", align 4 extern int bb __attribute__((section(".sdata"))) = 1; -// CHECK-DAG: @bb = global i32 1, section ".sdata", align 4 +// CHECK-DAG: @bb = dso_local global i32 1, section ".sdata", align 4 int foo() { return aa + bb; diff --git a/clang/test/CodeGenCXX/fastcall.cpp b/clang/test/CodeGenCXX/fastcall.cpp index 0820324558ee..8f0ad5aad75b 100644 --- a/clang/test/CodeGenCXX/fastcall.cpp +++ b/clang/test/CodeGenCXX/fastcall.cpp @@ -2,7 +2,7 @@ void __attribute__((fastcall)) foo1(int &y); void bar1(int &y) { - // CHECK-LABEL: define void @_Z4bar1Ri + // CHECK-LABEL: define dso_local void @_Z4bar1Ri // CHECK: call x86_fastcallcc void @_Z4foo1Ri(i32* inreg dereferenceable({{[0-9]+}}) % foo1(y); } @@ -14,7 +14,7 @@ struct S1 { void __attribute__((fastcall)) foo2(S1 a, int b); void bar2(S1 a, int b) { - // CHECK-LABEL: define void @_Z4bar22S1i + // CHECK-LABEL: define dso_local void @_Z4bar22S1i // CHECK: call x86_fastcallcc void @_Z4foo22S1i(%struct.S1* inreg %{{.*}}, i32 inreg % foo2(a, b); } diff --git a/clang/test/CodeGenCXX/flatten.cpp b/clang/test/CodeGenCXX/flatten.cpp index b36c8ed6cee9..c0e32830c21b 100644 --- a/clang/test/CodeGenCXX/flatten.cpp +++ b/clang/test/CodeGenCXX/flatten.cpp @@ -7,7 +7,7 @@ void f(void) {} [[gnu::flatten]] -// CHECK: define void @_Z1gv() +// CHECK: define dso_local void @_Z1gv() void g(void) { // CHECK-NOT: call {{.*}} @_Z1fv f(); diff --git a/clang/test/CodeGenCXX/float128-declarations.cpp b/clang/test/CodeGenCXX/float128-declarations.cpp index 61d4531f997c..751392c6f10c 100644 --- a/clang/test/CodeGenCXX/float128-declarations.cpp +++ b/clang/test/CodeGenCXX/float128-declarations.cpp @@ -85,14 +85,14 @@ int main(void) { // CHECK-DAG: @_ZN12_GLOBAL__N_15arr1nE = internal global [10 x fp128] // CHECK-DAG: @_ZN12_GLOBAL__N_15arr2nE = internal global [3 x fp128] [fp128 0xL33333333333333333FFF333333333333, fp128 0xL00000000000000004000800000000000, fp128 0xL00000000000000004025176592E00000] // CHECK-DAG: define internal fp128 @_ZN12_GLOBAL__N_16func1nERKu9__ieee128(fp128* -// CHECK-DAG: @f1f = global fp128 0xL00000000000000000000000000000000 -// CHECK-DAG: @f2f = global fp128 0xL33333333333333334004033333333333 -// CHECK-DAG: @arr1f = global [10 x fp128] -// CHECK-DAG: @arr2f = global [3 x fp128] [fp128 0xL3333333333333333BFFF333333333333, fp128 0xL0000000000000000C000800000000000, fp128 0xL0000000000000000C025176592E00000] +// CHECK-DAG: @f1f = dso_local global fp128 0xL00000000000000000000000000000000 +// CHECK-DAG: @f2f = dso_local global fp128 0xL33333333333333334004033333333333 +// CHECK-DAG: @arr1f = dso_local global [10 x fp128] +// CHECK-DAG: @arr2f = dso_local global [3 x fp128] [fp128 0xL3333333333333333BFFF333333333333, fp128 0xL0000000000000000C000800000000000, fp128 0xL0000000000000000C025176592E00000] // CHECK-DAG: declare fp128 @_Z6func1fu9__ieee128(fp128) -// CHECK-DAG: define linkonce_odr void @_ZN2C1C2Eu9__ieee128(%class.C1* %this, fp128 %arg) -// CHECK-DAG: define linkonce_odr fp128 @_ZN2C16func2cEu9__ieee128(fp128 %arg) -// CHECK-DAG: define linkonce_odr fp128 @_Z6func1tIu9__ieee128ET_S0_(fp128 %arg) +// CHECK-DAG: define linkonce_odr dso_local void @_ZN2C1C2Eu9__ieee128(%class.C1* %this, fp128 %arg) +// CHECK-DAG: define linkonce_odr dso_local fp128 @_ZN2C16func2cEu9__ieee128(fp128 %arg) +// CHECK-DAG: define linkonce_odr dso_local fp128 @_Z6func1tIu9__ieee128ET_S0_(fp128 %arg) // CHECK-DAG: @__const.main.s1 = private unnamed_addr constant %struct.S1 { fp128 0xL00000000000000004006080000000000 } // CHECK-DAG: store fp128 0xLF0AFD0EBFF292DCE42E0B38CDD83F26F, fp128* %f1l, align 16 // CHECK-DAG: store fp128 0xL00000000000000008000000000000000, fp128* %f2l, align 16 @@ -107,14 +107,14 @@ int main(void) { // CHECK-X86-DAG: @_ZN12_GLOBAL__N_15arr1nE = internal global [10 x fp128] // CHECK-X86-DAG: @_ZN12_GLOBAL__N_15arr2nE = internal global [3 x fp128] [fp128 0xL33333333333333333FFF333333333333, fp128 0xL00000000000000004000800000000000, fp128 0xL00000000000000004025176592E00000] // CHECK-X86-DAG: define internal fp128 @_ZN12_GLOBAL__N_16func1nERKg(fp128* -// CHECK-X86-DAG: @f1f = global fp128 0xL00000000000000000000000000000000 -// CHECK-X86-DAG: @f2f = global fp128 0xL33333333333333334004033333333333 -// CHECK-X86-DAG: @arr1f = global [10 x fp128] -// CHECK-X86-DAG: @arr2f = global [3 x fp128] [fp128 0xL3333333333333333BFFF333333333333, fp128 0xL0000000000000000C000800000000000, fp128 0xL0000000000000000C025176592E00000] +// CHECK-X86-DAG: @f1f = dso_local global fp128 0xL00000000000000000000000000000000 +// CHECK-X86-DAG: @f2f = dso_local global fp128 0xL33333333333333334004033333333333 +// CHECK-X86-DAG: @arr1f = dso_local global [10 x fp128] +// CHECK-X86-DAG: @arr2f = dso_local global [3 x fp128] [fp128 0xL3333333333333333BFFF333333333333, fp128 0xL0000000000000000C000800000000000, fp128 0xL0000000000000000C025176592E00000] // CHECK-X86-DAG: declare fp128 @_Z6func1fg(fp128) -// CHECK-X86-DAG: define linkonce_odr void @_ZN2C1C2Eg(%class.C1* %this, fp128 %arg) -// CHECK-X86-DAG: define linkonce_odr fp128 @_ZN2C16func2cEg(fp128 %arg) -// CHECK-X86-DAG: define linkonce_odr fp128 @_Z6func1tIgET_S0_(fp128 %arg) +// CHECK-X86-DAG: define linkonce_odr dso_local void @_ZN2C1C2Eg(%class.C1* %this, fp128 %arg) +// CHECK-X86-DAG: define linkonce_odr dso_local fp128 @_ZN2C16func2cEg(fp128 %arg) +// CHECK-X86-DAG: define linkonce_odr dso_local fp128 @_Z6func1tIgET_S0_(fp128 %arg) // CHECK-X86-DAG: @__const.main.s1 = private unnamed_addr constant %struct.S1 { fp128 0xL00000000000000004006080000000000 } // CHECK-X86-DAG: store fp128 0xLF0AFD0EBFF292DCE42E0B38CDD83F26F, fp128* %f1l, align 16 // CHECK-X86-DAG: store fp128 0xL00000000000000008000000000000000, fp128* %f2l, align 16 diff --git a/clang/test/CodeGenCXX/fp16-mangle.cpp b/clang/test/CodeGenCXX/fp16-mangle.cpp index 5827fd549dc2..e798b576b479 100644 --- a/clang/test/CodeGenCXX/fp16-mangle.cpp +++ b/clang/test/CodeGenCXX/fp16-mangle.cpp @@ -1,12 +1,12 @@ // RUN: %clang_cc1 -emit-llvm -o - -triple arm-none-linux-gnueabi %s | FileCheck %s -// CHECK: @_ZN1SIDhDhE1iE = global i32 3 +// CHECK: @_ZN1SIDhDhE1iE = dso_local global i32 3 template <typename T, typename U> struct S { static int i; }; template <> int S<__fp16, __fp16>::i = 3; -// CHECK-LABEL: define void @_Z1fPDh(half* %x) +// CHECK-LABEL: define dso_local void @_Z1fPDh(half* %x) void f (__fp16 *x) { } -// CHECK-LABEL: define void @_Z1gPDhS_(half* %x, half* %y) +// CHECK-LABEL: define dso_local void @_Z1gPDhS_(half* %x, half* %y) void g (__fp16 *x, __fp16 *y) { } diff --git a/clang/test/CodeGenCXX/global-dtor-no-atexit.cpp b/clang/test/CodeGenCXX/global-dtor-no-atexit.cpp index 862194126ba8..54e143385135 100644 --- a/clang/test/CodeGenCXX/global-dtor-no-atexit.cpp +++ b/clang/test/CodeGenCXX/global-dtor-no-atexit.cpp @@ -22,7 +22,7 @@ public: A a, b; // PR9593 -// CHECK-LABEL: define void @_Z4funcv() +// CHECK-LABEL: define dso_local void @_Z4funcv() // CHECK: call i32 @__cxa_guard_acquire(i64* @_ZGVZ4funcvE2a1) // CHECK: call void @_ZN1AC1Ev([[A]]* @_ZZ4funcvE2a1) // CHECK-NEXT: call i32 @atexit(void ()* @__dtor__ZZ4funcvE2a1) diff --git a/clang/test/CodeGenCXX/homogeneous-aggregates.cpp b/clang/test/CodeGenCXX/homogeneous-aggregates.cpp index 05fb7f1d20a4..bcefd50eff41 100644 --- a/clang/test/CodeGenCXX/homogeneous-aggregates.cpp +++ b/clang/test/CodeGenCXX/homogeneous-aggregates.cpp @@ -38,36 +38,36 @@ struct I2 : Base2 {}; struct I3 : Base2 {}; struct D5 : I1, I2, I3 {}; // homogeneous aggregate -// PPC: define void @_Z7func_D12D1(%struct.D1* noalias sret %agg.result, [3 x i64] %x.coerce) -// ARM32: define arm_aapcs_vfpcc void @_Z7func_D12D1(%struct.D1* noalias sret %agg.result, [3 x i64] %x.coerce) -// ARM64: define void @_Z7func_D12D1(%struct.D1* noalias sret %agg.result, %struct.D1* %x) +// PPC: define dso_local void @_Z7func_D12D1(%struct.D1* noalias sret %agg.result, [3 x i64] %x.coerce) +// ARM32: define dso_local arm_aapcs_vfpcc void @_Z7func_D12D1(%struct.D1* noalias sret %agg.result, [3 x i64] %x.coerce) +// ARM64: define dso_local void @_Z7func_D12D1(%struct.D1* noalias sret %agg.result, %struct.D1* %x) // X64: define dso_local x86_vectorcallcc void @"\01_Z7func_D12D1@@24"(%struct.D1* noalias sret %agg.result, %struct.D1* %x) D1 CC func_D1(D1 x) { return x; } -// PPC: define [3 x double] @_Z7func_D22D2([3 x double] %x.coerce) -// ARM32: define arm_aapcs_vfpcc %struct.D2 @_Z7func_D22D2(%struct.D2 %x.coerce) -// ARM64: define %struct.D2 @_Z7func_D22D2([3 x double] %x.coerce) +// PPC: define dso_local [3 x double] @_Z7func_D22D2([3 x double] %x.coerce) +// ARM32: define dso_local arm_aapcs_vfpcc %struct.D2 @_Z7func_D22D2(%struct.D2 %x.coerce) +// ARM64: define dso_local %struct.D2 @_Z7func_D22D2([3 x double] %x.coerce) // X64: define dso_local x86_vectorcallcc %struct.D2 @"\01_Z7func_D22D2@@24"(%struct.D2 inreg %x.coerce) D2 CC func_D2(D2 x) { return x; } -// PPC: define void @_Z7func_D32D3(%struct.D3* noalias sret %agg.result, [4 x i64] %x.coerce) -// ARM32: define arm_aapcs_vfpcc void @_Z7func_D32D3(%struct.D3* noalias sret %agg.result, [4 x i64] %x.coerce) -// ARM64: define void @_Z7func_D32D3(%struct.D3* noalias sret %agg.result, %struct.D3* %x) +// PPC: define dso_local void @_Z7func_D32D3(%struct.D3* noalias sret %agg.result, [4 x i64] %x.coerce) +// ARM32: define dso_local arm_aapcs_vfpcc void @_Z7func_D32D3(%struct.D3* noalias sret %agg.result, [4 x i64] %x.coerce) +// ARM64: define dso_local void @_Z7func_D32D3(%struct.D3* noalias sret %agg.result, %struct.D3* %x) D3 CC func_D3(D3 x) { return x; } -// PPC: define [4 x double] @_Z7func_D42D4([4 x double] %x.coerce) -// ARM32: define arm_aapcs_vfpcc %struct.D4 @_Z7func_D42D4(%struct.D4 %x.coerce) -// ARM64: define %struct.D4 @_Z7func_D42D4([4 x double] %x.coerce) +// PPC: define dso_local [4 x double] @_Z7func_D42D4([4 x double] %x.coerce) +// ARM32: define dso_local arm_aapcs_vfpcc %struct.D4 @_Z7func_D42D4(%struct.D4 %x.coerce) +// ARM64: define dso_local %struct.D4 @_Z7func_D42D4([4 x double] %x.coerce) D4 CC func_D4(D4 x) { return x; } D5 CC func_D5(D5 x) { return x; } -// PPC: define [3 x double] @_Z7func_D52D5([3 x double] %x.coerce) -// ARM32: define arm_aapcs_vfpcc %struct.D5 @_Z7func_D52D5(%struct.D5 %x.coerce) +// PPC: define dso_local [3 x double] @_Z7func_D52D5([3 x double] %x.coerce) +// ARM32: define dso_local arm_aapcs_vfpcc %struct.D5 @_Z7func_D52D5(%struct.D5 %x.coerce) // The C++ multiple inheritance expansion case is a little more complicated, so // do some extra checking. // -// ARM64-LABEL: define %struct.D5 @_Z7func_D52D5([3 x double] %x.coerce) +// ARM64-LABEL: define dso_local %struct.D5 @_Z7func_D52D5([3 x double] %x.coerce) // ARM64: bitcast %struct.D5* %{{.*}} to [3 x double]* // ARM64: store [3 x double] %x.coerce, [3 x double]* @@ -77,7 +77,7 @@ void call_D5(D5 *p) { // Check the call site. // -// ARM64-LABEL: define void @_Z7call_D5P2D5(%struct.D5* %p) +// ARM64-LABEL: define dso_local void @_Z7call_D5P2D5(%struct.D5* %p) // ARM64: load [3 x double], [3 x double]* // ARM64: call %struct.D5 @_Z7func_D52D5([3 x double] %{{.*}}) @@ -86,9 +86,9 @@ struct Float1 { float x; }; struct Float2 { float y; }; struct HVAWithEmptyBase : Float1, Empty, Float2 { float z; }; -// PPC: define void @_Z15with_empty_base16HVAWithEmptyBase([3 x float] %a.coerce) -// ARM64: define void @_Z15with_empty_base16HVAWithEmptyBase([3 x float] %a.coerce) -// ARM32: define arm_aapcs_vfpcc void @_Z15with_empty_base16HVAWithEmptyBase(%struct.HVAWithEmptyBase %a.coerce) +// PPC: define dso_local void @_Z15with_empty_base16HVAWithEmptyBase([3 x float] %a.coerce) +// ARM64: define dso_local void @_Z15with_empty_base16HVAWithEmptyBase([3 x float] %a.coerce) +// ARM32: define dso_local arm_aapcs_vfpcc void @_Z15with_empty_base16HVAWithEmptyBase(%struct.HVAWithEmptyBase %a.coerce) void CC with_empty_base(HVAWithEmptyBase a) {} // FIXME: MSVC doesn't consider this an HVA because of the empty base. @@ -99,8 +99,8 @@ struct HVAWithEmptyBitField : Float1, Float2 { float z; }; -// PPC: define void @_Z19with_empty_bitfield20HVAWithEmptyBitField([3 x float] %a.coerce) -// ARM64: define void @_Z19with_empty_bitfield20HVAWithEmptyBitField([3 x float] %a.coerce) -// ARM32: define arm_aapcs_vfpcc void @_Z19with_empty_bitfield20HVAWithEmptyBitField(%struct.HVAWithEmptyBitField %a.coerce) +// PPC: define dso_local void @_Z19with_empty_bitfield20HVAWithEmptyBitField([3 x float] %a.coerce) +// ARM64: define dso_local void @_Z19with_empty_bitfield20HVAWithEmptyBitField([3 x float] %a.coerce) +// ARM32: define dso_local arm_aapcs_vfpcc void @_Z19with_empty_bitfield20HVAWithEmptyBitField(%struct.HVAWithEmptyBitField %a.coerce) // X64: define dso_local x86_vectorcallcc void @"\01_Z19with_empty_bitfield20HVAWithEmptyBitField@@16"(%struct.HVAWithEmptyBitField inreg %a.coerce) void CC with_empty_bitfield(HVAWithEmptyBitField a) {} diff --git a/clang/test/CodeGenCXX/implicit-record-visibility.cpp b/clang/test/CodeGenCXX/implicit-record-visibility.cpp index 701a2031edf5..9029360a8c25 100644 --- a/clang/test/CodeGenCXX/implicit-record-visibility.cpp +++ b/clang/test/CodeGenCXX/implicit-record-visibility.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -I%S -fvisibility hidden -triple x86_64-linux-gnu -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -I%S -fvisibility hidden -triple x86_64-linux-gnu -emit-llvm -o - -fsemantic-interposition | FileCheck %s #include <stdarg.h> #include <typeinfo> diff --git a/clang/test/CodeGenCXX/inheriting-constructor.cpp b/clang/test/CodeGenCXX/inheriting-constructor.cpp index 2614a8075912..d2bf414e9b89 100644 --- a/clang/test/CodeGenCXX/inheriting-constructor.cpp +++ b/clang/test/CodeGenCXX/inheriting-constructor.cpp @@ -15,16 +15,16 @@ struct C { template<typename T> C(T); }; struct D : C { using C::C; }; D d(123); -// ITANIUM-LABEL: define void @_ZN1BD2Ev -// ITANIUM-LABEL: define void @_ZN1BD1Ev -// ITANIUM-LABEL: define void @_ZN1BD0Ev +// ITANIUM-LABEL: define dso_local void @_ZN1BD2Ev +// ITANIUM-LABEL: define dso_local void @_ZN1BD1Ev +// ITANIUM-LABEL: define dso_local void @_ZN1BD0Ev // WIN32-LABEL: define {{.*}}void @"??1B@@UAE@XZ" // WIN64-LABEL: define {{.*}}void @"??1B@@UEAA@XZ" -// ITANIUM-LABEL: define linkonce_odr void @_ZN1BCI11AEi( +// ITANIUM-LABEL: define linkonce_odr dso_local void @_ZN1BCI11AEi( // ITANIUM: call void @_ZN1BCI21AEi( -// ITANIUM-LABEL: define linkonce_odr void @_ZN1DCI11CIiEET_( +// ITANIUM-LABEL: define linkonce_odr dso_local void @_ZN1DCI11CIiEET_( // ITANIUM: call void @_ZN1DCI21CIiEET_( // WIN32-LABEL: define internal {{.*}} @"??0B@@QAE@H@Z"( @@ -51,7 +51,7 @@ namespace noninline_nonvirt { // ITANIUM: call i32 @__cxa_atexit( // Complete object ctor for B delegates to base object ctor. - // ITANIUM-LABEL: define linkonce_odr void @_ZN17noninline_nonvirt1BCI1NS_1AEEiO1QPvU17pass_object_size0( + // ITANIUM-LABEL: define linkonce_odr dso_local void @_ZN17noninline_nonvirt1BCI1NS_1AEEiO1QPvU17pass_object_size0( // ITANIUM: call void @_ZN17noninline_nonvirt1BCI2NS_1AEEiO1QPvU17pass_object_size0({{.*}}, i32 {{.*}}, %{{.*}}* {{.*}}, i8* {{.*}}, i{{32|64}} {{.*}}) // In MSABI, we don't have ctor variants. B ctor forwards to A ctor. @@ -63,7 +63,7 @@ namespace noninline_nonvirt { struct C : B { using B::B; }; C c(1, 2, &c); // Complete object ctor for C delegates. - // ITANIUM-LABEL: define linkonce_odr void @_ZN17noninline_nonvirt1CCI1NS_1AEEiO1QPvU17pass_object_size0( + // ITANIUM-LABEL: define linkonce_odr dso_local void @_ZN17noninline_nonvirt1CCI1NS_1AEEiO1QPvU17pass_object_size0( // ITANIUM: call void @_ZN17noninline_nonvirt1CCI2NS_1AEEiO1QPvU17pass_object_size0({{.*}}, i32 {{.*}}, %{{.*}}* {{.*}}, i8* {{.*}}, i{{32|64}} {{.*}}) // MSABI-LABEL: define internal {{.*}} @"??0C@noninline_nonvirt@@Q{{AE|EAA}}@H$$Q{{E?}}AUQ@@P{{E?}}AXW4__pass_object_size0@__clang@@@Z"(%{{.*}}, i32{{.*}}, %{{.*}}, i8*{{.*}}, i{{32|64}}{{.*}}) @@ -75,7 +75,7 @@ namespace noninline_virt { struct B : Z, virtual A { Z z; using A::A; }; B b(1, 2, &b); // Complete object ctor forwards to A ctor then constructs Zs. - // ITANIUM-LABEL: define linkonce_odr void @_ZN14noninline_virt1BCI1NS_1AEEiO1QPvU17pass_object_size0( + // ITANIUM-LABEL: define linkonce_odr dso_local void @_ZN14noninline_virt1BCI1NS_1AEEiO1QPvU17pass_object_size0( // ITANIUM: call void @_ZN14noninline_virt1AC2EiO1QPvU17pass_object_size0({{.*}} %{{.*}}, i32 %{{.*}}, %{{.*}}* {{.*}}, i8* {{.*}}, i{{32|64}} %{{.*}} // ITANIUM: call void @_ZN1ZC2Ev( // ITANIUM: store {{.*}} @_ZTVN14noninline_virt1BE @@ -115,7 +115,7 @@ namespace inalloca_nonvirt { struct B : Z, A { Z z; using A::A; }; B b(1, 2, 3, 4); // No inlining implied for Itanium. - // ITANIUM-LABEL: define linkonce_odr void @_ZN16inalloca_nonvirt1BCI1NS_1AEE1QiS1_OS1_( + // ITANIUM-LABEL: define linkonce_odr dso_local void @_ZN16inalloca_nonvirt1BCI1NS_1AEE1QiS1_OS1_( // ITANIUM: call void @_ZN16inalloca_nonvirt1BCI2NS_1AEE1QiS1_OS1_( // MSABI-LABEL: define internal void @"??__Eb@inalloca_nonvirt@@YAXXZ"( @@ -243,7 +243,7 @@ namespace inalloca_virt { struct C : B { using B::B; }; C c(1, 2, 3, 4); - // ITANIUM-LABEL: define linkonce_odr void @_ZN13inalloca_virt1CD1Ev( + // ITANIUM-LABEL: define linkonce_odr dso_local void @_ZN13inalloca_virt1CD1Ev( // MSABI-LABEL: define internal void @"??__Ec@inalloca_virt@@YAXXZ"( @@ -370,7 +370,7 @@ namespace inline_virt { // ITANIUM: call void @_ZN1QD1Ev( // B base object inheriting constructor does not get passed arguments. - // ITANIUM-LABEL: define linkonce_odr void @_ZN11inline_virt1BCI2NS_1AEE1QiS1_OS1_z( + // ITANIUM-LABEL: define linkonce_odr dso_local void @_ZN11inline_virt1BCI2NS_1AEE1QiS1_OS1_z( // ITANIUM-NOT: call // ITANIUM: call void @_ZN1ZC2Ev( // ITANIUM-NOT: call @@ -382,13 +382,13 @@ namespace inline_virt { // ITANIUM: } } -// ITANIUM-LABEL: define linkonce_odr void @_ZN1BCI21AEi( +// ITANIUM-LABEL: define linkonce_odr dso_local void @_ZN1BCI21AEi( // ITANIUM: call void @_ZN1AC2Ei( -// ITANIUM-LABEL: define linkonce_odr void @_ZN1DCI21CIiEET_( +// ITANIUM-LABEL: define linkonce_odr dso_local void @_ZN1DCI21CIiEET_( // ITANIUM: call void @_ZN1CC2IiEET_( -// ITANIUM-LABEL: define linkonce_odr void @_ZN17noninline_nonvirt1BCI2NS_1AEEiO1QPvU17pass_object_size0( +// ITANIUM-LABEL: define linkonce_odr dso_local void @_ZN17noninline_nonvirt1BCI2NS_1AEEiO1QPvU17pass_object_size0( // ITANIUM: call void @_ZN1ZC2Ev( // ITANIUM: call void @_ZN17noninline_nonvirt1AC2EiO1QPvU17pass_object_size0( diff --git a/clang/test/CodeGenCXX/init-invariant.cpp b/clang/test/CodeGenCXX/init-invariant.cpp index 82a664922243..3af9fe5f57c6 100644 --- a/clang/test/CodeGenCXX/init-invariant.cpp +++ b/clang/test/CodeGenCXX/init-invariant.cpp @@ -13,7 +13,7 @@ struct A { int n; }; -// CHECK: @a = global {{.*}} zeroinitializer +// CHECK: @a = dso_local global {{.*}} zeroinitializer extern const A a = A(); struct B { @@ -21,7 +21,7 @@ struct B { mutable int n; }; -// CHECK: @b = global {{.*}} zeroinitializer +// CHECK: @b = dso_local global {{.*}} zeroinitializer extern const B b = B(); struct C { @@ -30,11 +30,11 @@ struct C { int n; }; -// CHECK: @c = global {{.*}} zeroinitializer +// CHECK: @c = dso_local global {{.*}} zeroinitializer extern const C c = C(); int f(); -// CHECK: @d = global i32 0 +// CHECK: @d = dso_local global i32 0 extern const int d = f(); void e() { @@ -54,7 +54,7 @@ void e() { // CHECK: store {{.*}}, i32* @d // CHECK: call {{.*}}@llvm.invariant.start.p0i8(i64 4, i8* bitcast ({{.*}} @d to i8*)) -// CHECK-LABEL: define void @_Z1ev( +// CHECK-LABEL: define dso_local void @_Z1ev( // CHECK: call void @_ZN1AC1Ev(%struct.A* nonnull @_ZZ1evE1a) // CHECK: call {{.*}}@llvm.invariant.start.p0i8(i64 4, i8* {{.*}}bitcast ({{.*}} @_ZZ1evE1a to i8*)) // CHECK-NOT: llvm.invariant.end diff --git a/clang/test/CodeGenCXX/initializer-list-ctor-order.cpp b/clang/test/CodeGenCXX/initializer-list-ctor-order.cpp index 6bb9c1b07b73..99e8784654bf 100644 --- a/clang/test/CodeGenCXX/initializer-list-ctor-order.cpp +++ b/clang/test/CodeGenCXX/initializer-list-ctor-order.cpp @@ -14,7 +14,7 @@ struct A { void foo() { A a{f(), g()}; } -// CHECK-ITANIUM-LABEL: define void @_Z3foov +// CHECK-ITANIUM-LABEL: define dso_local void @_Z3foov // CHECK-MS-LABEL: define dso_local void @"?foo@@YAXXZ" // CHECK: call i32 @f() // CHECK: call i32 @g() @@ -23,7 +23,7 @@ struct B : A { B(); }; B::B() : A{f(), g()} {} -// CHECK-ITANIUM-LABEL: define void @_ZN1BC2Ev +// CHECK-ITANIUM-LABEL: define dso_local void @_ZN1BC2Ev // CHECK-MS-LABEL: define dso_local x86_thiscallcc %struct.B* @"??0B@@QAE@XZ" // CHECK: call i32 @f() // CHECK: call i32 @g() diff --git a/clang/test/CodeGenCXX/invariant.group-for-vptrs.cpp b/clang/test/CodeGenCXX/invariant.group-for-vptrs.cpp index d4f80dde90cd..b459218a8ab2 100644 --- a/clang/test/CodeGenCXX/invariant.group-for-vptrs.cpp +++ b/clang/test/CodeGenCXX/invariant.group-for-vptrs.cpp @@ -8,7 +8,7 @@ struct D : A { void foo(); }; -// CHECK-LABEL: define void @_Z21testExternallyVisiblev() +// CHECK-LABEL: define dso_local void @_Z21testExternallyVisiblev() void testExternallyVisible() { A *a = new A; @@ -37,7 +37,7 @@ struct C : B { } -// CHECK-LABEL: define void @_Z21testInternallyVisibleb( +// CHECK-LABEL: define dso_local void @_Z21testInternallyVisibleb( void testInternallyVisible(bool p) { B *b = new B; // CHECK: = load {{.*}}, !invariant.group ![[MD]] @@ -50,12 +50,12 @@ void testInternallyVisible(bool p) { } // Checking A::A() -// CHECK-LABEL: define linkonce_odr void @_ZN1AC2Ev( +// CHECK-LABEL: define linkonce_odr dso_local void @_ZN1AC2Ev( // CHECK: store {{.*}}, !invariant.group ![[MD]] // CHECK-LABEL: {{^}}} // Checking D::D() -// CHECK-LABEL: define linkonce_odr void @_ZN1DC2Ev( +// CHECK-LABEL: define linkonce_odr dso_local void @_ZN1DC2Ev( // CHECK: = call i8* @llvm.launder.invariant.group.p0i8(i8* // CHECK: call void @_ZN1AC2Ev(%struct.A* // CHECK: store {{.*}} !invariant.group ![[MD]] diff --git a/clang/test/CodeGenCXX/key-function-vtable.cpp b/clang/test/CodeGenCXX/key-function-vtable.cpp index 028017c176ad..137ea4284cb3 100644 --- a/clang/test/CodeGenCXX/key-function-vtable.cpp +++ b/clang/test/CodeGenCXX/key-function-vtable.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-none-linux-gnu %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-none-linux-gnu %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -triple arm-apple-darwin %s -emit-llvm -o - | FileCheck %s // Simple key function test diff --git a/clang/test/CodeGenCXX/linetable-virtual-variadic.cpp b/clang/test/CodeGenCXX/linetable-virtual-variadic.cpp index fd65e981f5f3..2de358619376 100644 --- a/clang/test/CodeGenCXX/linetable-virtual-variadic.cpp +++ b/clang/test/CodeGenCXX/linetable-virtual-variadic.cpp @@ -12,9 +12,9 @@ class Derived : public virtual Base { void Derived::VariadicFunction(...) { } -// CHECK: define void @_ZN7Derived16VariadicFunctionEz({{.*}} !dbg ![[SP:[0-9]+]] +// CHECK: define dso_local void @_ZN7Derived16VariadicFunctionEz({{.*}} !dbg ![[SP:[0-9]+]] // CHECK: ret void, !dbg ![[LOC:[0-9]+]] -// CHECK: define void @_ZT{{.+}}N7Derived16VariadicFunctionEz({{.*}} !dbg ![[SP_I:[0-9]+]] +// CHECK: define dso_local void @_ZT{{.+}}N7Derived16VariadicFunctionEz({{.*}} !dbg ![[SP_I:[0-9]+]] // CHECK: ret void, !dbg ![[LOC_I:[0-9]+]] // // CHECK: ![[SP]] = distinct !DISubprogram(name: "VariadicFunction" diff --git a/clang/test/CodeGenCXX/mangle-win64-ccs.cpp b/clang/test/CodeGenCXX/mangle-win64-ccs.cpp index 10c0430117c5..586d9fef2847 100644 --- a/clang/test/CodeGenCXX/mangle-win64-ccs.cpp +++ b/clang/test/CodeGenCXX/mangle-win64-ccs.cpp @@ -20,7 +20,7 @@ ptrdiff_t useThem() { // CHECK-WIN: call i64 @_Z11func_as_intIU8sysv_abiFiiEExPT_(i32 (i32)* @_Z9f_sysvabii) // CHECK-WIN: call i64 @_Z11func_as_intIFiiEExPT_(i32 (i32)* @_Z7f_msabii) -// CHECK-LIN: define i64 @_Z7useThemv() +// CHECK-LIN: define dso_local i64 @_Z7useThemv() // CHECK-LIN: call i64 @_Z11func_as_intIFiiEElPT_(i32 (i32)* @_Z7f_plaini) // CHECK-LIN: call i64 @_Z11func_as_intIFiiEElPT_(i32 (i32)* @_Z9f_sysvabii) // CHECK-LIN: call i64 @_Z11func_as_intIU6ms_abiFiiEElPT_(i32 (i32)* @_Z7f_msabii) diff --git a/clang/test/CodeGenCXX/member-function-pointers.cpp b/clang/test/CodeGenCXX/member-function-pointers.cpp index faeb8550c3c4..e7baeb7678d5 100644 --- a/clang/test/CodeGenCXX/member-function-pointers.cpp +++ b/clang/test/CodeGenCXX/member-function-pointers.cpp @@ -20,21 +20,21 @@ void (A::*volatile vpa)(); void (B::*pb)(); void (C::*pc)(); -// GLOBAL-LP64: @pa2 = global { i64, i64 } { i64 ptrtoint (void (%struct.A*)* @_ZN1A1fEv to i64), i64 0 }, align 8 +// GLOBAL-LP64: @pa2 = dso_local global { i64, i64 } { i64 ptrtoint (void (%struct.A*)* @_ZN1A1fEv to i64), i64 0 }, align 8 void (A::*pa2)() = &A::f; -// GLOBAL-LP64: @pa3 = global { i64, i64 } { i64 1, i64 0 }, align 8 -// GLOBAL-LP32: @pa3 = global { i32, i32 } { i32 1, i32 0 }, align 4 +// GLOBAL-LP64: @pa3 = dso_local global { i64, i64 } { i64 1, i64 0 }, align 8 +// GLOBAL-LP32: @pa3 = dso_local global { i32, i32 } { i32 1, i32 0 }, align 4 void (A::*pa3)() = &A::vf1; -// GLOBAL-LP64: @pa4 = global { i64, i64 } { i64 9, i64 0 }, align 8 -// GLOBAL-LP32: @pa4 = global { i32, i32 } { i32 5, i32 0 }, align 4 +// GLOBAL-LP64: @pa4 = dso_local global { i64, i64 } { i64 9, i64 0 }, align 8 +// GLOBAL-LP32: @pa4 = dso_local global { i32, i32 } { i32 5, i32 0 }, align 4 void (A::*pa4)() = &A::vf2; -// GLOBAL-LP64: @pc2 = global { i64, i64 } { i64 ptrtoint (void (%struct.A*)* @_ZN1A1fEv to i64), i64 16 }, align 8 +// GLOBAL-LP64: @pc2 = dso_local global { i64, i64 } { i64 ptrtoint (void (%struct.A*)* @_ZN1A1fEv to i64), i64 16 }, align 8 void (C::*pc2)() = &C::f; -// GLOBAL-LP64: @pc3 = global { i64, i64 } { i64 1, i64 0 }, align 8 +// GLOBAL-LP64: @pc3 = dso_local global { i64, i64 } { i64 1, i64 0 }, align 8 void (A::*pc3)() = &A::vf1; void f() { @@ -233,7 +233,7 @@ namespace test9 { fooptr p; }; - // CODE-LP64-LABEL: define void @_ZN5test94testEv( + // CODE-LP64-LABEL: define dso_local void @_ZN5test94testEv( // CODE-LP64: alloca i32 // CODE-LP64-NEXT: ret void void test() { @@ -263,22 +263,22 @@ namespace test10 { // It's not that the offsets are doubled on ARM, it's that they're left-shifted by 1. -// GLOBAL-LP64: @_ZN6test101aE = global { i64, i64 } { i64 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i64), i64 0 }, align 8 -// GLOBAL-LP32: @_ZN6test101aE = global { i32, i32 } { i32 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i32), i32 0 }, align 4 +// GLOBAL-LP64: @_ZN6test101aE = dso_local global { i64, i64 } { i64 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i64), i64 0 }, align 8 +// GLOBAL-LP32: @_ZN6test101aE = dso_local global { i32, i32 } { i32 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i32), i32 0 }, align 4 // GLOBAL-ARM: @_ZN6test101aE = global { i32, i32 } { i32 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i32), i32 0 }, align 4 void (A::*a)() = &A::foo; -// GLOBAL-LP64: @_ZN6test101bE = global { i64, i64 } { i64 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i64), i64 8 }, align 8 +// GLOBAL-LP64: @_ZN6test101bE = dso_local global { i64, i64 } { i64 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i64), i64 8 }, align 8 // GLOBAL-LP32: @_ZN6test101bE = global { i32, i32 } { i32 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i32), i32 4 }, align 4 // GLOBAL-ARM: @_ZN6test101bE = global { i32, i32 } { i32 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i32), i32 8 }, align 4 void (B::*b)() = (void (B::*)()) &A::foo; -// GLOBAL-LP64: @_ZN6test101cE = global { i64, i64 } { i64 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i64), i64 8 }, align 8 +// GLOBAL-LP64: @_ZN6test101cE = dso_local global { i64, i64 } { i64 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i64), i64 8 }, align 8 // GLOBAL-LP32: @_ZN6test101cE = global { i32, i32 } { i32 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i32), i32 4 }, align 4 // GLOBAL-ARM: @_ZN6test101cE = global { i32, i32 } { i32 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i32), i32 8 }, align 4 void (C::*c)() = (void (C::*)()) (void (B::*)()) &A::foo; -// GLOBAL-LP64: @_ZN6test101dE = global { i64, i64 } { i64 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i64), i64 16 }, align 8 +// GLOBAL-LP64: @_ZN6test101dE = dso_local global { i64, i64 } { i64 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i64), i64 16 }, align 8 // GLOBAL-LP32: @_ZN6test101dE = global { i32, i32 } { i32 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i32), i32 8 }, align 4 // GLOBAL-ARM: @_ZN6test101dE = global { i32, i32 } { i32 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i32), i32 16 }, align 4 void (D::*d)() = (void (C::*)()) (void (B::*)()) &A::foo; @@ -290,7 +290,7 @@ namespace test11 { struct C : B { virtual void a(); }; void (C::*x)() = &C::a; - // GLOBAL-LP64: @_ZN6test111xE = global { i64, i64 } { i64 1, i64 0 } + // GLOBAL-LP64: @_ZN6test111xE = dso_local global { i64, i64 } { i64 1, i64 0 } // GLOBAL-LP32: @_ZN6test111xE = global { i32, i32 } { i32 1, i32 0 } // GLOBAL-ARM: @_ZN6test111xE = global { i32, i32 } { i32 0, i32 1 } } diff --git a/clang/test/CodeGenCXX/microsoft-abi-default-cc.cpp b/clang/test/CodeGenCXX/microsoft-abi-default-cc.cpp index 804ee5197b85..d5c43f1bc549 100644 --- a/clang/test/CodeGenCXX/microsoft-abi-default-cc.cpp +++ b/clang/test/CodeGenCXX/microsoft-abi-default-cc.cpp @@ -12,13 +12,13 @@ void foo(); void __cdecl foo(); void __cdecl foo() {} -// GCABI-LABEL: define void @_Z3foov() +// GCABI-LABEL: define dso_local void @_Z3foov() // MSABI: define dso_local void @"?foo@@YAXXZ" void __cdecl bar(); void bar(); void bar() {} -// GCABI-LABEL: define void @_Z3barv() +// GCABI-LABEL: define dso_local void @_Z3barv() // MSABI: define dso_local void @"?bar@@YAXXZ" // Test that it's OK to mark either the method declaration or method definition @@ -33,17 +33,17 @@ public: }; void METHOD_CC A::baz() {} -// GCABI-LABEL: define void @_ZN1A3bazEv +// GCABI-LABEL: define dso_local void @_ZN1A3bazEv // MSABI: define dso_local x86_thiscallcc void @"?baz@A@@QAEXXZ" void A::qux() {} -// GCABI-LABEL: define void @_ZN1A3quxEv +// GCABI-LABEL: define dso_local void @_ZN1A3quxEv // MSABI: define dso_local x86_thiscallcc void @"?qux@A@@QAEXXZ" void __cdecl static_baz() {} -// GCABI-LABEL: define void @_Z10static_bazv +// GCABI-LABEL: define dso_local void @_Z10static_bazv // MSABI: define dso_local void @"?static_baz@@YAXXZ" void static_qux() {} -// GCABI-LABEL: define void @_Z10static_quxv +// GCABI-LABEL: define dso_local void @_Z10static_quxv // MSABI: define dso_local void @"?static_qux@@YAXXZ" namespace PR31656 { diff --git a/clang/test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp b/clang/test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp index 9fb9f39cb083..ba2effedc5aa 100644 --- a/clang/test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp +++ b/clang/test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp @@ -84,23 +84,23 @@ void call_bools_and_chars() { // Returning structs that fit into a register. Small small_return() { return Small(); } -// LINUX-LABEL: define void @_Z12small_returnv(%struct.Small* noalias sret %agg.result) +// LINUX-LABEL: define dso_local void @_Z12small_returnv(%struct.Small* noalias sret %agg.result) // WIN32: define dso_local i32 @"?small_return@@YA?AUSmall@@XZ"() // WIN64: define dso_local i32 @"?small_return@@YA?AUSmall@@XZ"() Medium medium_return() { return Medium(); } -// LINUX-LABEL: define void @_Z13medium_returnv(%struct.Medium* noalias sret %agg.result) +// LINUX-LABEL: define dso_local void @_Z13medium_returnv(%struct.Medium* noalias sret %agg.result) // WIN32: define dso_local i64 @"?medium_return@@YA?AUMedium@@XZ"() // WIN64: define dso_local i64 @"?medium_return@@YA?AUMedium@@XZ"() // Returning structs that fit into a register but are not POD. SmallCpp11NotCpp03Pod small_non_pod_return() { return SmallCpp11NotCpp03Pod(); } -// LINUX-LABEL: define void @_Z20small_non_pod_returnv(%struct.SmallCpp11NotCpp03Pod* noalias sret %agg.result) +// LINUX-LABEL: define dso_local void @_Z20small_non_pod_returnv(%struct.SmallCpp11NotCpp03Pod* noalias sret %agg.result) // WIN32: define dso_local void @"?small_non_pod_return@@YA?AUSmallCpp11NotCpp03Pod@@XZ"(%struct.SmallCpp11NotCpp03Pod* noalias sret %agg.result) // WIN64: define dso_local void @"?small_non_pod_return@@YA?AUSmallCpp11NotCpp03Pod@@XZ"(%struct.SmallCpp11NotCpp03Pod* noalias sret %agg.result) SmallWithCtor small_with_ctor_return() { return SmallWithCtor(); } -// LINUX-LABEL: define void @_Z22small_with_ctor_returnv(%struct.SmallWithCtor* noalias sret %agg.result) +// LINUX-LABEL: define dso_local void @_Z22small_with_ctor_returnv(%struct.SmallWithCtor* noalias sret %agg.result) // WIN32: define dso_local void @"?small_with_ctor_return@@YA?AUSmallWithCtor@@XZ"(%struct.SmallWithCtor* noalias sret %agg.result) // WIN64: define dso_local void @"?small_with_ctor_return@@YA?AUSmallWithCtor@@XZ"(%struct.SmallWithCtor* noalias sret %agg.result) // FIXME: The 'sret' mark here doesn't seem to be enough to convince LLVM to @@ -108,56 +108,56 @@ SmallWithCtor small_with_ctor_return() { return SmallWithCtor(); } // WOA: define dso_local arm_aapcs_vfpcc void @"?small_with_ctor_return@@YA?AUSmallWithCtor@@XZ"(%struct.SmallWithCtor* noalias sret %agg.result) SmallWithVftable small_with_vftable_return() { return SmallWithVftable(); } -// LINUX-LABEL: define void @_Z25small_with_vftable_returnv(%struct.SmallWithVftable* noalias sret %agg.result) +// LINUX-LABEL: define dso_local void @_Z25small_with_vftable_returnv(%struct.SmallWithVftable* noalias sret %agg.result) // WIN32: define dso_local void @"?small_with_vftable_return@@YA?AUSmallWithVftable@@XZ"(%struct.SmallWithVftable* noalias sret %agg.result) // WIN64: define dso_local void @"?small_with_vftable_return@@YA?AUSmallWithVftable@@XZ"(%struct.SmallWithVftable* noalias sret %agg.result) MediumWithCopyCtor medium_with_copy_ctor_return() { return MediumWithCopyCtor(); } -// LINUX-LABEL: define void @_Z28medium_with_copy_ctor_returnv(%struct.MediumWithCopyCtor* noalias sret %agg.result) +// LINUX-LABEL: define dso_local void @_Z28medium_with_copy_ctor_returnv(%struct.MediumWithCopyCtor* noalias sret %agg.result) // WIN32: define dso_local void @"?medium_with_copy_ctor_return@@YA?AUMediumWithCopyCtor@@XZ"(%struct.MediumWithCopyCtor* noalias sret %agg.result) // WIN64: define dso_local void @"?medium_with_copy_ctor_return@@YA?AUMediumWithCopyCtor@@XZ"(%struct.MediumWithCopyCtor* noalias sret %agg.result) // WOA: define dso_local arm_aapcs_vfpcc void @"?medium_with_copy_ctor_return@@YA?AUMediumWithCopyCtor@@XZ"(%struct.MediumWithCopyCtor* noalias sret %agg.result) // Returning a large struct that doesn't fit into a register. Big big_return() { return Big(); } -// LINUX-LABEL: define void @_Z10big_returnv(%struct.Big* noalias sret %agg.result) +// LINUX-LABEL: define dso_local void @_Z10big_returnv(%struct.Big* noalias sret %agg.result) // WIN32: define dso_local void @"?big_return@@YA?AUBig@@XZ"(%struct.Big* noalias sret %agg.result) // WIN64: define dso_local void @"?big_return@@YA?AUBig@@XZ"(%struct.Big* noalias sret %agg.result) void small_arg(Small s) {} -// LINUX-LABEL: define void @_Z9small_arg5Small(i32 %s.0) +// LINUX-LABEL: define dso_local void @_Z9small_arg5Small(i32 %s.0) // WIN32: define dso_local void @"?small_arg@@YAXUSmall@@@Z"(i32 %s.0) // WIN64: define dso_local void @"?small_arg@@YAXUSmall@@@Z"(i32 %s.coerce) // WOA: define dso_local arm_aapcs_vfpcc void @"?small_arg@@YAXUSmall@@@Z"([1 x i32] %s.coerce) void medium_arg(Medium s) {} -// LINUX-LABEL: define void @_Z10medium_arg6Medium(i32 %s.0, i32 %s.1) +// LINUX-LABEL: define dso_local void @_Z10medium_arg6Medium(i32 %s.0, i32 %s.1) // WIN32: define dso_local void @"?medium_arg@@YAXUMedium@@@Z"(i32 %s.0, i32 %s.1) // WIN64: define dso_local void @"?medium_arg@@YAXUMedium@@@Z"(i64 %s.coerce) // WOA: define dso_local arm_aapcs_vfpcc void @"?medium_arg@@YAXUMedium@@@Z"([2 x i32] %s.coerce) void base_no_byval_arg(BaseNoByval s) {} -// LINUX-LABEL: define void @_Z17base_no_byval_arg11BaseNoByval(%struct.BaseNoByval* byval(%struct.BaseNoByval) align 4 %s) +// LINUX-LABEL: define dso_local void @_Z17base_no_byval_arg11BaseNoByval(%struct.BaseNoByval* byval(%struct.BaseNoByval) align 4 %s) // WIN32: define dso_local void @"?base_no_byval_arg@@YAXUBaseNoByval@@@Z"(i32 %s.0, i32 %s.1) // WIN64: define dso_local void @"?base_no_byval_arg@@YAXUBaseNoByval@@@Z"(i64 %s.coerce) // WOA: define dso_local arm_aapcs_vfpcc void @"?base_no_byval_arg@@YAXUBaseNoByval@@@Z"([2 x i32] %s.coerce) void small_arg_with_ctor(SmallWithCtor s) {} -// LINUX-LABEL: define void @_Z19small_arg_with_ctor13SmallWithCtor(%struct.SmallWithCtor* byval(%struct.SmallWithCtor) align 4 %s) +// LINUX-LABEL: define dso_local void @_Z19small_arg_with_ctor13SmallWithCtor(%struct.SmallWithCtor* byval(%struct.SmallWithCtor) align 4 %s) // WIN32: define dso_local void @"?small_arg_with_ctor@@YAXUSmallWithCtor@@@Z"(i32 %s.0) // WIN64: define dso_local void @"?small_arg_with_ctor@@YAXUSmallWithCtor@@@Z"(i32 %s.coerce) // WOA: define dso_local arm_aapcs_vfpcc void @"?small_arg_with_ctor@@YAXUSmallWithCtor@@@Z"([1 x i32] %s.coerce) // FIXME: We could coerce to a series of i32s here if we wanted to. void multibyte_arg(Multibyte s) {} -// LINUX-LABEL: define void @_Z13multibyte_arg9Multibyte(%struct.Multibyte* byval(%struct.Multibyte) align 4 %s) +// LINUX-LABEL: define dso_local void @_Z13multibyte_arg9Multibyte(%struct.Multibyte* byval(%struct.Multibyte) align 4 %s) // WIN32: define dso_local void @"?multibyte_arg@@YAXUMultibyte@@@Z"(%struct.Multibyte* byval(%struct.Multibyte) align 4 %s) // WIN64: define dso_local void @"?multibyte_arg@@YAXUMultibyte@@@Z"(i32 %s.coerce) // WOA: define dso_local arm_aapcs_vfpcc void @"?multibyte_arg@@YAXUMultibyte@@@Z"([1 x i32] %s.coerce) void packed_arg(Packed s) {} -// LINUX-LABEL: define void @_Z10packed_arg6Packed(%struct.Packed* byval(%struct.Packed) align 4 %s) +// LINUX-LABEL: define dso_local void @_Z10packed_arg6Packed(%struct.Packed* byval(%struct.Packed) align 4 %s) // WIN32: define dso_local void @"?packed_arg@@YAXUPacked@@@Z"(%struct.Packed* byval(%struct.Packed) align 4 %s) // WIN64: define dso_local void @"?packed_arg@@YAXUPacked@@@Z"(%struct.Packed* %s) @@ -239,20 +239,20 @@ void eh_cleanup_arg_with_dtor() { // WIN32: } void small_arg_with_vftable(SmallWithVftable s) {} -// LINUX-LABEL: define void @_Z22small_arg_with_vftable16SmallWithVftable(%struct.SmallWithVftable* %s) +// LINUX-LABEL: define dso_local void @_Z22small_arg_with_vftable16SmallWithVftable(%struct.SmallWithVftable* %s) // WIN32: define dso_local void @"?small_arg_with_vftable@@YAXUSmallWithVftable@@@Z"(<{ %struct.SmallWithVftable }>* inalloca %0) // WIN64: define dso_local void @"?small_arg_with_vftable@@YAXUSmallWithVftable@@@Z"(%struct.SmallWithVftable* %s) // WOA64: define dso_local void @"?small_arg_with_vftable@@YAXUSmallWithVftable@@@Z"(%struct.SmallWithVftable* %s) void medium_arg_with_copy_ctor(MediumWithCopyCtor s) {} -// LINUX-LABEL: define void @_Z25medium_arg_with_copy_ctor18MediumWithCopyCtor(%struct.MediumWithCopyCtor* %s) +// LINUX-LABEL: define dso_local void @_Z25medium_arg_with_copy_ctor18MediumWithCopyCtor(%struct.MediumWithCopyCtor* %s) // WIN32: define dso_local void @"?medium_arg_with_copy_ctor@@YAXUMediumWithCopyCtor@@@Z"(<{ %struct.MediumWithCopyCtor }>* inalloca %0) // WIN64: define dso_local void @"?medium_arg_with_copy_ctor@@YAXUMediumWithCopyCtor@@@Z"(%struct.MediumWithCopyCtor* %s) // WOA: define dso_local arm_aapcs_vfpcc void @"?medium_arg_with_copy_ctor@@YAXUMediumWithCopyCtor@@@Z"(%struct.MediumWithCopyCtor* %s) // WOA64: define dso_local void @"?medium_arg_with_copy_ctor@@YAXUMediumWithCopyCtor@@@Z"(%struct.MediumWithCopyCtor* %s) void big_arg(Big s) {} -// LINUX-LABEL: define void @_Z7big_arg3Big(%struct.Big* byval(%struct.Big) align 4 %s) +// LINUX-LABEL: define dso_local void @_Z7big_arg3Big(%struct.Big* byval(%struct.Big) align 4 %s) // WIN32: define dso_local void @"?big_arg@@YAXUBig@@@Z"(%struct.Big* byval(%struct.Big) align 4 %s) // WIN64: define dso_local void @"?big_arg@@YAXUBig@@@Z"(%struct.Big* %s) @@ -263,7 +263,7 @@ struct RefField { int &x; }; void takes_ref_field(RefField s) {} -// LINUX-LABEL: define void @_Z15takes_ref_field8RefField(%struct.RefField* byval(%struct.RefField) align 4 %s) +// LINUX-LABEL: define dso_local void @_Z15takes_ref_field8RefField(%struct.RefField* byval(%struct.RefField) align 4 %s) // WIN32: define dso_local void @"?takes_ref_field@@YAXURefField@@@Z"(i32* %s.0) // WIN64: define dso_local void @"?takes_ref_field@@YAXURefField@@@Z"(i64 %s.coerce) @@ -271,7 +271,7 @@ void pass_ref_field() { int x; takes_ref_field(RefField(x)); } -// LINUX-LABEL: define void @_Z14pass_ref_fieldv() +// LINUX-LABEL: define dso_local void @_Z14pass_ref_fieldv() // LINUX: call void @_Z15takes_ref_field8RefField(%struct.RefField* byval(%struct.RefField) align 4 %{{.*}}) // WIN32-LABEL: define dso_local void @"?pass_ref_field@@YAXXZ"() // WIN32: call void @"?takes_ref_field@@YAXURefField@@@Z"(i32* %{{.*}}) diff --git a/clang/test/CodeGenCXX/microsoft-uuidof-mangling.cpp b/clang/test/CodeGenCXX/microsoft-uuidof-mangling.cpp index 10b19ddf56bc..57300e8cd6d8 100644 --- a/clang/test/CodeGenCXX/microsoft-uuidof-mangling.cpp +++ b/clang/test/CodeGenCXX/microsoft-uuidof-mangling.cpp @@ -37,12 +37,12 @@ int main(int argc, const char * argv[]) return 0; } -// CHECK: define i32 @main +// CHECK: define dso_local i32 @main // CHECK: call void @_ZN8UUIDTestI10TestStructXu8__uuidoftS0_EEC1Ev // CHECK: call void @_Z15test_uuidofTypeI10TestStructEvPPv(i8** null) // CHECK: call void @_Z15test_uuidofExprI9HasMemberEvPPv(i8** null) -// CHECK: define linkonce_odr void @_ZN8UUIDTestI10TestStructXu8__uuidoftS0_EEC1Ev -// CHECK: define linkonce_odr void @_Z15test_uuidofTypeI10TestStructEvPPv -// CHECK: define linkonce_odr void @_Z15test_uuidofExprI9HasMemberEvPPv -// CHECK: define linkonce_odr void @_ZN8UUIDTestI10TestStructXu8__uuidoftS0_EEC2Ev +// CHECK: define linkonce_odr dso_local void @_ZN8UUIDTestI10TestStructXu8__uuidoftS0_EEC1Ev +// CHECK: define linkonce_odr dso_local void @_Z15test_uuidofTypeI10TestStructEvPPv +// CHECK: define linkonce_odr dso_local void @_Z15test_uuidofExprI9HasMemberEvPPv +// CHECK: define linkonce_odr dso_local void @_ZN8UUIDTestI10TestStructXu8__uuidoftS0_EEC2Ev diff --git a/clang/test/CodeGenCXX/microsoft-uuidof.cpp b/clang/test/CodeGenCXX/microsoft-uuidof.cpp index f8d2da737910..51f0a3f01acd 100644 --- a/clang/test/CodeGenCXX/microsoft-uuidof.cpp +++ b/clang/test/CodeGenCXX/microsoft-uuidof.cpp @@ -1,8 +1,8 @@ -// RUN: %clang_cc1 -emit-llvm %s -o - -DDEFINE_GUID -triple=i386-pc-linux -fms-extensions | FileCheck %s --check-prefix=CHECK-DEFINE-GUID -// RUN: %clang_cc1 -emit-llvm %s -o - -DDEFINE_GUID -DBRACKET_ATTRIB -triple=i386-pc-linux -fms-extensions | FileCheck %s --check-prefix=CHECK-DEFINE-GUID -// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-linux -fms-extensions | FileCheck %s -// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-linux -fms-extensions | FileCheck %s --check-prefix=CHECK-64 -// RUN: %clang_cc1 -emit-llvm %s -o - -DDEFINE_GUID -DWRONG_GUID -triple=i386-pc-linux -fms-extensions | FileCheck %s --check-prefix=CHECK-DEFINE-WRONG-GUID +// RUN: %clang_cc1 -emit-llvm %s -o - -DDEFINE_GUID -triple=i386-pc-linux -fms-extensions -fsemantic-interposition | FileCheck %s --check-prefix=CHECK-DEFINE-GUID +// RUN: %clang_cc1 -emit-llvm %s -o - -DDEFINE_GUID -DBRACKET_ATTRIB -triple=i386-pc-linux -fms-extensions -fsemantic-interposition | FileCheck %s --check-prefix=CHECK-DEFINE-GUID +// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-linux -fms-extensions -fsemantic-interposition | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-linux -fms-extensions -fsemantic-interposition | FileCheck %s --check-prefix=CHECK-64 +// RUN: %clang_cc1 -emit-llvm %s -o - -DDEFINE_GUID -DWRONG_GUID -triple=i386-pc-linux -fms-extensions -fsemantic-interposition | FileCheck %s --check-prefix=CHECK-DEFINE-WRONG-GUID #ifdef DEFINE_GUID struct _GUID { @@ -33,29 +33,29 @@ struct __declspec(uuid("{12345678-1234-1234-1234-1234567890ac}")) Curly; #ifdef DEFINE_GUID // Make sure we can properly generate code when the UUID has curly braces on it. GUID thing = __uuidof(Curly); -// CHECK-DEFINE-GUID: @thing = global %struct._GUID zeroinitializer, align 4 +// CHECK-DEFINE-GUID: @thing = dso_local global %struct._GUID zeroinitializer, align 4 // CHECK-DEFINE-WRONG-GUID: @thing = global %struct._GUID zeroinitializer, align 4 // This gets initialized in a static initializer. -// CHECK-DEFINE-GUID: @g = global %struct._GUID zeroinitializer, align 4 +// CHECK-DEFINE-GUID: @g = dso_local global %struct._GUID zeroinitializer, align 4 // CHECK-DEFINE-WRONG-GUID: @g = global %struct._GUID zeroinitializer, align 4 GUID g = __uuidof(S1); #endif // First global use of __uuidof(S1) forces the creation of the global. -// CHECK: @_GUID_12345678_1234_1234_1234_1234567890ab = linkonce_odr constant { i32, i16, i16, [8 x i8] } { i32 305419896, i16 4660, i16 4660, [8 x i8] c"\124\124Vx\90\AB" }, comdat -// CHECK: @gr = constant %struct._GUID* bitcast ({ i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ab to %struct._GUID*), align 4 +// CHECK: @_GUID_12345678_1234_1234_1234_1234567890ab = linkonce_odr dso_local constant { i32, i16, i16, [8 x i8] } { i32 305419896, i16 4660, i16 4660, [8 x i8] c"\124\124Vx\90\AB" }, comdat +// CHECK: @gr = dso_local constant %struct._GUID* bitcast ({ i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ab to %struct._GUID*), align 4 // CHECK-64: @gr = constant %struct._GUID* bitcast ({ i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ab to %struct._GUID*), align 8 const GUID& gr = __uuidof(S1); -// CHECK: @gp = global %struct._GUID* bitcast ({ i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ab to %struct._GUID*), align 4 +// CHECK: @gp = dso_local global %struct._GUID* bitcast ({ i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ab to %struct._GUID*), align 4 const GUID* gp = &__uuidof(S1); -// CHECK: @cp = global %struct._GUID* bitcast ({ i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ac to %struct._GUID*), align 4 +// CHECK: @cp = dso_local global %struct._GUID* bitcast ({ i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ac to %struct._GUID*), align 4 const GUID* cp = &__uuidof(Curly); // Special case: _uuidof(0) -// CHECK: @zeroiid = constant %struct._GUID* bitcast ({ i32, i16, i16, [8 x i8] }* @_GUID_00000000_0000_0000_0000_000000000000 to %struct._GUID*), align 4 +// CHECK: @zeroiid = dso_local constant %struct._GUID* bitcast ({ i32, i16, i16, [8 x i8] }* @_GUID_00000000_0000_0000_0000_000000000000 to %struct._GUID*), align 4 const GUID& zeroiid = __uuidof(0); // __uuidof(S2) hasn't been used globally yet, so it's emitted when it's used diff --git a/clang/test/CodeGenCXX/mips-size_t-ptrdiff_t.cpp b/clang/test/CodeGenCXX/mips-size_t-ptrdiff_t.cpp index 5b245a4aaccd..bbd6522a882b 100644 --- a/clang/test/CodeGenCXX/mips-size_t-ptrdiff_t.cpp +++ b/clang/test/CodeGenCXX/mips-size_t-ptrdiff_t.cpp @@ -9,13 +9,13 @@ long *alloc_long() { long *rv = new long; // size_t is implicit in the new operator return rv; } -// O32-LABEL: define i32* @_Z10alloc_longv() +// O32-LABEL: define dso_local i32* @_Z10alloc_longv() // O32: call i8* @_Znwj(i32 signext 4) -// N32-LABEL: define i32* @_Z10alloc_longv() +// N32-LABEL: define dso_local i32* @_Z10alloc_longv() // N32: call i8* @_Znwj(i32 signext 4) -// N64-LABEL: define i64* @_Z10alloc_longv() +// N64-LABEL: define dso_local i64* @_Z10alloc_longv() // N64: call i8* @_Znwm(i64 zeroext 8) long *alloc_long_array() { @@ -23,13 +23,13 @@ long *alloc_long_array() { return rv; } -// O32-LABEL: define i32* @_Z16alloc_long_arrayv() +// O32-LABEL: define dso_local i32* @_Z16alloc_long_arrayv() // O32: call i8* @_Znaj(i32 signext 8) -// N32-LABEL: define i32* @_Z16alloc_long_arrayv() +// N32-LABEL: define dso_local i32* @_Z16alloc_long_arrayv() // N32: call i8* @_Znaj(i32 signext 8) -// N64-LABEL: define i64* @_Z16alloc_long_arrayv() +// N64-LABEL: define dso_local i64* @_Z16alloc_long_arrayv() // N64: call i8* @_Znam(i64 zeroext 16) #include <stddef.h> diff --git a/clang/test/CodeGenCXX/new-alias.cpp b/clang/test/CodeGenCXX/new-alias.cpp index b21638abbfb6..b05ec2e17128 100644 --- a/clang/test/CodeGenCXX/new-alias.cpp +++ b/clang/test/CodeGenCXX/new-alias.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu -std=c++11 -o - %s | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu -std=c++11 -o - %s -fsemantic-interposition | FileCheck %s using size_t = decltype(sizeof(0)); diff --git a/clang/test/CodeGenCXX/new-array-init-exceptions.cpp b/clang/test/CodeGenCXX/new-array-init-exceptions.cpp index 5cfb75744d54..10319997f3ec 100644 --- a/clang/test/CodeGenCXX/new-array-init-exceptions.cpp +++ b/clang/test/CodeGenCXX/new-array-init-exceptions.cpp @@ -7,7 +7,7 @@ struct Throws { ~Throws(); }; -// CHECK-LABEL: define void @_Z7cleanupi +// CHECK-LABEL: define dso_local void @_Z7cleanupi void cleanup(int n) { // CHECK: invoke void @_ZN6ThrowsC1Ei // CHECK-NEXT: to label %{{[^ ]+}} unwind label %[[LPAD:[^ ]+]] @@ -25,7 +25,7 @@ void cleanup(int n) { } -// CHECK-LABEL: define void @_Z7cleanupv +// CHECK-LABEL: define dso_local void @_Z7cleanupv void cleanup() { // CHECK: invoke void @_ZN6ThrowsC1Ei // CHECK-NEXT: to label %{{[^ ]+}} unwind label %[[LPAD2:[^ ]+]] diff --git a/clang/test/CodeGenCXX/new-array-init.cpp b/clang/test/CodeGenCXX/new-array-init.cpp index b504d5e78007..4c93dfdc5b70 100644 --- a/clang/test/CodeGenCXX/new-array-init.cpp +++ b/clang/test/CodeGenCXX/new-array-init.cpp @@ -4,7 +4,7 @@ // CHECK: @[[ABC4:.*]] = {{.*}} constant [4 x i8] c"abc\00" // CHECK: @[[ABC15:.*]] = {{.*}} constant [15 x i8] c"abc\00\00\00\00 -// CHECK-LABEL: define void @_Z2fni +// CHECK-LABEL: define dso_local void @_Z2fni void fn(int n) { // CHECK: icmp ult i{{32|64}} %{{[^ ]+}}, 3 // CHECK: store i32 1 @@ -15,21 +15,21 @@ void fn(int n) { new int[n] { 1, 2, 3 }; } -// CHECK-LABEL: define void @_Z11const_exactv +// CHECK-LABEL: define dso_local void @_Z11const_exactv void const_exact() { // CHECK-NOT: icmp ult i{{32|64}} %{{[^ ]+}}, 3 // CHECK-NOT: icmp eq i32* new int[3] { 1, 2, 3 }; } -// CHECK-LABEL: define void @_Z16const_sufficientv +// CHECK-LABEL: define dso_local void @_Z16const_sufficientv void const_sufficient() { // CHECK-NOT: icmp ult i{{32|64}} %{{[^ ]+}}, 3 new int[4] { 1, 2, 3 }; // CHECK: ret void } -// CHECK-LABEL: define void @_Z22check_array_value_initv +// CHECK-LABEL: define dso_local void @_Z22check_array_value_initv void check_array_value_init() { struct S; new (int S::*[3][4][5]) (); @@ -44,7 +44,7 @@ void check_array_value_init() { // CHECK: br i1 } -// CHECK-LABEL: define void @_Z15string_nonconsti +// CHECK-LABEL: define dso_local void @_Z15string_nonconsti void string_nonconst(int n) { // CHECK: icmp slt i{{32|64}} %{{[^ ]+}}, 4 // FIXME: Conditionally throw an exception rather than passing -1 to alloc function @@ -57,7 +57,7 @@ void string_nonconst(int n) { new char[n] { "abc" }; } -// CHECK-LABEL: define void @_Z12string_exactv +// CHECK-LABEL: define dso_local void @_Z12string_exactv void string_exact() { // CHECK-NOT: icmp // CHECK: %[[PTR:.*]] = call i8* @_Zna{{.}}(i{{32|64}} 4) @@ -66,7 +66,7 @@ void string_exact() { new char[4] { "abc" }; } -// CHECK-LABEL: define void @_Z17string_sufficientv +// CHECK-LABEL: define dso_local void @_Z17string_sufficientv void string_sufficient() { // CHECK-NOT: icmp // CHECK: %[[PTR:.*]] = call i8* @_Zna{{.}}(i{{32|64}} 15) @@ -76,7 +76,7 @@ void string_sufficient() { new char[15] { "abc" }; } -// CHECK-LABEL: define void @_Z10aggr_exactv +// CHECK-LABEL: define dso_local void @_Z10aggr_exactv void aggr_exact() { // CHECK-NOT: icmp // CHECK: %[[MEM:.*]] = call i8* @_Zna{{.}}(i{{32|64}} 16) @@ -96,7 +96,7 @@ void aggr_exact() { new Aggr[2] { 1, 2, 3 }; } -// CHECK-LABEL: define void @_Z15aggr_sufficienti +// CHECK-LABEL: define dso_local void @_Z15aggr_sufficienti void aggr_sufficient(int n) { // CHECK: icmp ult i32 %{{.*}}, 2 // CHECK: %[[MEM:.*]] = call i8* @_Zna{{.}}( @@ -118,13 +118,13 @@ void aggr_sufficient(int n) { new Aggr[n] { 1, 2, 3 }; } -// SIO-LABEL: define void @_Z14constexpr_testv +// SIO-LABEL: define dso_local void @_Z14constexpr_testv void constexpr_test() { // SIO: call i8* @_Zna{{.}}(i32 4) new int[0+1]{0}; } -// CHECK-LABEL: define void @_Z13unknown_boundv +// CHECK-LABEL: define dso_local void @_Z13unknown_boundv void unknown_bound() { struct Aggr { int x, y, z; }; new Aggr[]{1, 2, 3, 4}; @@ -139,7 +139,7 @@ void unknown_bound() { // CHECK: } } -// CHECK-LABEL: define void @_Z20unknown_bound_stringv +// CHECK-LABEL: define dso_local void @_Z20unknown_bound_stringv void unknown_bound_string() { new char[]{"hello"}; // CHECK: call {{.*}}_Znaj(i32 6) diff --git a/clang/test/CodeGenCXX/new-overflow.cpp b/clang/test/CodeGenCXX/new-overflow.cpp index a2269bfc59ff..7f85724a0fbe 100644 --- a/clang/test/CodeGenCXX/new-overflow.cpp +++ b/clang/test/CodeGenCXX/new-overflow.cpp @@ -11,7 +11,7 @@ namespace test0 { typedef A elt; - // CHECK: define [[A:%.*]]* @_ZN5test04testEs(i16 signext + // CHECK: define dso_local [[A:%.*]]* @_ZN5test04testEs(i16 signext // CHECK: [[N:%.*]] = sext i16 {{%.*}} to i32 // CHECK-NEXT: [[T0:%.*]] = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 [[N]], i32 4) // CHECK-NEXT: [[T1:%.*]] = extractvalue { i32, i1 } [[T0]], 1 @@ -33,7 +33,7 @@ namespace test1 { typedef A elt[100]; - // CHECK: define [100 x [[A:%.*]]]* @_ZN5test14testEs(i16 signext + // CHECK: define dso_local [100 x [[A:%.*]]]* @_ZN5test14testEs(i16 signext // CHECK: [[N:%.*]] = sext i16 {{%.*}} to i32 // CHECK-NEXT: [[T0:%.*]] = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 [[N]], i32 400) // CHECK-NEXT: [[T1:%.*]] = extractvalue { i32, i1 } [[T0]], 1 @@ -57,7 +57,7 @@ namespace test2 { typedef A elt[100]; - // CHECK: define [100 x [[A:%.*]]]* @_ZN5test24testEs(i16 signext + // CHECK: define dso_local [100 x [[A:%.*]]]* @_ZN5test24testEs(i16 signext // CHECK: [[N:%.*]] = sext i16 {{%.*}} to i32 // CHECK-NEXT: [[T0:%.*]] = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 [[N]], i32 400) // CHECK-NEXT: [[T1:%.*]] = extractvalue { i32, i1 } [[T0]], 1 @@ -83,7 +83,7 @@ namespace test4 { typedef A elt; - // CHECK: define [[A:%.*]]* @_ZN5test44testEs(i16 signext + // CHECK: define dso_local [[A:%.*]]* @_ZN5test44testEs(i16 signext // CHECK: [[N:%.*]] = sext i16 {{%.*}} to i32 // CHECK-NEXT: call i8* @_Znaj(i32 [[N]]) // CHECK: getelementptr inbounds {{.*}}, i32 [[N]] @@ -100,7 +100,7 @@ namespace test5 { typedef A elt; - // CHECK: define [[A:%.*]]* @_ZN5test54testEi(i32 + // CHECK: define dso_local [[A:%.*]]* @_ZN5test54testEi(i32 // CHECK: [[N:%.*]] = load i32, i32* // CHECK-NEXT: call i8* @_Znaj(i32 [[N]]) // CHECK: getelementptr inbounds {{.*}}, i32 [[N]] @@ -118,7 +118,7 @@ namespace test6 { typedef A elt; - // CHECK: define [[A:%.*]]* @_ZN5test64testEt(i16 zeroext + // CHECK: define dso_local [[A:%.*]]* @_ZN5test64testEt(i16 zeroext // CHECK: [[N:%.*]] = zext i16 {{%.*}} to i32 // CHECK-NEXT: [[T0:%.*]] = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 [[N]], i32 4) // CHECK-NEXT: [[T1:%.*]] = extractvalue { i32, i1 } [[T0]], 1 @@ -140,7 +140,7 @@ namespace test7 { typedef A elt[100]; - // CHECK: define [100 x [[A:%.*]]]* @_ZN5test74testEt(i16 zeroext + // CHECK: define dso_local [100 x [[A:%.*]]]* @_ZN5test74testEt(i16 zeroext // CHECK: [[N:%.*]] = zext i16 {{%.*}} to i32 // CHECK-NEXT: [[T0:%.*]] = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 [[N]], i32 400) // CHECK-NEXT: [[T1:%.*]] = extractvalue { i32, i1 } [[T0]], 1 @@ -163,7 +163,7 @@ namespace test8 { typedef A elt; - // CHECK: define [[A:%.*]]* @_ZN5test84testEx(i64 + // CHECK: define dso_local [[A:%.*]]* @_ZN5test84testEx(i64 // CHECK: [[N:%.*]] = load i64, i64* // CHECK-NEXT: [[T1:%.*]] = trunc i64 [[N]] to i32 // CHECK-NEXT: [[T2:%.*]] = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 [[T1]], i32 4) @@ -186,7 +186,7 @@ namespace test9 { typedef A elt; - // CHECK: define [[A:%.*]]* @_ZN5test94testEy(i64 + // CHECK: define dso_local [[A:%.*]]* @_ZN5test94testEy(i64 // CHECK: [[N:%.*]] = load i64, i64* // CHECK-NEXT: [[T1:%.*]] = trunc i64 [[N]] to i32 // CHECK-NEXT: [[T2:%.*]] = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 [[T1]], i32 4) diff --git a/clang/test/CodeGenCXX/new.cpp b/clang/test/CodeGenCXX/new.cpp index 1f5288d1d10e..0f598594e61d 100644 --- a/clang/test/CodeGenCXX/new.cpp +++ b/clang/test/CodeGenCXX/new.cpp @@ -122,7 +122,7 @@ A* t10() { return new(1, 2, 3.45, 100) A; } -// CHECK-LABEL: define void @_Z3t11i +// CHECK-LABEL: define dso_local void @_Z3t11i struct B { int a; }; struct Bmemptr { int Bmemptr::* memptr; int a; }; @@ -146,7 +146,7 @@ void t11(int n) { struct Empty { }; // We don't need to initialize an empty class. -// CHECK-LABEL: define void @_Z3t12v +// CHECK-LABEL: define dso_local void @_Z3t12v void t12() { // CHECK: call i8* @_Znam // CHECK-NOT: br @@ -160,7 +160,7 @@ void t12() { } // Zero-initialization -// CHECK-LABEL: define void @_Z3t13i +// CHECK-LABEL: define dso_local void @_Z3t13i void t13(int n) { // CHECK: call i8* @_Znwm // CHECK: store i32 0, i32* @@ -195,7 +195,7 @@ void f() { namespace test15 { struct A { A(); ~A(); }; - // CHECK-LABEL: define void @_ZN6test156test0aEPv( + // CHECK-LABEL: define dso_local void @_ZN6test156test0aEPv( // CHECK: [[P:%.*]] = load i8*, i8** // CHECK-NOT: icmp eq i8* [[P]], null // CHECK-NOT: br i1 @@ -205,7 +205,7 @@ namespace test15 { new (p) A(); } - // CHECK-LABEL: define void @_ZN6test156test0bEPv( + // CHECK-LABEL: define dso_local void @_ZN6test156test0bEPv( // CHECK: [[P0:%.*]] = load i8*, i8** // CHECK: [[P:%.*]] = call i8* @_ZnwmPvb(i64 1, i8* [[P0]] // CHECK-NEXT: icmp eq i8* [[P]], null @@ -216,7 +216,7 @@ namespace test15 { new (p, true) A(); } - // CHECK-LABEL: define void @_ZN6test156test1aEPv( + // CHECK-LABEL: define dso_local void @_ZN6test156test1aEPv( // CHECK: [[P:%.*]] = load i8*, i8** // CHECK-NOT: icmp eq i8* [[P]], null // CHECK-NOT: br i1 @@ -232,7 +232,7 @@ namespace test15 { new (p) A[5]; } - // CHECK-LABEL: define void @_ZN6test156test1bEPv( + // CHECK-LABEL: define dso_local void @_ZN6test156test1bEPv( // CHECK: [[P0:%.*]] = load i8*, i8** // CHECK: [[P:%.*]] = call i8* @_ZnamPvb(i64 13, i8* [[P0]] // CHECK-NEXT: icmp eq i8* [[P]], null @@ -252,7 +252,7 @@ namespace test15 { // TODO: it's okay if all these size calculations get dropped. // FIXME: maybe we should try to throw on overflow? - // CHECK-LABEL: define void @_ZN6test155test2EPvi( + // CHECK-LABEL: define dso_local void @_ZN6test155test2EPvi( // CHECK: [[N:%.*]] = load i32, i32* // CHECK-NEXT: [[T0:%.*]] = sext i32 [[N]] to i64 // CHECK-NEXT: [[P:%.*]] = load i8*, i8** @@ -269,7 +269,7 @@ namespace test15 { } namespace PR10197 { - // CHECK-LABEL: define weak_odr void @_ZN7PR101971fIiEEvv() + // CHECK-LABEL: define weak_odr dso_local void @_ZN7PR101971fIiEEvv() template<typename T> void f() { // CHECK: [[CALL:%.*]] = call i8* @_Znwm @@ -284,7 +284,7 @@ namespace PR10197 { namespace PR11523 { class MyClass; typedef int MyClass::* NewTy; - // CHECK-LABEL: define i64* @_ZN7PR115231fEv + // CHECK-LABEL: define dso_local i64* @_ZN7PR115231fEv // CHECK: store i64 -1 NewTy* f() { return new NewTy[2](); } } @@ -303,7 +303,7 @@ namespace PR11757 { namespace PR13380 { struct A { A() {} }; struct B : public A { int x; }; - // CHECK-LABEL: define i8* @_ZN7PR133801fEv + // CHECK-LABEL: define dso_local i8* @_ZN7PR133801fEv // CHECK: call i8* @_Znam( // CHECK: call void @llvm.memset.p0i8 // CHECK-NEXT: call void @_ZN7PR133801BC1Ev @@ -316,7 +316,7 @@ void *operator new(size_t, MyPlacementType); namespace N3664 { struct S { S() throw(int); }; - // CHECK-LABEL: define void @_ZN5N36641fEv + // CHECK-LABEL: define dso_local void @_ZN5N36641fEv void f() { // CHECK: call i8* @_Znwm(i64 4) [[ATTR_BUILTIN_NEW:#[^ ]*]] int *p = new int; // expected-note {{allocated with 'new' here}} @@ -337,7 +337,7 @@ namespace N3664 { // CHECK: declare noalias i8* @_ZnamRKSt9nothrow_t(i64, {{.*}}) [[ATTR_NOBUILTIN_NOUNWIND]] - // CHECK-LABEL: define void @_ZN5N36641gEv + // CHECK-LABEL: define dso_local void @_ZN5N36641gEv void g() { // It's OK for there to be attributes here, so long as we don't have a // 'builtin' attribute. @@ -357,7 +357,7 @@ namespace N3664 { } namespace builtins { - // CHECK-LABEL: define void @_ZN8builtins1fEv + // CHECK-LABEL: define dso_local void @_ZN8builtins1fEv void f() { // CHECK: call i8* @_Znwm(i64 4) [[ATTR_BUILTIN_NEW]] // CHECK: call void @_ZdlPv({{.*}}) [[ATTR_BUILTIN_DELETE]] diff --git a/clang/test/CodeGenCXX/no-elide-constructors.cpp b/clang/test/CodeGenCXX/no-elide-constructors.cpp index ecb350f43ec9..143c6abe514f 100644 --- a/clang/test/CodeGenCXX/no-elide-constructors.cpp +++ b/clang/test/CodeGenCXX/no-elide-constructors.cpp @@ -14,7 +14,7 @@ public: ~X(); }; -// CHECK-LABEL: define void @_Z4Testv( +// CHECK-LABEL: define dso_local void @_Z4Testv( X Test() { X x; diff --git a/clang/test/CodeGenCXX/no-odr-use.cpp b/clang/test/CodeGenCXX/no-odr-use.cpp index ba310046ddc5..bde106804276 100644 --- a/clang/test/CodeGenCXX/no-odr-use.cpp +++ b/clang/test/CodeGenCXX/no-odr-use.cpp @@ -1,12 +1,12 @@ -// RUN: %clang_cc1 -std=c++11 -emit-llvm -o - -triple x86_64-linux-gnu %s | FileCheck %s --check-prefixes=CHECK,CHECK-CXX11 -// RUN: %clang_cc1 -std=c++2a -emit-llvm -o - -triple x86_64-linux-gnu %s | FileCheck %s --check-prefixes=CHECK,CHECK-CXX2A +// RUN: %clang_cc1 -std=c++11 -emit-llvm -o - -triple x86_64-linux-gnu %s -fsemantic-interposition | FileCheck %s --check-prefixes=CHECK,CHECK-CXX11 +// RUN: %clang_cc1 -std=c++2a -emit-llvm -o - -triple x86_64-linux-gnu %s -fsemantic-interposition | FileCheck %s --check-prefixes=CHECK,CHECK-CXX2A // CHECK-DAG: @__const._Z1fi.a = private unnamed_addr constant {{.*}} { i32 1, [2 x i32] [i32 2, i32 3], [3 x i32] [i32 4, i32 5, i32 6] } // CHECK-CXX11-DAG: @_ZN7PR422765State1mE.const = private unnamed_addr constant [2 x { i64, i64 }] [{ {{.*}} @_ZN7PR422765State2f1Ev {{.*}}, i64 0 }, { {{.*}} @_ZN7PR422765State2f2Ev {{.*}}, i64 0 }] // CHECK-CXX2A-DAG: @_ZN7PR422765State1mE = linkonce_odr constant [2 x { i64, i64 }] [{ {{.*}} @_ZN7PR422765State2f1Ev {{.*}}, i64 0 }, { {{.*}} @_ZN7PR422765State2f2Ev {{.*}}, i64 0 }], comdat struct A { int x, y[2]; int arr[3]; }; -// CHECK-LABEL: define i32 @_Z1fi( +// CHECK-LABEL: define dso_local i32 @_Z1fi( int f(int i) { // CHECK: call void {{.*}}memcpy{{.*}}({{.*}}, {{.*}} @__const._Z1fi.a constexpr A a = {1, 2, 3, 4, 5, 6}; @@ -36,7 +36,7 @@ namespace PR42276 { using l = void (State::*)(); static constexpr l m[]{&State::f1, &State::f2}; }; - // CHECK-LABEL: define void @_ZN7PR422765State16syncDirtyObjectsEv( + // CHECK-LABEL: define dso_local void @_ZN7PR422765State16syncDirtyObjectsEv( void State::syncDirtyObjects() { for (int i = 0; i < sizeof(m) / sizeof(m[0]); ++i) // CHECK-CXX11: getelementptr inbounds [2 x { i64, i64 }], [2 x { i64, i64 }]* @_ZN7PR422765State1mE.const, i64 0, i64 % diff --git a/clang/test/CodeGenCXX/no-unique-address.cpp b/clang/test/CodeGenCXX/no-unique-address.cpp index c88fb4d2c30f..1bd5953268e1 100644 --- a/clang/test/CodeGenCXX/no-unique-address.cpp +++ b/clang/test/CodeGenCXX/no-unique-address.cpp @@ -3,13 +3,13 @@ struct A { ~A(); int n; char c[3]; }; struct B { [[no_unique_address]] A a; char k; }; -// CHECK-DAG: @b = global { i32, [3 x i8], i8 } { i32 1, [3 x i8] c"\02\03\04", i8 5 } +// CHECK-DAG: @b = dso_local global { i32, [3 x i8], i8 } { i32 1, [3 x i8] c"\02\03\04", i8 5 } B b = {1, 2, 3, 4, 5}; struct C : A {}; struct D : C {}; struct E { int e; [[no_unique_address]] D d; char k; }; -// CHECK-DAG: @e = global { i32, i32, [3 x i8], i8 } { i32 1, i32 2, [3 x i8] c"\03\04\05", i8 6 } +// CHECK-DAG: @e = dso_local global { i32, i32, [3 x i8], i8 } { i32 1, i32 2, [3 x i8] c"\03\04\05", i8 6 } E e = {1, 2, 3, 4, 5, 6}; struct Empty1 {}; @@ -22,7 +22,7 @@ struct HasEmpty { int b; [[no_unique_address]] Empty3 e3; }; -// CHECK-DAG: @he = global %{{[^ ]*}} { i32 1, i32 2 } +// CHECK-DAG: @he = dso_local global %{{[^ ]*}} { i32 1, i32 2 } HasEmpty he = {{}, 1, {}, 2, {}}; struct HasEmptyDuplicates { @@ -32,14 +32,14 @@ struct HasEmptyDuplicates { int b; [[no_unique_address]] Empty1 e3; // +8 }; -// CHECK-DAG: @off1 = global i64 0 +// CHECK-DAG: @off1 = dso_local global i64 0 Empty1 HasEmptyDuplicates::*off1 = &HasEmptyDuplicates::e1; -// CHECK-DAG: @off2 = global i64 4 +// CHECK-DAG: @off2 = dso_local global i64 4 Empty1 HasEmptyDuplicates::*off2 = &HasEmptyDuplicates::e2; -// CHECK-DAG: @off3 = global i64 8 +// CHECK-DAG: @off3 = dso_local global i64 8 Empty1 HasEmptyDuplicates::*off3 = &HasEmptyDuplicates::e3; -// CHECK-DAG: @hed = global %{{[^ ]*}} { i32 1, i32 2, [4 x i8] undef } +// CHECK-DAG: @hed = dso_local global %{{[^ ]*}} { i32 1, i32 2, [4 x i8] undef } HasEmptyDuplicates hed = {{}, 1, {}, 2, {}}; struct __attribute__((packed, aligned(2))) PackedAndPadded { @@ -51,7 +51,7 @@ struct WithPackedAndPadded { [[no_unique_address]] PackedAndPadded pap; char d; }; -// CHECK-DAG: @wpap = global <{ i8, i32, i8 }> <{ i8 1, i32 2, i8 3 }> +// CHECK-DAG: @wpap = dso_local global <{ i8, i32, i8 }> <{ i8 1, i32 2, i8 3 }> WithPackedAndPadded wpap = {1, 2, 3}; struct FieldOverlap { @@ -59,12 +59,12 @@ struct FieldOverlap { int n; }; static_assert(sizeof(FieldOverlap) == 4); -// CHECK-DAG: @fo = global %{{[^ ]*}} { i32 1234 } +// CHECK-DAG: @fo = dso_local global %{{[^ ]*}} { i32 1234 } FieldOverlap fo = {{}, {}, {}, {}, 1234}; -// CHECK-DAG: @e1 = constant %[[E1:[^ ]*]]* bitcast (%[[FO:[^ ]*]]* @fo to %[[E1]]*) +// CHECK-DAG: @e1 = dso_local constant %[[E1:[^ ]*]]* bitcast (%[[FO:[^ ]*]]* @fo to %[[E1]]*) Empty1 &e1 = fo.e1; -// CHECK-DAG: @e2 = constant %[[E1]]* bitcast (i8* getelementptr (i8, i8* bitcast (%[[FO]]* @fo to i8*), i64 1) to %[[E1]]*) +// CHECK-DAG: @e2 = dso_local constant %[[E1]]* bitcast (i8* getelementptr (i8, i8* bitcast (%[[FO]]* @fo to i8*), i64 1) to %[[E1]]*) Empty1 &e2 = fo.e2; // CHECK-LABEL: accessE1 diff --git a/clang/test/CodeGenCXX/nrvo.cpp b/clang/test/CodeGenCXX/nrvo.cpp index 74a5af765d13..9a59d36b38b1 100644 --- a/clang/test/CodeGenCXX/nrvo.cpp +++ b/clang/test/CodeGenCXX/nrvo.cpp @@ -18,8 +18,8 @@ template<typename T> struct Y { } }; -// CHECK-LABEL: define void @_Z5test0v -// CHECK-EH-LABEL: define void @_Z5test0v +// CHECK-LABEL: define dso_local void @_Z5test0v +// CHECK-EH-LABEL: define dso_local void @_Z5test0v X test0() { X x; // CHECK: call {{.*}} @_ZN1XC1Ev @@ -30,8 +30,8 @@ X test0() { return x; } -// CHECK-LABEL: define void @_Z5test1b( -// CHECK-EH-LABEL: define void @_Z5test1b( +// CHECK-LABEL: define dso_local void @_Z5test1b( +// CHECK-EH-LABEL: define dso_local void @_Z5test1b( X test1(bool B) { // CHECK: call {{.*}} @_ZN1XC1Ev // CHECK-NEXT: ret void @@ -43,8 +43,8 @@ X test1(bool B) { // CHECK-EH-NEXT: ret void } -// CHECK-LABEL: define void @_Z5test2b -// CHECK-EH-LABEL: define void @_Z5test2b +// CHECK-LABEL: define dso_local void @_Z5test2b +// CHECK-EH-LABEL: define dso_local void @_Z5test2b // CHECK-EH-SAME: personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) X test2(bool B) { // No NRVO. @@ -128,7 +128,7 @@ X test2(bool B) { } -// CHECK-LABEL: define void @_Z5test3b +// CHECK-LABEL: define dso_local void @_Z5test3b X test3(bool B) { // CHECK: call {{.*}} @_ZN1XC1Ev // CHECK-NOT: call {{.*}} @_ZN1XC1ERKS_ @@ -145,7 +145,7 @@ X test3(bool B) { extern "C" void exit(int) throw(); -// CHECK-LABEL: define void @_Z5test4b +// CHECK-LABEL: define dso_local void @_Z5test4b X test4(bool B) { { // CHECK: call {{.*}} @_ZN1XC1Ev @@ -160,7 +160,7 @@ X test4(bool B) { } #ifdef __EXCEPTIONS -// CHECK-EH-LABEL: define void @_Z5test5 +// CHECK-EH-LABEL: define dso_local void @_Z5test5 void may_throw(); X test5() { try { @@ -175,7 +175,7 @@ X test5() { #endif // rdar://problem/10430868 -// CHECK-LABEL: define void @_Z5test6v +// CHECK-LABEL: define dso_local void @_Z5test6v X test6() { X a __attribute__((aligned(8))); return a; @@ -189,7 +189,7 @@ X test6() { // CHECK-NEXT: ret void } -// CHECK-LABEL: define void @_Z5test7b +// CHECK-LABEL: define dso_local void @_Z5test7b X test7(bool b) { // CHECK: call {{.*}} @_ZN1XC1Ev // CHECK-NEXT: ret @@ -200,7 +200,7 @@ X test7(bool b) { return X(); } -// CHECK-LABEL: define void @_Z5test8b +// CHECK-LABEL: define dso_local void @_Z5test8b X test8(bool b) { // CHECK: call {{.*}} @_ZN1XC1Ev // CHECK-NEXT: ret @@ -217,7 +217,7 @@ Y<int> test9() { Y<int>::f(); } -// CHECK-LABEL: define linkonce_odr void @_ZN1YIiE1fEv +// CHECK-LABEL: define linkonce_odr dso_local void @_ZN1YIiE1fEv // CHECK: call {{.*}} @_ZN1YIiEC1Ev // CHECK-EH-03: attributes [[NR_NUW]] = { noreturn nounwind } diff --git a/clang/test/CodeGenCXX/powerpc-byval.cpp b/clang/test/CodeGenCXX/powerpc-byval.cpp index ff87618575d6..09856f0db228 100644 --- a/clang/test/CodeGenCXX/powerpc-byval.cpp +++ b/clang/test/CodeGenCXX/powerpc-byval.cpp @@ -9,4 +9,4 @@ void byval(S one, S two) { one = two; } -// CHECK: define void @_Z5byval1SS_(%struct.S* %one, %struct.S* %two) +// CHECK: define dso_local void @_Z5byval1SS_(%struct.S* %one, %struct.S* %two) diff --git a/clang/test/CodeGenCXX/pr12251.cpp b/clang/test/CodeGenCXX/pr12251.cpp index 49e61cae3756..5ed83b1a1cc1 100644 --- a/clang/test/CodeGenCXX/pr12251.cpp +++ b/clang/test/CodeGenCXX/pr12251.cpp @@ -4,12 +4,12 @@ bool f(bool *x) { return *x; } -// CHECK-LABEL: define zeroext i1 @_Z1fPb +// CHECK-LABEL: define dso_local zeroext i1 @_Z1fPb // CHECK: load i8, i8* %{{[^ ]*}}, align 1, !range [[RANGE_i8_0_2:![^ ]*]] // Only enum-tests follow. Ensure that after the bool test, no further range // metadata shows up when strict enums are disabled. -// NO-STRICT-ENUMS-LABEL: define zeroext i1 @_Z1fPb +// NO-STRICT-ENUMS-LABEL: define dso_local zeroext i1 @_Z1fPb // NO-STRICT-ENUMS: load i8, i8* %{{[^ ]*}}, align 1, !range // NO-STRICT-ENUMS-NOT: !range @@ -17,84 +17,84 @@ enum e1 { }; e1 g1(e1 *x) { return *x; } -// CHECK-LABEL: define i32 @_Z2g1P2e1 +// CHECK-LABEL: define dso_local i32 @_Z2g1P2e1 // CHECK: ret i32 0 enum e2 { e2_a = 0 }; e2 g2(e2 *x) { return *x; } -// CHECK-LABEL: define i32 @_Z2g2P2e2 +// CHECK-LABEL: define dso_local i32 @_Z2g2P2e2 // CHECK: ret i32 0 enum e3 { e3_a = 16 }; e3 g3(e3 *x) { return *x; } -// CHECK-LABEL: define i32 @_Z2g3P2e3 +// CHECK-LABEL: define dso_local i32 @_Z2g3P2e3 // CHECK: load i32, i32* %x, align 4, !range [[RANGE_i32_0_32:![^ ]*]] enum e4 { e4_a = -16}; e4 g4(e4 *x) { return *x; } -// CHECK-LABEL: define i32 @_Z2g4P2e4 +// CHECK-LABEL: define dso_local i32 @_Z2g4P2e4 // CHECK: load i32, i32* %x, align 4, !range [[RANGE_i32_m16_16:![^ ]*]] enum e5 { e5_a = -16, e5_b = 16}; e5 g5(e5 *x) { return *x; } -// CHECK-LABEL: define i32 @_Z2g5P2e5 +// CHECK-LABEL: define dso_local i32 @_Z2g5P2e5 // CHECK: load i32, i32* %x, align 4, !range [[RANGE_i32_m32_32:![^ ]*]] enum e6 { e6_a = -1 }; e6 g6(e6 *x) { return *x; } -// CHECK-LABEL: define i32 @_Z2g6P2e6 +// CHECK-LABEL: define dso_local i32 @_Z2g6P2e6 // CHECK: load i32, i32* %x, align 4, !range [[RANGE_i32_m1_1:![^ ]*]] enum e7 { e7_a = -16, e7_b = 2}; e7 g7(e7 *x) { return *x; } -// CHECK-LABEL: define i32 @_Z2g7P2e7 +// CHECK-LABEL: define dso_local i32 @_Z2g7P2e7 // CHECK: load i32, i32* %x, align 4, !range [[RANGE_i32_m16_16]] enum e8 { e8_a = -17}; e8 g8(e8 *x) { return *x; } -// CHECK-LABEL: define i32 @_Z2g8P2e8 +// CHECK-LABEL: define dso_local i32 @_Z2g8P2e8 // CHECK: load i32, i32* %x, align 4, !range [[RANGE_i32_m32_32:![^ ]*]] enum e9 { e9_a = 17}; e9 g9(e9 *x) { return *x; } -// CHECK-LABEL: define i32 @_Z2g9P2e9 +// CHECK-LABEL: define dso_local i32 @_Z2g9P2e9 // CHECK: load i32, i32* %x, align 4, !range [[RANGE_i32_0_32]] enum e10 { e10_a = -16, e10_b = 32}; e10 g10(e10 *x) { return *x; } -// CHECK-LABEL: define i32 @_Z3g10P3e10 +// CHECK-LABEL: define dso_local i32 @_Z3g10P3e10 // CHECK: load i32, i32* %x, align 4, !range [[RANGE_i32_m64_64:![^ ]*]] enum e11 {e11_a = 4294967296 }; enum e11 g11(enum e11 *x) { return *x; } -// CHECK-LABEL: define i64 @_Z3g11P3e11 +// CHECK-LABEL: define dso_local i64 @_Z3g11P3e11 // CHECK: load i64, i64* %x, align {{[84]}}, !range [[RANGE_i64_0_2pow33:![^ ]*]] enum e12 {e12_a = 9223372036854775808U }; enum e12 g12(enum e12 *x) { return *x; } -// CHECK-LABEL: define i64 @_Z3g12P3e12 +// CHECK-LABEL: define dso_local i64 @_Z3g12P3e12 // CHECK: load i64, i64* %x, align {{[84]}} // CHECK-NOT: range // CHECK: ret @@ -103,7 +103,7 @@ enum e13 : char {e13_a = -1 }; e13 g13(e13 *x) { return *x; } -// CHECK-LABEL: define signext i8 @_Z3g13P3e13 +// CHECK-LABEL: define dso_local signext i8 @_Z3g13P3e13 // CHECK: load i8, i8* %x, align 1 // CHECK-NOT: range // CHECK: ret @@ -112,7 +112,7 @@ enum class e14 {e14_a = 1}; e14 g14(e14 *x) { return *x; } -// CHECK-LABEL: define i32 @_Z3g14P3e14 +// CHECK-LABEL: define dso_local i32 @_Z3g14P3e14 // CHECK: load i32, i32* %x, align 4 // CHECK-NOT: range // CHECK: ret @@ -121,7 +121,7 @@ enum e15 { e15_a = 2147483648 }; e15 g15(e15 *x) { return *x; } -// CHECK-LABEL: define i32 @_Z3g15P3e15 +// CHECK-LABEL: define dso_local i32 @_Z3g15P3e15 // CHECK: load i32, i32* %x, align 4 // CHECK-NOT: range // CHECK: ret @@ -130,7 +130,7 @@ enum e16 { e16_a = -2147483648 }; e16 g16(e16 *x) { return *x; } -// CHECK-LABEL: define i32 @_Z3g16P3e16 +// CHECK-LABEL: define dso_local i32 @_Z3g16P3e16 // CHECK: load i32, i32* %x, align 4 // CHECK-NOT: range // CHECK: ret diff --git a/clang/test/CodeGenCXX/pr13396.cpp b/clang/test/CodeGenCXX/pr13396.cpp index e41dd39fcc6e..a2144fa3d6b1 100644 --- a/clang/test/CodeGenCXX/pr13396.cpp +++ b/clang/test/CodeGenCXX/pr13396.cpp @@ -7,13 +7,13 @@ struct foo { }; foo::foo() { - // CHECK-LABEL: define void @_ZN3fooC2Ev(%struct.foo* inreg %this) - // CHECK-LABEL: define void @_ZN3fooC1Ev(%struct.foo* inreg %this) + // CHECK-LABEL: define dso_local void @_ZN3fooC2Ev(%struct.foo* inreg %this) + // CHECK-LABEL: define dso_local void @_ZN3fooC1Ev(%struct.foo* inreg %this) } foo::~foo() { - // CHECK-LABEL: define void @_ZN3fooD2Ev(%struct.foo* inreg %this) - // CHECK-LABEL: define void @_ZN3fooD1Ev(%struct.foo* inreg %this) + // CHECK-LABEL: define dso_local void @_ZN3fooD2Ev(%struct.foo* inreg %this) + // CHECK-LABEL: define dso_local void @_ZN3fooD1Ev(%struct.foo* inreg %this) } void dummy() { @@ -21,6 +21,6 @@ void dummy() { // older clangs accept: // template foo::foo(int x); foo x(10); - // CHECK-LABEL: define linkonce_odr void @_ZN3fooC1IiEET_(%struct.foo* inreg %this, i32 inreg %x) - // CHECK-LABEL: define linkonce_odr void @_ZN3fooC2IiEET_(%struct.foo* inreg %this, i32 inreg %x) + // CHECK-LABEL: define linkonce_odr dso_local void @_ZN3fooC1IiEET_(%struct.foo* inreg %this, i32 inreg %x) + // CHECK-LABEL: define linkonce_odr dso_local void @_ZN3fooC2IiEET_(%struct.foo* inreg %this, i32 inreg %x) } diff --git a/clang/test/CodeGenCXX/pr31054.cpp b/clang/test/CodeGenCXX/pr31054.cpp index 33b17b9eafc8..5354cba21520 100644 --- a/clang/test/CodeGenCXX/pr31054.cpp +++ b/clang/test/CodeGenCXX/pr31054.cpp @@ -7,6 +7,6 @@ void func() { } // Test that we did not crash, by checking whether function was created. -// CHECK-LABEL: define void @_Z4funcv() #0 { +// CHECK-LABEL: define dso_local void @_Z4funcv() #0 { // CHECK: ret void // CHECK: } diff --git a/clang/test/CodeGenCXX/pr9130.cpp b/clang/test/CodeGenCXX/pr9130.cpp index e726e5a80b0a..ec234207e8ba 100644 --- a/clang/test/CodeGenCXX/pr9130.cpp +++ b/clang/test/CodeGenCXX/pr9130.cpp @@ -11,4 +11,4 @@ class nsVorbisState : public nsOggCodecState { nsVorbisState::~nsVorbisState() { } -// CHECK-LABEL: define linkonce_odr i32 @_ZN15nsOggCodecState9StartTimeEv +// CHECK-LABEL: define linkonce_odr dso_local i32 @_ZN15nsOggCodecState9StartTimeEv diff --git a/clang/test/CodeGenCXX/pragma-visibility.cpp b/clang/test/CodeGenCXX/pragma-visibility.cpp index c0ba9046c8c4..e2b4a3881d75 100644 --- a/clang/test/CodeGenCXX/pragma-visibility.cpp +++ b/clang/test/CodeGenCXX/pragma-visibility.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -o - %s -fsemantic-interposition | FileCheck %s #pragma GCC visibility push(hidden) struct x { @@ -42,7 +42,7 @@ template<> void x5<int>::y() {} #pragma GCC visibility push(hidden) namespace n __attribute((visibility("default"))) { void f() {} - // CHECK-LABEL: define void @_ZN1n1fEv + // CHECK-LABEL: define dso_local void @_ZN1n1fEv } #pragma GCC visibility pop @@ -70,5 +70,5 @@ namespace test2 { bar<int>::f(); } // CHECK-LABEL: define linkonce_odr hidden void @_ZN5test23barINS_3fooEE1fEv - // CHECK-LABEL: define linkonce_odr void @_ZN5test23barIiE1fEv + // CHECK-LABEL: define linkonce_odr dso_local void @_ZN5test23barIiE1fEv } diff --git a/clang/test/CodeGenCXX/redefine_extname.cpp b/clang/test/CodeGenCXX/redefine_extname.cpp index 41860d47ffe8..8087f87181d8 100644 --- a/clang/test/CodeGenCXX/redefine_extname.cpp +++ b/clang/test/CodeGenCXX/redefine_extname.cpp @@ -25,7 +25,7 @@ int f() { } extern "C" { int foo() { return 1; } -// CHECK: define i32 @bar() +// CHECK: define dso_local i32 @bar() } // Check that #pragma redefine_extname applies to C code only, and shouldn't be diff --git a/clang/test/CodeGenCXX/regcall.cpp b/clang/test/CodeGenCXX/regcall.cpp index bdf76964bf23..f29a1d7d1f48 100644 --- a/clang/test/CodeGenCXX/regcall.cpp +++ b/clang/test/CodeGenCXX/regcall.cpp @@ -21,7 +21,7 @@ int main() int __regcall foo (int i){ return i; } -// CHECK-LIN: define x86_regcallcc {{.+}}@_Z15__regcall3__foo +// CHECK-LIN: define dso_local x86_regcallcc {{.+}}@_Z15__regcall3__foo // CHECK-WIN64: define dso_local x86_regcallcc {{.+}}@"?foo@@YwHH@Z" // CHECK-WIN32: define dso_local x86_regcallcc {{.+}}@"?foo@@YwHH@Z" @@ -34,8 +34,8 @@ public: __regcall #endif test_class(){++x;} - // CHECK-LIN-DAG: define linkonce_odr x86_regcallcc void @_ZN10test_classC1Ev - // CHECK-LIN-DAG: define linkonce_odr x86_regcallcc void @_ZN10test_classC2Ev + // CHECK-LIN-DAG: define linkonce_odr dso_local x86_regcallcc void @_ZN10test_classC1Ev + // CHECK-LIN-DAG: define linkonce_odr dso_local x86_regcallcc void @_ZN10test_classC2Ev // Windows ignores calling convention on constructor/destructors. // CHECK-WIN64-DAG: define linkonce_odr dso_local %class.test_class* @"??0test_class@@QEAA@XZ" // CHECK-WIN32-DAG: define linkonce_odr dso_local x86_thiscallcc %class.test_class* @"??0test_class@@QAE@XZ" @@ -44,8 +44,8 @@ public: __regcall #endif ~test_class(){--x;} - // CHECK-LIN-DAG: define linkonce_odr x86_regcallcc void @_ZN10test_classD2Ev - // CHECK-LIN-DAG: define linkonce_odr x86_regcallcc void @_ZN10test_classD1Ev + // CHECK-LIN-DAG: define linkonce_odr dso_local x86_regcallcc void @_ZN10test_classD2Ev + // CHECK-LIN-DAG: define linkonce_odr dso_local x86_regcallcc void @_ZN10test_classD1Ev // Windows ignores calling convention on constructor/destructors. // CHECK-WIN64-DAG: define linkonce_odr dso_local void @"??1test_class@@QEAA@XZ" // CHECK-WIN32-DAG: define linkonce_odr dso_local x86_thiscallcc void @"??1test_class@@QAE@XZ" @@ -53,35 +53,35 @@ public: test_class& __regcall operator+=(const test_class&){ return *this; } - // CHECK-LIN-DAG: define linkonce_odr x86_regcallcc dereferenceable(4) %class.test_class* @_ZN10test_classpLERKS_ + // CHECK-LIN-DAG: define linkonce_odr dso_local x86_regcallcc dereferenceable(4) %class.test_class* @_ZN10test_classpLERKS_ // CHECK-WIN64-DAG: define linkonce_odr dso_local x86_regcallcc dereferenceable(4) %class.test_class* @"??Ytest_class@@QEAwAEAV0@AEBV0@@Z" // CHECK-WIN32-DAG: define linkonce_odr dso_local x86_regcallcc dereferenceable(4) %class.test_class* @"??Ytest_class@@QAwAAV0@ABV0@@Z" void __regcall do_thing(){} - // CHECK-LIN-DAG: define linkonce_odr x86_regcallcc void @_ZN10test_class20__regcall3__do_thingEv + // CHECK-LIN-DAG: define linkonce_odr dso_local x86_regcallcc void @_ZN10test_class20__regcall3__do_thingEv // CHECK-WIN64-DAG: define linkonce_odr dso_local x86_regcallcc void @"?do_thing@test_class@@QEAwXXZ" // CHECK-WIN32-DAG: define linkonce_odr dso_local x86_regcallcc void @"?do_thing@test_class@@QAwXXZ" template<typename T> void __regcall tempFunc(T i){} - // CHECK-LIN-DAG: define linkonce_odr x86_regcallcc void @_ZN10test_class20__regcall3__tempFuncIiEEvT_ + // CHECK-LIN-DAG: define linkonce_odr dso_local x86_regcallcc void @_ZN10test_class20__regcall3__tempFuncIiEEvT_ // CHECK-WIN64-DAG: define linkonce_odr dso_local x86_regcallcc void @"??$freeTempFunc@H@@YwXH@Z" // CHECK-WIN32-DAG: define linkonce_odr dso_local x86_regcallcc void @"??$freeTempFunc@H@@YwXH@Z" }; bool __regcall operator ==(const test_class&, const test_class&){ --x; return false;} -// CHECK-LIN-DAG: define x86_regcallcc zeroext i1 @_ZeqRK10test_classS1_ +// CHECK-LIN-DAG: define dso_local x86_regcallcc zeroext i1 @_ZeqRK10test_classS1_ // CHECK-WIN64-DAG: define dso_local x86_regcallcc zeroext i1 @"??8@Yw_NAEBVtest_class@@0@Z" // CHECK-WIN32-DAG: define dso_local x86_regcallcc zeroext i1 @"??8@Yw_NABVtest_class@@0@Z" test_class __regcall operator""_test_class (unsigned long long) { ++x; return test_class{};} -// CHECK-LIN64-DAG: define x86_regcallcc void @_Zli11_test_classy(%class.test_class* noalias sret %agg.result, i64 %0) +// CHECK-LIN64-DAG: define dso_local x86_regcallcc void @_Zli11_test_classy(%class.test_class* noalias sret %agg.result, i64 %0) // CHECK-LIN32-DAG: define x86_regcallcc void @_Zli11_test_classy(%class.test_class* inreg noalias sret %agg.result, i64 %0) // CHECK-WIN64-DAG: ??__K_test_class@@Yw?AVtest_class@@_K@Z" // CHECK-WIN32-DAG: ??__K_test_class@@Yw?AVtest_class@@_K@Z" template<typename T> void __regcall freeTempFunc(T i){} -// CHECK-LIN-DAG: define linkonce_odr x86_regcallcc void @_Z24__regcall3__freeTempFuncIiEvT_ +// CHECK-LIN-DAG: define linkonce_odr dso_local x86_regcallcc void @_Z24__regcall3__freeTempFuncIiEvT_ // CHECK-WIN64-DAG: define linkonce_odr dso_local x86_regcallcc void @"??$freeTempFunc@H@@YwXH@Z" // CHECK-WIN32-DAG: define linkonce_odr dso_local x86_regcallcc void @"??$freeTempFunc@H@@YwXH@Z" diff --git a/clang/test/CodeGenCXX/rtti-qualfn.cpp b/clang/test/CodeGenCXX/rtti-qualfn.cpp index 329cd50547ab..ba49df4b4a78 100644 --- a/clang/test/CodeGenCXX/rtti-qualfn.cpp +++ b/clang/test/CodeGenCXX/rtti-qualfn.cpp @@ -4,19 +4,19 @@ struct A {}; -// CHECK-DAG: @_ZTIFvvE = linkonce_odr constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv120__function_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @_ZTSFvvE, i32 0, i32 0) }, comdat -// CHECK-DAG: @_ZTIPDoFvvE = linkonce_odr constant { i8*, i8*, i32, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv119__pointer_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @_ZTSPDoFvvE, i32 0, i32 0), i32 64, i8* bitcast ({ i8*, i8* }* @_ZTIFvvE to i8*) }, comdat +// CHECK-DAG: @_ZTIFvvE = linkonce_odr dso_local constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv120__function_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @_ZTSFvvE, i32 0, i32 0) }, comdat +// CHECK-DAG: @_ZTIPDoFvvE = linkonce_odr dso_local constant { i8*, i8*, i32, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv119__pointer_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @_ZTSPDoFvvE, i32 0, i32 0), i32 64, i8* bitcast ({ i8*, i8* }* @_ZTIFvvE to i8*) }, comdat auto &ti_noexcept_ptr = typeid(void (A::*)() noexcept); -// CHECK-DAG: @_ZTIM1ADoFvvE = linkonce_odr constant { i8*, i8*, i32, i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv129__pointer_to_member_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @_ZTSM1ADoFvvE, i32 0, i32 0), i32 64, i8* bitcast ({ i8*, i8* }* @_ZTIFvvE to i8*), i8* bitcast ({ i8*, i8* }* @_ZTI1A to i8*) }, comdat +// CHECK-DAG: @_ZTIM1ADoFvvE = linkonce_odr dso_local constant { i8*, i8*, i32, i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv129__pointer_to_member_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @_ZTSM1ADoFvvE, i32 0, i32 0), i32 64, i8* bitcast ({ i8*, i8* }* @_ZTIFvvE to i8*), i8* bitcast ({ i8*, i8* }* @_ZTI1A to i8*) }, comdat auto &ti_noexcept_memptr = typeid(void (A::*)() noexcept); -// CHECK-LABEL: define void @_Z1fv( +// CHECK-LABEL: define dso_local void @_Z1fv( __attribute__((noreturn)) void f() noexcept { // CHECK: call void @__cxa_throw({{.*}}@_ZTIPDoFvvE throw f; } -// CHECK-LABEL: define void @_Z1gM1ADoFvvE( +// CHECK-LABEL: define dso_local void @_Z1gM1ADoFvvE( void g(__attribute__((noreturn)) void (A::*p)() noexcept) { // CHECK: call void @__cxa_throw({{.*}}@_ZTIM1ADoFvvE throw p; diff --git a/clang/test/CodeGenCXX/stack-reuse-exceptions.cpp b/clang/test/CodeGenCXX/stack-reuse-exceptions.cpp index 2d968db3fdbd..5c80be59009a 100644 --- a/clang/test/CodeGenCXX/stack-reuse-exceptions.cpp +++ b/clang/test/CodeGenCXX/stack-reuse-exceptions.cpp @@ -18,7 +18,7 @@ struct NontrivialDtor { ~NontrivialDtor(); }; -// CHECK-LABEL: define void @_Z33cleanupsAreEmittedWithoutTryCatchv +// CHECK-LABEL: define dso_local void @_Z33cleanupsAreEmittedWithoutTryCatchv void cleanupsAreEmittedWithoutTryCatch() { // CHECK: %[[CLEAN:[^ ]+]] = bitcast %struct.NontrivialDtor* %{{[^ ]+}} to i8* // CHECK: call void @llvm.lifetime.start.p0i8({{[^,]+}}, i8* nonnull %[[CLEAN]]) @@ -56,7 +56,7 @@ void cleanupsAreEmittedWithoutTryCatch() { getLarge(); } -// CHECK-LABEL: define void @_Z30cleanupsAreEmittedWithTryCatchv +// CHECK-LABEL: define dso_local void @_Z30cleanupsAreEmittedWithTryCatchv void cleanupsAreEmittedWithTryCatch() { // CHECK: %[[CLEAN:[^ ]+]] = bitcast %struct.NontrivialDtor* %{{[^ ]+}} to i8* // CHECK: call void @llvm.lifetime.start.p0i8({{[^,]+}}, i8* nonnull %[[CLEAN]]) @@ -121,7 +121,7 @@ void cleanupsAreEmittedWithTryCatch() { getLarge(); } -// CHECK-LABEL: define void @_Z39cleanupInTryHappensBeforeCleanupInCatchv +// CHECK-LABEL: define dso_local void @_Z39cleanupInTryHappensBeforeCleanupInCatchv void cleanupInTryHappensBeforeCleanupInCatch() { // CHECK: %[[T1:[^ ]+]] = bitcast %struct.Large* %{{[^ ]+}} to i8* // CHECK: call void @llvm.lifetime.start.p0i8({{[^,]+}}, i8* nonnull %[[T1]]) diff --git a/clang/test/CodeGenCXX/stack-reuse.cpp b/clang/test/CodeGenCXX/stack-reuse.cpp index 35dcb5b349c3..f7d4cc68579f 100644 --- a/clang/test/CodeGenCXX/stack-reuse.cpp +++ b/clang/test/CodeGenCXX/stack-reuse.cpp @@ -33,7 +33,7 @@ extern void bar_large(S_large*); extern "C" { void small_rvoed_unnamed_temporary_object() { -// CHECK-LABEL: define void @small_rvoed_unnamed_temporary_object +// CHECK-LABEL: define dso_local void @small_rvoed_unnamed_temporary_object // CHECK: call void @llvm.lifetime.start // CHECK: call void @_Z9foo_smallv // CHECK: call void @llvm.lifetime.end @@ -46,7 +46,7 @@ void small_rvoed_unnamed_temporary_object() { } void large_rvoed_unnamed_temporary_object() { -// CHECK-LABEL: define void @large_rvoed_unnamed_temporary_object +// CHECK-LABEL: define dso_local void @large_rvoed_unnamed_temporary_object // CHECK: call void @llvm.lifetime.start // CHECK: call void @_Z9foo_largev // CHECK: call void @llvm.lifetime.end @@ -59,7 +59,7 @@ void large_rvoed_unnamed_temporary_object() { } void small_rvoed_named_temporary_object() { -// CHECK-LABEL: define void @small_rvoed_named_temporary_object +// CHECK-LABEL: define dso_local void @small_rvoed_named_temporary_object // CHECK: call void @llvm.lifetime.start // CHECK: call void @_Z9foo_smallv // CHECK: call void @llvm.lifetime.end @@ -76,7 +76,7 @@ void small_rvoed_named_temporary_object() { } void large_rvoed_named_temporary_object() { -// CHECK-LABEL: define void @large_rvoed_named_temporary_object +// CHECK-LABEL: define dso_local void @large_rvoed_named_temporary_object // CHECK: call void @llvm.lifetime.start // CHECK: call void @_Z9foo_largev // CHECK: call void @llvm.lifetime.end @@ -93,7 +93,7 @@ void large_rvoed_named_temporary_object() { } void small_auto_object() { -// CHECK-LABEL: define void @small_auto_object +// CHECK-LABEL: define dso_local void @small_auto_object // CHECK: call void @llvm.lifetime.start // CHECK: call void @_Z9bar_smallP7S_small // CHECK: call void @llvm.lifetime.end @@ -112,7 +112,7 @@ void small_auto_object() { } void large_auto_object() { -// CHECK-LABEL: define void @large_auto_object +// CHECK-LABEL: define dso_local void @large_auto_object // CHECK: call void @llvm.lifetime.start // CHECK: call void @_Z9bar_largeP7S_large // CHECK: call void @llvm.lifetime.end @@ -131,7 +131,7 @@ void large_auto_object() { } int large_combiner_test(S_large s) { -// CHECK-LABEL: define i32 @large_combiner_test +// CHECK-LABEL: define dso_local i32 @large_combiner_test // CHECK: [[T2:%.*]] = alloca %struct.Combiner // CHECK: [[T1:%.*]] = alloca %struct.Combiner // CHECK: [[T3:%.*]] = call %struct.Combiner* @_ZN8CombinerC1E7S_large(%struct.Combiner* nonnull [[T1]], [9 x i32] %s.coerce) diff --git a/clang/test/CodeGenCXX/static-data-member.cpp b/clang/test/CodeGenCXX/static-data-member.cpp index 5ffd83ff023b..69378e453e06 100644 --- a/clang/test/CodeGenCXX/static-data-member.cpp +++ b/clang/test/CodeGenCXX/static-data-member.cpp @@ -1,8 +1,8 @@ -// RUN: %clang_cc1 -triple x86_64-pc-linux -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-pc-linux -emit-llvm -o - %s -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s | \ // RUN: FileCheck --check-prefix=MACHO %s -// CHECK: @_ZN5test11A1aE = constant i32 10, align 4 +// CHECK: @_ZN5test11A1aE = dso_local constant i32 10, align 4 // CHECK: @_ZN5test212_GLOBAL__N_11AIiE1xE = internal global i32 0, align 4 // CHECK: @_ZN5test31AIiE1xE = weak_odr global i32 0, comdat, align 4 // CHECK: @_ZGVN5test31AIiE1xE = weak_odr global i64 0, comdat($_ZN5test31AIiE1xE) @@ -85,7 +85,7 @@ namespace test4 { }; int f(A *a) { - // CHECK-LABEL: define i32 @_ZN5test41fEPNS_1AE + // CHECK-LABEL: define dso_local i32 @_ZN5test41fEPNS_1AE // CHECK: ret i32 76 return a->n; } diff --git a/clang/test/CodeGenCXX/static-init-4.cpp b/clang/test/CodeGenCXX/static-init-4.cpp index a4bb987c8d3d..3687f4ffcb97 100644 --- a/clang/test/CodeGenCXX/static-init-4.cpp +++ b/clang/test/CodeGenCXX/static-init-4.cpp @@ -4,4 +4,4 @@ typedef __attribute__((vector_size(4*4))) float float32x4_t; union QDSUnion { float32x4_t q; float s[4]; }; constexpr float32x4_t a = {1,2,3,4}; QDSUnion t = {{(a)}}; -// CHECK: @t = global %union.QDSUnion { <4 x float> <float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00> } +// CHECK: @t = dso_local global %union.QDSUnion { <4 x float> <float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00> } diff --git a/clang/test/CodeGenCXX/static-init.cpp b/clang/test/CodeGenCXX/static-init.cpp index 925ddec1ad06..fdc167dea3e6 100644 --- a/clang/test/CodeGenCXX/static-init.cpp +++ b/clang/test/CodeGenCXX/static-init.cpp @@ -1,13 +1,13 @@ -// RUN: %clang_cc1 %s -triple=x86_64-pc-linuxs -emit-llvm -std=c++98 -o - | FileCheck -check-prefix=CHECK -check-prefix=CHECK98 %s -// RUN: %clang_cc1 %s -triple=x86_64-pc-linuxs -emit-llvm -std=c++11 -o - | FileCheck -check-prefix=CHECK -check-prefix=CHECK11 %s +// RUN: %clang_cc1 %s -triple=x86_64-pc-linuxs -emit-llvm -std=c++98 -o - -fsemantic-interposition | FileCheck -check-prefix=CHECK -check-prefix=CHECK98 %s +// RUN: %clang_cc1 %s -triple=x86_64-pc-linuxs -emit-llvm -std=c++11 -o - -fsemantic-interposition | FileCheck -check-prefix=CHECK -check-prefix=CHECK11 %s // CHECK: @_ZZ1hvE1i = internal global i32 0, align 4 -// CHECK: @base_req = global [4 x i8] c"foo\00", align 1 -// CHECK: @base_req_uchar = global [4 x i8] c"bar\00", align 1 +// CHECK: @base_req = dso_local global [4 x i8] c"foo\00", align 1 +// CHECK: @base_req_uchar = dso_local global [4 x i8] c"bar\00", align 1 // CHECK: @_ZZN5test31BC1EvE1u = internal global { i8, [3 x i8] } { i8 97, [3 x i8] undef }, align 4 -// CHECK: @_ZZ2h2vE1i = linkonce_odr global i32 0, comdat, align 4 +// CHECK: @_ZZ2h2vE1i = linkonce_odr dso_local global i32 0, comdat, align 4 // CHECK: @_ZGVZ2h2vE1i = linkonce_odr global i64 0, comdat, align 8{{$}} // CHECK: @_ZZN5test1L6getvarEiE3var = internal constant [4 x i32] [i32 1, i32 0, i32 2, i32 4], align 16 // CHECK98: @_ZZN5test414useStaticLocalEvE3obj = linkonce_odr global %"struct.test4::HasVTable" zeroinitializer, comdat, align 8 @@ -108,14 +108,14 @@ namespace test2 { B::B() { static int x = foo(); } - // CHECK-LABEL: define void @_ZN5test21BC2Ev + // CHECK-LABEL: define dso_local void @_ZN5test21BC2Ev // CHECK: load atomic i8, i8* bitcast (i64* @_ZGVZN5test21BC1EvE1x to i8*) acquire, // CHECK: call i32 @__cxa_guard_acquire(i64* @_ZGVZN5test21BC1EvE1x) // CHECK: [[T0:%.*]] = call i32 @_ZN5test23fooEv() // CHECK: store i32 [[T0]], i32* @_ZZN5test21BC1EvE1x, // CHECK: call void @__cxa_guard_release(i64* @_ZGVZN5test21BC1EvE1x) - // CHECK-LABEL: define void @_ZN5test21BC1Ev + // CHECK-LABEL: define dso_local void @_ZN5test21BC1Ev // CHECK: load atomic i8, i8* bitcast (i64* @_ZGVZN5test21BC1EvE1x to i8*) acquire, // CHECK: call i32 @__cxa_guard_acquire(i64* @_ZGVZN5test21BC1EvE1x) // CHECK: [[T0:%.*]] = call i32 @_ZN5test23fooEv() @@ -127,14 +127,14 @@ namespace test2 { B::~B() { static int y = foo(); } - // CHECK-LABEL: define void @_ZN5test21BD2Ev( + // CHECK-LABEL: define dso_local void @_ZN5test21BD2Ev( // CHECK: load atomic i8, i8* bitcast (i64* @_ZGVZN5test21BD1EvE1y to i8*) acquire, // CHECK: call i32 @__cxa_guard_acquire(i64* @_ZGVZN5test21BD1EvE1y) // CHECK: [[T0:%.*]] = call i32 @_ZN5test23fooEv() // CHECK: store i32 [[T0]], i32* @_ZZN5test21BD1EvE1y, // CHECK: call void @__cxa_guard_release(i64* @_ZGVZN5test21BD1EvE1y) - // CHECK-LABEL: define void @_ZN5test21BD1Ev( + // CHECK-LABEL: define dso_local void @_ZN5test21BD1Ev( // CHECK: call void @_ZN5test21BD2Ev( } @@ -154,8 +154,8 @@ namespace test3 { union U { char x; int i; }; static U u = { 'a' }; } - // CHECK-LABEL: define void @_ZN5test31BC2Ev( - // CHECK-LABEL: define void @_ZN5test31BC1Ev( + // CHECK-LABEL: define dso_local void @_ZN5test31BC2Ev( + // CHECK-LABEL: define dso_local void @_ZN5test31BC1Ev( } // We forgot to set the comdat when replacing the global with a different type. @@ -170,6 +170,6 @@ inline HasVTable &useStaticLocal() { void useit() { useStaticLocal(); } -// CHECK: define linkonce_odr dereferenceable(8) %"struct.test4::HasVTable"* @_ZN5test414useStaticLocalEv() +// CHECK: define linkonce_odr dso_local dereferenceable(8) %"struct.test4::HasVTable"* @_ZN5test414useStaticLocalEv() // CHECK: ret %"struct.test4::HasVTable"*{{.*}} @_ZZN5test414useStaticLocalEvE3obj } diff --git a/clang/test/CodeGenCXX/static-initializer-branch-weights.cpp b/clang/test/CodeGenCXX/static-initializer-branch-weights.cpp index f9e77812714c..6c48bce93d4d 100644 --- a/clang/test/CodeGenCXX/static-initializer-branch-weights.cpp +++ b/clang/test/CodeGenCXX/static-initializer-branch-weights.cpp @@ -52,7 +52,7 @@ struct A { static thread_local inline S thread_local_inline_member; }; -// CHECK-LABEL: define void @_Z1fv() +// CHECK-LABEL: define dso_local void @_Z1fv() void f() { // CHECK: load atomic i8, i8* bitcast (i64* @_ZGVZ1fvE12static_local to i8*) acquire, // CHECK: icmp eq i8 {{.*}}, 0 diff --git a/clang/test/CodeGenCXX/static-local-in-local-class.cpp b/clang/test/CodeGenCXX/static-local-in-local-class.cpp index 2a82c8ff7dae..4a971eb41c0b 100644 --- a/clang/test/CodeGenCXX/static-local-in-local-class.cpp +++ b/clang/test/CodeGenCXX/static-local-in-local-class.cpp @@ -4,7 +4,7 @@ // CHECK: internal global i32* @"_ZZNK17pr18020_constexpr3$_1clEvE2l1" // CHECK: @_ZZL14deduced_returnvE1n = internal global i32 42 // CHECK: @_ZZZL20block_deduced_returnvEUb_E1n = internal global i32 42 -// CHECK: @_ZZ18static_local_labelPvE1q = linkonce_odr global i8* blockaddress(@_Z18static_local_labelPv, %{{.*}}) +// CHECK: @_ZZ18static_local_labelPvE1q = linkonce_odr dso_local global i8* blockaddress(@_Z18static_local_labelPv, %{{.*}}) // CHECK: @"_ZZNK3$_2clEvE1x" = internal global i32 42 namespace pr6769 { @@ -87,7 +87,7 @@ struct pr18020_class { static pr18020_class x; int pr18020_f() { return x()(); } -// CHECK-LABEL: define linkonce_odr i32 @_ZZN13pr18020_classclEvEN1UclEv +// CHECK-LABEL: define linkonce_odr dso_local i32 @_ZZN13pr18020_classclEvEN1UclEv // CHECK: load i32, i32* @_ZZN13pr18020_classclEvE2l1 // In this test case, the function containing the static local will not be @@ -102,7 +102,7 @@ extern "C" int call_deduced_return_operator() { return *decltype(deduced_return())()(); } -// CHECK-LABEL: define i32 @call_deduced_return_operator() +// CHECK-LABEL: define dso_local i32 @call_deduced_return_operator() // CHECK: call i32* @_ZZL14deduced_returnvEN1SclEv( // CHECK: load i32, i32* % // CHECK: ret i32 % @@ -122,7 +122,7 @@ extern "C" int call_block_deduced_return() { return *decltype(block_deduced_return())()(); } -// CHECK-LABEL: define i32 @call_block_deduced_return() +// CHECK-LABEL: define dso_local i32 @call_block_deduced_return() // CHECK: call i32* @_ZZZL20block_deduced_returnvEUb_EN1SclEv( // CHECK: load i32, i32* % // CHECK: ret i32 % @@ -141,7 +141,7 @@ label: } void *global_label = decltype(static_local_label(0))::get(); -// CHECK-LABEL: define linkonce_odr i8* @_ZZ18static_local_labelPvEN1S3getEv() +// CHECK-LABEL: define linkonce_odr dso_local i8* @_ZZ18static_local_labelPvEN1S3getEv() // CHECK: %[[lbl:[^ ]*]] = load i8*, i8** @_ZZ18static_local_labelPvE1q // CHECK: ret i8* %[[lbl]] @@ -153,7 +153,7 @@ auto global_lambda = []() { extern "C" int use_global_lambda() { return *decltype(global_lambda())::get(); } -// CHECK-LABEL: define i32 @use_global_lambda() +// CHECK-LABEL: define dso_local i32 @use_global_lambda() // CHECK: call i32* @"_ZZNK3$_2clEvEN1S3getEv"() // CHECK-LABEL: define internal i32* @"_ZZNK3$_2clEvEN1S3getEv"() diff --git a/clang/test/CodeGenCXX/static-member-variable-explicit-specialization.cpp b/clang/test/CodeGenCXX/static-member-variable-explicit-specialization.cpp index 20b409cbf996..ea1ae0ccda40 100644 --- a/clang/test/CodeGenCXX/static-member-variable-explicit-specialization.cpp +++ b/clang/test/CodeGenCXX/static-member-variable-explicit-specialization.cpp @@ -11,7 +11,7 @@ template<typename T> int A<T>::a = foo(); // ALLK-NOT: @_ZN1AIcE1aE template<> int A<char>::a; -// ALL: @_ZN1AIbE1aE = global i32 10 +// ALL: @_ZN1AIbE1aE = dso_local global i32 10 template<> int A<bool>::a = 10; // ALL: @llvm.global_ctors = appending global [8 x { i32, void ()*, i8* }] diff --git a/clang/test/CodeGenCXX/std-byte.cpp b/clang/test/CodeGenCXX/std-byte.cpp index a3cc634221bf..62226a66b83e 100644 --- a/clang/test/CodeGenCXX/std-byte.cpp +++ b/clang/test/CodeGenCXX/std-byte.cpp @@ -6,7 +6,7 @@ namespace std { enum byte : unsigned char {}; } -// CHECK-LABEL: define void @test0( +// CHECK-LABEL: define dso_local void @test0( extern "C" void test0(std::byte *sb, int *i) { // CHECK: store i8 0, i8* %{{.*}} !tbaa [[TAG_CHAR:!.*]] *sb = std::byte{0}; @@ -25,7 +25,7 @@ enum byte : unsigned char {}; // Make sure we don't get confused with other enums named 'byte'. -// CHECK-LABEL: define void @test1( +// CHECK-LABEL: define dso_local void @test1( extern "C" void test1(::byte *b, ::my::byte *mb, ::my::std::byte *msb) { *b = ::byte{0}; *mb = ::my::byte{0}; diff --git a/clang/test/CodeGenCXX/template-anonymous-types.cpp b/clang/test/CodeGenCXX/template-anonymous-types.cpp index 63685efbfa0a..2ab25c5bcf7b 100644 --- a/clang/test/CodeGenCXX/template-anonymous-types.cpp +++ b/clang/test/CodeGenCXX/template-anonymous-types.cpp @@ -19,18 +19,18 @@ template <typename T> int f(T t) { void test() { // Look for two instantiations, one for FOO's // type and one for BAR's. - // CHECK-LABEL: define linkonce_odr i32 @_Z1fIN1SUt_EEiT_(i32 %t) + // CHECK-LABEL: define linkonce_odr dso_local i32 @_Z1fIN1SUt_EEiT_(i32 %t) (void)f(S::FOO); - // CHECK-LABEL: define linkonce_odr i32 @_Z1fIN1SUt0_EEiT_(i32 %t) + // CHECK-LABEL: define linkonce_odr dso_local i32 @_Z1fIN1SUt0_EEiT_(i32 %t) (void)f(S::BAR); // Now check for the class template instantiations. // // BAR's instantiation of X: - // CHECK-LABEL: define linkonce_odr i32 @_ZN1XIN1SUt_EE1fEv(%struct.X* %this) - // CHECK-LABEL: define linkonce_odr void @_ZN1XIN1SUt_EEC2ES1_(%struct.X* %this, i32 %t) unnamed_addr + // CHECK-LABEL: define linkonce_odr dso_local i32 @_ZN1XIN1SUt_EE1fEv(%struct.X* %this) + // CHECK-LABEL: define linkonce_odr dso_local void @_ZN1XIN1SUt_EEC2ES1_(%struct.X* %this, i32 %t) unnamed_addr // // FOO's instantiation of X: - // CHECK-LABEL: define linkonce_odr i32 @_ZN1XIN1SUt0_EE1fEv(%struct.X.0* %this) - // CHECK-LABEL: define linkonce_odr void @_ZN1XIN1SUt0_EEC2ES1_(%struct.X.0* %this, i32 %t) unnamed_addr + // CHECK-LABEL: define linkonce_odr dso_local i32 @_ZN1XIN1SUt0_EE1fEv(%struct.X.0* %this) + // CHECK-LABEL: define linkonce_odr dso_local void @_ZN1XIN1SUt0_EEC2ES1_(%struct.X.0* %this, i32 %t) unnamed_addr } diff --git a/clang/test/CodeGenCXX/thiscall-struct-return.cpp b/clang/test/CodeGenCXX/thiscall-struct-return.cpp index a6be5aa494e1..3611e459629e 100644 --- a/clang/test/CodeGenCXX/thiscall-struct-return.cpp +++ b/clang/test/CodeGenCXX/thiscall-struct-return.cpp @@ -29,7 +29,7 @@ public: } }; -// CHECK-LABEL: define void @_Z4testv() +// CHECK-LABEL: define dso_local void @_Z4testv() void test( void ) { // CHECK: call void @_ZN1CC1Ev(%class.C* [[C:%.+]]) C c; diff --git a/clang/test/CodeGenCXX/throw-expression-cleanup.cpp b/clang/test/CodeGenCXX/throw-expression-cleanup.cpp index 9944e161a817..a45127bcc6e4 100644 --- a/clang/test/CodeGenCXX/throw-expression-cleanup.cpp +++ b/clang/test/CodeGenCXX/throw-expression-cleanup.cpp @@ -14,7 +14,7 @@ void f() { } catch (...) { } } -// CHECK-LABEL: define void @_Z1fv +// CHECK-LABEL: define dso_local void @_Z1fv // CHECK: call void @_ZN5ErrorC1ERK1X // CHECK: invoke void @__cxa_throw // CHECK: landingpad diff --git a/clang/test/CodeGenCXX/throw-expressions.cpp b/clang/test/CodeGenCXX/throw-expressions.cpp index 3fe20388f2fc..40d5c22bb01f 100644 --- a/clang/test/CodeGenCXX/throw-expressions.cpp +++ b/clang/test/CodeGenCXX/throw-expressions.cpp @@ -23,7 +23,7 @@ int test4() { int test5(bool x, bool y, int z) { return (x ? throw 1 : y) ? z : throw 2; } -// CHECK-LABEL: define i32 @_Z5test5bbi( +// CHECK-LABEL: define dso_local i32 @_Z5test5bbi( // CHECK: br i1 // // x.true: @@ -47,7 +47,7 @@ int test5(bool x, bool y, int z) { int test6(bool x, bool y, int z) { return (x ? throw 1 : y) ? z : (throw 2); } -// CHECK-LABEL: define i32 @_Z5test6bbi( +// CHECK-LABEL: define dso_local i32 @_Z5test6bbi( // CHECK: br i1 // // x.true: @@ -81,7 +81,7 @@ namespace DR1560 { // CHECK-NOT: call {{.*}}@_ZN6DR15601AD1Ev } -// CHECK-LABEL: define void @_Z5test7b( +// CHECK-LABEL: define dso_local void @_Z5test7b( void test7(bool cond) { // CHECK: br i1 // @@ -97,7 +97,7 @@ void test7(bool cond) { cond ? throw test7 : val; } -// CHECK-LABEL: define dereferenceable(4) i32* @_Z5test8b( +// CHECK-LABEL: define dso_local dereferenceable(4) i32* @_Z5test8b( int &test8(bool cond) { // CHECK: br i1 // diff --git a/clang/test/CodeGenCXX/thunk-linkonce-odr.cpp b/clang/test/CodeGenCXX/thunk-linkonce-odr.cpp index 82f2148e0b55..9c1a1f33f9cc 100644 --- a/clang/test/CodeGenCXX/thunk-linkonce-odr.cpp +++ b/clang/test/CodeGenCXX/thunk-linkonce-odr.cpp @@ -29,5 +29,5 @@ int g() { // Thunks should be marked as "linkonce ODR" not "weak". // -// CHECK: define linkonce_odr i32 @_ZThn{{[48]}}_N1D1fEv -// CHECK: define linkonce_odr i32 @_ZThn{{[48]}}_N1C1fEv +// CHECK: define linkonce_odr dso_local i32 @_ZThn{{[48]}}_N1D1fEv +// CHECK: define linkonce_odr dso_local i32 @_ZThn{{[48]}}_N1C1fEv diff --git a/clang/test/CodeGenCXX/thunk-returning-memptr.cpp b/clang/test/CodeGenCXX/thunk-returning-memptr.cpp index 0b7870c6d658..b01da8423619 100644 --- a/clang/test/CodeGenCXX/thunk-returning-memptr.cpp +++ b/clang/test/CodeGenCXX/thunk-returning-memptr.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple=i686 -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple=i686 -emit-llvm -o - %s -fsemantic-interposition | FileCheck %s struct X; diff --git a/clang/test/CodeGenCXX/thunks.cpp b/clang/test/CodeGenCXX/thunks.cpp index fe7d656eb7e5..0f4f51d2ce50 100644 --- a/clang/test/CodeGenCXX/thunks.cpp +++ b/clang/test/CodeGenCXX/thunks.cpp @@ -34,7 +34,7 @@ struct C : A, B { virtual void f(); }; -// CHECK-LABEL: define void @_ZThn8_N5Test11C1fEv( +// CHECK-LABEL: define dso_local void @_ZThn8_N5Test11C1fEv( // CHECK-DBG-NOT: dbg.declare // CHECK: ret void // @@ -59,7 +59,7 @@ struct B : virtual A { virtual void f(); }; -// CHECK-LABEL: define void @_ZTv0_n24_N5Test21B1fEv( +// CHECK-LABEL: define dso_local void @_ZTv0_n24_N5Test21B1fEv( // CHECK-DBG-NOT: dbg.declare // CHECK: ret void void B::f() { } @@ -87,7 +87,7 @@ struct B : A { virtual V2 *f(); }; -// CHECK: define %{{.*}}* @_ZTch0_v0_n24_N5Test31B1fEv( +// CHECK: define dso_local %{{.*}}* @_ZTch0_v0_n24_N5Test31B1fEv( // WIN64: define weak_odr dso_local %{{.*}} @"?f@B@Test3@@QEAAPEAUV1@2@XZ"( V2 *B::f() { return 0; } @@ -203,7 +203,7 @@ namespace Test6 { virtual X f(); }; - // CHECK-LABEL: define void @_ZThn16_N5Test66Thunks1fEv + // CHECK-LABEL: define dso_local void @_ZThn16_N5Test66Thunks1fEv // CHECK-DBG-NOT: dbg.declare // CHECK-NOT: memcpy // CHECK: {{call void @_ZN5Test66Thunks1fEv.*sret}} @@ -254,7 +254,7 @@ namespace Test7 { void D::baz(X, X&, _Complex float, Small, Small&, Large) { } - // CHECK-LABEL: define void @_ZThn8_N5Test71D3bazENS_1XERS1_CfNS_5SmallERS4_NS_5LargeE( + // CHECK-LABEL: define dso_local void @_ZThn8_N5Test71D3bazENS_1XERS1_CfNS_5SmallERS4_NS_5LargeE( // CHECK-DBG-NOT: dbg.declare // CHECK-NOT: memcpy // CHECK: ret void @@ -269,10 +269,10 @@ namespace Test8 { struct B { virtual void bar(NonPOD); }; struct C : A, B { virtual void bar(NonPOD); static void helper(NonPOD); }; - // CHECK: define void @_ZN5Test81C6helperENS_6NonPODE([[NONPODTYPE:%.*]]* + // CHECK: define dso_local void @_ZN5Test81C6helperENS_6NonPODE([[NONPODTYPE:%.*]]* void C::helper(NonPOD var) {} - // CHECK-LABEL: define void @_ZThn8_N5Test81C3barENS_6NonPODE( + // CHECK-LABEL: define dso_local void @_ZThn8_N5Test81C3barENS_6NonPODE( // CHECK-DBG-NOT: dbg.declare // CHECK-NOT: load [[NONPODTYPE]], [[NONPODTYPE]]* // CHECK-NOT: memcpy @@ -436,7 +436,7 @@ namespace Test14 { }; void C::f() { } - // CHECK: define void @_ZThn8_N6Test141C1fEv({{.*}}) unnamed_addr [[NUW:#[0-9]+]] + // CHECK: define dso_local void @_ZThn8_N6Test141C1fEv({{.*}}) unnamed_addr [[NUW:#[0-9]+]] // CHECK-DBG-NOT: dbg.declare // CHECK: ret void } @@ -483,7 +483,7 @@ struct D : public C { ~D(); }; D::~D() {} -// CHECK: define linkonce_odr void @_ZThn8_N6Test161C3fooEv({{.*}}) {{.*}} comdat +// CHECK: define linkonce_odr dso_local void @_ZThn8_N6Test161C3fooEv({{.*}}) {{.*}} comdat // CHECK-DBG-NOT: dbg.declare // CHECK: ret void } @@ -522,21 +522,21 @@ C c; // CHECK-NONOPT-NOT: comdat // This is from Test5: -// CHECK-NONOPT-LABEL: define linkonce_odr void @_ZTv0_n24_N5Test51B1fEv +// CHECK-NONOPT-LABEL: define linkonce_odr dso_local void @_ZTv0_n24_N5Test51B1fEv // This is from Test10: -// CHECK-NONOPT-LABEL: define linkonce_odr void @_ZN6Test101C3fooEv -// CHECK-NONOPT-LABEL: define linkonce_odr void @_ZThn8_N6Test101C3fooEv +// CHECK-NONOPT-LABEL: define linkonce_odr dso_local void @_ZN6Test101C3fooEv +// CHECK-NONOPT-LABEL: define linkonce_odr dso_local void @_ZThn8_N6Test101C3fooEv // Checking with opt // CHECK-OPT-LABEL: define internal void @_ZThn8_N6Test4B12_GLOBAL__N_11C1fEv(%"struct.Test4B::(anonymous namespace)::C"* %this) unnamed_addr #0 align 2 // This is from Test5: -// CHECK-OPT-LABEL: define linkonce_odr void @_ZTv0_n24_N5Test51B1fEv +// CHECK-OPT-LABEL: define linkonce_odr dso_local void @_ZTv0_n24_N5Test51B1fEv // This is from Test10: -// CHECK-OPT-LABEL: define linkonce_odr void @_ZN6Test101C3fooEv -// CHECK-OPT-LABEL: define linkonce_odr void @_ZThn8_N6Test101C3fooEv +// CHECK-OPT-LABEL: define linkonce_odr dso_local void @_ZN6Test101C3fooEv +// CHECK-OPT-LABEL: define linkonce_odr dso_local void @_ZThn8_N6Test101C3fooEv // This is from Test10: // WIN64-LABEL: define linkonce_odr dso_local void @"?foo@C@Test10@@UEAAXXZ"( diff --git a/clang/test/CodeGenCXX/type-metadata.cpp b/clang/test/CodeGenCXX/type-metadata.cpp index 05731f15b9df..fa527607b848 100644 --- a/clang/test/CodeGenCXX/type-metadata.cpp +++ b/clang/test/CodeGenCXX/type-metadata.cpp @@ -130,7 +130,7 @@ void D::h() { } // ITANIUM: define hidden void @_Z2afP1A -// ITANIUM-DEFAULTVIS: define void @_Z2afP1A +// ITANIUM-DEFAULTVIS: define dso_local void @_Z2afP1A // MS: define dso_local void @"?af@@YAXPEAUA@@@Z" void af(A *a) { // TT-ITANIUM: [[P:%[^ ]*]] = call i1 @llvm.type.test(i8* [[VT:%[^ ]*]], metadata !"_ZTS1A") @@ -241,7 +241,7 @@ struct D : C { }; // ITANIUM: define hidden void @_ZN5test21fEPNS_1DE -// ITANIUM-DEFAULTVIS: define void @_ZN5test21fEPNS_1DE +// ITANIUM-DEFAULTVIS: define dso_local void @_ZN5test21fEPNS_1DE // MS: define dso_local void @"?f@test2@@YAXPEAUD@1@@Z" void f(D *d) { // TT-ITANIUM: {{%[^ ]*}} = call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata !"_ZTSN5test21DE") diff --git a/clang/test/CodeGenCXX/ubsan-function-noexcept.cpp b/clang/test/CodeGenCXX/ubsan-function-noexcept.cpp index 45c2764add7d..8f399e2321db 100644 --- a/clang/test/CodeGenCXX/ubsan-function-noexcept.cpp +++ b/clang/test/CodeGenCXX/ubsan-function-noexcept.cpp @@ -3,10 +3,10 @@ // Check that typeinfo recorded in function prolog doesn't have "Do" noexcept // qualifier in its mangled name. // CHECK: @[[RTTI:[0-9]+]] = private constant i8* bitcast ({ i8*, i8* }* @_ZTIFvvE to i8*) -// CHECK: define void @_Z1fv() #{{.*}} prologue <{ i32, i32 }> <{ i32 {{.*}}, i32 trunc (i64 sub (i64 ptrtoint (i8** @[[RTTI]] to i64), i64 ptrtoint (void ()* @_Z1fv to i64)) to i32) }> +// CHECK: define dso_local void @_Z1fv() #{{.*}} prologue <{ i32, i32 }> <{ i32 {{.*}}, i32 trunc (i64 sub (i64 ptrtoint (i8** @[[RTTI]] to i64), i64 ptrtoint (void ()* @_Z1fv to i64)) to i32) }> void f() noexcept {} -// CHECK: define void @_Z1gPDoFvvE +// CHECK: define dso_local void @_Z1gPDoFvvE void g(void (*p)() noexcept) { // Check that reference typeinfo at call site doesn't have "Do" noexcept // qualifier in its mangled name, either. diff --git a/clang/test/CodeGenCXX/ubsan-vtable-checks.cpp b/clang/test/CodeGenCXX/ubsan-vtable-checks.cpp index ec4a21a2b2b4..3084f7e70159 100644 --- a/clang/test/CodeGenCXX/ubsan-vtable-checks.cpp +++ b/clang/test/CodeGenCXX/ubsan-vtable-checks.cpp @@ -16,7 +16,7 @@ U::~U() {} // CHECK-VPTR-MS: @__ubsan_vptr_type_cache = external dso_local -// ITANIUM: define i32 @_Z5get_vP1T +// ITANIUM: define dso_local i32 @_Z5get_vP1T // MSABI: define dso_local i32 @"?get_v int get_v(T* t) { // First, we check that vtable is not loaded before a type check. @@ -29,7 +29,7 @@ int get_v(T* t) { return t->v(); } -// ITANIUM: define void @_Z9delete_itP1T +// ITANIUM: define dso_local void @_Z9delete_itP1T // MSABI: define dso_local void @"?delete_it void delete_it(T *t) { // First, we check that vtable is not loaded before a type check. @@ -41,7 +41,7 @@ void delete_it(T *t) { delete t; } -// ITANIUM: define %struct.U* @_Z7dyncastP1T +// ITANIUM: define dso_local %struct.U* @_Z7dyncastP1T // MSABI: define dso_local %struct.U* @"?dyncast U* dyncast(T *t) { // First, we check that dynamic_cast is not called before a type check. diff --git a/clang/test/CodeGenCXX/uncopyable-args.cpp b/clang/test/CodeGenCXX/uncopyable-args.cpp index baada1ccdfdf..35f6b0453876 100644 --- a/clang/test/CodeGenCXX/uncopyable-args.cpp +++ b/clang/test/CodeGenCXX/uncopyable-args.cpp @@ -13,7 +13,7 @@ void foo(A); void bar() { foo({}); } -// CHECK-LABEL: define void @_ZN7trivial3barEv() +// CHECK-LABEL: define dso_local void @_ZN7trivial3barEv() // CHECK: alloca %"struct.trivial::A" // CHECK: load i8*, i8** // CHECK: call void @_ZN7trivial3fooENS_1AE(i8* %{{.*}}) @@ -33,7 +33,7 @@ void bar() { // normally doesn't permit copies when using braced initialization. foo({}); } -// CHECK-LABEL: define void @_ZN12default_ctor3barEv() +// CHECK-LABEL: define dso_local void @_ZN12default_ctor3barEv() // CHECK: alloca %"struct.default_ctor::A" // CHECK: call void @_Z{{.*}}C1Ev( // CHECK: load i8*, i8** @@ -55,7 +55,7 @@ void foo(A); void bar() { foo({}); } -// CHECK-LABEL: define void @_ZN9move_ctor3barEv() +// CHECK-LABEL: define dso_local void @_ZN9move_ctor3barEv() // CHECK: call void @_Z{{.*}}C1Ev( // CHECK-NOT: call // NEWABI: call void @_ZN9move_ctor3fooENS_1AE(%"struct.move_ctor::A"* %{{.*}}) @@ -77,7 +77,7 @@ void foo(A); void bar() { foo({}); } -// CHECK-LABEL: define void @_ZN11all_deleted3barEv() +// CHECK-LABEL: define dso_local void @_ZN11all_deleted3barEv() // CHECK: call void @_Z{{.*}}C1Ev( // CHECK-NOT: call // NEWABI: call void @_ZN11all_deleted3fooENS_1AE(%"struct.all_deleted::A"* %{{.*}}) @@ -98,7 +98,7 @@ void foo(A); void bar() { foo({}); } -// CHECK-LABEL: define void @_ZN18implicitly_deleted3barEv() +// CHECK-LABEL: define dso_local void @_ZN18implicitly_deleted3barEv() // CHECK: call void @_Z{{.*}}C1Ev( // CHECK-NOT: call // NEWABI: call void @_ZN18implicitly_deleted3fooENS_1AE(%"struct.implicitly_deleted::A"* %{{.*}}) @@ -121,7 +121,7 @@ void foo(A); void bar() { foo({}); } -// CHECK-LABEL: define void @_ZN11one_deleted3barEv() +// CHECK-LABEL: define dso_local void @_ZN11one_deleted3barEv() // CHECK: call void @_Z{{.*}}C1Ev( // CHECK-NOT: call // NEWABI: call void @_ZN11one_deleted3fooENS_1AE(%"struct.one_deleted::A"* %{{.*}}) @@ -143,7 +143,7 @@ void foo(A); void bar() { foo({}); } -// CHECK-LABEL: define void @_ZN14copy_defaulted3barEv() +// CHECK-LABEL: define dso_local void @_ZN14copy_defaulted3barEv() // CHECK: call void @_Z{{.*}}C1Ev( // CHECK: load i8*, i8** // CHECK: call void @_ZN14copy_defaulted3fooENS_1AE(i8* %{{.*}}) @@ -163,7 +163,7 @@ void foo(A); void bar() { foo({}); } -// CHECK-LABEL: define void @_ZN14move_defaulted3barEv() +// CHECK-LABEL: define dso_local void @_ZN14move_defaulted3barEv() // CHECK: call void @_Z{{.*}}C1Ev( // CHECK: load i8*, i8** // CHECK: call void @_ZN14move_defaulted3fooENS_1AE(i8* %{{.*}}) @@ -182,7 +182,7 @@ void foo(A); void bar() { foo({}); } -// CHECK-LABEL: define void @_ZN17trivial_defaulted3barEv() +// CHECK-LABEL: define dso_local void @_ZN17trivial_defaulted3barEv() // CHECK: call void @_Z{{.*}}C1Ev( // CHECK: load i8*, i8** // CHECK: call void @_ZN17trivial_defaulted3fooENS_1AE(i8* %{{.*}}) @@ -204,7 +204,7 @@ void foo(B); void bar() { foo({}); } -// CHECK-LABEL: define void @_ZN14two_copy_ctors3barEv() +// CHECK-LABEL: define dso_local void @_ZN14two_copy_ctors3barEv() // CHECK: call void @_Z{{.*}}C1Ev( // NEWABI: call void @_ZN14two_copy_ctors3fooENS_1BE(%"struct.two_copy_ctors::B"* %{{.*}}) // OLDABI: call void @_ZN14two_copy_ctors3fooENS_1BE(%"struct.two_copy_ctors::B"* byval @@ -221,8 +221,8 @@ struct A { void *p; }; void *foo(A a) { return a.p; } -// NEWABI-LABEL: define i8* @_ZN15definition_only3fooENS_1AE(%"struct.definition_only::A"* -// OLDABI-LABEL: define i8* @_ZN15definition_only3fooENS_1AE(i8* +// NEWABI-LABEL: define dso_local i8* @_ZN15definition_only3fooENS_1AE(%"struct.definition_only::A"* +// OLDABI-LABEL: define dso_local i8* @_ZN15definition_only3fooENS_1AE(i8* // WIN64-LABEL: define dso_local i8* @"?foo@definition_only@@YAPEAXUA@1@@Z"(%"struct.definition_only::A"* } @@ -237,8 +237,8 @@ struct A { B b; }; void *foo(A a) { return a.b.p; } -// NEWABI-LABEL: define i8* @_ZN17deleted_by_member3fooENS_1AE(%"struct.deleted_by_member::A"* -// OLDABI-LABEL: define i8* @_ZN17deleted_by_member3fooENS_1AE(i8* +// NEWABI-LABEL: define dso_local i8* @_ZN17deleted_by_member3fooENS_1AE(%"struct.deleted_by_member::A"* +// OLDABI-LABEL: define dso_local i8* @_ZN17deleted_by_member3fooENS_1AE(i8* // WIN64-LABEL: define dso_local i8* @"?foo@deleted_by_member@@YAPEAXUA@1@@Z"(%"struct.deleted_by_member::A"* } @@ -252,8 +252,8 @@ struct A : B { A(); }; void *foo(A a) { return a.p; } -// NEWABI-LABEL: define i8* @_ZN15deleted_by_base3fooENS_1AE(%"struct.deleted_by_base::A"* -// OLDABI-LABEL: define i8* @_ZN15deleted_by_base3fooENS_1AE(i8* +// NEWABI-LABEL: define dso_local i8* @_ZN15deleted_by_base3fooENS_1AE(%"struct.deleted_by_base::A"* +// OLDABI-LABEL: define dso_local i8* @_ZN15deleted_by_base3fooENS_1AE(i8* // WIN64-LABEL: define dso_local i8* @"?foo@deleted_by_base@@YAPEAXUA@1@@Z"(%"struct.deleted_by_base::A"* } @@ -268,8 +268,8 @@ struct A { B b; }; void *foo(A a) { return a.b.p; } -// NEWABI-LABEL: define i8* @_ZN22deleted_by_member_copy3fooENS_1AE(%"struct.deleted_by_member_copy::A"* -// OLDABI-LABEL: define i8* @_ZN22deleted_by_member_copy3fooENS_1AE(i8* +// NEWABI-LABEL: define dso_local i8* @_ZN22deleted_by_member_copy3fooENS_1AE(%"struct.deleted_by_member_copy::A"* +// OLDABI-LABEL: define dso_local i8* @_ZN22deleted_by_member_copy3fooENS_1AE(i8* // WIN64-LABEL: define dso_local i8* @"?foo@deleted_by_member_copy@@YAPEAXUA@1@@Z"(%"struct.deleted_by_member_copy::A"* } @@ -283,8 +283,8 @@ struct A : B { A(); }; void *foo(A a) { return a.p; } -// NEWABI-LABEL: define i8* @_ZN20deleted_by_base_copy3fooENS_1AE(%"struct.deleted_by_base_copy::A"* -// OLDABI-LABEL: define i8* @_ZN20deleted_by_base_copy3fooENS_1AE(i8* +// NEWABI-LABEL: define dso_local i8* @_ZN20deleted_by_base_copy3fooENS_1AE(%"struct.deleted_by_base_copy::A"* +// OLDABI-LABEL: define dso_local i8* @_ZN20deleted_by_base_copy3fooENS_1AE(i8* // WIN64-LABEL: define dso_local i8* @"?foo@deleted_by_base_copy@@YAPEAXUA@1@@Z"(%"struct.deleted_by_base_copy::A"* } @@ -294,8 +294,8 @@ struct A { A(const A &o) = delete; void *p; }; -// NEWABI-LABEL: define i8* @_ZN15explicit_delete3fooENS_1AE(%"struct.explicit_delete::A"* -// OLDABI-LABEL: define i8* @_ZN15explicit_delete3fooENS_1AE(i8* +// NEWABI-LABEL: define dso_local i8* @_ZN15explicit_delete3fooENS_1AE(%"struct.explicit_delete::A"* +// OLDABI-LABEL: define dso_local i8* @_ZN15explicit_delete3fooENS_1AE(i8* // WIN64-LABEL: define dso_local i8* @"?foo@explicit_delete@@YAPEAXUA@1@@Z"(%"struct.explicit_delete::A"* void *foo(A a) { return a.p; } } diff --git a/clang/test/CodeGenCXX/virt-dtor-key.cpp b/clang/test/CodeGenCXX/virt-dtor-key.cpp index d1055d4e30ca..a50557b40fc0 100644 --- a/clang/test/CodeGenCXX/virt-dtor-key.cpp +++ b/clang/test/CodeGenCXX/virt-dtor-key.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple i386-linux -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -triple i386-linux -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -triple i386-windows-gnu -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-MINGW // CHECK: @_ZTI3foo = constant // CHECK-MINGW: @_ZTI3foo = linkonce_odr diff --git a/clang/test/CodeGenCXX/virtual-function-elimination.cpp b/clang/test/CodeGenCXX/virtual-function-elimination.cpp index a89e6ebceeaf..6b6144b13729 100644 --- a/clang/test/CodeGenCXX/virtual-function-elimination.cpp +++ b/clang/test/CodeGenCXX/virtual-function-elimination.cpp @@ -7,7 +7,7 @@ struct __attribute__((visibility("default"))) A { void test_1(A *p) { // A has default visibility, so no need for type.checked.load. -// CHECK-LABEL: define void @_Z6test_1P1A +// CHECK-LABEL: define dso_local void @_Z6test_1P1A // CHECK: [[FN_PTR_ADDR:%.+]] = getelementptr inbounds void (%struct.A*)*, void (%struct.A*)** {{%.+}}, i64 0 // CHECK: [[FN_PTR:%.+]] = load void (%struct.A*)*, void (%struct.A*)** [[FN_PTR_ADDR]] // CHECK: call void [[FN_PTR]]( @@ -21,7 +21,7 @@ struct __attribute__((visibility("hidden"))) [[clang::lto_visibility_public]] B void test_2(B *p) { // B has public LTO visibility, so no need for type.checked.load. -// CHECK-LABEL: define void @_Z6test_2P1B +// CHECK-LABEL: define dso_local void @_Z6test_2P1B // CHECK: [[FN_PTR_ADDR:%.+]] = getelementptr inbounds void (%struct.B*)*, void (%struct.B*)** {{%.+}}, i64 0 // CHECK: [[FN_PTR:%.+]] = load void (%struct.B*)*, void (%struct.B*)** [[FN_PTR_ADDR]] // CHECK: call void [[FN_PTR]]( @@ -36,7 +36,7 @@ struct __attribute__((visibility("hidden"))) C { void test_3(C *p) { // C has hidden visibility, so we generate type.checked.load to allow VFE. -// CHECK-LABEL: define void @_Z6test_3P1C +// CHECK-LABEL: define dso_local void @_Z6test_3P1C // CHECK: [[LOAD:%.+]] = call { i8*, i1 } @llvm.type.checked.load(i8* {{%.+}}, i32 0, metadata !"_ZTS1C") // CHECK: [[FN_PTR_I8:%.+]] = extractvalue { i8*, i1 } [[LOAD]], 0 // CHECK: [[FN_PTR:%.+]] = bitcast i8* [[FN_PTR_I8]] to void (%struct.C*)* @@ -47,7 +47,7 @@ void test_3(C *p) { void test_4(C *p) { // When using type.checked.load, we pass the vtable offset to the intrinsic, // rather than adding it to the pointer with a GEP. -// CHECK-LABEL: define void @_Z6test_4P1C +// CHECK-LABEL: define dso_local void @_Z6test_4P1C // CHECK: [[LOAD:%.+]] = call { i8*, i1 } @llvm.type.checked.load(i8* {{%.+}}, i32 8, metadata !"_ZTS1C") // CHECK: [[FN_PTR_I8:%.+]] = extractvalue { i8*, i1 } [[LOAD]], 0 // CHECK: [[FN_PTR:%.+]] = bitcast i8* [[FN_PTR_I8]] to void (%struct.C*)* @@ -63,7 +63,7 @@ void test_5(C *p, void (C::*q)(void)) { // this case "_ZTSM1CFvvE.virtual"). If we passed the offset from the member // function pointer to the intrinsic, this information would be lost. No // codegen changes on the non-virtual side. -// CHECK-LABEL: define void @_Z6test_5P1CMS_FvvE( +// CHECK-LABEL: define dso_local void @_Z6test_5P1CMS_FvvE( // CHECK: [[FN_PTR_ADDR:%.+]] = getelementptr i8, i8* %vtable, i64 {{%.+}} // CHECK: [[LOAD:%.+]] = call { i8*, i1 } @llvm.type.checked.load(i8* [[FN_PTR_ADDR]], i32 0, metadata !"_ZTSM1CFvvE.virtual") // CHECK: [[FN_PTR_I8:%.+]] = extractvalue { i8*, i1 } [[LOAD]], 0 diff --git a/clang/test/CodeGenCXX/visibility-inlines-hidden-staticvar.cpp b/clang/test/CodeGenCXX/visibility-inlines-hidden-staticvar.cpp index c0fa57d859c7..1ab86b277861 100644 --- a/clang/test/CodeGenCXX/visibility-inlines-hidden-staticvar.cpp +++ b/clang/test/CodeGenCXX/visibility-inlines-hidden-staticvar.cpp @@ -8,45 +8,45 @@ // CHECK-DAG: @_ZZ4funcvE3var = internal global i32 0 // CHECK-DAG: @_ZZ11hidden_funcvE3var = internal global i32 0 // CHECK-DAG: @_ZZ12default_funcvE3var = internal global i32 0 -// CHECK-DAG: @_ZZ11inline_funcvE3var = linkonce_odr global i32 0, comdat +// CHECK-DAG: @_ZZ11inline_funcvE3var = linkonce_odr dso_local global i32 0, comdat // CHECK-DAG: @_ZZ18inline_hidden_funcvE3var = linkonce_odr hidden global i32 0, comdat -// CHECK-DAG: @_ZZ19inline_default_funcvE3var = linkonce_odr global i32 0, comdat -// CHECK-DAG: @_ZZN13ExportedClass10inl_methodEvE3var = linkonce_odr global i32 0, comdat, align 4 -// CHECK-DAG: define i32 @_Z4funcv() +// CHECK-DAG: @_ZZ19inline_default_funcvE3var = linkonce_odr dso_local global i32 0, comdat +// CHECK-DAG: @_ZZN13ExportedClass10inl_methodEvE3var = linkonce_odr dso_local global i32 0, comdat, align 4 +// CHECK-DAG: define dso_local i32 @_Z4funcv() // CHECK-DAG: define hidden i32 @_Z11hidden_funcv() -// CHECK-DAG: define i32 @_Z12default_funcv() +// CHECK-DAG: define dso_local i32 @_Z12default_funcv() // CHECK-DAG: define linkonce_odr hidden i32 @_Z11inline_funcv() // CHECK-DAG: define linkonce_odr hidden i32 @_Z18inline_hidden_funcv() -// CHECK-DAG: define linkonce_odr i32 @_Z19inline_default_funcv() +// CHECK-DAG: define linkonce_odr dso_local i32 @_Z19inline_default_funcv() // CHECK-DAG: define linkonce_odr hidden i32 @_ZN13ExportedClass10inl_methodEv({{.*}}) -// CHECK-DAG: define i32 @_ZN13ExportedClass10ext_methodEv({{.*}}) +// CHECK-DAG: define dso_local i32 @_ZN13ExportedClass10ext_methodEv({{.*}}) // CHECK-NO-VIH-DAG: @_ZZ4funcvE3var = internal global i32 0 // CHECK-NO-VIH-DAG: @_ZZ11hidden_funcvE3var = internal global i32 0 // CHECK-NO-VIH-DAG: @_ZZ12default_funcvE3var = internal global i32 0 -// CHECK-NO-VIH-DAG: @_ZZ11inline_funcvE3var = linkonce_odr global i32 0, comdat +// CHECK-NO-VIH-DAG: @_ZZ11inline_funcvE3var = linkonce_odr dso_local global i32 0, comdat // CHECK-NO-VIH-DAG: @_ZZ18inline_hidden_funcvE3var = linkonce_odr hidden global i32 0, comdat -// CHECK-NO-VIH-DAG: @_ZZ19inline_default_funcvE3var = linkonce_odr global i32 0, comdat -// CHECK-NO-VIH-DAG: @_ZZN13ExportedClass10inl_methodEvE3var = linkonce_odr global i32 0, comdat, align 4 -// CHECK-NO-VIH-DAG: define i32 @_Z4funcv() +// CHECK-NO-VIH-DAG: @_ZZ19inline_default_funcvE3var = linkonce_odr dso_local global i32 0, comdat +// CHECK-NO-VIH-DAG: @_ZZN13ExportedClass10inl_methodEvE3var = linkonce_odr dso_local global i32 0, comdat, align 4 +// CHECK-NO-VIH-DAG: define dso_local i32 @_Z4funcv() // CHECK-NO-VIH-DAG: define hidden i32 @_Z11hidden_funcv() -// CHECK-NO-VIH-DAG: define i32 @_Z12default_funcv() -// CHECK-NO-VIH-DAG: define linkonce_odr i32 @_Z11inline_funcv() +// CHECK-NO-VIH-DAG: define dso_local i32 @_Z12default_funcv() +// CHECK-NO-VIH-DAG: define linkonce_odr dso_local i32 @_Z11inline_funcv() // CHECK-NO-VIH-DAG: define linkonce_odr hidden i32 @_Z18inline_hidden_funcv() -// CHECK-NO-VIH-DAG: define linkonce_odr i32 @_Z19inline_default_funcv() -// CHECK-NO-VIH-DAG: define linkonce_odr i32 @_ZN13ExportedClass10inl_methodEv({{.*}}) -// CHECK-NO-VIH-DAG: define i32 @_ZN13ExportedClass10ext_methodEv({{.*}}) +// CHECK-NO-VIH-DAG: define linkonce_odr dso_local i32 @_Z19inline_default_funcv() +// CHECK-NO-VIH-DAG: define linkonce_odr dso_local i32 @_ZN13ExportedClass10inl_methodEv({{.*}}) +// CHECK-NO-VIH-DAG: define dso_local i32 @_ZN13ExportedClass10ext_methodEv({{.*}}) // CHECK-VIS-HIDDEN-DAG: @_ZZ4funcvE3var = internal global i32 0 // CHECK-VIS-HIDDEN-DAG: @_ZZ11hidden_funcvE3var = internal global i32 0 // CHECK-VIS-HIDDEN-DAG: @_ZZ12default_funcvE3var = internal global i32 0 // CHECK-VIS-HIDDEN-DAG: @_ZZ11inline_funcvE3var = linkonce_odr hidden global i32 0, comdat // CHECK-VIS-HIDDEN-DAG: @_ZZ18inline_hidden_funcvE3var = linkonce_odr hidden global i32 0, comdat -// CHECK-VIS-HIDDEN-DAG: @_ZZ19inline_default_funcvE3var = linkonce_odr global i32 0, comdat -// CHECK-VIS-HIDDEN-DAG: @_ZZN13ExportedClass10inl_methodEvE3var = linkonce_odr global i32 0, comdat, align 4 +// CHECK-VIS-HIDDEN-DAG: @_ZZ19inline_default_funcvE3var = linkonce_odr dso_local global i32 0, comdat +// CHECK-VIS-HIDDEN-DAG: @_ZZN13ExportedClass10inl_methodEvE3var = linkonce_odr dso_local global i32 0, comdat, align 4 // CHECK-VIS-HIDDEN-DAG: define hidden i32 @_Z4funcv() // CHECK-VIS-HIDDEN-DAG: define hidden i32 @_Z11hidden_funcv() -// CHECK-VIS-HIDDEN-DAG: define i32 @_Z12default_funcv() +// CHECK-VIS-HIDDEN-DAG: define dso_local i32 @_Z12default_funcv() // CHECK-VIS-HIDDEN-DAG: define linkonce_odr hidden i32 @_Z11inline_funcv() // CHECK-VIS-HIDDEN-DAG: define linkonce_odr hidden i32 @_Z18inline_hidden_funcv() // CHECK-VIS-HIDDEN-DAG: define linkonce_odr i32 @_Z19inline_default_funcv() diff --git a/clang/test/CodeGenCXX/visibility-inlines-hidden.cpp b/clang/test/CodeGenCXX/visibility-inlines-hidden.cpp index 20e4a1f45e3c..5c03c3dea2f0 100644 --- a/clang/test/CodeGenCXX/visibility-inlines-hidden.cpp +++ b/clang/test/CodeGenCXX/visibility-inlines-hidden.cpp @@ -37,7 +37,7 @@ struct __attribute__((visibility("default"))) X2 { extern template struct X1<float>; void use(X0 *x0, X1<int> *x1, X2 *x2, X1<float> *x3) { - // CHECK-LABEL: define linkonce_odr void @_ZN2X02f1Ev + // CHECK-LABEL: define linkonce_odr dso_local void @_ZN2X02f1Ev x0->f1(); // CHECK-LABEL: define linkonce_odr hidden void @_ZN2X02f2Ev x0->f2(); @@ -47,7 +47,7 @@ void use(X0 *x0, X1<int> *x1, X2 *x2, X1<float> *x3) { X0::f5(); // CHECK-LABEL: define linkonce_odr hidden void @_ZN2X02f6Ev x0->X0::f6(); - // CHECK-LABEL: define linkonce_odr void @_ZN2X1IiE2f1Ev + // CHECK-LABEL: define linkonce_odr dso_local void @_ZN2X1IiE2f1Ev x1->f1(); // CHECK-LABEL: define linkonce_odr hidden void @_ZN2X1IiE2f2Ev x1->f2(); @@ -106,7 +106,7 @@ namespace PR11642 { }; extern template class Foo<int>; template class Foo<int>; - // CHECK-LABEL: define weak_odr i32 @_ZN7PR116423FooIiE3fooEi + // CHECK-LABEL: define weak_odr dso_local i32 @_ZN7PR116423FooIiE3fooEi } // Test that clang implements the new gcc behaviour for inline functions. @@ -122,7 +122,7 @@ namespace test3 { foo(); zed<int>(); } - // CHECK-LABEL: define weak_odr void @_ZN5test33zedIfEEvv + // CHECK-LABEL: define weak_odr dso_local void @_ZN5test33zedIfEEvv // CHECK-LABEL: define linkonce_odr hidden void @_ZN5test33fooEv // CHECK-LABEL: define linkonce_odr hidden void @_ZN5test33zedIiEEvv } diff --git a/clang/test/CodeGenCXX/vla-consruct.cpp b/clang/test/CodeGenCXX/vla-consruct.cpp index 87191fe99da7..809e67f318d0 100644 --- a/clang/test/CodeGenCXX/vla-consruct.cpp +++ b/clang/test/CodeGenCXX/vla-consruct.cpp @@ -18,7 +18,7 @@ void print(int n, int a, int b, int c, int d) { } void test(int n) { - // CHECK: define void {{.*test.*}}(i32 [[n:%.+]]) # + // CHECK: define dso_local void {{.*test.*}}(i32 [[n:%.+]]) # // CHECK: [[n_addr:%.+]] = alloca // CHECK-NEXT: [[saved_stack:%.+]] = alloca // CHECK-NEXT: [[vla_expr:%.+]] = alloca i64, align 8 diff --git a/clang/test/CodeGenCXX/vla.cpp b/clang/test/CodeGenCXX/vla.cpp index 81ff62d2cbf8..afc7befaa3fd 100644 --- a/clang/test/CodeGenCXX/vla.cpp +++ b/clang/test/CodeGenCXX/vla.cpp @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin %s -emit-llvm -o - | FileCheck -check-prefixes=X64,CHECK %s -// RUN: %clang_cc1 -std=c++11 -triple amdgcn %s -emit-llvm -o - | FileCheck -check-prefixes=AMDGCN,CHECK %s +// RUN: %clang_cc1 -std=c++11 -triple amdgcn %s -fsemantic-interposition -emit-llvm -o - | FileCheck -check-prefixes=AMDGCN,CHECK %s template<typename T> struct S { diff --git a/clang/test/CodeGenCXX/vtable-key-function-arm.cpp b/clang/test/CodeGenCXX/vtable-key-function-arm.cpp index 3d5c3c3865ea..e3648b87c55d 100644 --- a/clang/test/CodeGenCXX/vtable-key-function-arm.cpp +++ b/clang/test/CodeGenCXX/vtable-key-function-arm.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 %s -triple=armv7-unknown-unknown -emit-llvm -o - | FileCheck %s -// RUN: %clang_cc1 %s -triple=armv7-unknown-unknown -emit-llvm -o - | FileCheck -check-prefix=CHECK-LATE %s +// RUN: %clang_cc1 %s -triple=armv7-unknown-unknown -emit-llvm -o - -fsemantic-interposition | FileCheck %s +// RUN: %clang_cc1 %s -triple=armv7-unknown-unknown -emit-llvm -o - -fsemantic-interposition | FileCheck -check-prefix=CHECK-LATE %s // The 'a' variants ask for the vtable first. // The 'b' variants ask for the vtable second. diff --git a/clang/test/CodeGenCXX/vtable-linkage.cpp b/clang/test/CodeGenCXX/vtable-linkage.cpp index d4f06ce6ce03..e1413e284639 100644 --- a/clang/test/CodeGenCXX/vtable-linkage.cpp +++ b/clang/test/CodeGenCXX/vtable-linkage.cpp @@ -98,10 +98,10 @@ void use_F() { // C has no key function, so its vtable should have weak_odr linkage // and hidden visibility (rdar://problem/7523229). -// CHECK-DAG: @_ZTV1C = linkonce_odr unnamed_addr constant {{.*}}, comdat, align 8{{$}} -// CHECK-DAG: @_ZTS1C = linkonce_odr constant {{.*}}, comdat, align 1{{$}} -// CHECK-DAG: @_ZTI1C = linkonce_odr constant {{.*}}, comdat, align 8{{$}} -// CHECK-DAG: @_ZTT1C = linkonce_odr unnamed_addr constant {{.*}}, comdat, align 8{{$}} +// CHECK-DAG: @_ZTV1C = linkonce_odr dso_local unnamed_addr constant {{.*}}, comdat, align 8{{$}} +// CHECK-DAG: @_ZTS1C = linkonce_odr dso_local constant {{.*}}, comdat, align 1{{$}} +// CHECK-DAG: @_ZTI1C = linkonce_odr dso_local constant {{.*}}, comdat, align 8{{$}} +// CHECK-DAG: @_ZTT1C = linkonce_odr dso_local unnamed_addr constant {{.*}}, comdat, align 8{{$}} // D has a key function that is defined in this translation unit so its vtable is // defined in the translation unit. diff --git a/clang/test/CodeGenCXX/x86_64-arguments-avx.cpp b/clang/test/CodeGenCXX/x86_64-arguments-avx.cpp index 2e04cf5c52ca..28c617f1f18d 100644 --- a/clang/test/CodeGenCXX/x86_64-arguments-avx.cpp +++ b/clang/test/CodeGenCXX/x86_64-arguments-avx.cpp @@ -8,7 +8,7 @@ public: __m256d data; }; -// CHECK: define <4 x double> @_ZN5test14testENS_7PR22753E(<4 x double> +// CHECK: define dso_local <4 x double> @_ZN5test14testENS_7PR22753E(<4 x double> PR22753 test(PR22753 x) { return x; } @@ -30,7 +30,7 @@ union UU1 { __m128d v3; }; -// CHECK: define <2 x double> @_ZN5test27PR23082ENS_3UU1E(<2 x double> +// CHECK: define dso_local <2 x double> @_ZN5test27PR23082ENS_3UU1E(<2 x double> UU1 PR23082(UU1 x) { return x; } @@ -45,7 +45,7 @@ union UU2 { __m256d v3; }; -// CHECK: define <4 x double> @_ZN5test27PR23082ENS_3UU2E(<4 x double> +// CHECK: define dso_local <4 x double> @_ZN5test27PR23082ENS_3UU2E(<4 x double> UU2 PR23082(UU2 x) { return x; } @@ -56,6 +56,6 @@ union U { __attribute__((__vector_size__(32))) float f1; int f2; }; -// CHECK: define i32 @_ZN5test31fENS_1UE({{.*}}* byval({{.*}}) align 32 +// CHECK: define dso_local i32 @_ZN5test31fENS_1UE({{.*}}* byval({{.*}}) align 32 int f(U u) { return u.f2; } } diff --git a/clang/test/CodeGenCXX/x86_64-arguments-nacl-x32.cpp b/clang/test/CodeGenCXX/x86_64-arguments-nacl-x32.cpp index f53576632d07..9966fa551029 100644 --- a/clang/test/CodeGenCXX/x86_64-arguments-nacl-x32.cpp +++ b/clang/test/CodeGenCXX/x86_64-arguments-nacl-x32.cpp @@ -5,7 +5,7 @@ struct test_struct {}; typedef int test_struct::* test_struct_mdp; typedef int (test_struct::*test_struct_mfp)(); -// CHECK-LABEL: define i32 @{{.*}}f_mdp{{.*}}(i32 %a) +// CHECK-LABEL: define dso_local i32 @{{.*}}f_mdp{{.*}}(i32 %a) test_struct_mdp f_mdp(test_struct_mdp a) { return a; } // CHECK-LABEL: define {{.*}} @{{.*}}f_mfp{{.*}}(i64 %a.coerce) @@ -13,29 +13,29 @@ test_struct_mfp f_mfp(test_struct_mfp a) { return a; } // A struct with <= 12 bytes before a member data pointer should still // be allowed in registers, since the member data pointer is only 4 bytes. -// CHECK-LABEL: define void @{{.*}}f_struct_with_mdp{{.*}}(i64 %a.coerce0, i64 %a.coerce1) +// CHECK-LABEL: define dso_local void @{{.*}}f_struct_with_mdp{{.*}}(i64 %a.coerce0, i64 %a.coerce1) struct struct_with_mdp { char *a; char *b; char *c; test_struct_mdp d; }; void f_struct_with_mdp(struct_with_mdp a) { (void)a; } struct struct_with_mdp_too_much { char *a; char *b; char *c; char *d; test_struct_mdp e; }; -// CHECK-LABEL: define void @{{.*}}f_struct_with_mdp_too_much{{.*}}({{.*}} byval({{.*}} {{.*}} %a) +// CHECK-LABEL: define dso_local void @{{.*}}f_struct_with_mdp_too_much{{.*}}({{.*}} byval({{.*}} {{.*}} %a) void f_struct_with_mdp_too_much(struct_with_mdp_too_much a) { (void)a; } // A struct with <= 8 bytes before a member function pointer should still // be allowed in registers, since the member function pointer is only 8 bytes. -// CHECK-LABEL: define void @{{.*}}f_struct_with_mfp_0{{.*}}(i64 %a.coerce0, i32 %a.coerce1) +// CHECK-LABEL: define dso_local void @{{.*}}f_struct_with_mfp_0{{.*}}(i64 %a.coerce0, i32 %a.coerce1) struct struct_with_mfp_0 { char *a; test_struct_mfp b; }; void f_struct_with_mfp_0(struct_with_mfp_0 a) { (void)a; } -// CHECK-LABEL: define void @{{.*}}f_struct_with_mfp_1{{.*}}(i64 %a.coerce0, i64 %a.coerce1) +// CHECK-LABEL: define dso_local void @{{.*}}f_struct_with_mfp_1{{.*}}(i64 %a.coerce0, i64 %a.coerce1) struct struct_with_mfp_1 { char *a; char *b; test_struct_mfp c; }; void f_struct_with_mfp_1(struct_with_mfp_1 a) { (void)a; } -// CHECK-LABEL: define void @{{.*}}f_struct_with_mfp_too_much{{.*}}({{.*}} byval({{.*}}) {{.*}} %a, i32 %x) +// CHECK-LABEL: define dso_local void @{{.*}}f_struct_with_mfp_too_much{{.*}}({{.*}} byval({{.*}}) {{.*}} %a, i32 %x) struct struct_with_mfp_too_much { char *a; char *b; char *c; test_struct_mfp d; }; @@ -46,12 +46,12 @@ void f_struct_with_mfp_too_much(struct_with_mfp_too_much a, int x) { /* Struct containing an empty struct */ typedef struct { int* a; test_struct x; double *b; } struct_with_empty; -// CHECK-LABEL: define void @{{.*}}f_pass_struct_with_empty{{.*}}(i64 %x{{.*}}, double* %x +// CHECK-LABEL: define dso_local void @{{.*}}f_pass_struct_with_empty{{.*}}(i64 %x{{.*}}, double* %x void f_pass_struct_with_empty(struct_with_empty x) { (void) x; } -// CHECK-LABEL: define { i64, double* } @{{.*}}f_return_struct_with_empty +// CHECK-LABEL: define dso_local { i64, double* } @{{.*}}f_return_struct_with_empty struct_with_empty f_return_struct_with_empty() { return {0, {}, 0}; } diff --git a/clang/test/CodeGenCXX/x86_64-arguments.cpp b/clang/test/CodeGenCXX/x86_64-arguments.cpp index e90590778895..ed7f4d312df7 100644 --- a/clang/test/CodeGenCXX/x86_64-arguments.cpp +++ b/clang/test/CodeGenCXX/x86_64-arguments.cpp @@ -1,30 +1,30 @@ -// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s -fsemantic-interposition | FileCheck %s // Basic base class test. struct f0_s0 { unsigned a; }; struct f0_s1 : public f0_s0 { void *b; }; -// CHECK-LABEL: define void @_Z2f05f0_s1(i32 %a0.coerce0, i8* %a0.coerce1) +// CHECK-LABEL: define dso_local void @_Z2f05f0_s1(i32 %a0.coerce0, i8* %a0.coerce1) void f0(f0_s1 a0) { } // Check with two eight-bytes in base class. struct f1_s0 { unsigned a; unsigned b; float c; }; struct f1_s1 : public f1_s0 { float d;}; -// CHECK-LABEL: define void @_Z2f15f1_s1(i64 %a0.coerce0, <2 x float> %a0.coerce1) +// CHECK-LABEL: define dso_local void @_Z2f15f1_s1(i64 %a0.coerce0, <2 x float> %a0.coerce1) void f1(f1_s1 a0) { } // Check with two eight-bytes in base class and merge. struct f2_s0 { unsigned a; unsigned b; float c; }; struct f2_s1 : public f2_s0 { char d;}; -// CHECK-LABEL: define void @_Z2f25f2_s1(i64 %a0.coerce0, i64 %a0.coerce1) +// CHECK-LABEL: define dso_local void @_Z2f25f2_s1(i64 %a0.coerce0, i64 %a0.coerce1) void f2(f2_s1 a0) { } // PR5831 -// CHECK-LABEL: define void @_Z2f34s3_1(i64 %x.coerce) +// CHECK-LABEL: define dso_local void @_Z2f34s3_1(i64 %x.coerce) struct s3_0 {}; struct s3_1 { struct s3_0 a; long b; }; void f3(struct s3_1 x) {} -// CHECK-LABEL: define i64 @_Z4f4_0M2s4i(i64 %a) +// CHECK-LABEL: define dso_local i64 @_Z4f4_0M2s4i(i64 %a) // CHECK: define {{.*}} @_Z4f4_1M2s4FivE(i64 %a.coerce0, i64 %a.coerce1) struct s4 {}; typedef int s4::* s4_mdp; @@ -34,7 +34,7 @@ s4_mfp f4_1(s4_mfp a) { return a; } // A struct with <= one eightbyte before a member data pointer should still // be allowed in registers. -// CHECK-LABEL: define void @{{.*}}f_struct_with_mdp{{.*}}(i8* %a.coerce0, i64 %a.coerce1) +// CHECK-LABEL: define dso_local void @{{.*}}f_struct_with_mdp{{.*}}(i8* %a.coerce0, i64 %a.coerce1) struct struct_with_mdp { char *a; s4_mdp b; }; void f_struct_with_mdp(struct_with_mdp a) { (void)a; } diff --git a/clang/test/CodeGenCoroutines/coro-await-resume-eh.cpp b/clang/test/CodeGenCoroutines/coro-await-resume-eh.cpp index f0f8855fbd4d..1a490bcb9c05 100644 --- a/clang/test/CodeGenCoroutines/coro-await-resume-eh.cpp +++ b/clang/test/CodeGenCoroutines/coro-await-resume-eh.cpp @@ -28,7 +28,7 @@ struct throwing_task { }; }; -// CHECK-LABEL: define void @_Z1fv() +// CHECK-LABEL: define dso_local void @_Z1fv() throwing_task f() { // A variable RESUMETHREW is used to keep track of whether the body // of 'await_resume' threw an exception. Exceptions thrown in diff --git a/clang/test/CodeGenCoroutines/coro-cleanup.cpp b/clang/test/CodeGenCoroutines/coro-cleanup.cpp index ba1246979e52..5417bad1d36e 100644 --- a/clang/test/CodeGenCoroutines/coro-cleanup.cpp +++ b/clang/test/CodeGenCoroutines/coro-cleanup.cpp @@ -1,5 +1,5 @@ // Verify that coroutine promise and allocated memory are freed up on exception. -// RUN: %clang_cc1 -std=c++1z -fcoroutines-ts -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s -fexceptions -fcxx-exceptions -disable-llvm-passes | FileCheck %s +// RUN: %clang_cc1 -std=c++1z -fcoroutines-ts -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s -fexceptions -fcxx-exceptions -disable-llvm-passes -fsemantic-interposition | FileCheck %s namespace std::experimental { template <typename... T> struct coroutine_traits; @@ -37,7 +37,7 @@ template <> struct std::experimental::coroutine_traits<void> { struct Cleanup { ~Cleanup(); }; void may_throw(); -// CHECK-LABEL: define void @_Z1fv( +// CHECK-LABEL: define dso_local void @_Z1fv( void f() { // CHECK: call i8* @_Znwm(i64 diff --git a/clang/test/CodeGenCoroutines/coro-gro-nrvo.cpp b/clang/test/CodeGenCoroutines/coro-gro-nrvo.cpp index f4a71864ea0e..100308eae1f9 100644 --- a/clang/test/CodeGenCoroutines/coro-gro-nrvo.cpp +++ b/clang/test/CodeGenCoroutines/coro-gro-nrvo.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fcoroutines-ts -std=c++14 -emit-llvm %s -o - -disable-llvm-passes | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fcoroutines-ts -std=c++14 -emit-llvm %s -o - -disable-llvm-passes -fsemantic-interposition | FileCheck %s #include "Inputs/coroutine.h" @@ -34,7 +34,7 @@ struct coro { }; // Verify that the NRVO is applied to the Gro object. -// CHECK-LABEL: define void @_Z1fi(%struct.coro* noalias sret %agg.result, i32 %0) +// CHECK-LABEL: define dso_local void @_Z1fi(%struct.coro* noalias sret %agg.result, i32 %0) coro f(int) { // CHECK: %call = call i8* @_Znwm( // CHECK-NEXT: br label %[[CoroInit:.*]] diff --git a/clang/test/CodeGenCoroutines/coro-gro.cpp b/clang/test/CodeGenCoroutines/coro-gro.cpp index 95bf2069722a..1af32a07066a 100644 --- a/clang/test/CodeGenCoroutines/coro-gro.cpp +++ b/clang/test/CodeGenCoroutines/coro-gro.cpp @@ -43,7 +43,7 @@ template <> struct std::experimental::coroutine_traits<int> { struct Cleanup { ~Cleanup(); }; void doSomething() noexcept; -// CHECK: define i32 @_Z1fv( +// CHECK: define dso_local i32 @_Z1fv( int f() { // CHECK: %[[RetVal:.+]] = alloca i32 // CHECK: %[[GroActive:.+]] = alloca i1 diff --git a/clang/test/CodeGenCoroutines/coro-lambda.cpp b/clang/test/CodeGenCoroutines/coro-lambda.cpp index cd3256dc07ef..dd5434f1ae28 100644 --- a/clang/test/CodeGenCoroutines/coro-lambda.cpp +++ b/clang/test/CodeGenCoroutines/coro-lambda.cpp @@ -1,5 +1,5 @@ // Verify that we synthesized the coroutine for a lambda inside of a function template. -// RUN: %clang_cc1 -std=c++1z -fcoroutines-ts -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s -fexceptions -fcxx-exceptions -disable-llvm-passes | FileCheck %s +// RUN: %clang_cc1 -std=c++1z -fcoroutines-ts -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s -fexceptions -fcxx-exceptions -disable-llvm-passes -fsemantic-interposition | FileCheck %s namespace std::experimental { template <typename R, typename... T> struct coroutine_traits { diff --git a/clang/test/CodeGenCoroutines/coro-params.cpp b/clang/test/CodeGenCoroutines/coro-params.cpp index 6d764331e1a1..fdf661f7ef36 100644 --- a/clang/test/CodeGenCoroutines/coro-params.cpp +++ b/clang/test/CodeGenCoroutines/coro-params.cpp @@ -2,7 +2,7 @@ // Verifies that parameter copies are destroyed // Vefifies that parameter copies are used in the body of the coroutine // Verifies that parameter copies are used to construct the promise type, if that type has a matching constructor -// RUN: %clang_cc1 -std=c++1z -fcoroutines-ts -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s -disable-llvm-passes -fexceptions | FileCheck %s +// RUN: %clang_cc1 -std=c++1z -fcoroutines-ts -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s -disable-llvm-passes -fexceptions -fsemantic-interposition | FileCheck %s namespace std::experimental { template <typename... T> struct coroutine_traits; @@ -62,7 +62,7 @@ struct MoveAndCopy { void consume(int,int,int) noexcept; // TODO: Add support for CopyOnly params -// CHECK: define void @_Z1fi8MoveOnly11MoveAndCopy(i32 %val, %struct.MoveOnly* %[[MoParam:.+]], %struct.MoveAndCopy* %[[McParam:.+]]) #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8* +// CHECK: define dso_local void @_Z1fi8MoveOnly11MoveAndCopy(i32 %val, %struct.MoveOnly* %[[MoParam:.+]], %struct.MoveAndCopy* %[[McParam:.+]]) #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8* void f(int val, MoveOnly moParam, MoveAndCopy mcParam) { // CHECK: %[[MoCopy:.+]] = alloca %struct.MoveOnly // CHECK: %[[McCopy:.+]] = alloca %struct.MoveAndCopy diff --git a/clang/test/CodeGenCoroutines/coro-ret-void.cpp b/clang/test/CodeGenCoroutines/coro-ret-void.cpp index 6ebb44dfaefa..eb660902f49c 100644 --- a/clang/test/CodeGenCoroutines/coro-ret-void.cpp +++ b/clang/test/CodeGenCoroutines/coro-ret-void.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++14 -fcoroutines-ts -triple=x86_64-unknown-linux-gnu -emit-llvm %s -o - -disable-llvm-passes | FileCheck %s +// RUN: %clang_cc1 -std=c++14 -fcoroutines-ts -triple=x86_64-unknown-linux-gnu -emit-llvm %s -o - -disable-llvm-passes -fsemantic-interposition | FileCheck %s #include "Inputs/coroutine.h" @@ -17,7 +17,7 @@ coro1 f() { co_await coro::suspend_never{}; } -// CHECK-LABEL: define void @_Z1fv( +// CHECK-LABEL: define dso_local void @_Z1fv( // CHECK: call void @_ZNSt12experimental13coroutines_v113suspend_never12await_resumeEv(%"struct.std::experimental::coroutines_v1::suspend_never"* // CHECK: call void @_ZN5coro112promise_type11return_voidEv(%"struct.coro1::promise_type"* %__promise) diff --git a/clang/test/Modules/codegen-extern-template.cpp b/clang/test/Modules/codegen-extern-template.cpp index 56916e710cb1..480c4a5de9d8 100644 --- a/clang/test/Modules/codegen-extern-template.cpp +++ b/clang/test/Modules/codegen-extern-template.cpp @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple=x86_64-linux-gnu -fmodules -fmodules-codegen -emit-module -fmodule-name=foo %S/Inputs/codegen-extern-template.modulemap -x c++ -o %t.pcm -// RUN: %clang_cc1 -triple x86_64-linux-gnu -fmodules -fmodule-file=%t.pcm %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -fmodules -fmodule-file=%t.pcm %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s // expected-no-diagnostics #include "codegen-extern-template.h" diff --git a/clang/test/Modules/initializers.cpp b/clang/test/Modules/initializers.cpp index 68eb952c2e4e..d9b0961b419a 100644 --- a/clang/test/Modules/initializers.cpp +++ b/clang/test/Modules/initializers.cpp @@ -1,9 +1,9 @@ -// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -emit-llvm -DIMPORT=1 -fmodules %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-IMPORT,CHECK-NO-NS,CHECK-IMPORT-NO-NS --implicit-check-not=unused -// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -emit-llvm -DIMPORT=1 -DNS -fmodules %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-IMPORT,CHECK-NS,CHECK-IMPORT-NS --implicit-check-not=unused -// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -emit-llvm -DIMPORT=2 -fmodules %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-NO-NS --implicit-check-not=unused -// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -emit-llvm -DIMPORT=2 -DNS -fmodules %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-NS --implicit-check-not=unused -// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -emit-llvm -fmodules %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-NO-NS --implicit-check-not=unused -// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -emit-llvm -DNS -fmodules %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-NS --implicit-check-not=unused +// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -emit-llvm -DIMPORT=1 -fmodules %s -o - -fsemantic-interposition | FileCheck %s --check-prefixes=CHECK,CHECK-IMPORT,CHECK-NO-NS,CHECK-IMPORT-NO-NS --implicit-check-not=unused +// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -emit-llvm -DIMPORT=1 -DNS -fmodules %s -o - -fsemantic-interposition | FileCheck %s --check-prefixes=CHECK,CHECK-IMPORT,CHECK-NS,CHECK-IMPORT-NS --implicit-check-not=unused +// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -emit-llvm -DIMPORT=2 -fmodules %s -o - -fsemantic-interposition | FileCheck %s --check-prefixes=CHECK,CHECK-NO-NS --implicit-check-not=unused +// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -emit-llvm -DIMPORT=2 -DNS -fmodules %s -o - -fsemantic-interposition | FileCheck %s --check-prefixes=CHECK,CHECK-NS --implicit-check-not=unused +// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -emit-llvm -fmodules %s -o - -fsemantic-interposition | FileCheck %s --check-prefixes=CHECK,CHECK-NO-NS --implicit-check-not=unused +// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -emit-llvm -DNS -fmodules %s -o - -fsemantic-interposition | FileCheck %s --check-prefixes=CHECK,CHECK-NS --implicit-check-not=unused // Check that we behave sensibly when importing a header containing strong and // weak, ordered and unordered global initializers. @@ -123,8 +123,8 @@ inline void use(bool b, ...) { #pragma clang module load m #endif -// CHECK-IMPORT-NO-NS-DAG: @[[A:a]] = global i32 0, align 4 -// CHECK-IMPORT-NO-NS-DAG: @[[B:b]] = linkonce_odr global i32 0, comdat, align 4 +// CHECK-IMPORT-NO-NS-DAG: @[[A:a]] = dso_local global i32 0, align 4 +// CHECK-IMPORT-NO-NS-DAG: @[[B:b]] = linkonce_odr dso_local global i32 0, comdat, align 4 // CHECK-IMPORT-NO-NS-DAG: @[[C:c]] = thread_local global i32 0, align 4 // CHECK-IMPORT-NO-NS-DAG: @[[D:d]] = linkonce_odr thread_local global i32 0, comdat, align 4 // CHECK-NO-NS-DAG: @[[E:_Z1eIiE]] = linkonce_odr global i32 0, comdat, align 4 diff --git a/clang/test/Modules/var-templates.cpp b/clang/test/Modules/var-templates.cpp index eca242873969..4468ea20eda8 100644 --- a/clang/test/Modules/var-templates.cpp +++ b/clang/test/Modules/var-templates.cpp @@ -20,5 +20,5 @@ inline int f() { return n<0>; } #pragma clang module import B -// CHECK: @_Z1nILi0EE = linkonce_odr global i32 42, comdat +// CHECK: @_Z1nILi0EE = linkonce_odr dso_local global i32 42, comdat int g() { return f(); } diff --git a/clang/test/OpenMP/allocate_codegen.cpp b/clang/test/OpenMP/allocate_codegen.cpp index c068589041af..56573f6ca9f8 100644 --- a/clang/test/OpenMP/allocate_codegen.cpp +++ b/clang/test/OpenMP/allocate_codegen.cpp @@ -1,16 +1,16 @@ // RUN: %clang_cc1 -verify -fopenmp -triple x86_64-apple-darwin10.6.0 -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -fopenmp -triple x86_64-apple-darwin10.6.0 -x c++ -std=c++11 -emit-pch -o %t %s // RUN: %clang_cc1 -fopenmp -triple x86_64-apple-darwin10.6.0 -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -// RUN: %clang_cc1 -verify -fopenmp -triple x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp -triple x86_64-unknown-linux-gnu -emit-llvm -o - %s -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -triple x86_64-unknown-linux-gnu -x c++ -std=c++11 -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -triple x86_64-unknown-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -triple x86_64-unknown-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -verify -fopenmp-simd -triple x86_64-apple-darwin10.6.0 -emit-llvm -o - %s | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -fopenmp-simd -triple x86_64-apple-darwin10.6.0 -x c++ -std=c++11 -emit-pch -o %t %s // RUN: %clang_cc1 -fopenmp-simd -triple x86_64-apple-darwin10.6.0 -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -triple x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -triple x86_64-unknown-linux-gnu -emit-llvm -o - %s -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -fopenmp-simd -fnoopenmp-use-tls -triple x86_64-unknown-linux-gnu -x c++ -std=c++11 -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fnoopenmp-use-tls -triple x86_64-unknown-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -fopenmp-simd -fnoopenmp-use-tls -triple x86_64-unknown-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // SIMD-ONLY0-NOT: {{__kmpc|__tgt}} // expected-no-diagnostics @@ -92,7 +92,7 @@ int main () { // CHECK-NOT: call {{.+}} {{__kmpc_alloc|__kmpc_free}} extern template int ST<int>::m; -// CHECK: define void @{{.+}}bar{{.+}}(i32 %{{.+}}, float* {{.+}}) +// CHECK: define dso_local void @{{.+}}bar{{.+}}(i32 %{{.+}}, float* {{.+}}) void bar(int a, float &z) { // CHECK: [[A_VOID_PTR:%.+]] = call i8* @__kmpc_alloc(i32 [[GTID:%.+]], i64 4, i8* inttoptr (i64 1 to i8*)) // CHECK: [[A_ADDR:%.+]] = bitcast i8* [[A_VOID_PTR]] to i32* diff --git a/clang/test/OpenMP/constexpr_codegen.cpp b/clang/test/OpenMP/constexpr_codegen.cpp index f1fa4ac2a9ef..84f7b518e85b 100644 --- a/clang/test/OpenMP/constexpr_codegen.cpp +++ b/clang/test/OpenMP/constexpr_codegen.cpp @@ -12,7 +12,7 @@ #ifndef HEADER #define HEADER -// CHECK: @{{.*}}Foo{{.*}}bar{{.*}} = constant i32 1, +// CHECK: @{{.*}}Foo{{.*}}bar{{.*}} = dso_local constant i32 1, // Section A - Define a class with a static constexpr data member. struct Foo { diff --git a/clang/test/OpenMP/declare_variant_mixed_codegen.c b/clang/test/OpenMP/declare_variant_mixed_codegen.c index 63457095b934..465e1ade058b 100644 --- a/clang/test/OpenMP/declare_variant_mixed_codegen.c +++ b/clang/test/OpenMP/declare_variant_mixed_codegen.c @@ -19,7 +19,7 @@ int hst(double i) { return 1; } #pragma omp declare variant(dev) match(device = {kind(gpu)}) int base(); -// HOST-LABEL: define void @foo() +// HOST-LABEL: define dso_local void @foo() // HOST: call i32 (double, ...) bitcast (i32 (double)* @base to i32 (double, ...)*)(double -1.000000e+00) // HOST: call i32 @hst(double -2.000000e+00) // HOST: call void [[OFFL:@.+_foo_l29]]() diff --git a/clang/test/OpenMP/for_codegen.cpp b/clang/test/OpenMP/for_codegen.cpp index 9082eaaf878f..40c7ded52401 100644 --- a/clang/test/OpenMP/for_codegen.cpp +++ b/clang/test/OpenMP/for_codegen.cpp @@ -23,9 +23,9 @@ // CHECK: [[IDENT_T_TY:%.+]] = type { i32, i32, i32, i32, i8* } // CHECK-DAG: [[IMPLICIT_BARRIER_LOC:@.+]] = private unnamed_addr global %{{.+}} { i32 0, i32 66, i32 0, i32 0, i8* // CHECK-DAG: [[LOOP_LOC:@.+]] = private unnamed_addr global %{{.+}} { i32 0, i32 514, i32 0, i32 0, i8* -// CHECK-DAG: [[I:@.+]] = global i8 1, -// CHECK-DAG: [[J:@.+]] = global i8 2, -// CHECK-DAG: [[K:@.+]] = global i8 3, +// CHECK-DAG: [[I:@.+]] = dso_local global i8 1, +// CHECK-DAG: [[J:@.+]] = dso_local global i8 2, +// CHECK-DAG: [[K:@.+]] = dso_local global i8 3, // CHECK-LABEL: loop_with_counter_collapse void loop_with_counter_collapse() { diff --git a/clang/test/OpenMP/for_private_codegen.cpp b/clang/test/OpenMP/for_private_codegen.cpp index d914a62d3bae..774511cec19b 100644 --- a/clang/test/OpenMP/for_private_codegen.cpp +++ b/clang/test/OpenMP/for_private_codegen.cpp @@ -184,7 +184,7 @@ int main() { #endif } -// CHECK: define i{{[0-9]+}} @main() +// CHECK: define dso_local i{{[0-9]+}} @main() // CHECK: [[TEST:%.+]] = alloca [[S_FLOAT_TY]], // CHECK: call {{.*}} [[S_FLOAT_TY_DEF_CONSTR:@.+]]([[S_FLOAT_TY]]* [[TEST]]) // CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 0, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*)* [[MAIN_MICROTASK:@.+]] to void diff --git a/clang/test/OpenMP/nvptx_declare_target_var_ctor_dtor_codegen.cpp b/clang/test/OpenMP/nvptx_declare_target_var_ctor_dtor_codegen.cpp index 0a9772b8075c..257c693669e2 100644 --- a/clang/test/OpenMP/nvptx_declare_target_var_ctor_dtor_codegen.cpp +++ b/clang/test/OpenMP/nvptx_declare_target_var_ctor_dtor_codegen.cpp @@ -18,7 +18,7 @@ // DEVICE-DAG: [[C_ADDR:.+]] = internal global i32 0, // DEVICE-DAG: [[CD_ADDR:@.+]] ={{ hidden | }}global %struct.S zeroinitializer, // HOST-DAG: @[[C_ADDR:.+]] = internal global i32 0, -// HOST-DAG: @[[CD_ADDR:.+]] ={{ hidden | }}global %struct.S zeroinitializer, +// HOST-DAG: @[[CD_ADDR:.+]] ={{ hidden | }}dso_local global %struct.S zeroinitializer, #pragma omp declare target int foo() { return 0; } diff --git a/clang/test/OpenMP/nvptx_target_requires_unified_shared_memory.cpp b/clang/test/OpenMP/nvptx_target_requires_unified_shared_memory.cpp index 877aa7ab0b62..25e656cd9d19 100644 --- a/clang/test/OpenMP/nvptx_target_requires_unified_shared_memory.cpp +++ b/clang/test/OpenMP/nvptx_target_requires_unified_shared_memory.cpp @@ -30,10 +30,10 @@ int bar(int n){ return sum; } -// CHECK-HOST: [[VAR:@.+]] = global double 1.000000e+01 +// CHECK-HOST: [[VAR:@.+]] = dso_local global double 1.000000e+01 // CHECK-HOST: [[VAR_DECL_TGT_LINK_PTR:@.+]] = weak global double* [[VAR]] -// CHECK-HOST: [[TO_VAR:@.+]] = global double 2.000000e+01 +// CHECK-HOST: [[TO_VAR:@.+]] = dso_local global double 2.000000e+01 // CHECK-HOST: [[VAR_DECL_TGT_TO_PTR:@.+]] = weak global double* [[TO_VAR]] // CHECK-HOST: [[OFFLOAD_SIZES:@.+]] = private unnamed_addr constant [2 x i64] [i64 4, i64 8] diff --git a/clang/test/OpenMP/openmp_offload_registration.cpp b/clang/test/OpenMP/openmp_offload_registration.cpp index 1aa2067ab8e8..d6c58c4334c9 100644 --- a/clang/test/OpenMP/openmp_offload_registration.cpp +++ b/clang/test/OpenMP/openmp_offload_registration.cpp @@ -1,6 +1,6 @@ // Test offload registration for two targets, and test offload target validation. -// RUN: %clang_cc1 -verify -fopenmp -x c -triple x86_64-unknown-linux-gnu -fopenmp-targets=x86_64-pc-linux-gnu,powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s -// RUN: %clang_cc1 -verify -fopenmp -x c -triple x86_64-unknown-linux-gnu -fopenmp-targets=aarch64-unknown-linux-gnu -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp -x c -triple x86_64-unknown-linux-gnu -fopenmp-targets=x86_64-pc-linux-gnu,powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp -x c -triple x86_64-unknown-linux-gnu -fopenmp-targets=aarch64-unknown-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s // expected-no-diagnostics void foo() { diff --git a/clang/test/OpenMP/parallel_codegen.cpp b/clang/test/OpenMP/parallel_codegen.cpp index f96ad406c25f..b4e0167ceda0 100644 --- a/clang/test/OpenMP/parallel_codegen.cpp +++ b/clang/test/OpenMP/parallel_codegen.cpp @@ -57,7 +57,7 @@ int main (int argc, char **argv) { // ALL-NEXT: [[RET:%.+]] = call {{[a-z\_\b]*[ ]?i32}} [[TMAIN:@.+tmain.+]](i8** [[ARGV]]) // ALL: ret i32 // ALL-NEXT: } -// ALL-DEBUG-LABEL: define i32 @main(i32 %argc, i8** %argv) +// ALL-DEBUG-LABEL: define dso_local i32 @main(i32 %argc, i8** %argv) // CHECK-DEBUG: [[LOC_2_ADDR:%.+]] = alloca %struct.ident_t // CHECK-DEBUG: [[KMPC_LOC_VOIDPTR:%.+]] = bitcast %struct.ident_t* [[LOC_2_ADDR]] to i8* // CHECK-DEBUG-NEXT: [[KMPC_DEFAULT_LOC_VOIDPTR:%.+]] = bitcast %struct.ident_t* [[DEF_LOC_2]] to i8* diff --git a/clang/test/OpenMP/parallel_firstprivate_codegen.cpp b/clang/test/OpenMP/parallel_firstprivate_codegen.cpp index 2a306d1272f8..3917f37471c0 100644 --- a/clang/test/OpenMP/parallel_firstprivate_codegen.cpp +++ b/clang/test/OpenMP/parallel_firstprivate_codegen.cpp @@ -148,7 +148,7 @@ int main() { static int sivar; SS ss(sivar); #ifdef LAMBDA - // LAMBDA: [[G:@.+]] = global i{{[0-9]+}} 1212, + // LAMBDA: [[G:@.+]] = dso_local global i{{[0-9]+}} 1212, // LAMBDA-LABEL: @main // LAMBDA: alloca [[SS_TY]], // LAMBDA: alloca [[CAP_TY:%.+]], @@ -236,7 +236,7 @@ int main() { }(); return 0; #elif defined(BLOCKS) - // BLOCKS: [[G:@.+]] = global i{{[0-9]+}} 1212, + // BLOCKS: [[G:@.+]] = dso_local global i{{[0-9]+}} 1212, // BLOCKS-LABEL: @main // BLOCKS: call // BLOCKS: call {{.*}}void {{%.+}}(i8 diff --git a/clang/test/OpenMP/parallel_master_codegen.cpp b/clang/test/OpenMP/parallel_master_codegen.cpp index db799f55d13f..f8a9177dcad7 100644 --- a/clang/test/OpenMP/parallel_master_codegen.cpp +++ b/clang/test/OpenMP/parallel_master_codegen.cpp @@ -25,7 +25,7 @@ void parallel_master() { foo(); } -// CK1-LABEL: define void @{{.+}}parallel_master{{.+}} +// CK1-LABEL: define dso_local void @{{.+}}parallel_master{{.+}} // CK1: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* [[DEF_LOC]], i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* [[OMP_OUTLINED:@.+]] to void (i32*, i32*, ...)*)) // CK1: define internal {{.*}}void [[OMP_OUTLINED]](i32* noalias [[GTID:%.+]], i32* noalias [[BTID:%.+]]) @@ -60,7 +60,7 @@ void parallel_master_private() { a++; } -// CK2-LABEL: define void @{{.+}}parallel_master_private{{.+}} +// CK2-LABEL: define dso_local void @{{.+}}parallel_master_private{{.+}} // CK2: [[A_PRIV:%.+]] = alloca i32 // CK2: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* [[DEF_LOC]], i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* [[OMP_OUTLINED:@.+]] to void (i32*, i32*, ...)*)) @@ -96,7 +96,7 @@ void parallel_master_private() { a++; } -// CK3-LABEL: define void @{{.+}}parallel_master{{.+}} +// CK3-LABEL: define dso_local void @{{.+}}parallel_master{{.+}} // CK3: [[A_VAL:%.+]] = alloca i32 // CK3: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* [[OMP_OUTLINED:@.+]] to void @@ -139,7 +139,7 @@ void parallel_master_firstprivate() { a++; } -// CK4-LABEL: define void @{{.+}}parallel_master_firstprivate{{.+}} +// CK4-LABEL: define dso_local void @{{.+}}parallel_master_firstprivate{{.+}} // CK4: [[A_VAL:%.+]] = alloca i32 // CK4: [[A_CASTED:%.+]] = alloca i64 // CK4: [[ZERO:%.+]] = load i32, i32* [[A_VAL]] @@ -206,10 +206,10 @@ void parallel_master_copyin() { a++; } -// CK5-LABEL: define void @{{.+}}parallel_master_copyin{{.+}} +// CK5-LABEL: define dso_local void @{{.+}}parallel_master_copyin{{.+}} // CK5: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* [[DEF_LOC_1]], i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* [[OMP_OUTLINED:@.+]] to void (i32*, i32*, ...)*)) // CK5: ret void -// TLS-CHECK-LABEL: define void @{{.+}}parallel_master_copyin{{.+}} +// TLS-CHECK-LABEL: define dso_local void @{{.+}}parallel_master_copyin{{.+}} // TLS-CHECK: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* [[DEF_LOC_2]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* [[OMP_OUTLINED:@.+]] to void (i32*, i32*, ...)*) // TLS-CHECK: ret void diff --git a/clang/test/OpenMP/parallel_private_codegen.cpp b/clang/test/OpenMP/parallel_private_codegen.cpp index ceceaf95d49a..468453e14311 100644 --- a/clang/test/OpenMP/parallel_private_codegen.cpp +++ b/clang/test/OpenMP/parallel_private_codegen.cpp @@ -273,7 +273,7 @@ int main() { #endif } -// CHECK: define i{{[0-9]+}} @main() +// CHECK: define dso_local i{{[0-9]+}} @main() // CHECK: [[TEST:%.+]] = alloca [[S_FLOAT_TY]], // CHECK: call {{.*}} [[S_FLOAT_TY_DEF_CONSTR:@.+]]([[S_FLOAT_TY]]* [[TEST]]) // CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 0, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*)* [[MAIN_MICROTASK:@.+]] to void diff --git a/clang/test/OpenMP/sections_private_codegen.cpp b/clang/test/OpenMP/sections_private_codegen.cpp index 6a6d4fe6481d..20ba1b1ded0d 100644 --- a/clang/test/OpenMP/sections_private_codegen.cpp +++ b/clang/test/OpenMP/sections_private_codegen.cpp @@ -154,7 +154,7 @@ int main() { #endif } -// CHECK: define i{{[0-9]+}} @main() +// CHECK: define dso_local i{{[0-9]+}} @main() // CHECK: [[TEST:%.+]] = alloca [[S_FLOAT_TY]], // CHECK: call {{.*}} [[S_FLOAT_TY_DEF_CONSTR:@.+]]([[S_FLOAT_TY]]* [[TEST]]) // CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 0, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*)* [[MAIN_MICROTASK:@.+]] to void diff --git a/clang/test/OpenMP/simd_metadata.c b/clang/test/OpenMP/simd_metadata.c index f0ae0200dd08..2f057eeb0902 100644 --- a/clang/test/OpenMP/simd_metadata.c +++ b/clang/test/OpenMP/simd_metadata.c @@ -1,24 +1,24 @@ -// RUN: %clang_cc1 -fopenmp -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=X86 -// RUN: %clang_cc1 -fopenmp -triple x86_64-unknown-unknown -target-feature +avx -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=X86-AVX -// RUN: %clang_cc1 -fopenmp -triple x86_64-unknown-unknown -target-feature +avx512f -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=X86-AVX512 -// RUN: %clang_cc1 -fopenmp -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=X86 -// RUN: %clang_cc1 -fopenmp -triple i386-unknown-unknown -target-feature +avx -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=X86-AVX -// RUN: %clang_cc1 -fopenmp -triple i386-unknown-unknown -target-feature +avx512f -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=X86-AVX512 -// RUN: %clang_cc1 -fopenmp -triple powerpc64-unknown-unknown -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=PPC -// RUN: %clang_cc1 -fopenmp -triple powerpc64-unknown-unknown -target-abi elfv1-qpx -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=PPC-QPX +// RUN: %clang_cc1 -fopenmp -triple x86_64-unknown-unknown -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK -check-prefix=X86 +// RUN: %clang_cc1 -fopenmp -triple x86_64-unknown-unknown -target-feature +avx -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK -check-prefix=X86-AVX +// RUN: %clang_cc1 -fopenmp -triple x86_64-unknown-unknown -target-feature +avx512f -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK -check-prefix=X86-AVX512 +// RUN: %clang_cc1 -fopenmp -triple i386-unknown-unknown -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK -check-prefix=X86 +// RUN: %clang_cc1 -fopenmp -triple i386-unknown-unknown -target-feature +avx -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK -check-prefix=X86-AVX +// RUN: %clang_cc1 -fopenmp -triple i386-unknown-unknown -target-feature +avx512f -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK -check-prefix=X86-AVX512 +// RUN: %clang_cc1 -fopenmp -triple powerpc64-unknown-unknown -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK -check-prefix=PPC +// RUN: %clang_cc1 -fopenmp -triple powerpc64-unknown-unknown -target-abi elfv1-qpx -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK -check-prefix=PPC-QPX -// RUN: %clang_cc1 -fopenmp-simd -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=X86 -// RUN: %clang_cc1 -fopenmp-simd -triple x86_64-unknown-unknown -target-feature +avx -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=X86-AVX -// RUN: %clang_cc1 -fopenmp-simd -triple x86_64-unknown-unknown -target-feature +avx512f -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=X86-AVX512 -// RUN: %clang_cc1 -fopenmp-simd -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=X86 -// RUN: %clang_cc1 -fopenmp-simd -triple i386-unknown-unknown -target-feature +avx -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=X86-AVX -// RUN: %clang_cc1 -fopenmp-simd -triple i386-unknown-unknown -target-feature +avx512f -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=X86-AVX512 -// RUN: %clang_cc1 -fopenmp-simd -triple powerpc64-unknown-unknown -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=PPC -// RUN: %clang_cc1 -fopenmp-simd -triple powerpc64-unknown-unknown -target-abi elfv1-qpx -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=PPC-QPX +// RUN: %clang_cc1 -fopenmp-simd -triple x86_64-unknown-unknown -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK -check-prefix=X86 +// RUN: %clang_cc1 -fopenmp-simd -triple x86_64-unknown-unknown -target-feature +avx -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK -check-prefix=X86-AVX +// RUN: %clang_cc1 -fopenmp-simd -triple x86_64-unknown-unknown -target-feature +avx512f -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK -check-prefix=X86-AVX512 +// RUN: %clang_cc1 -fopenmp-simd -triple i386-unknown-unknown -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK -check-prefix=X86 +// RUN: %clang_cc1 -fopenmp-simd -triple i386-unknown-unknown -target-feature +avx -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK -check-prefix=X86-AVX +// RUN: %clang_cc1 -fopenmp-simd -triple i386-unknown-unknown -target-feature +avx512f -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK -check-prefix=X86-AVX512 +// RUN: %clang_cc1 -fopenmp-simd -triple powerpc64-unknown-unknown -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK -check-prefix=PPC +// RUN: %clang_cc1 -fopenmp-simd -triple powerpc64-unknown-unknown -target-abi elfv1-qpx -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK -check-prefix=PPC-QPX void h1(float *c, float *a, double b[], int size) { -// CHECK-LABEL: define void @h1 +// CHECK-LABEL: define dso_local void @h1 int t = 0; #pragma omp simd safelen(16) linear(t) aligned(c:32) aligned(a,b) // CHECK: [[C_PTRINT:%.+]] = ptrtoint diff --git a/clang/test/OpenMP/single_codegen.cpp b/clang/test/OpenMP/single_codegen.cpp index ef1e32d27fed..a031504fc873 100644 --- a/clang/test/OpenMP/single_codegen.cpp +++ b/clang/test/OpenMP/single_codegen.cpp @@ -1,12 +1,12 @@ -// RUN: %clang_cc1 -verify -fopenmp -fnoopenmp-use-tls -x c++ -std=c++11 -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp -fnoopenmp-use-tls -x c++ -std=c++11 -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -std=c++11 -fopenmp -fnoopenmp-use-tls -fexceptions -fcxx-exceptions -debug-info-kind=line-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s --check-prefix=TERM_DEBUG // RUN: %clang_cc1 -verify -fopenmp -fnoopenmp-use-tls -x c++ -std=c++11 -DARRAY -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck -check-prefix=ARRAY %s -// RUN: %clang_cc1 -verify -fopenmp-simd -fnoopenmp-use-tls -x c++ -std=c++11 -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fnoopenmp-use-tls -x c++ -std=c++11 -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -fopenmp-simd -fnoopenmp-use-tls -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fnoopenmp-use-tls -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -fopenmp-simd -fnoopenmp-use-tls -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -std=c++11 -fopenmp-simd -fnoopenmp-use-tls -fexceptions -fcxx-exceptions -debug-info-kind=line-tables-only -x c++ -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -verify -fopenmp-simd -fnoopenmp-use-tls -x c++ -std=c++11 -DARRAY -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s // SIMD-ONLY0-NOT: {{__kmpc|__tgt}} diff --git a/clang/test/OpenMP/single_private_codegen.cpp b/clang/test/OpenMP/single_private_codegen.cpp index 4b4d103d7dd4..27dfe66bd99e 100644 --- a/clang/test/OpenMP/single_private_codegen.cpp +++ b/clang/test/OpenMP/single_private_codegen.cpp @@ -143,7 +143,7 @@ int main() { #endif } -// CHECK: define i{{[0-9]+}} @main() +// CHECK: define dso_local i{{[0-9]+}} @main() // CHECK: [[TEST:%.+]] = alloca [[S_FLOAT_TY]], // CHECK: call {{.*}} [[S_FLOAT_TY_DEF_CONSTR:@.+]]([[S_FLOAT_TY]]* [[TEST]]) // CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 0, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*)* [[MAIN_MICROTASK:@.+]] to void diff --git a/clang/test/OpenMP/target_codegen_global_capture.cpp b/clang/test/OpenMP/target_codegen_global_capture.cpp index 27f8bcea020b..6f0d46c95ef4 100644 --- a/clang/test/OpenMP/target_codegen_global_capture.cpp +++ b/clang/test/OpenMP/target_codegen_global_capture.cpp @@ -17,10 +17,10 @@ #define HEADER -// CHECK-DAG: [[GA:@.+]] = global double 1.000000e+00 -// CHECK-DAG: [[GB:@.+]] = global double 2.000000e+00 -// CHECK-DAG: [[GC:@.+]] = global double 3.000000e+00 -// CHECK-DAG: [[GD:@.+]] = global double 4.000000e+00 +// CHECK-DAG: [[GA:@.+]] = dso_local global double 1.000000e+00 +// CHECK-DAG: [[GB:@.+]] = dso_local global double 2.000000e+00 +// CHECK-DAG: [[GC:@.+]] = dso_local global double 3.000000e+00 +// CHECK-DAG: [[GD:@.+]] = dso_local global double 4.000000e+00 // CHECK-DAG: [[FA:@.+]] = internal global float 5.000000e+00 // CHECK-DAG: [[FB:@.+]] = internal global float 6.000000e+00 // CHECK-DAG: [[FC:@.+]] = internal global float 7.000000e+00 diff --git a/clang/test/OpenMP/target_codegen_registration.cpp b/clang/test/OpenMP/target_codegen_registration.cpp index 828f1b3190fa..d5d8521021e4 100644 --- a/clang/test/OpenMP/target_codegen_registration.cpp +++ b/clang/test/OpenMP/target_codegen_registration.cpp @@ -1,43 +1,43 @@ // Test host codegen. -// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // SIMD-ONLY0-NOT: {{__kmpc|__tgt}} // Test target codegen - host bc file has to be created first. // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm-bc %s -o %t-x86-host.bc -// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm-bc %s -o %t-x86-host.bc -// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // SIMD-ONLY1-NOT: {{__kmpc|__tgt}} // Check that no target code is emitted if no omptests flag was provided. -// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK-NTARGET +// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK-NTARGET -// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY2 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY2 %s // SIMD-ONLY2-NOT: {{__kmpc|__tgt}} // expected-no-diagnostics diff --git a/clang/test/OpenMP/target_data_use_device_ptr_codegen.cpp b/clang/test/OpenMP/target_data_use_device_ptr_codegen.cpp index a3d8043b6b4e..1de407a93858 100644 --- a/clang/test/OpenMP/target_data_use_device_ptr_codegen.cpp +++ b/clang/test/OpenMP/target_data_use_device_ptr_codegen.cpp @@ -21,7 +21,7 @@ double *g; -// CK1: @g = global double* +// CK1: @g = dso_local global double* // CK1: [[MTYPE00:@.+]] = {{.*}}constant [1 x i64] [i64 99] // CK1: [[MTYPE01:@.+]] = {{.*}}constant [1 x i64] [i64 99] // CK1: [[MTYPE03:@.+]] = {{.*}}constant [1 x i64] [i64 99] diff --git a/clang/test/OpenMP/target_defaultmap_codegen.cpp b/clang/test/OpenMP/target_defaultmap_codegen.cpp index 5cff255400e9..118e808db667 100644 --- a/clang/test/OpenMP/target_defaultmap_codegen.cpp +++ b/clang/test/OpenMP/target_defaultmap_codegen.cpp @@ -1230,7 +1230,7 @@ void implicit_maps_pointer (){ double *g; -// CK23: @g = global double* +// CK23: @g = dso_local global double* // CK23: [[SIZES00:@.+]] = {{.+}}constant [1 x i[[sz:64|32]]] [i{{64|32}} {{8|4}}] // CK23: [[TYPES00:@.+]] = {{.+}}constant [1 x i64] [i64 288] diff --git a/clang/test/OpenMP/target_is_device_ptr_codegen.cpp b/clang/test/OpenMP/target_is_device_ptr_codegen.cpp index 90514acadf81..7bc15e0f3632 100644 --- a/clang/test/OpenMP/target_is_device_ptr_codegen.cpp +++ b/clang/test/OpenMP/target_is_device_ptr_codegen.cpp @@ -21,7 +21,7 @@ double *g; -// CK1: @g = global double* +// CK1: @g = dso_local global double* // CK1: [[SIZES00:@.+]] = {{.+}}constant [1 x i[[sz:64|32]]] [i{{64|32}} {{8|4}}] // CK1: [[TYPES00:@.+]] = {{.+}}constant [1 x i64] [i64 288] diff --git a/clang/test/OpenMP/target_map_codegen.cpp b/clang/test/OpenMP/target_map_codegen.cpp index cd1b5e49174e..858397f7f50c 100644 --- a/clang/test/OpenMP/target_map_codegen.cpp +++ b/clang/test/OpenMP/target_map_codegen.cpp @@ -370,7 +370,7 @@ void implicit_maps_nested_integer_and_enum (int a){ #ifdef CK6 // CK6-LABEL: @.__omp_offloading_{{.*}}implicit_maps_host_global{{.*}}_l397.region_id = weak constant i8 0 -// CK6-DAG: [[GBL:@Gi]] = global i32 0 +// CK6-DAG: [[GBL:@Gi]] = dso_local global i32 0 // CK6-DAG: [[SIZES:@.+]] = {{.+}}constant [1 x i64] [i64 4] // Map types: OMP_MAP_PRIVATE_VAL | OMP_MAP_TARGET_PARAM | OMP_MAP_IMPLICIT = 800 // CK6-DAG: [[TYPES:@.+]] = {{.+}}constant [1 x i64] [i64 800] diff --git a/clang/test/OpenMP/target_parallel_codegen_registration.cpp b/clang/test/OpenMP/target_parallel_codegen_registration.cpp index 61534d898912..06cf39e7096b 100644 --- a/clang/test/OpenMP/target_parallel_codegen_registration.cpp +++ b/clang/test/OpenMP/target_parallel_codegen_registration.cpp @@ -1,43 +1,43 @@ // Test host codegen. -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // SIMD-ONLY0-NOT: {{__kmpc|__tgt}} // Test target parallel codegen - host bc file has to be created first. // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm-bc %s -o %t-x86-host.bc -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm-bc %s -o %t-x86-host.bc -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // SIMD-ONLY1-NOT: {{__kmpc|__tgt}} // Check that no target code is emitted if no omptests flag was provided. -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK-NTARGET +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK-NTARGET -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY2 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY2 %s // SIMD-ONLY2-NOT: {{__kmpc|__tgt}} // expected-no-diagnostics diff --git a/clang/test/OpenMP/target_parallel_for_codegen_registration.cpp b/clang/test/OpenMP/target_parallel_for_codegen_registration.cpp index de44331c8e1a..1e19b68337c3 100644 --- a/clang/test/OpenMP/target_parallel_for_codegen_registration.cpp +++ b/clang/test/OpenMP/target_parallel_for_codegen_registration.cpp @@ -1,43 +1,43 @@ // Test host codegen. -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // SIMD-ONLY0-NOT: {{__kmpc|__tgt}} // Test target parallel for codegen - host bc file has to be created first. // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm-bc %s -o %t-x86-host.bc -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm-bc %s -o %t-x86-host.bc -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // SIMD-ONLY1-NOT: {{__kmpc|__tgt}} // Check that no target code is emitted if no omptests flag was provided. -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK-NTARGET +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK-NTARGET -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY2 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY2 %s // SIMD-ONLY2-NOT: {{__kmpc|__tgt}} // expected-no-diagnostics diff --git a/clang/test/OpenMP/target_parallel_for_simd_codegen_registration.cpp b/clang/test/OpenMP/target_parallel_for_simd_codegen_registration.cpp index 824040de6fea..5268b4d04a95 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_codegen_registration.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_codegen_registration.cpp @@ -1,43 +1,43 @@ // Test host codegen. -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // SIMD-ONLY0-NOT: {{__kmpc|__tgt}} // Test target parallel for simd codegen - host bc file has to be created first. // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm-bc %s -o %t-x86-host.bc -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm-bc %s -o %t-x86-host.bc -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // SIMD-ONLY1-NOT: {{__kmpc|__tgt}} // Check that no target code is emitted if no omptests flag was provided. -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK-NTARGET +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK-NTARGET -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY2 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY2 %s // SIMD-ONLY2-NOT: {{__kmpc|__tgt}} // expected-no-diagnostics diff --git a/clang/test/OpenMP/target_simd_codegen_registration.cpp b/clang/test/OpenMP/target_simd_codegen_registration.cpp index f756cb48917c..7ecb697fa7ba 100644 --- a/clang/test/OpenMP/target_simd_codegen_registration.cpp +++ b/clang/test/OpenMP/target_simd_codegen_registration.cpp @@ -1,43 +1,43 @@ // Test host codegen. -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // SIMD-ONLY0-NOT: {{__kmpc|__tgt}} // Test target simd codegen - host bc file has to be created first. // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm-bc %s -o %t-x86-host.bc -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm-bc %s -o %t-x86-host.bc -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // SIMD-ONLY1-NOT: {{__kmpc|__tgt}} // Check that no target code is emitted if no omptests flag was provided. -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK-NTARGET +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK-NTARGET -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY2 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY2 %s // SIMD-ONLY2-NOT: {{__kmpc|__tgt}} // expected-no-diagnostics diff --git a/clang/test/OpenMP/target_teams_codegen_registration.cpp b/clang/test/OpenMP/target_teams_codegen_registration.cpp index e29843b11736..2a1ffda32ba3 100644 --- a/clang/test/OpenMP/target_teams_codegen_registration.cpp +++ b/clang/test/OpenMP/target_teams_codegen_registration.cpp @@ -1,43 +1,43 @@ // Test host codegen. -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // SIMD-ONLY0-NOT: {{__kmpc|__tgt}} // Test target teams codegen - host bc file has to be created first. // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm-bc %s -o %t-x86-host.bc -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm-bc %s -o %t-x86-host.bc -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // SIMD-ONLY1-NOT: {{__kmpc|__tgt}} // Check that no target code is emitted if no omptests flag was provided. -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK-NTARGET +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK-NTARGET -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY2 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY2 %s // SIMD-ONLY2-NOT: {{__kmpc|__tgt}} // expected-no-diagnostics diff --git a/clang/test/OpenMP/target_teams_distribute_codegen_registration.cpp b/clang/test/OpenMP/target_teams_distribute_codegen_registration.cpp index d260f918b41e..1af6c8b86e4f 100644 --- a/clang/test/OpenMP/target_teams_distribute_codegen_registration.cpp +++ b/clang/test/OpenMP/target_teams_distribute_codegen_registration.cpp @@ -1,43 +1,43 @@ // Test host codegen. -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // SIMD-ONLY0-NOT: {{__kmpc|__tgt}} // Test target teams distribute codegen - host bc file has to be created first. // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm-bc %s -o %t-x86-host.bc -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm-bc %s -o %t-x86-host.bc -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // SIMD-ONLY1-NOT: {{__kmpc|__tgt}} // Check that no target code is emitted if no omptests flag was provided. -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK-NTARGET +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK-NTARGET -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY2 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY2 %s // SIMD-ONLY2-NOT: {{__kmpc|__tgt}} // expected-no-diagnostics diff --git a/clang/test/OpenMP/target_teams_distribute_firstprivate_codegen.cpp b/clang/test/OpenMP/target_teams_distribute_firstprivate_codegen.cpp index c268b72a25ed..d221dec515ad 100644 --- a/clang/test/OpenMP/target_teams_distribute_firstprivate_codegen.cpp +++ b/clang/test/OpenMP/target_teams_distribute_firstprivate_codegen.cpp @@ -65,22 +65,22 @@ T tmain() { return T(); } -// CHECK-DAG: [[TEST:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// CHECK-DAG: [[TEST:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> test; -// CHECK-DAG: [[T_VAR:@.+]] = global i{{[0-9]+}} 333, +// CHECK-DAG: [[T_VAR:@.+]] = dso_local global i{{[0-9]+}} 333, int t_var = 333; -// CHECK-DAG: [[VEC:@.+]] = global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], +// CHECK-DAG: [[VEC:@.+]] = dso_local global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], int vec[] = {1, 2}; -// CHECK-DAG: [[S_ARR:@.+]] = global [2 x [[S_FLOAT_TY]]] zeroinitializer, +// CHECK-DAG: [[S_ARR:@.+]] = dso_local global [2 x [[S_FLOAT_TY]]] zeroinitializer, S<float> s_arr[] = {1, 2}; -// CHECK-DAG: [[VAR:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// CHECK-DAG: [[VAR:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> var(3); // CHECK-DAG: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0, int main() { static int sivar; #ifdef LAMBDA - // LAMBDA: [[G:@.+]] = global i{{[0-9]+}} 1212, + // LAMBDA: [[G:@.+]] = dso_local global i{{[0-9]+}} 1212, // LAMBDA-LABEL: @main // LAMBDA: call void [[OUTER_LAMBDA:@.+]]( [&]() { diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_codegen.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_codegen.cpp index 9c91538ce7e0..d05c61316476 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_codegen.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_codegen.cpp @@ -89,22 +89,22 @@ T tmain() { return T(); } -// HCHECK-DAG: [[TEST:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// HCHECK-DAG: [[TEST:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> test; -// HCHECK-DAG: [[T_VAR:@.+]] = global i{{[0-9]+}} 333, +// HCHECK-DAG: [[T_VAR:@.+]] = dso_local global i{{[0-9]+}} 333, int t_var = 333; -// HCHECK-DAG: [[VEC:@.+]] = global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], +// HCHECK-DAG: [[VEC:@.+]] = dso_local global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], int vec[] = {1, 2}; -// HCHECK-DAG: [[S_ARR:@.+]] = global [2 x [[S_FLOAT_TY]]] zeroinitializer, +// HCHECK-DAG: [[S_ARR:@.+]] = dso_local global [2 x [[S_FLOAT_TY]]] zeroinitializer, S<float> s_arr[] = {1, 2}; -// HCHECK-DAG: [[VAR:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// HCHECK-DAG: [[VAR:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> var(3); // HCHECK-DAG: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0, int main() { static int sivar; #ifdef LAMBDA - // HLAMBDA: [[G:@.+]] = global i{{[0-9]+}} 1212, + // HLAMBDA: [[G:@.+]] = dso_local global i{{[0-9]+}} 1212, // HLAMBDA-LABEL: @main // HLAMBDA: call void [[OUTER_LAMBDA:@.+]]( [&]() { diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_private_codegen.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_private_codegen.cpp index 87a149968930..e38970004bd9 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_private_codegen.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_private_codegen.cpp @@ -103,7 +103,7 @@ S<float> var(3); int main() { static int sivar; #ifdef LAMBDA - // HLAMBDA: [[G:@.+]] = global i{{[0-9]+}} 1212, + // HLAMBDA: [[G:@.+]] = dso_local global i{{[0-9]+}} 1212, // HLAMBDA-LABEL: @main // HLAMBDA: call void [[OUTER_LAMBDA:@.+]]( [&]() { diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_codegen_registration.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_codegen_registration.cpp index 227ca5c8eb91..7edaf39479ec 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_codegen_registration.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_codegen_registration.cpp @@ -1,43 +1,43 @@ // Test host codegen. -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // SIMD-ONLY0-NOT: {{__kmpc|__tgt}} // Test target teams distribute parallel for simd codegen - host bc file has to be created first. // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm-bc %s -o %t-x86-host.bc -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm-bc %s -o %t-x86-host.bc -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // SIMD-ONLY1-NOT: {{__kmpc|__tgt}} // Check that no target code is emitted if no omptests flag was provided. -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK-NTARGET +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK-NTARGET -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY2 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY2 %s // SIMD-ONLY2-NOT: {{__kmpc|__tgt}} // expected-no-diagnostics diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_codegen.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_codegen.cpp index 978e90dec543..d68e14672c13 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_codegen.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_codegen.cpp @@ -89,22 +89,22 @@ T tmain() { return T(); } -// HCHECK-DAG: [[TEST:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// HCHECK-DAG: [[TEST:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> test; -// HCHECK-DAG: [[T_VAR:@.+]] = global i{{[0-9]+}} 333, +// HCHECK-DAG: [[T_VAR:@.+]] = dso_local global i{{[0-9]+}} 333, int t_var = 333; -// HCHECK-DAG: [[VEC:@.+]] = global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], +// HCHECK-DAG: [[VEC:@.+]] = dso_local global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], int vec[] = {1, 2}; -// HCHECK-DAG: [[S_ARR:@.+]] = global [2 x [[S_FLOAT_TY]]] zeroinitializer, +// HCHECK-DAG: [[S_ARR:@.+]] = dso_local global [2 x [[S_FLOAT_TY]]] zeroinitializer, S<float> s_arr[] = {1, 2}; -// HCHECK-DAG: [[VAR:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// HCHECK-DAG: [[VAR:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> var(3); // HCHECK-DAG: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0, int main() { static int sivar; #ifdef LAMBDA - // HLAMBDA: [[G:@.+]] = global i{{[0-9]+}} 1212, + // HLAMBDA: [[G:@.+]] = dso_local global i{{[0-9]+}} 1212, // HLAMBDA-LABEL: @main // HLAMBDA: call void [[OUTER_LAMBDA:@.+]]( [&]() { diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_private_codegen.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_private_codegen.cpp index 88169197d1c6..3ca71e810829 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_private_codegen.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_private_codegen.cpp @@ -103,7 +103,7 @@ S<float> var(3); int main() { static int sivar; #ifdef LAMBDA - // HLAMBDA: [[G:@.+]] = global i{{[0-9]+}} 1212, + // HLAMBDA: [[G:@.+]] = dso_local global i{{[0-9]+}} 1212, // HLAMBDA-LABEL: @main // HLAMBDA: call void [[OUTER_LAMBDA:@.+]]( [&]() { diff --git a/clang/test/OpenMP/target_teams_distribute_private_codegen.cpp b/clang/test/OpenMP/target_teams_distribute_private_codegen.cpp index f52d3b040f04..0d435901afd3 100644 --- a/clang/test/OpenMP/target_teams_distribute_private_codegen.cpp +++ b/clang/test/OpenMP/target_teams_distribute_private_codegen.cpp @@ -64,22 +64,22 @@ T tmain() { return T(); } -// CHECK-DAG: [[TEST:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// CHECK-DAG: [[TEST:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> test; -// CHECK-DAG: [[T_VAR:@.+]] = global i{{[0-9]+}} 333, +// CHECK-DAG: [[T_VAR:@.+]] = dso_local global i{{[0-9]+}} 333, int t_var = 333; -// CHECK-DAG: [[VEC:@.+]] = global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], +// CHECK-DAG: [[VEC:@.+]] = dso_local global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], int vec[] = {1, 2}; -// CHECK-DAG: [[S_ARR:@.+]] = global [2 x [[S_FLOAT_TY]]] zeroinitializer, +// CHECK-DAG: [[S_ARR:@.+]] = dso_local global [2 x [[S_FLOAT_TY]]] zeroinitializer, S<float> s_arr[] = {1, 2}; -// CHECK-DAG: [[VAR:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// CHECK-DAG: [[VAR:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> var(3); // CHECK-DAG: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0, int main() { static int sivar; #ifdef LAMBDA - // LAMBDA: [[G:@.+]] = global i{{[0-9]+}} 1212, + // LAMBDA: [[G:@.+]] = dso_local global i{{[0-9]+}} 1212, // LAMBDA-LABEL: @main // LAMBDA: call void [[OUTER_LAMBDA:@.+]]( [&]() { diff --git a/clang/test/OpenMP/target_teams_distribute_simd_codegen_registration.cpp b/clang/test/OpenMP/target_teams_distribute_simd_codegen_registration.cpp index 96b72aba6032..1dcce2f5c7bd 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_codegen_registration.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_codegen_registration.cpp @@ -1,43 +1,43 @@ // Test host codegen. -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY0 %s // SIMD-ONLY0-NOT: {{__kmpc|__tgt}} // Test target teams distribute simd codegen - host bc file has to be created first. // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm-bc %s -o %t-x86-host.bc -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -check-prefix=TCHECK +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck %s -check-prefix=TCHECK // RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm-bc %s -o %t-x86-host.bc -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY1 %s // SIMD-ONLY1-NOT: {{__kmpc|__tgt}} // Check that no target code is emitted if no omptests flag was provided. -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK-NTARGET +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s -check-prefix=CHECK-NTARGET -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY2 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - -fsemantic-interposition | FileCheck --check-prefix SIMD-ONLY2 %s // SIMD-ONLY2-NOT: {{__kmpc|__tgt}} // expected-no-diagnostics diff --git a/clang/test/OpenMP/target_teams_distribute_simd_firstprivate_codegen.cpp b/clang/test/OpenMP/target_teams_distribute_simd_firstprivate_codegen.cpp index 05ea0e897a4b..3537eee6568b 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_firstprivate_codegen.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_firstprivate_codegen.cpp @@ -65,22 +65,22 @@ T tmain() { return T(); } -// CHECK-DAG: [[TEST:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// CHECK-DAG: [[TEST:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> test; -// CHECK-DAG: [[T_VAR:@.+]] = global i{{[0-9]+}} 333, +// CHECK-DAG: [[T_VAR:@.+]] = dso_local global i{{[0-9]+}} 333, int t_var = 333; -// CHECK-DAG: [[VEC:@.+]] = global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], +// CHECK-DAG: [[VEC:@.+]] = dso_local global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], int vec[] = {1, 2}; -// CHECK-DAG: [[S_ARR:@.+]] = global [2 x [[S_FLOAT_TY]]] zeroinitializer, +// CHECK-DAG: [[S_ARR:@.+]] = dso_local global [2 x [[S_FLOAT_TY]]] zeroinitializer, S<float> s_arr[] = {1, 2}; -// CHECK-DAG: [[VAR:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// CHECK-DAG: [[VAR:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> var(3); // CHECK-DAG: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0, int main() { static int sivar; #ifdef LAMBDA - // LAMBDA: [[G:@.+]] = global i{{[0-9]+}} 1212, + // LAMBDA: [[G:@.+]] = dso_local global i{{[0-9]+}} 1212, // LAMBDA-LABEL: @main // LAMBDA: call void [[OUTER_LAMBDA:@.+]]( [&]() { diff --git a/clang/test/OpenMP/target_teams_distribute_simd_private_codegen.cpp b/clang/test/OpenMP/target_teams_distribute_simd_private_codegen.cpp index 402c83921d8f..6823460b0cf4 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_private_codegen.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_private_codegen.cpp @@ -64,22 +64,22 @@ T tmain() { return T(); } -// CHECK-DAG: [[TEST:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// CHECK-DAG: [[TEST:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> test; -// CHECK-DAG: [[T_VAR:@.+]] = global i{{[0-9]+}} 333, +// CHECK-DAG: [[T_VAR:@.+]] = dso_local global i{{[0-9]+}} 333, int t_var = 333; -// CHECK-DAG: [[VEC:@.+]] = global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], +// CHECK-DAG: [[VEC:@.+]] = dso_local global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], int vec[] = {1, 2}; -// CHECK-DAG: [[S_ARR:@.+]] = global [2 x [[S_FLOAT_TY]]] zeroinitializer, +// CHECK-DAG: [[S_ARR:@.+]] = dso_local global [2 x [[S_FLOAT_TY]]] zeroinitializer, S<float> s_arr[] = {1, 2}; -// CHECK-DAG: [[VAR:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// CHECK-DAG: [[VAR:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> var(3); // CHECK-DAG: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0, int main() { static int sivar; #ifdef LAMBDA - // LAMBDA: [[G:@.+]] = global i{{[0-9]+}} 1212, + // LAMBDA: [[G:@.+]] = dso_local global i{{[0-9]+}} 1212, // LAMBDA-LABEL: @main // LAMBDA: call void [[OUTER_LAMBDA:@.+]]( [&]() { diff --git a/clang/test/OpenMP/teams_distribute_firstprivate_codegen.cpp b/clang/test/OpenMP/teams_distribute_firstprivate_codegen.cpp index a2e6533ba7a4..51788cdf04de 100644 --- a/clang/test/OpenMP/teams_distribute_firstprivate_codegen.cpp +++ b/clang/test/OpenMP/teams_distribute_firstprivate_codegen.cpp @@ -66,22 +66,22 @@ T tmain() { return T(); } -// CHECK-DAG: [[TEST:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// CHECK-DAG: [[TEST:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> test; -// CHECK-DAG: [[T_VAR:@.+]] = global i{{[0-9]+}} 333, +// CHECK-DAG: [[T_VAR:@.+]] = dso_local global i{{[0-9]+}} 333, int t_var = 333; -// CHECK-DAG: [[VEC:@.+]] = global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], +// CHECK-DAG: [[VEC:@.+]] = dso_local global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], int vec[] = {1, 2}; -// CHECK-DAG: [[S_ARR:@.+]] = global [2 x [[S_FLOAT_TY]]] zeroinitializer, +// CHECK-DAG: [[S_ARR:@.+]] = dso_local global [2 x [[S_FLOAT_TY]]] zeroinitializer, S<float> s_arr[] = {1, 2}; -// CHECK-DAG: [[VAR:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// CHECK-DAG: [[VAR:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> var(3); // CHECK-DAG: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0, int main() { static int sivar; #ifdef LAMBDA - // LAMBDA: [[G:@.+]] = global i{{[0-9]+}} 1212, + // LAMBDA: [[G:@.+]] = dso_local global i{{[0-9]+}} 1212, // LAMBDA-LABEL: @main // LAMBDA: call void [[OUTER_LAMBDA:@.+]]( [&]() { diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_firstprivate_codegen.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_firstprivate_codegen.cpp index 6f33c4f754a2..a7ec35ecfbad 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_firstprivate_codegen.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_firstprivate_codegen.cpp @@ -66,22 +66,22 @@ T tmain() { return T(); } -// CHECK-DAG: [[TEST:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// CHECK-DAG: [[TEST:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> test; -// CHECK-DAG: [[T_VAR:@.+]] = global i{{[0-9]+}} 333, +// CHECK-DAG: [[T_VAR:@.+]] = dso_local global i{{[0-9]+}} 333, int t_var = 333; -// CHECK-DAG: [[VEC:@.+]] = global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], +// CHECK-DAG: [[VEC:@.+]] = dso_local global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], int vec[] = {1, 2}; -// CHECK-DAG: [[S_ARR:@.+]] = global [2 x [[S_FLOAT_TY]]] zeroinitializer, +// CHECK-DAG: [[S_ARR:@.+]] = dso_local global [2 x [[S_FLOAT_TY]]] zeroinitializer, S<float> s_arr[] = {1, 2}; -// CHECK-DAG: [[VAR:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// CHECK-DAG: [[VAR:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> var(3); // CHECK-DAG: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0, int main() { static int sivar; #ifdef LAMBDA - // LAMBDA: [[G:@.+]] = global i{{[0-9]+}} 1212, + // LAMBDA: [[G:@.+]] = dso_local global i{{[0-9]+}} 1212, // LAMBDA-LABEL: @main // LAMBDA: call void [[OUTER_LAMBDA:@.+]]( [&]() { diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_private_codegen.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_private_codegen.cpp index 5fc7ee12eb0a..b381a078fe3c 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_private_codegen.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_private_codegen.cpp @@ -65,22 +65,22 @@ T tmain() { return T(); } -// CHECK-DAG: [[TEST:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// CHECK-DAG: [[TEST:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> test; -// CHECK-DAG: [[T_VAR:@.+]] = global i{{[0-9]+}} 333, +// CHECK-DAG: [[T_VAR:@.+]] = dso_local global i{{[0-9]+}} 333, int t_var = 333; -// CHECK-DAG: [[VEC:@.+]] = global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], +// CHECK-DAG: [[VEC:@.+]] = dso_local global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], int vec[] = {1, 2}; -// CHECK-DAG: [[S_ARR:@.+]] = global [2 x [[S_FLOAT_TY]]] zeroinitializer, +// CHECK-DAG: [[S_ARR:@.+]] = dso_local global [2 x [[S_FLOAT_TY]]] zeroinitializer, S<float> s_arr[] = {1, 2}; -// CHECK-DAG: [[VAR:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// CHECK-DAG: [[VAR:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> var(3); // CHECK-DAG: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0, int main() { static int sivar; #ifdef LAMBDA - // LAMBDA: [[G:@.+]] = global i{{[0-9]+}} 1212, + // LAMBDA: [[G:@.+]] = dso_local global i{{[0-9]+}} 1212, // LAMBDA-LABEL: @main // LAMBDA: call void [[OUTER_LAMBDA:@.+]]( [&]() { diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_codegen.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_codegen.cpp index c92f9be7ab74..a9103bd54737 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_codegen.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_codegen.cpp @@ -66,22 +66,22 @@ T tmain() { return T(); } -// CHECK-DAG: [[TEST:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// CHECK-DAG: [[TEST:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> test; -// CHECK-DAG: [[T_VAR:@.+]] = global i{{[0-9]+}} 333, +// CHECK-DAG: [[T_VAR:@.+]] = dso_local global i{{[0-9]+}} 333, int t_var = 333; -// CHECK-DAG: [[VEC:@.+]] = global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], +// CHECK-DAG: [[VEC:@.+]] = dso_local global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], int vec[] = {1, 2}; -// CHECK-DAG: [[S_ARR:@.+]] = global [2 x [[S_FLOAT_TY]]] zeroinitializer, +// CHECK-DAG: [[S_ARR:@.+]] = dso_local global [2 x [[S_FLOAT_TY]]] zeroinitializer, S<float> s_arr[] = {1, 2}; -// CHECK-DAG: [[VAR:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// CHECK-DAG: [[VAR:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> var(3); // CHECK-DAG: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0, int main() { static int sivar; #ifdef LAMBDA - // LAMBDA: [[G:@.+]] = global i{{[0-9]+}} 1212, + // LAMBDA: [[G:@.+]] = dso_local global i{{[0-9]+}} 1212, // LAMBDA-LABEL: @main // LAMBDA: call void [[OUTER_LAMBDA:@.+]]( [&]() { diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_private_codegen.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_private_codegen.cpp index b2c8c22b84d8..c3af3d5e1db3 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_private_codegen.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_private_codegen.cpp @@ -65,22 +65,22 @@ T tmain() { return T(); } -// CHECK-DAG: [[TEST:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// CHECK-DAG: [[TEST:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> test; -// CHECK-DAG: [[T_VAR:@.+]] = global i{{[0-9]+}} 333, +// CHECK-DAG: [[T_VAR:@.+]] = dso_local global i{{[0-9]+}} 333, int t_var = 333; -// CHECK-DAG: [[VEC:@.+]] = global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], +// CHECK-DAG: [[VEC:@.+]] = dso_local global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], int vec[] = {1, 2}; -// CHECK-DAG: [[S_ARR:@.+]] = global [2 x [[S_FLOAT_TY]]] zeroinitializer, +// CHECK-DAG: [[S_ARR:@.+]] = dso_local global [2 x [[S_FLOAT_TY]]] zeroinitializer, S<float> s_arr[] = {1, 2}; -// CHECK-DAG: [[VAR:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// CHECK-DAG: [[VAR:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> var(3); // CHECK-DAG: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0, int main() { static int sivar; #ifdef LAMBDA - // LAMBDA: [[G:@.+]] = global i{{[0-9]+}} 1212, + // LAMBDA: [[G:@.+]] = dso_local global i{{[0-9]+}} 1212, // LAMBDA-LABEL: @main // LAMBDA: call void [[OUTER_LAMBDA:@.+]]( [&]() { diff --git a/clang/test/OpenMP/teams_distribute_private_codegen.cpp b/clang/test/OpenMP/teams_distribute_private_codegen.cpp index 8880e2f51769..1e48f36a0cd0 100644 --- a/clang/test/OpenMP/teams_distribute_private_codegen.cpp +++ b/clang/test/OpenMP/teams_distribute_private_codegen.cpp @@ -65,22 +65,22 @@ T tmain() { return T(); } -// CHECK-DAG: [[TEST:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// CHECK-DAG: [[TEST:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> test; -// CHECK-DAG: [[T_VAR:@.+]] = global i{{[0-9]+}} 333, +// CHECK-DAG: [[T_VAR:@.+]] = dso_local global i{{[0-9]+}} 333, int t_var = 333; -// CHECK-DAG: [[VEC:@.+]] = global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], +// CHECK-DAG: [[VEC:@.+]] = dso_local global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], int vec[] = {1, 2}; -// CHECK-DAG: [[S_ARR:@.+]] = global [2 x [[S_FLOAT_TY]]] zeroinitializer, +// CHECK-DAG: [[S_ARR:@.+]] = dso_local global [2 x [[S_FLOAT_TY]]] zeroinitializer, S<float> s_arr[] = {1, 2}; -// CHECK-DAG: [[VAR:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// CHECK-DAG: [[VAR:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> var(3); // CHECK-DAG: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0, int main() { static int sivar; #ifdef LAMBDA - // LAMBDA: [[G:@.+]] = global i{{[0-9]+}} 1212, + // LAMBDA: [[G:@.+]] = dso_local global i{{[0-9]+}} 1212, // LAMBDA-LABEL: @main // LAMBDA: call void [[OUTER_LAMBDA:@.+]]( [&]() { diff --git a/clang/test/OpenMP/teams_distribute_simd_firstprivate_codegen.cpp b/clang/test/OpenMP/teams_distribute_simd_firstprivate_codegen.cpp index 293af4296cea..7d3234ff8063 100644 --- a/clang/test/OpenMP/teams_distribute_simd_firstprivate_codegen.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_firstprivate_codegen.cpp @@ -66,22 +66,22 @@ T tmain() { return T(); } -// CHECK-DAG: [[TEST:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// CHECK-DAG: [[TEST:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> test; -// CHECK-DAG: [[T_VAR:@.+]] = global i{{[0-9]+}} 333, +// CHECK-DAG: [[T_VAR:@.+]] = dso_local global i{{[0-9]+}} 333, int t_var = 333; -// CHECK-DAG: [[VEC:@.+]] = global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], +// CHECK-DAG: [[VEC:@.+]] = dso_local global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], int vec[] = {1, 2}; -// CHECK-DAG: [[S_ARR:@.+]] = global [2 x [[S_FLOAT_TY]]] zeroinitializer, +// CHECK-DAG: [[S_ARR:@.+]] = dso_local global [2 x [[S_FLOAT_TY]]] zeroinitializer, S<float> s_arr[] = {1, 2}; -// CHECK-DAG: [[VAR:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// CHECK-DAG: [[VAR:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> var(3); // CHECK-DAG: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0, int main() { static int sivar; #ifdef LAMBDA - // LAMBDA: [[G:@.+]] = global i{{[0-9]+}} 1212, + // LAMBDA: [[G:@.+]] = dso_local global i{{[0-9]+}} 1212, // LAMBDA-LABEL: @main // LAMBDA: call void [[OUTER_LAMBDA:@.+]]( [&]() { diff --git a/clang/test/OpenMP/teams_distribute_simd_private_codegen.cpp b/clang/test/OpenMP/teams_distribute_simd_private_codegen.cpp index 10ad66ad3121..4cc36d39ced0 100644 --- a/clang/test/OpenMP/teams_distribute_simd_private_codegen.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_private_codegen.cpp @@ -65,22 +65,22 @@ T tmain() { return T(); } -// CHECK-DAG: [[TEST:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// CHECK-DAG: [[TEST:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> test; -// CHECK-DAG: [[T_VAR:@.+]] = global i{{[0-9]+}} 333, +// CHECK-DAG: [[T_VAR:@.+]] = dso_local global i{{[0-9]+}} 333, int t_var = 333; -// CHECK-DAG: [[VEC:@.+]] = global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], +// CHECK-DAG: [[VEC:@.+]] = dso_local global [2 x i{{[0-9]+}}] [i{{[0-9]+}} 1, i{{[0-9]+}} 2], int vec[] = {1, 2}; -// CHECK-DAG: [[S_ARR:@.+]] = global [2 x [[S_FLOAT_TY]]] zeroinitializer, +// CHECK-DAG: [[S_ARR:@.+]] = dso_local global [2 x [[S_FLOAT_TY]]] zeroinitializer, S<float> s_arr[] = {1, 2}; -// CHECK-DAG: [[VAR:@.+]] = global [[S_FLOAT_TY]] zeroinitializer, +// CHECK-DAG: [[VAR:@.+]] = dso_local global [[S_FLOAT_TY]] zeroinitializer, S<float> var(3); // CHECK-DAG: [[SIVAR:@.+]] = internal global i{{[0-9]+}} 0, int main() { static int sivar; #ifdef LAMBDA - // LAMBDA: [[G:@.+]] = global i{{[0-9]+}} 1212, + // LAMBDA: [[G:@.+]] = dso_local global i{{[0-9]+}} 1212, // LAMBDA-LABEL: @main // LAMBDA: call void [[OUTER_LAMBDA:@.+]]( [&]() { diff --git a/clang/test/OpenMP/teams_private_codegen.cpp b/clang/test/OpenMP/teams_private_codegen.cpp index 0df111c3eb42..484171d58c99 100644 --- a/clang/test/OpenMP/teams_private_codegen.cpp +++ b/clang/test/OpenMP/teams_private_codegen.cpp @@ -104,7 +104,7 @@ int main() { static int sivar; SS ss(sivar); #ifdef LAMBDA - // LAMBDA: [[G:@.+]] = global i{{[0-9]+}} 1212, + // LAMBDA: [[G:@.+]] = dso_local global i{{[0-9]+}} 1212, // LAMBDA: define {{.+}} @main() // LAMBDA: alloca [[SS_TY]], // LAMBDA: alloca [[CAP_TY:%.+]], diff --git a/clang/test/OpenMP/threadprivate_codegen.cpp b/clang/test/OpenMP/threadprivate_codegen.cpp index 52ed8bb4b1aa..cda89d60e1ea 100644 --- a/clang/test/OpenMP/threadprivate_codegen.cpp +++ b/clang/test/OpenMP/threadprivate_codegen.cpp @@ -127,7 +127,7 @@ struct S5 { // CHECK-DAG: [[GS1]].cache. = common global i8** null // CHECK-DAG: [[DEFAULT_LOC:@.+]] = private unnamed_addr global [[IDENT]] { i32 0, i32 2, i32 0, i32 0, i8* getelementptr inbounds ([{{[0-9]+}} x i8], [{{[0-9]+}} x i8]* {{@.+}}, i32 0, i32 0) } // CHECK-DAG: [[GS2:@.+]] = internal global [[S2]] zeroinitializer -// CHECK-DAG: [[ARR_X:@.+]] = global [2 x [3 x [[S1]]]] zeroinitializer +// CHECK-DAG: [[ARR_X:@.+]] = dso_local global [2 x [3 x [[S1]]]] zeroinitializer // CHECK-DAG: [[ARR_X]].cache. = common global i8** null // CHECK-DAG: [[SM:@.+]] = internal global [[SMAIN]] zeroinitializer // CHECK-DAG: [[SM]].cache. = common global i8** null @@ -135,11 +135,11 @@ struct S5 { // CHECK-DAG: [[STATIC_S]].cache. = common global i8** null // CHECK-DAG: [[GS3:@.+]] = external global [[S5]] // CHECK-DAG: [[GS3]].cache. = common global i8** null -// CHECK-DAG: [[ST_INT_ST:@.+]] = linkonce_odr global i32 23 +// CHECK-DAG: [[ST_INT_ST:@.+]] = linkonce_odr dso_local global i32 23 // CHECK-DAG: [[ST_INT_ST]].cache. = common global i8** null -// CHECK-DAG: [[ST_FLOAT_ST:@.+]] = linkonce_odr global float 2.300000e+01 +// CHECK-DAG: [[ST_FLOAT_ST:@.+]] = linkonce_odr dso_local global float 2.300000e+01 // CHECK-DAG: [[ST_FLOAT_ST]].cache. = common global i8** null -// CHECK-DAG: [[ST_S4_ST:@.+]] = linkonce_odr global %struct.S4 zeroinitializer +// CHECK-DAG: [[ST_S4_ST:@.+]] = linkonce_odr dso_local global %struct.S4 zeroinitializer // CHECK-DAG: [[ST_S4_ST]].cache. = common global i8** null // CHECK-NOT: .cache. = common global i8** null // There is no cache for gs2 - it is not threadprivate. Check that there is only @@ -147,13 +147,13 @@ struct S5 { // ST<float>::st, ST<S4>::st) // CHECK-DEBUG-DAG: [[GS1:@.+]] = internal global [[S1]] zeroinitializer // CHECK-DEBUG-DAG: [[GS2:@.+]] = internal global [[S2]] zeroinitializer -// CHECK-DEBUG-DAG: [[ARR_X:@.+]] = global [2 x [3 x [[S1]]]] zeroinitializer +// CHECK-DEBUG-DAG: [[ARR_X:@.+]] = dso_local global [2 x [3 x [[S1]]]] zeroinitializer // CHECK-DEBUG-DAG: [[SM:@.+]] = internal global [[SMAIN]] zeroinitializer // CHECK-DEBUG-DAG: [[STATIC_S:@.+]] = external global [[S3]] // CHECK-DEBUG-DAG: [[GS3:@.+]] = external global [[S5]] -// CHECK-DEBUG-DAG: [[ST_INT_ST:@.+]] = linkonce_odr global i32 23 -// CHECK-DEBUG-DAG: [[ST_FLOAT_ST:@.+]] = linkonce_odr global float 2.300000e+01 -// CHECK-DEBUG-DAG: [[ST_S4_ST:@.+]] = linkonce_odr global %struct.S4 zeroinitializer +// CHECK-DEBUG-DAG: [[ST_INT_ST:@.+]] = linkonce_odr dso_local global i32 23 +// CHECK-DEBUG-DAG: [[ST_FLOAT_ST:@.+]] = linkonce_odr dso_local global float 2.300000e+01 +// CHECK-DEBUG-DAG: [[ST_S4_ST:@.+]] = linkonce_odr dso_local global %struct.S4 zeroinitializer // CHECK-DEBUG-DAG: [[LOC1:@.*]] = private unnamed_addr constant [{{[0-9]+}} x i8] c";{{.*}}threadprivate_codegen.cpp;;201;1;;\00" // CHECK-DEBUG-DAG: [[LOC2:@.*]] = private unnamed_addr constant [{{[0-9]+}} x i8] c";{{.*}}threadprivate_codegen.cpp;;256;1;;\00" // CHECK-DEBUG-DAG: [[LOC3:@.*]] = private unnamed_addr constant [{{[0-9]+}} x i8] c";{{.*}}threadprivate_codegen.cpp;;343;19;;\00" diff --git a/clang/test/PCH/chain-pending-instantiations.cpp b/clang/test/PCH/chain-pending-instantiations.cpp index e87d3366ecb9..34edaaa07b8c 100644 --- a/clang/test/PCH/chain-pending-instantiations.cpp +++ b/clang/test/PCH/chain-pending-instantiations.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -emit-llvm -triple i686-pc-linux -o - -chain-include %s -chain-include %s | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -triple i686-pc-linux -o - -chain-include %s -chain-include %s -fsemantic-interposition | FileCheck %s // CHECK: define linkonce_odr %{{[^ ]+}} @_ZN1AI1BE3getEv #if !defined(PASS1) #define PASS1 diff --git a/clang/test/SemaCXX/attr-on-explicit-template-instantiation.cpp b/clang/test/SemaCXX/attr-on-explicit-template-instantiation.cpp index ddb9c8e2e4a5..254805c516a0 100644 --- a/clang/test/SemaCXX/attr-on-explicit-template-instantiation.cpp +++ b/clang/test/SemaCXX/attr-on-explicit-template-instantiation.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o - -fsemantic-interposition | FileCheck %s // PR39118 // Make sure that attributes are properly applied to explicit template diff --git a/clang/test/SemaCXX/cxx03-aligned-allocation-unscoped-enum.cpp b/clang/test/SemaCXX/cxx03-aligned-allocation-unscoped-enum.cpp index 7237fbf9db7f..b6b33fa49e16 100644 --- a/clang/test/SemaCXX/cxx03-aligned-allocation-unscoped-enum.cpp +++ b/clang/test/SemaCXX/cxx03-aligned-allocation-unscoped-enum.cpp @@ -12,7 +12,7 @@ enum align_val_t : size_t {}; } _Static_assert(__is_same(__underlying_type(std::align_val_t), size_t), ""); -// CHECK-LABEL: define void @_Z1fPi( +// CHECK-LABEL: define dso_local void @_Z1fPi( void f(int *p) { // CHECK-NOT: call void @_ZdlPvSt11align_val_t( // CHECK: call void @_ZdlPv(