diff options
Diffstat (limited to 'clang/test/CodeGen')
45 files changed, 334 insertions, 367 deletions
diff --git a/clang/test/CodeGen/aarch64-varargs-ms.c b/clang/test/CodeGen/aarch64-varargs-ms.c index c27e78570ba..f3ff9603c9c 100644 --- a/clang/test/CodeGen/aarch64-varargs-ms.c +++ b/clang/test/CodeGen/aarch64-varargs-ms.c @@ -3,7 +3,7 @@ #include <stdarg.h> int simple_int(va_list ap) { -// CHECK-LABEL: define dso_local i32 @simple_int +// CHECK-LABEL: define i32 @simple_int return va_arg(ap, int); // CHECK: [[ADDR:%[a-z_0-9]+]] = bitcast i8* %argp.cur to i32* // CHECK: [[RESULT:%[a-z_0-9]+]] = load i32, i32* [[ADDR]] diff --git a/clang/test/CodeGen/attr-x86-interrupt.c b/clang/test/CodeGen/attr-x86-interrupt.c index 700a57524dc..0aca1f5b9c9 100644 --- a/clang/test/CodeGen/attr-x86-interrupt.c +++ b/clang/test/CodeGen/attr-x86-interrupt.c @@ -23,12 +23,12 @@ __attribute__((interrupt)) void foo8(int *a) {} // 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" -// X86_64_WIN: define dso_local x86_intrcc void @foo7(i32* %{{.+}}, i64 %{{.+}}) -// X86_64_WIN: define dso_local x86_intrcc void @foo8(i32* %{{.+}}) +// X86_64_WIN: define x86_intrcc void @foo7(i32* %{{.+}}, i64 %{{.+}}) +// X86_64_WIN: define x86_intrcc void @foo8(i32* %{{.+}}) // X86_64_Win: "disable-tail-calls"="true" // X86_64_Win-NOT: "disable-tail-calls"="false" // X86_WIN: @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_WIN: define dso_local x86_intrcc void @foo7(i32* %{{.+}}, i32 %{{.+}}) -// X86_WIN: define dso_local x86_intrcc void @foo8(i32* %{{.+}}) +// X86_WIN: define x86_intrcc void @foo7(i32* %{{.+}}, i32 %{{.+}}) +// X86_WIN: define x86_intrcc void @foo8(i32* %{{.+}}) // X86_Win: "disable-tail-calls"="true" // X86_Win-NOT: "disable-tail-calls"="false" diff --git a/clang/test/CodeGen/blocks-windows.c b/clang/test/CodeGen/blocks-windows.c index 546c0bf065e..ced00ef015f 100644 --- a/clang/test/CodeGen/blocks-windows.c +++ b/clang/test/CodeGen/blocks-windows.c @@ -68,7 +68,7 @@ int (*g(void))(void) { } // CHECK-BLOCKS-IN-BLOCKS-DECL: @_NSConcreteStackBlock = external dllexport global i8* -// CHECK-BLOCKS-IN-BLOCKS-DEFN: @_NSConcreteStackBlock = common dso_local dllexport global [5 x i32] +// CHECK-BLOCKS-IN-BLOCKS-DEFN: @_NSConcreteStackBlock = common dllexport global [5 x i32] // CHECK-BLOCKS-NOT-IN-BLOCKS: @_NSConcreteStackBlock = external dllimport global i8* // CHECK-BLOCKS-NOT-IN-BLOCKS-EXTERN: @_NSConcreteStackBlock = external dllimport global i8* // CHECK-BLOCKS-NOT-IN-BLOCKS-EXTERN-DLLIMPORT: @_NSConcreteStackBlock = external dllimport global i8* diff --git a/clang/test/CodeGen/builtins-ms.c b/clang/test/CodeGen/builtins-ms.c index 915cc17e002..a33b57de8dd 100644 --- a/clang/test/CodeGen/builtins-ms.c +++ b/clang/test/CodeGen/builtins-ms.c @@ -1,6 +1,6 @@ // RUN: %clang_cc1 %s -emit-llvm -o - -fms-extensions -triple i686-pc-win32 | FileCheck %s -// CHECK-LABEL: define dso_local void @test_alloca( +// CHECK-LABEL: define void @test_alloca( void capture(void *); void test_alloca(int n) { capture(_alloca(n)); @@ -8,7 +8,7 @@ void test_alloca(int n) { // CHECK: call void @capture(i8* %[[arg]]) } -// CHECK-LABEL: define dso_local void @test_alloca_with_align( +// CHECK-LABEL: define void @test_alloca_with_align( void test_alloca_with_align(int n) { capture(__builtin_alloca_with_align(n, 64)); // CHECK: %[[arg:.*]] = alloca i8, i32 %{{.*}}, align 8 diff --git a/clang/test/CodeGen/builtins-overflow.c b/clang/test/CodeGen/builtins-overflow.c index 57f90eb66a5..f83bbfb9672 100644 --- a/clang/test/CodeGen/builtins-overflow.c +++ b/clang/test/CodeGen/builtins-overflow.c @@ -14,7 +14,7 @@ extern long long LongLongErrorCode; void overflowed(void); unsigned test_add_overflow_uint_uint_uint(unsigned x, unsigned y) { - // CHECK-LABEL: define {{(dso_local )?}}i32 @test_add_overflow_uint_uint_uint + // CHECK-LABEL: define i32 @test_add_overflow_uint_uint_uint // CHECK-NOT: ext // CHECK: [[S:%.+]] = call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 %{{.+}}, i32 %{{.+}}) // CHECK-DAG: [[Q:%.+]] = extractvalue { i32, i1 } [[S]], 0 @@ -28,7 +28,7 @@ unsigned test_add_overflow_uint_uint_uint(unsigned x, unsigned y) { } int test_add_overflow_int_int_int(int x, int y) { - // CHECK-LABEL: define {{(dso_local )?}}i32 @test_add_overflow_int_int_int + // CHECK-LABEL: define i32 @test_add_overflow_int_int_int // CHECK-NOT: ext // CHECK: [[S:%.+]] = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %{{.+}}, i32 %{{.+}}) // CHECK-DAG: [[C:%.+]] = extractvalue { i32, i1 } [[S]], 1 @@ -42,7 +42,7 @@ int test_add_overflow_int_int_int(int x, int y) { } unsigned test_sub_overflow_uint_uint_uint(unsigned x, unsigned y) { - // CHECK-LABEL: define {{(dso_local )?}}i32 @test_sub_overflow_uint_uint_uint + // CHECK-LABEL: define i32 @test_sub_overflow_uint_uint_uint // CHECK-NOT: ext // CHECK: [[S:%.+]] = call { i32, i1 } @llvm.usub.with.overflow.i32(i32 %{{.+}}, i32 %{{.+}}) // CHECK-DAG: [[Q:%.+]] = extractvalue { i32, i1 } [[S]], 0 @@ -56,7 +56,7 @@ unsigned test_sub_overflow_uint_uint_uint(unsigned x, unsigned y) { } int test_sub_overflow_int_int_int(int x, int y) { - // CHECK-LABEL: define {{(dso_local )?}}i32 @test_sub_overflow_int_int_int + // CHECK-LABEL: define i32 @test_sub_overflow_int_int_int // CHECK-NOT: ext // CHECK: [[S:%.+]] = call { i32, i1 } @llvm.ssub.with.overflow.i32(i32 %{{.+}}, i32 %{{.+}}) // CHECK-DAG: [[C:%.+]] = extractvalue { i32, i1 } [[S]], 1 @@ -70,7 +70,7 @@ int test_sub_overflow_int_int_int(int x, int y) { } unsigned test_mul_overflow_uint_uint_uint(unsigned x, unsigned y) { - // CHECK-LABEL: define {{(dso_local )?}}i32 @test_mul_overflow_uint_uint_uint + // CHECK-LABEL: define i32 @test_mul_overflow_uint_uint_uint // CHECK-NOT: ext // CHECK: [[S:%.+]] = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %{{.+}}, i32 %{{.+}}) // CHECK-DAG: [[Q:%.+]] = extractvalue { i32, i1 } [[S]], 0 @@ -84,7 +84,7 @@ unsigned test_mul_overflow_uint_uint_uint(unsigned x, unsigned y) { } int test_mul_overflow_int_int_int(int x, int y) { - // CHECK-LABEL: define {{(dso_local )?}}i32 @test_mul_overflow_int_int_int + // CHECK-LABEL: define i32 @test_mul_overflow_int_int_int // CHECK-NOT: ext // CHECK: [[S:%.+]] = call { i32, i1 } @llvm.smul.with.overflow.i32(i32 %{{.+}}, i32 %{{.+}}) // CHECK-DAG: [[C:%.+]] = extractvalue { i32, i1 } [[S]], 1 @@ -98,7 +98,7 @@ int test_mul_overflow_int_int_int(int x, int y) { } int test_add_overflow_uint_int_int(unsigned x, int y) { - // CHECK-LABEL: define {{(dso_local )?}}i32 @test_add_overflow_uint_int_int + // CHECK-LABEL: define i32 @test_add_overflow_uint_int_int // CHECK: [[XE:%.+]] = zext i32 %{{.+}} to i33 // CHECK: [[YE:%.+]] = sext i32 %{{.+}} to i33 // CHECK: [[S:%.+]] = call { i33, i1 } @llvm.sadd.with.overflow.i33(i33 [[XE]], i33 [[YE]]) @@ -136,7 +136,7 @@ _Bool test_add_overflow_uint_uint_bool(unsigned x, unsigned y) { } unsigned test_add_overflow_bool_bool_uint(_Bool x, _Bool y) { - // CHECK-LABEL: define {{(dso_local )?}}i32 @test_add_overflow_bool_bool_uint + // CHECK-LABEL: define i32 @test_add_overflow_bool_bool_uint // CHECK: [[XE:%.+]] = zext i1 %{{.+}} to i32 // CHECK: [[YE:%.+]] = zext i1 %{{.+}} to i32 // CHECK: [[S:%.+]] = call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 [[XE]], i32 [[YE]]) @@ -165,7 +165,7 @@ _Bool test_add_overflow_bool_bool_bool(_Bool x, _Bool y) { } int test_add_overflow_volatile(int x, int y) { - // CHECK-LABEL: define {{(dso_local )?}}i32 @test_add_overflow_volatile + // CHECK-LABEL: define i32 @test_add_overflow_volatile // CHECK: [[S:%.+]] = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %{{.+}}, i32 %{{.+}}) // CHECK-DAG: [[Q:%.+]] = extractvalue { i32, i1 } [[S]], 0 // CHECK-DAG: [[C:%.+]] = extractvalue { i32, i1 } [[S]], 1 diff --git a/clang/test/CodeGen/c-strings.c b/clang/test/CodeGen/c-strings.c index aa428b8d547..4e14d988a5d 100644 --- a/clang/test/CodeGen/c-strings.c +++ b/clang/test/CodeGen/c-strings.c @@ -4,7 +4,7 @@ // Should be 3 hello strings, two global (of different sizes), the rest are // shared. -// CHECK: @align = {{(dso_local )?}}global i8 [[ALIGN:[0-9]+]] +// CHECK: @align = global i8 [[ALIGN:[0-9]+]] // ITANIUM: @.str = private unnamed_addr constant [6 x i8] c"hello\00" // MSABI: @"\01??_C@_05CJBACGMB@hello?$AA@" = linkonce_odr unnamed_addr constant [6 x i8] c"hello\00", comdat, align 1 // ITANIUM: @f1.x = internal global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0) @@ -13,7 +13,7 @@ // CHECK: @f3.x = internal global [8 x i8] c"hello\00\00\00", align [[ALIGN]] // ITANIUM: @f4.x = internal global %struct.s { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0) } // MSABI: @f4.x = internal global %struct.s { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @"\01??_C@_05CJBACGMB@hello?$AA@", i32 0, i32 0) } -// CHECK: @x = {{(dso_local )?}}global [3 x i8] c"ola", align [[ALIGN]] +// CHECK: @x = global [3 x i8] c"ola", align [[ALIGN]] // XFAIL: hexagon // Hexagon aligns arrays of size 8+ bytes to a 64-bit boundary, which diff --git a/clang/test/CodeGen/cfi-icall-cross-dso.c b/clang/test/CodeGen/cfi-icall-cross-dso.c index 0fdf4a2a963..43ab0e73b14 100644 --- a/clang/test/CodeGen/cfi-icall-cross-dso.c +++ b/clang/test/CodeGen/cfi-icall-cross-dso.c @@ -49,7 +49,7 @@ void caller(void (*f)()) { // CHECK: define internal void @g({{.*}} !type [[TVOID:![0-9]+]] !type [[TVOID_GENERALIZED:![0-9]+]] !type [[TVOID_ID:![0-9]+]] static void g(void) {} -// CHECK: declare {{(dso_local )?}}void @h({{[^!]*$}} +// CHECK: declare void @h({{[^!]*$}} void h(void); typedef void (*Fn)(void); @@ -60,9 +60,9 @@ Fn h1() { return &h; } -// CHECK: define {{(dso_local )?}}void @bar({{.*}} !type [[TNOPROTO:![0-9]+]] !type [[TNOPROTO_GENERALIZED:![0-9]+]] !type [[TNOPROTO_ID:![0-9]+]] +// CHECK: define void @bar({{.*}} !type [[TNOPROTO:![0-9]+]] !type [[TNOPROTO_GENERALIZED:![0-9]+]] !type [[TNOPROTO_ID:![0-9]+]] // ITANIUM: define available_externally void @foo({{[^!]*$}} -// MS: define linkonce_odr dso_local void @foo({{.*}} !type [[TNOPROTO]] !type [[TNOPROTO_GENERALIZED:![0-9]+]] !type [[TNOPROTO_ID]] +// MS: define linkonce_odr void @foo({{.*}} !type [[TNOPROTO]] !type [[TNOPROTO_GENERALIZED:![0-9]+]] !type [[TNOPROTO_ID]] inline void foo() {} void bar() { foo(); } diff --git a/clang/test/CodeGen/cfi-icall.c b/clang/test/CodeGen/cfi-icall.c index 83fc8f89fbc..5f346b66e81 100644 --- a/clang/test/CodeGen/cfi-icall.c +++ b/clang/test/CodeGen/cfi-icall.c @@ -3,20 +3,20 @@ // Tests that we assign appropriate identifiers to unprototyped functions. -// CHECK: define {{(dso_local )?}}void @f({{.*}} !type [[TVOID:![0-9]+]] !type [[TVOID_GENERALIZED:![0-9]+]] +// CHECK: define void @f({{.*}} !type [[TVOID:![0-9]+]] !type [[TVOID_GENERALIZED:![0-9]+]] void f() { } void xf(); -// CHECK: define {{(dso_local )?}}void @g({{.*}} !type [[TINT:![0-9]+]] !type [[TINT_GENERALIZED:![0-9]+]] +// CHECK: define void @g({{.*}} !type [[TINT:![0-9]+]] !type [[TINT_GENERALIZED:![0-9]+]] void g(int b) { void (*fp)() = b ? f : xf; // ITANIUM: call i1 @llvm.type.test(i8* {{.*}}, metadata !"_ZTSFvE") fp(); } -// CHECK: declare !type [[TVOID]] !type [[TVOID_GENERALIZED]] {{(dso_local )?}}void @xf({{.*}} +// CHECK: declare !type [[TVOID]] !type [[TVOID_GENERALIZED]] void @xf({{.*}} // ITANIUM-DAG: [[TVOID]] = !{i64 0, !"_ZTSFvE"} // ITANIUM-DAG: [[TVOID_GENERALIZED]] = !{i64 0, !"_ZTSFvE.generalized"} diff --git a/clang/test/CodeGen/cfstring-windows.c b/clang/test/CodeGen/cfstring-windows.c index 554c4d9982e..e54c8608907 100644 --- a/clang/test/CodeGen/cfstring-windows.c +++ b/clang/test/CodeGen/cfstring-windows.c @@ -32,7 +32,7 @@ typedef struct __CFString *CFStringRef; const CFStringRef string = (CFStringRef)__builtin___CFStringMakeConstantString("string"); // CHECK-CF-IN-CF-DECL: @__CFConstantStringClassReference = external dllexport global [0 x i32] -// CHECK-CF-IN-CF-DEFN: @__CFConstantStringClassReference = common dso_local dllexport global [32 x i32] +// CHECK-CF-IN-CF-DEFN: @__CFConstantStringClassReference = common dllexport global [32 x i32] // CHECK-CF: @__CFConstantStringClassReference = external dllimport global [0 x i32] // CHECK-CF-EXTERN: @__CFConstantStringClassReference = external dllimport global [0 x i32] // CHECK-CF-EXTERN-DLLIMPORT: @__CFConstantStringClassReference = external dllimport global [0 x i32] diff --git a/clang/test/CodeGen/dllexport.c b/clang/test/CodeGen/dllexport.c index f27012ec235..17c2ce9e275 100644 --- a/clang/test/CodeGen/dllexport.c +++ b/clang/test/CodeGen/dllexport.c @@ -14,24 +14,24 @@ __declspec(dllexport) extern int ExternGlobalDecl; // dllexport implies a definition. -// CHECK-DAG: @GlobalDef = common dso_local dllexport global i32 0, align 4 +// CHECK-DAG: @GlobalDef = common dllexport global i32 0, align 4 __declspec(dllexport) int GlobalDef; // Export definition. -// CHECK-DAG: @GlobalInit = dso_local dllexport global i32 1, align 4 +// CHECK-DAG: @GlobalInit = dllexport global i32 1, align 4 __declspec(dllexport) int GlobalInit = 1; // Declare, then export definition. -// CHECK-DAG: @GlobalDeclInit = dso_local dllexport global i32 1, align 4 +// CHECK-DAG: @GlobalDeclInit = dllexport global i32 1, align 4 __declspec(dllexport) extern int GlobalDeclInit; int GlobalDeclInit = 1; // Redeclarations -// CHECK-DAG: @GlobalRedecl1 = common dso_local dllexport global i32 0, align 4 +// CHECK-DAG: @GlobalRedecl1 = common dllexport global i32 0, align 4 __declspec(dllexport) extern int GlobalRedecl1; __declspec(dllexport) int GlobalRedecl1; -// CHECK-DAG: @GlobalRedecl2 = common dso_local dllexport global i32 0, align 4 +// CHECK-DAG: @GlobalRedecl2 = common dllexport global i32 0, align 4 __declspec(dllexport) extern int GlobalRedecl2; int GlobalRedecl2; @@ -44,22 +44,22 @@ __declspec(dllexport) extern int GlobalRedecl2; // Declarations are not exported. // Export function definition. -// CHECK-DAG: define dso_local dllexport void @def() +// CHECK-DAG: define dllexport void @def() __declspec(dllexport) void def(void) {} // Export inline function. -// CHECK-DAG: define weak_odr dso_local dllexport void @inlineFunc() -// CHECK-DAG: define weak_odr dso_local dllexport void @externInlineFunc() +// CHECK-DAG: define weak_odr dllexport void @inlineFunc() +// CHECK-DAG: define weak_odr dllexport void @externInlineFunc() __declspec(dllexport) inline void inlineFunc(void) {} __declspec(dllexport) inline void externInlineFunc(void) {} extern void externInlineFunc(void); // Redeclarations -// CHECK-DAG: define dso_local dllexport void @redecl1() +// CHECK-DAG: define dllexport void @redecl1() __declspec(dllexport) void redecl1(void); __declspec(dllexport) void redecl1(void) {} -// CHECK-DAG: define dso_local dllexport void @redecl2() +// CHECK-DAG: define dllexport void @redecl2() __declspec(dllexport) void redecl2(void); void redecl2(void) {} @@ -70,46 +70,46 @@ __declspec(dllexport) void redecl2(void); //===----------------------------------------------------------------------===// // dllexport takes precedence over the dllimport if both are specified. -// CHECK-DAG: @PrecedenceGlobal1A = common dso_local dllexport global i32 0, align 4 -// CHECK-DAG: @PrecedenceGlobal1B = common dso_local dllexport global i32 0, align 4 +// CHECK-DAG: @PrecedenceGlobal1A = common dllexport global i32 0, align 4 +// CHECK-DAG: @PrecedenceGlobal1B = common dllexport global i32 0, align 4 __attribute__((dllimport, dllexport)) int PrecedenceGlobal1A; __declspec(dllimport) __declspec(dllexport) int PrecedenceGlobal1B; -// CHECK-DAG: @PrecedenceGlobal2A = common dso_local dllexport global i32 0, align 4 -// CHECK-DAG: @PrecedenceGlobal2B = common dso_local dllexport global i32 0, align 4 +// CHECK-DAG: @PrecedenceGlobal2A = common dllexport global i32 0, align 4 +// CHECK-DAG: @PrecedenceGlobal2B = common dllexport global i32 0, align 4 __attribute__((dllexport, dllimport)) int PrecedenceGlobal2A; __declspec(dllexport) __declspec(dllimport) int PrecedenceGlobal2B; -// CHECK-DAG: @PrecedenceGlobalRedecl1 = dso_local dllexport global i32 0, align 4 +// CHECK-DAG: @PrecedenceGlobalRedecl1 = dllexport global i32 0, align 4 __declspec(dllexport) extern int PrecedenceGlobalRedecl1; __declspec(dllimport) int PrecedenceGlobalRedecl1 = 0; -// CHECK-DAG: @PrecedenceGlobalRedecl2 = common dso_local dllexport global i32 0, align 4 +// CHECK-DAG: @PrecedenceGlobalRedecl2 = common dllexport global i32 0, align 4 __declspec(dllimport) extern int PrecedenceGlobalRedecl2; __declspec(dllexport) int PrecedenceGlobalRedecl2; -// CHECK-DAG: @PrecedenceGlobalMixed1 = dso_local dllexport global i32 1, align 4 +// CHECK-DAG: @PrecedenceGlobalMixed1 = dllexport global i32 1, align 4 __attribute__((dllexport)) extern int PrecedenceGlobalMixed1; __declspec(dllimport) int PrecedenceGlobalMixed1 = 1; -// CHECK-DAG: @PrecedenceGlobalMixed2 = common dso_local dllexport global i32 0, align 4 +// CHECK-DAG: @PrecedenceGlobalMixed2 = common dllexport global i32 0, align 4 __attribute__((dllimport)) extern int PrecedenceGlobalMixed2; __declspec(dllexport) int PrecedenceGlobalMixed2; -// CHECK-DAG: define dso_local dllexport void @precedence1A() -// CHECK-DAG: define dso_local dllexport void @precedence1B() +// CHECK-DAG: define dllexport void @precedence1A() +// CHECK-DAG: define dllexport void @precedence1B() void __attribute__((dllimport, dllexport)) precedence1A(void) {} void __declspec(dllimport) __declspec(dllexport) precedence1B(void) {} -// CHECK-DAG: define dso_local dllexport void @precedence2A() -// CHECK-DAG: define dso_local dllexport void @precedence2B() +// CHECK-DAG: define dllexport void @precedence2A() +// CHECK-DAG: define dllexport void @precedence2B() void __attribute__((dllexport, dllimport)) precedence2A(void) {} void __declspec(dllexport) __declspec(dllimport) precedence2B(void) {} -// CHECK-DAG: define dso_local dllexport void @precedenceRedecl1() +// CHECK-DAG: define dllexport void @precedenceRedecl1() void __declspec(dllimport) precedenceRedecl1(void); void __declspec(dllexport) precedenceRedecl1(void) {} -// CHECK-DAG: define dso_local dllexport void @precedenceRedecl2() +// CHECK-DAG: define dllexport void @precedenceRedecl2() void __declspec(dllexport) precedenceRedecl2(void); void __declspec(dllimport) precedenceRedecl2(void) {} diff --git a/clang/test/CodeGen/dllimport.c b/clang/test/CodeGen/dllimport.c index 61d69570526..f70048ebd1f 100644 --- a/clang/test/CodeGen/dllimport.c +++ b/clang/test/CodeGen/dllimport.c @@ -39,14 +39,14 @@ USEVAR(GlobalRedecl2) // NB: MSVC issues a warning and makes GlobalRedecl3 dllexport. We follow GCC // and drop the dllimport with a warning. -// CHECK: @GlobalRedecl3 = external dso_local global i32 +// CHECK: @GlobalRedecl3 = external global i32 __declspec(dllimport) extern int GlobalRedecl3; extern int GlobalRedecl3; // dllimport ignored USEVAR(GlobalRedecl3) // Make sure this works even if the decl has been used before it's defined (PR20792). -// MS: @GlobalRedecl4 = common dso_local dllexport global i32 -// GNU: @GlobalRedecl4 = common dso_local global i32 +// MS: @GlobalRedecl4 = common dllexport global i32 +// GNU: @GlobalRedecl4 = common global i32 __declspec(dllimport) extern int GlobalRedecl4; USEVAR(GlobalRedecl4) int GlobalRedecl4; // dllimport ignored @@ -76,22 +76,22 @@ int functionScope() { __declspec(dllimport) void decl(void); // Initialize use_decl with the address of the thunk. -// CHECK-DAG: @use_decl = dso_local global void ()* @decl +// CHECK-DAG: @use_decl = global void ()* @decl void (*use_decl)(void) = &decl; // Import inline function. // MS-DAG: declare dllimport void @inlineFunc() // MO1-DAG: define available_externally dllimport void @inlineFunc() -// GNU-DAG: declare dso_local void @inlineFunc() -// GO1-DAG: define available_externally dso_local void @inlineFunc() +// GNU-DAG: declare void @inlineFunc() +// GO1-DAG: define available_externally void @inlineFunc() __declspec(dllimport) inline void inlineFunc(void) {} USE(inlineFunc) // inline attributes // MS-DAG: declare dllimport void @noinline() // MO1-DAG: define available_externally dllimport void @noinline() -// GNU-DAG: declare dso_local void @noinline() -// GO1-DAG: define available_externally dso_local void @noinline() +// GNU-DAG: declare void @noinline() +// GO1-DAG: define available_externally void @noinline() // CHECK-NOT: @alwaysInline() // O1-NOT: @alwaysInline() __declspec(dllimport) __attribute__((noinline)) inline void noinline(void) {} @@ -107,20 +107,20 @@ USE(redecl1) // NB: MSVC issues a warning and makes redecl2/redecl3 dllexport. We follow GCC // and drop the dllimport with a warning. -// CHECK-DAG: declare dso_local void @redecl2() +// CHECK-DAG: declare void @redecl2() __declspec(dllimport) void redecl2(void); void redecl2(void); USE(redecl2) -// MS: define dso_local dllexport void @redecl3() -// GNU: define dso_local void @redecl3() +// MS: define dllexport void @redecl3() +// GNU: define void @redecl3() __declspec(dllimport) void redecl3(void); void redecl3(void) {} // dllimport ignored USE(redecl3) // Make sure this works even if the decl is used before it's defined (PR20792). -// MS: define dso_local dllexport void @redecl4() -// GNU: define dso_local void @redecl4() +// MS: define dllexport void @redecl4() +// GNU: define void @redecl4() __declspec(dllimport) void redecl4(void); USE(redecl4) void redecl4(void) {} // dllimport ignored diff --git a/clang/test/CodeGen/dso-local-executable.c b/clang/test/CodeGen/dso-local-executable.c index 44d5ecf7547..161ed51cd47 100644 --- a/clang/test/CodeGen/dso-local-executable.c +++ b/clang/test/CodeGen/dso-local-executable.c @@ -1,14 +1,3 @@ -// RUN: %clang_cc1 -triple x86_64-pc-win32 -emit-llvm %s -o - | FileCheck --check-prefix=COFF %s -// COFF-DAG: @bar = external dso_local global i32 -// COFF-DAG: @weak_bar = extern_weak dso_local global i32 -// COFF-DAG: declare dso_local void @foo() -// COFF-DAG: @baz = dso_local global i32 42 -// COFF-DAG: define dso_local i32* @zed() -// COFF-DAG: @thread_var = external dso_local thread_local global i32 -// COFF-DAG: @local_thread_var = dso_local thread_local global i32 42 -// COFF-DAG: @import_var = external dllimport global i32 -// COFF-DAG: declare dllimport void @import_func() - // RUN: %clang_cc1 -triple x86_64-pc-linux -emit-llvm -mrelocation-model static %s -o - | FileCheck --check-prefix=STATIC %s // STATIC-DAG: @bar = external dso_local global i32 // STATIC-DAG: @weak_bar = extern_weak dso_local global i32 @@ -17,8 +6,6 @@ // STATIC-DAG: define dso_local i32* @zed() // STATIC-DAG: @thread_var = external thread_local global i32 // STATIC-DAG: @local_thread_var = dso_local thread_local global i32 42 -// STATIC-DAG: @import_var = external dso_local global i32 -// STATIC-DAG: declare dso_local void @import_func() // RUN: %clang_cc1 -triple x86_64-pc-linux -emit-llvm -pic-is-pie -mpie-copy-relocations %s -o - | FileCheck --check-prefix=PIE-COPY %s // PIE-COPY-DAG: @bar = external dso_local global i32 @@ -28,8 +15,6 @@ // PIE-COPY-DAG: define dso_local i32* @zed() // PIE-COPY-DAG: @thread_var = external thread_local global i32 // PIE-COPY-DAG: @local_thread_var = dso_local thread_local global i32 42 -// PIE-COPY-DAG: @import_var = external dso_local global i32 -// PIE-COPY-DAG: declare void @import_func() // RUN: %clang_cc1 -triple x86_64-pc-linux -emit-llvm -pic-is-pie %s -o - | FileCheck --check-prefix=PIE %s // PIE-DAG: @bar = external global i32 @@ -39,8 +24,6 @@ // PIE-DAG: define dso_local i32* @zed() // PIE-DAG: @thread_var = external thread_local global i32 // PIE-DAG: @local_thread_var = dso_local thread_local global i32 42 -// PIE-DAG: @import_var = external global i32 -// PIE-DAG: declare void @import_func() // RUN: %clang_cc1 -triple x86_64-pc-linux -emit-llvm -mrelocation-model static -fno-plt %s -o - | FileCheck --check-prefix=NOPLT %s // NOPLT-DAG: @bar = external dso_local global i32 @@ -50,8 +33,6 @@ // NOPLT-DAG: define dso_local i32* @zed() // NOPLT-DAG: @thread_var = external thread_local global i32 // NOPLT-DAG: @local_thread_var = dso_local thread_local global i32 42 -// NOPLT-DAG: @import_var = external dso_local global i32 -// NOPLT-DAG: declare void @import_func() // RUN: %clang_cc1 -triple x86_64-pc-linux -emit-llvm -fno-plt -pic-is-pie -mpie-copy-relocations %s -o - | FileCheck --check-prefix=PIE-COPY-NOPLT %s // PIE-COPY-NOPLT-DAG: @bar = external dso_local global i32 @@ -61,8 +42,6 @@ // PIE-COPY-NOPLT-DAG: define dso_local i32* @zed() // PIE-COPY-NOPLT-DAG: @thread_var = external thread_local global i32 // PIE-COPY-NOPLT-DAG: @local_thread_var = dso_local thread_local global i32 42 -// PIE-COPY-NOPLT-DAG: @import_var = external dso_local global i32 -// PIE-COPY-NOPLT-DAG: declare void @import_func() // RUN: %clang_cc1 -triple x86_64-pc-linux -emit-llvm -pic-is-pie -fno-plt %s -o - | FileCheck --check-prefix=PIE-NO-PLT %s // RUN: %clang_cc1 -triple powerpc64le-pc-linux -emit-llvm -mrelocation-model static %s -o - | FileCheck --check-prefix=PIE-NO-PLT %s @@ -73,8 +52,6 @@ // PIE-NO-PLT-DAG: define dso_local i32* @zed() // PIE-NO-PLT-DAG: @thread_var = external thread_local global i32 // PIE-NO-PLT-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() // RUN: %clang_cc1 -triple x86_64-pc-linux -emit-llvm %s -o - | FileCheck --check-prefix=SHARED %s // SHARED-DAG: @bar = external global i32 @@ -84,16 +61,6 @@ // SHARED-DAG: define i32* @zed() // SHARED-DAG: @thread_var = external thread_local global i32 // SHARED-DAG: @local_thread_var = thread_local global i32 42 -// PIE-NO-PLT-DAG: @import_var = external global i32 -// PIE-NO-PLT-DAG: declare void @import_func() - -__attribute__((dllimport)) extern int import_var; -__attribute__((dllimport)) void import_func(void); - -int *use_import() { - import_func(); - return &import_var; -} extern int bar; __attribute__((weak)) extern int weak_bar; diff --git a/clang/test/CodeGen/exceptions-seh-finally.c b/clang/test/CodeGen/exceptions-seh-finally.c index ecb6f76b4c1..0f2123ba32b 100644 --- a/clang/test/CodeGen/exceptions-seh-finally.c +++ b/clang/test/CodeGen/exceptions-seh-finally.c @@ -13,7 +13,7 @@ void basic_finally(void) { } } -// CHECK-LABEL: define dso_local void @basic_finally() +// CHECK-LABEL: define void @basic_finally() // CHECK: invoke void @might_crash() // CHECK: to label %[[invoke_cont:[^ ]*]] unwind label %[[lpad:[^ ]*]] // @@ -53,7 +53,7 @@ l: } } -// CHECK-LABEL: define dso_local void @label_in_finally() +// CHECK-LABEL: define void @label_in_finally() // CHECK: invoke void @might_crash() // CHECK: to label %[[invoke_cont:[^ ]*]] unwind label %[[lpad:[^ ]*]] // @@ -81,7 +81,7 @@ void use_abnormal_termination(void) { } } -// CHECK-LABEL: define dso_local void @use_abnormal_termination() +// CHECK-LABEL: define void @use_abnormal_termination() // CHECK: invoke void @might_crash() // CHECK: to label %[[invoke_cont:[^ ]*]] unwind label %[[lpad:[^ ]*]] // @@ -110,7 +110,7 @@ void noreturn_noop_finally() { } } -// CHECK-LABEL: define dso_local void @noreturn_noop_finally() +// CHECK-LABEL: define void @noreturn_noop_finally() // CHECK: call void @"\01?fin$0@0@noreturn_noop_finally@@"({{.*}}) // CHECK: ret void @@ -127,7 +127,7 @@ void noreturn_finally() { } } -// CHECK-LABEL: define dso_local void @noreturn_finally() +// CHECK-LABEL: define void @noreturn_finally() // CHECK: invoke void @might_crash() // CHECK: to label %[[cont:[^ ]*]] unwind label %[[lpad:[^ ]*]] // @@ -151,7 +151,7 @@ int finally_with_return() { } __finally { } } -// CHECK-LABEL: define dso_local i32 @finally_with_return() +// CHECK-LABEL: define i32 @finally_with_return() // CHECK: call void @"\01?fin$0@0@finally_with_return@@"({{.*}}) // CHECK-NEXT: ret i32 42 @@ -173,7 +173,7 @@ int nested___finally___finally() { return 0; } -// CHECK-LABEL: define dso_local i32 @nested___finally___finally +// CHECK-LABEL: define i32 @nested___finally___finally // CHECK: invoke void @"\01?fin$1@0@nested___finally___finally@@"({{.*}}) // CHECK: to label %[[outercont:[^ ]*]] unwind label %[[lpad:[^ ]*]] // @@ -208,7 +208,7 @@ int nested___finally___finally_with_eh_edge() { } return 912; } -// CHECK-LABEL: define dso_local i32 @nested___finally___finally_with_eh_edge +// CHECK-LABEL: define i32 @nested___finally___finally_with_eh_edge // CHECK: invoke void @might_crash() // CHECK-NEXT: to label %[[invokecont:[^ ]*]] unwind label %[[lpad1:[^ ]*]] // @@ -252,7 +252,7 @@ void finally_within_finally() { } } -// CHECK-LABEL: define dso_local void @finally_within_finally( +// CHECK-LABEL: define void @finally_within_finally( // CHECK: invoke void @might_crash( // CHECK: call void @"\01?fin$0@0@finally_within_finally@@"( diff --git a/clang/test/CodeGen/exceptions-seh-leave.c b/clang/test/CodeGen/exceptions-seh-leave.c index e61c8b34789..087fadbcd7a 100644 --- a/clang/test/CodeGen/exceptions-seh-leave.c +++ b/clang/test/CodeGen/exceptions-seh-leave.c @@ -17,7 +17,7 @@ int __leave_with___except_simple() { } return 1; } -// CHECK-LABEL: define dso_local i32 @__leave_with___except_simple() +// CHECK-LABEL: define i32 @__leave_with___except_simple() // CHECK: store i32 15, i32* %myres // CHECK-NEXT: br label %[[tryleave:[^ ]*]] // CHECK-NOT: store i32 23 @@ -37,7 +37,7 @@ int __leave_with___except() { } return 1; } -// CHECK-LABEL: define dso_local i32 @__leave_with___except() +// CHECK-LABEL: define i32 @__leave_with___except() // CHECK: invoke void @g() // CHECK-NEXT: to label %[[cont:.*]] unwind label %{{.*}} // For __excepts, instead of an explicit __try.__leave label, we could use @@ -69,7 +69,7 @@ int __leave_with___finally_simple() { } return 1; } -// CHECK-LABEL: define dso_local i32 @__leave_with___finally_simple() +// CHECK-LABEL: define i32 @__leave_with___finally_simple() // CHECK: store i32 15, i32* %myres // CHECK-NEXT: br label %[[tryleave:[^ ]*]] // CHECK-NOT: store i32 23 @@ -89,7 +89,7 @@ int __leave_with___finally_noreturn() { } return 1; } -// CHECK-LABEL: define dso_local i32 @__leave_with___finally_noreturn() +// CHECK-LABEL: define i32 @__leave_with___finally_noreturn() // CHECK: store i32 15, i32* %myres // CHECK-NEXT: br label %[[tryleave:[^ ]*]] // CHECK-NOT: store i32 23 @@ -109,7 +109,7 @@ int __leave_with___finally() { } return 1; } -// CHECK-LABEL: define dso_local i32 @__leave_with___finally() +// CHECK-LABEL: define i32 @__leave_with___finally() // CHECK: invoke void @g() // CHECK-NEXT: to label %[[cont:.*]] unwind label %{{.*}} // For __finally, there needs to be an explicit __try.__leave, because @@ -142,7 +142,7 @@ int nested___except___finally() { } return 1; } -// CHECK-LABEL: define dso_local i32 @nested___except___finally() +// CHECK-LABEL: define i32 @nested___except___finally() // CHECK-LABEL: invoke void @g() // CHECK-NEXT: to label %[[g1_cont1:.*]] unwind label %[[g1_lpad:.*]] @@ -194,7 +194,7 @@ int nested___except___except() { return 1; } // The order of basic blocks in the below doesn't matter. -// CHECK-LABEL: define dso_local i32 @nested___except___except() +// CHECK-LABEL: define i32 @nested___except___except() // CHECK-LABEL: invoke void @g() // CHECK-NEXT: to label %[[g1_cont:.*]] unwind label %[[g1_lpad:.*]] @@ -247,7 +247,7 @@ int nested___finally___except() { return 1; } // The order of basic blocks in the below doesn't matter. -// CHECK-LABEL: define dso_local i32 @nested___finally___except() +// CHECK-LABEL: define i32 @nested___finally___except() // CHECK-LABEL: invoke void @g() // CHECK-NEXT: to label %[[g1_cont:.*]] unwind label %[[g1_lpad:.*]] @@ -302,7 +302,7 @@ int nested___finally___finally() { return 1; } // The order of basic blocks in the below doesn't matter. -// CHECK-LABEL: define dso_local i32 @nested___finally___finally() +// CHECK-LABEL: define i32 @nested___finally___finally() // CHECK: invoke void @g() // CHECK-NEXT: to label %[[g1_cont:.*]] unwind label %[[g1_lpad:.*]] diff --git a/clang/test/CodeGen/exceptions-seh.c b/clang/test/CodeGen/exceptions-seh.c index 085a9a1fa69..a0a1dbccd15 100644 --- a/clang/test/CodeGen/exceptions-seh.c +++ b/clang/test/CodeGen/exceptions-seh.c @@ -10,7 +10,7 @@ void try_body(int numerator, int denominator, int *myres) { *myres = numerator / denominator; } -// CHECK-LABEL: define dso_local void @try_body(i32 %numerator, i32 %denominator, i32* %myres) +// CHECK-LABEL: define void @try_body(i32 %numerator, i32 %denominator, i32* %myres) // CHECK: sdiv i32 // CHECK: store i32 %{{.*}}, i32* // CHECK: ret void @@ -27,7 +27,7 @@ int safe_div(int numerator, int denominator, int *res) { return success; } -// CHECK-LABEL: define dso_local i32 @safe_div(i32 %numerator, i32 %denominator, i32* %res) +// CHECK-LABEL: define i32 @safe_div(i32 %numerator, i32 %denominator, i32* %res) // X64-SAME: personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) // X86-SAME: personality i8* bitcast (i32 (...)* @_except_handler3 to i8*) // CHECK: invoke void @try_body(i32 %{{.*}}, i32 %{{.*}}, i32* %{{.*}}) #[[NOINLINE:[0-9]+]] @@ -57,9 +57,9 @@ int safe_div(int numerator, int denominator, int *res) { // X86: ret i32 1 // Mingw uses msvcrt, so it can also use _except_handler3. -// X86-GNU-LABEL: define dso_local i32 @safe_div(i32 %numerator, i32 %denominator, i32* %res) +// X86-GNU-LABEL: define i32 @safe_div(i32 %numerator, i32 %denominator, i32* %res) // X86-GNU-SAME: personality i8* bitcast (i32 (...)* @_except_handler3 to i8*) -// X64-GNU-LABEL: define dso_local i32 @safe_div(i32 %numerator, i32 %denominator, i32* %res) +// X64-GNU-LABEL: define i32 @safe_div(i32 %numerator, i32 %denominator, i32* %res) // X64-GNU-SAME: personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) void j(void); @@ -74,7 +74,7 @@ int filter_expr_capture(void) { return r; } -// CHECK-LABEL: define dso_local i32 @filter_expr_capture() +// CHECK-LABEL: define i32 @filter_expr_capture() // X64-SAME: personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) // X86-SAME: personality i8* bitcast (i32 (...)* @_except_handler3 to i8*) // X64: call void (...) @llvm.localescape(i32* %[[r:[^ ,]*]]) @@ -114,7 +114,7 @@ int nested_try(void) { } return r; } -// CHECK-LABEL: define dso_local i32 @nested_try() +// CHECK-LABEL: define i32 @nested_try() // X64-SAME: personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) // X86-SAME: personality i8* bitcast (i32 (...)* @_except_handler3 to i8*) // CHECK: store i32 42, i32* %[[r:[^ ,]*]] @@ -174,7 +174,7 @@ int basic_finally(int g) { } return g; } -// CHECK-LABEL: define dso_local i32 @basic_finally(i32 %g) +// CHECK-LABEL: define i32 @basic_finally(i32 %g) // X64-SAME: personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) // X86-SAME: personality i8* bitcast (i32 (...)* @_except_handler3 to i8*) // CHECK: %[[g_addr:[^ ]*]] = alloca i32, align 4 @@ -211,7 +211,7 @@ int except_return(void) { return 42; } } -// CHECK-LABEL: define dso_local i32 @except_return() +// CHECK-LABEL: define i32 @except_return() // CHECK: %[[tmp:[^ ]*]] = invoke i32 @returns_int() // CHECK: to label %[[cont:[^ ]*]] unwind label %[[catchpad:[^ ]*]] // @@ -240,7 +240,7 @@ void finally_capture_twice(int x) { } } // -// CHECK-LABEL: define dso_local void @finally_capture_twice( +// CHECK-LABEL: define void @finally_capture_twice( // CHECK: [[X:%.*]] = alloca i32, align 4 // CHECK: call void (...) @llvm.localescape(i32* [[X]]) // CHECK-NEXT: store i32 {{.*}}, i32* [[X]], align 4 @@ -267,7 +267,7 @@ int exception_code_in_except(void) { } } -// CHECK-LABEL: define dso_local i32 @exception_code_in_except() +// CHECK-LABEL: define i32 @exception_code_in_except() // CHECK: %[[ret_slot:[^ ]*]] = alloca i32 // CHECK: %[[code_slot:[^ ]*]] = alloca i32 // CHECK: invoke void @try_body(i32 0, i32 0, i32* null) diff --git a/clang/test/CodeGen/inline.c b/clang/test/CodeGen/inline.c index ea6e9d76494..e17b251df00 100644 --- a/clang/test/CodeGen/inline.c +++ b/clang/test/CodeGen/inline.c @@ -61,13 +61,13 @@ // RUN: %clang_cc1 %s -triple i386-pc-win32 -O1 -disable-llvm-passes -emit-llvm -o - -std=c99 | FileCheck %s --check-prefix=CHECK4 // RUN: %clang_cc1 %s -triple i386-pc-win32 -fexperimental-new-pass-manager -O1 -disable-llvm-passes -emit-llvm -o - -std=c99 | FileCheck %s --check-prefix=CHECK4 // CHECK4-NOT: define weak_odr void @_Exit( -// CHECK4-LABEL: define weak_odr dso_local i32 @ei() -// CHECK4-LABEL: define dso_local i32 @bar() +// CHECK4-LABEL: define weak_odr i32 @ei() +// CHECK4-LABEL: define i32 @bar() // CHECK4-NOT: unreferenced1 -// CHECK4-LABEL: define weak_odr dso_local void @unreferenced2() -// CHECK4-LABEL: define dso_local void @gnu_inline() -// CHECK4-LABEL: define linkonce_odr dso_local i32 @foo() -// CHECK4-LABEL: define available_externally dso_local void @gnu_ei_inline() +// CHECK4-LABEL: define weak_odr void @unreferenced2() +// CHECK4-LABEL: define void @gnu_inline() +// CHECK4-LABEL: define linkonce_odr i32 @foo() +// CHECK4-LABEL: define available_externally void @gnu_ei_inline() __attribute__((noreturn)) void __cdecl _exit(int _Code); __inline void __cdecl _Exit(int status) { _exit(status); } diff --git a/clang/test/CodeGen/mangle-ms.c b/clang/test/CodeGen/mangle-ms.c index 0b05b7b9450..042c72e6d79 100644 --- a/clang/test/CodeGen/mangle-ms.c +++ b/clang/test/CodeGen/mangle-ms.c @@ -1,13 +1,13 @@ // RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-win32 | FileCheck %s -// CHECK: define dso_local void @"\01?f@@$$J0YAXP6AX@Z@Z" +// CHECK: define void @"\01?f@@$$J0YAXP6AX@Z@Z" __attribute__((overloadable)) void f(void (*x)()) {} -// CHECK: define dso_local void @f +// CHECK: define void @f void f(void (*x)(int)) {} -// CHECK: define dso_local void @g +// CHECK: define void @g void g(void (*x)(int)) {} -// CHECK: define dso_local void @"\01?g@@$$J0YAXP6AX@Z@Z" +// CHECK: define void @"\01?g@@$$J0YAXP6AX@Z@Z" __attribute__((overloadable)) void g(void (*x)()) {} diff --git a/clang/test/CodeGen/mangle-windows-rtd.c b/clang/test/CodeGen/mangle-windows-rtd.c index a22cba2e7ef..fc6f309eaf5 100644 --- a/clang/test/CodeGen/mangle-windows-rtd.c +++ b/clang/test/CodeGen/mangle-windows-rtd.c @@ -1,10 +1,10 @@ // RUN: %clang_cc1 -emit-llvm -mrtd %s -o - -triple=i386-mingw32 | FileCheck %s void f1(void) {} -// CHECK: define dso_local x86_stdcallcc void @"\01_f1@0" +// CHECK: define x86_stdcallcc void @"\01_f1@0" void __stdcall f2(void) {} -// CHECK: define dso_local x86_stdcallcc void @"\01_f2@0" +// CHECK: define x86_stdcallcc void @"\01_f2@0" void __fastcall f3(void) {} -// CHECK: define dso_local x86_fastcallcc void @"\01@f3@0" +// CHECK: define x86_fastcallcc void @"\01@f3@0" diff --git a/clang/test/CodeGen/mangle-windows.c b/clang/test/CodeGen/mangle-windows.c index 6dd14d95e00..db39425da82 100644 --- a/clang/test/CodeGen/mangle-windows.c +++ b/clang/test/CodeGen/mangle-windows.c @@ -11,73 +11,73 @@ // ELF64: target datalayout = "e-m:e-{{.*}}" void __stdcall f1(void) {} -// CHECK: define dso_local x86_stdcallcc void @"\01_f1@0" -// X64: define dso_local void @f1( +// CHECK: define x86_stdcallcc void @"\01_f1@0" +// X64: define void @f1( // ELF32: define x86_stdcallcc void @"\01_f1@0" // ELF64: define void @f1( void __fastcall f2(void) {} -// CHECK: define dso_local x86_fastcallcc void @"\01@f2@0" -// X64: define dso_local void @f2( +// CHECK: define x86_fastcallcc void @"\01@f2@0" +// X64: define void @f2( // ELF32: define x86_fastcallcc void @"\01@f2@0" // ELF64: define void @f2( void __stdcall f3() {} -// CHECK: define dso_local x86_stdcallcc void @"\01_f3@0" -// X64: define dso_local void @f3( +// CHECK: define x86_stdcallcc void @"\01_f3@0" +// X64: define void @f3( void __fastcall f4(char a) {} -// CHECK: define dso_local x86_fastcallcc void @"\01@f4@4" -// X64: define dso_local void @f4( +// CHECK: define x86_fastcallcc void @"\01@f4@4" +// X64: define void @f4( void __fastcall f5(short a) {} -// CHECK: define dso_local x86_fastcallcc void @"\01@f5@4" -// X64: define dso_local void @f5( +// CHECK: define x86_fastcallcc void @"\01@f5@4" +// X64: define void @f5( void __fastcall f6(int a) {} -// CHECK: define dso_local x86_fastcallcc void @"\01@f6@4" -// X64: define dso_local void @f6( +// CHECK: define x86_fastcallcc void @"\01@f6@4" +// X64: define void @f6( void __fastcall f7(long a) {} -// CHECK: define dso_local x86_fastcallcc void @"\01@f7@4" -// X64: define dso_local void @f7( +// CHECK: define x86_fastcallcc void @"\01@f7@4" +// X64: define void @f7( void __fastcall f8(long long a) {} -// CHECK: define dso_local x86_fastcallcc void @"\01@f8@8" -// X64: define dso_local void @f8( +// CHECK: define x86_fastcallcc void @"\01@f8@8" +// X64: define void @f8( void __fastcall f9(long long a, char b, char c, short d) {} -// CHECK: define dso_local x86_fastcallcc void @"\01@f9@20"(i64 %a, i8 signext %b, i8 signext %c, i16 signext %d) -// X64: define dso_local void @f9( +// CHECK: define x86_fastcallcc void @"\01@f9@20"(i64 %a, i8 signext %b, i8 signext %c, i16 signext %d) +// X64: define void @f9( void f12(void) {} -// CHECK: define dso_local void @f12( -// X64: define dso_local void @f12( +// CHECK: define void @f12( +// X64: define void @f12( void __vectorcall v1(void) {} -// CHECK: define dso_local x86_vectorcallcc void @"\01v1@@0"( -// X64: define dso_local x86_vectorcallcc void @"\01v1@@0"( +// CHECK: define x86_vectorcallcc void @"\01v1@@0"( +// X64: define x86_vectorcallcc void @"\01v1@@0"( // ELF32: define x86_vectorcallcc void @"\01v1@@0"( // ELF64: define 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"( +// CHECK: define x86_vectorcallcc void @"\01v2@@4"( +// X64: define x86_vectorcallcc void @"\01v2@@8"( // ELF32: define x86_vectorcallcc void @"\01v2@@4"( // ELF64: define x86_vectorcallcc void @"\01v2@@8"( void __vectorcall v3(short a) {} -// CHECK: define dso_local x86_vectorcallcc void @"\01v3@@4"( -// X64: define dso_local x86_vectorcallcc void @"\01v3@@8"( +// CHECK: define x86_vectorcallcc void @"\01v3@@4"( +// X64: define x86_vectorcallcc void @"\01v3@@8"( void __vectorcall v4(int a) {} -// CHECK: define dso_local x86_vectorcallcc void @"\01v4@@4"( -// X64: define dso_local x86_vectorcallcc void @"\01v4@@8"( +// CHECK: define x86_vectorcallcc void @"\01v4@@4"( +// X64: define x86_vectorcallcc void @"\01v4@@8"( void __vectorcall v5(long long a) {} -// CHECK: define dso_local x86_vectorcallcc void @"\01v5@@8"( -// X64: define dso_local x86_vectorcallcc void @"\01v5@@8"( +// CHECK: define x86_vectorcallcc void @"\01v5@@8"( +// X64: define x86_vectorcallcc void @"\01v5@@8"( void __vectorcall v6(char a, char b) {} -// CHECK: define dso_local x86_vectorcallcc void @"\01v6@@8"( -// X64: define dso_local x86_vectorcallcc void @"\01v6@@16"( +// CHECK: define x86_vectorcallcc void @"\01v6@@8"( +// X64: define x86_vectorcallcc void @"\01v6@@16"( diff --git a/clang/test/CodeGen/microsoft-call-conv-x64.c b/clang/test/CodeGen/microsoft-call-conv-x64.c index 5be748f94c5..6475dfa2936 100644 --- a/clang/test/CodeGen/microsoft-call-conv-x64.c +++ b/clang/test/CodeGen/microsoft-call-conv-x64.c @@ -3,12 +3,12 @@ void __fastcall f1(void); void __stdcall f2(void); void __fastcall f4(void) { -// CHECK-LABEL: define dso_local void @f4() +// CHECK-LABEL: define void @f4() f1(); // CHECK: call void @f1() } void __stdcall f5(void) { -// CHECK-LABEL: define dso_local void @f5() +// CHECK-LABEL: define void @f5() f2(); // CHECK: call void @f2() } diff --git a/clang/test/CodeGen/mingw-long-double.c b/clang/test/CodeGen/mingw-long-double.c index d1e3a62079f..1c7c31f88be 100644 --- a/clang/test/CodeGen/mingw-long-double.c +++ b/clang/test/CodeGen/mingw-long-double.c @@ -10,32 +10,32 @@ struct { long double ldb; } agggregate_LD = {}; // GNU32: %struct.anon = type { i8, x86_fp80 } -// GNU32: @agggregate_LD = dso_local global %struct.anon zeroinitializer, align 4 +// GNU32: @agggregate_LD = global %struct.anon zeroinitializer, align 4 // GNU64: %struct.anon = type { i8, x86_fp80 } -// GNU64: @agggregate_LD = dso_local global %struct.anon zeroinitializer, align 16 +// GNU64: @agggregate_LD = global %struct.anon zeroinitializer, align 16 // MSC64: %struct.anon = type { i8, double } -// MSC64: @agggregate_LD = dso_local global %struct.anon zeroinitializer, align 8 +// MSC64: @agggregate_LD = global %struct.anon zeroinitializer, align 8 long double dataLD = 1.0L; -// GNU32: @dataLD = dso_local global x86_fp80 0xK3FFF8000000000000000, align 4 -// GNU64: @dataLD = dso_local global x86_fp80 0xK3FFF8000000000000000, align 16 -// MSC64: @dataLD = dso_local global double 1.000000e+00, align 8 +// GNU32: @dataLD = global x86_fp80 0xK3FFF8000000000000000, align 4 +// GNU64: @dataLD = global x86_fp80 0xK3FFF8000000000000000, align 16 +// MSC64: @dataLD = global double 1.000000e+00, align 8 long double _Complex dataLDC = {1.0L, 1.0L}; -// GNU32: @dataLDC = dso_local global { x86_fp80, x86_fp80 } { x86_fp80 0xK3FFF8000000000000000, x86_fp80 0xK3FFF8000000000000000 }, align 4 -// GNU64: @dataLDC = dso_local global { x86_fp80, x86_fp80 } { x86_fp80 0xK3FFF8000000000000000, x86_fp80 0xK3FFF8000000000000000 }, align 16 -// MSC64: @dataLDC = dso_local global { double, double } { double 1.000000e+00, double 1.000000e+00 }, align 8 +// GNU32: @dataLDC = global { x86_fp80, x86_fp80 } { x86_fp80 0xK3FFF8000000000000000, x86_fp80 0xK3FFF8000000000000000 }, align 4 +// GNU64: @dataLDC = global { x86_fp80, x86_fp80 } { x86_fp80 0xK3FFF8000000000000000, x86_fp80 0xK3FFF8000000000000000 }, align 16 +// MSC64: @dataLDC = global { double, double } { double 1.000000e+00, double 1.000000e+00 }, align 8 long double TestLD(long double x) { return x * x; } -// GNU32: define dso_local x86_fp80 @TestLD(x86_fp80 %x) -// GNU64: define dso_local void @TestLD(x86_fp80* noalias sret %agg.result, x86_fp80*) -// MSC64: define dso_local double @TestLD(double %x) +// GNU32: define x86_fp80 @TestLD(x86_fp80 %x) +// GNU64: define void @TestLD(x86_fp80* noalias sret %agg.result, x86_fp80*) +// MSC64: define double @TestLD(double %x) long double _Complex TestLDC(long double _Complex x) { return x * x; } -// GNU32: define dso_local void @TestLDC({ x86_fp80, x86_fp80 }* noalias sret %agg.result, { x86_fp80, x86_fp80 }* byval align 4 %x) -// GNU64: define dso_local void @TestLDC({ x86_fp80, x86_fp80 }* noalias sret %agg.result, { x86_fp80, x86_fp80 }* %x) -// MSC64: define dso_local void @TestLDC({ double, double }* noalias sret %agg.result, { double, double }* %x) +// GNU32: define void @TestLDC({ x86_fp80, x86_fp80 }* noalias sret %agg.result, { x86_fp80, x86_fp80 }* byval align 4 %x) +// GNU64: define void @TestLDC({ x86_fp80, x86_fp80 }* noalias sret %agg.result, { x86_fp80, x86_fp80 }* %x) +// MSC64: define void @TestLDC({ double, double }* noalias sret %agg.result, { double, double }* %x) diff --git a/clang/test/CodeGen/ms-align-tentative.c b/clang/test/CodeGen/ms-align-tentative.c index ae9b4b10241..eb68e69f586 100644 --- a/clang/test/CodeGen/ms-align-tentative.c +++ b/clang/test/CodeGen/ms-align-tentative.c @@ -1,25 +1,25 @@ // RUN: %clang_cc1 -triple i386-pc-win32 -emit-llvm -fms-compatibility -o - < %s | FileCheck %s char __declspec(align(8192)) x; -// CHECK-DAG: @x = dso_local global i8 0, align 8192 +// CHECK-DAG: @x = global i8 0, align 8192 typedef char __declspec(align(8192)) T; T y; -// CHECK-DAG: @y = dso_local global i8 0, align 8192 +// CHECK-DAG: @y = global i8 0, align 8192 T __declspec(align(8192)) z; -// CHECK-DAG: @z = dso_local global i8 0, align 8192 +// CHECK-DAG: @z = global i8 0, align 8192 int __declspec(align(16)) redef; int __declspec(align(32)) redef = 8; -// CHECK-DAG: @redef = dso_local global i32 8, align 32 +// CHECK-DAG: @redef = global i32 8, align 32 struct __declspec(align(64)) S { char fd; } s; -// CHECK-DAG: @s = dso_local global %struct.S zeroinitializer, align 64 +// CHECK-DAG: @s = global %struct.S zeroinitializer, align 64 struct Wrap { struct S x; } w; -// CHECK-DAG: @w = dso_local global %struct.Wrap zeroinitializer, align 64 +// CHECK-DAG: @w = global %struct.Wrap zeroinitializer, align 64 diff --git a/clang/test/CodeGen/ms-annotation.c b/clang/test/CodeGen/ms-annotation.c index 8ad48366bfd..6f4a20c7b15 100644 --- a/clang/test/CodeGen/ms-annotation.c +++ b/clang/test/CodeGen/ms-annotation.c @@ -11,7 +11,7 @@ void test1(void) { __annotation(L"unicode: \u0ca0_\u0ca0"); } -// CHECK-LABEL: define dso_local void @test1() +// CHECK-LABEL: define void @test1() // CHECK: call void @llvm.codeview.annotation(metadata ![[A1:[0-9]+]]) // CHECK: call void @llvm.codeview.annotation(metadata ![[A2:[0-9]+]]) // CHECK: call void @llvm.codeview.annotation(metadata ![[A3:[0-9]+]]) diff --git a/clang/test/CodeGen/ms-barriers-intrinsics.c b/clang/test/CodeGen/ms-barriers-intrinsics.c index 7f87c901704..c7da50cd0d8 100644 --- a/clang/test/CodeGen/ms-barriers-intrinsics.c +++ b/clang/test/CodeGen/ms-barriers-intrinsics.c @@ -12,26 +12,26 @@ typedef __SIZE_TYPE__ size_t; #include <intrin.h> void test_ReadWriteBarrier() { _ReadWriteBarrier(); } -// CHECK-LABEL: define dso_local void @test_ReadWriteBarrier +// CHECK-LABEL: define void @test_ReadWriteBarrier // CHECK: fence syncscope("singlethread") seq_cst // CHECK: ret void // CHECK: } void test_ReadBarrier() { _ReadBarrier(); } -// CHECK-LABEL: define dso_local void @test_ReadBarrier +// CHECK-LABEL: define void @test_ReadBarrier // CHECK: fence syncscope("singlethread") seq_cst // CHECK: ret void // CHECK: } void test_WriteBarrier() { _WriteBarrier(); } -// CHECK-LABEL: define dso_local void @test_WriteBarrier +// CHECK-LABEL: define void @test_WriteBarrier // CHECK: fence syncscope("singlethread") seq_cst // CHECK: ret void // CHECK: } #if defined(__x86_64__) void test__faststorefence() { __faststorefence(); } -// CHECK-X64-LABEL: define dso_local void @test__faststorefence +// CHECK-X64-LABEL: define void @test__faststorefence // CHECK-X64: fence seq_cst // CHECK-X64: ret void // CHECK-X64: } diff --git a/clang/test/CodeGen/ms-declspecs.c b/clang/test/CodeGen/ms-declspecs.c index 68d964003ec..05810bb4b71 100644 --- a/clang/test/CodeGen/ms-declspecs.c +++ b/clang/test/CodeGen/ms-declspecs.c @@ -2,14 +2,14 @@ __declspec(selectany) int x1 = 1; const __declspec(selectany) int x2 = 2; -// CHECK: @x1 = weak_odr dso_local global i32 1, comdat, align 4 -// CHECK: @x2 = weak_odr dso_local constant i32 2, comdat, align 4 +// CHECK: @x1 = weak_odr global i32 1, comdat, align 4 +// CHECK: @x2 = weak_odr constant i32 2, comdat, align 4 // selectany turns extern variable declarations into definitions. __declspec(selectany) int x3; extern __declspec(selectany) int x4; -// CHECK: @x3 = weak_odr dso_local global i32 0, comdat, align 4 -// CHECK: @x4 = weak_odr dso_local global i32 0, comdat, align 4 +// CHECK: @x3 = weak_odr global i32 0, comdat, align 4 +// CHECK: @x4 = weak_odr global i32 0, comdat, align 4 struct __declspec(align(16)) S { char x; @@ -19,14 +19,14 @@ union { struct S s; } u; // CHECK: @u = {{.*}}zeroinitializer, align 16 -// CHECK: define dso_local void @t3() [[NAKED:#[0-9]+]] { +// CHECK: define void @t3() [[NAKED:#[0-9]+]] { __declspec(naked) void t3() {} -// CHECK: define dso_local void @t22() [[NUW:#[0-9]+]] +// CHECK: define void @t22() [[NUW:#[0-9]+]] void __declspec(nothrow) t22(); void t22() {} -// CHECK: define dso_local void @t2() [[NI:#[0-9]+]] { +// CHECK: define void @t2() [[NI:#[0-9]+]] { __declspec(noinline) void t2() {} // CHECK: call void @f20_t() [[NR:#[0-9]+]] diff --git a/clang/test/CodeGen/ms-declspecs.cpp b/clang/test/CodeGen/ms-declspecs.cpp index 06f45a280a6..decf5d6fcb2 100644 --- a/clang/test/CodeGen/ms-declspecs.cpp +++ b/clang/test/CodeGen/ms-declspecs.cpp @@ -8,8 +8,8 @@ extern "C" { __declspec(selectany) int x4; } __declspec(selectany) int x5; -// CHECK: @"\01?x1@@3HA" = weak_odr dso_local global i32 0, comdat, align 4 -// CHECK: @x2 = weak_odr dso_local global i32 0, comdat, align 4 -// CHECK: @"\01?x3@@3HA" = weak_odr dso_local global i32 0, comdat, align 4 -// CHECK: @x4 = weak_odr dso_local global i32 0, comdat, align 4 -// CHECK: @"\01?x5@@3HA" = weak_odr dso_local global i32 0, comdat, align 4 +// CHECK: @"\01?x1@@3HA" = weak_odr global i32 0, comdat, align 4 +// CHECK: @x2 = weak_odr global i32 0, comdat, align 4 +// CHECK: @"\01?x3@@3HA" = weak_odr global i32 0, comdat, align 4 +// CHECK: @x4 = weak_odr global i32 0, comdat, align 4 +// CHECK: @"\01?x5@@3HA" = weak_odr global i32 0, comdat, align 4 diff --git a/clang/test/CodeGen/ms-inline-asm-align.c b/clang/test/CodeGen/ms-inline-asm-align.c index 4786b2fe6e6..de896b8e60d 100644 --- a/clang/test/CodeGen/ms-inline-asm-align.c +++ b/clang/test/CodeGen/ms-inline-asm-align.c @@ -21,7 +21,7 @@ void align_test() { // DARWIN-SAME: .align 8 // DARWIN-SAME: "~{dirflag},~{fpsr},~{flags}"() -// WINDOWS-LABEL: define dso_local void @align_test() +// WINDOWS-LABEL: define void @align_test() // WINDOWS: call void asm sideeffect inteldialect // WINDOWS-SAME: .align 8 // WINDOWS-SAME: .align 16 diff --git a/clang/test/CodeGen/ms-inline-asm-avx512.c b/clang/test/CodeGen/ms-inline-asm-avx512.c index 76c0a57250b..6189e50d211 100644 --- a/clang/test/CodeGen/ms-inline-asm-avx512.c +++ b/clang/test/CodeGen/ms-inline-asm-avx512.c @@ -21,7 +21,7 @@ void t2() { } void ignore_fe_size() { - // CHECK-LABEL: define dso_local void @ignore_fe_size() + // CHECK-LABEL: define void @ignore_fe_size() char c; // CHECK: vaddps xmm1, xmm2, $1{1to4} __asm vaddps xmm1, xmm2, [c]{1to4} diff --git a/clang/test/CodeGen/ms-intrinsics.c b/clang/test/CodeGen/ms-intrinsics.c index 7f434b4eaf9..744cb479c87 100644 --- a/clang/test/CodeGen/ms-intrinsics.c +++ b/clang/test/CodeGen/ms-intrinsics.c @@ -55,7 +55,7 @@ void *test_ReturnAddress() { void *test_AddressOfReturnAddress() { return _AddressOfReturnAddress(); } -// CHECK-INTEL-LABEL: define dso_local i8* @test_AddressOfReturnAddress() +// CHECK-INTEL-LABEL: define i8* @test_AddressOfReturnAddress() // CHECK-INTEL: = tail call i8* @llvm.addressofreturnaddress() // CHECK-INTEL: ret i8* #endif diff --git a/clang/test/CodeGen/ms-setjmp.c b/clang/test/CodeGen/ms-setjmp.c index b9c67eb3040..675c8dda27d 100644 --- a/clang/test/CodeGen/ms-setjmp.c +++ b/clang/test/CodeGen/ms-setjmp.c @@ -13,11 +13,11 @@ jmp_buf jb; int test_setjmp() { return _setjmp(jb); - // I386-LABEL: define dso_local i32 @test_setjmp + // I386-LABEL: define i32 @test_setjmp // I386: %[[call:.*]] = call i32 (i8*, i32, ...) @_setjmp3(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @jb, i32 0, i32 0), i32 0) // I386-NEXT: ret i32 %[[call]] - // X64-LABEL: define dso_local i32 @test_setjmp + // X64-LABEL: define i32 @test_setjmp // X64: %[[addr:.*]] = call i8* @llvm.frameaddress(i32 0) // X64: %[[call:.*]] = call i32 @_setjmp(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @jb, i32 0, i32 0), i8* %[[addr]]) // X64-NEXT: ret i32 %[[call]] @@ -25,7 +25,7 @@ int test_setjmp() { int test_setjmpex() { return _setjmpex(jb); - // X64-LABEL: define dso_local i32 @test_setjmpex + // X64-LABEL: define i32 @test_setjmpex // X64: %[[addr:.*]] = call i8* @llvm.frameaddress(i32 0) // X64: %[[call:.*]] = call i32 @_setjmpex(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @jb, i32 0, i32 0), i8* %[[addr]]) // X64-NEXT: ret i32 %[[call]] diff --git a/clang/test/CodeGen/ms-x86-intrinsics.c b/clang/test/CodeGen/ms-x86-intrinsics.c index 450a134131b..51520d1f658 100644 --- a/clang/test/CodeGen/ms-x86-intrinsics.c +++ b/clang/test/CodeGen/ms-x86-intrinsics.c @@ -9,7 +9,7 @@ char test__readfsbyte(unsigned long Offset) { return __readfsbyte(Offset); } -// CHECK-I386-LABEL: define dso_local signext i8 @test__readfsbyte(i32 %Offset) +// CHECK-I386-LABEL: define signext i8 @test__readfsbyte(i32 %Offset) // CHECK-I386: [[PTR:%[0-9]+]] = inttoptr i32 %Offset to i8 addrspace(257)* // CHECK-I386: [[VALUE:%[0-9]+]] = load volatile i8, i8 addrspace(257)* [[PTR]], align 1 // CHECK-I386: ret i8 [[VALUE:%[0-9]+]] @@ -17,7 +17,7 @@ char test__readfsbyte(unsigned long Offset) { short test__readfsword(unsigned long Offset) { return __readfsword(Offset); } -// CHECK-I386-LABEL: define dso_local signext i16 @test__readfsword(i32 %Offset) +// CHECK-I386-LABEL: define signext i16 @test__readfsword(i32 %Offset) // CHECK-I386: [[PTR:%[0-9]+]] = inttoptr i32 %Offset to i16 addrspace(257)* // CHECK-I386: [[VALUE:%[0-9]+]] = load volatile i16, i16 addrspace(257)* [[PTR]], align 2 // CHECK-I386: ret i16 [[VALUE:%[0-9]+]] @@ -25,7 +25,7 @@ short test__readfsword(unsigned long Offset) { long test__readfsdword(unsigned long Offset) { return __readfsdword(Offset); } -// CHECK-I386-LABEL: define dso_local i32 @test__readfsdword(i32 %Offset) +// CHECK-I386-LABEL: define i32 @test__readfsdword(i32 %Offset) // CHECK-I386: [[PTR:%[0-9]+]] = inttoptr i32 %Offset to i32 addrspace(257)* // CHECK-I386: [[VALUE:%[0-9]+]] = load volatile i32, i32 addrspace(257)* [[PTR]], align 4 // CHECK-I386: ret i32 [[VALUE:%[0-9]+]] @@ -33,7 +33,7 @@ long test__readfsdword(unsigned long Offset) { long long test__readfsqword(unsigned long Offset) { return __readfsqword(Offset); } -// CHECK-I386-LABEL: define dso_local i64 @test__readfsqword(i32 %Offset) +// CHECK-I386-LABEL: define i64 @test__readfsqword(i32 %Offset) // CHECK-I386: [[PTR:%[0-9]+]] = inttoptr i32 %Offset to i64 addrspace(257)* // CHECK-I386: [[VALUE:%[0-9]+]] = load volatile i64, i64 addrspace(257)* [[PTR]], align 8 // CHECK-I386: ret i64 [[VALUE:%[0-9]+]] @@ -42,7 +42,7 @@ long long test__readfsqword(unsigned long Offset) { __int64 test__emul(int a, int b) { return __emul(a, b); } -// CHECK-LABEL: define dso_local i64 @test__emul(i32 %a, i32 %b) +// CHECK-LABEL: define i64 @test__emul(i32 %a, i32 %b) // CHECK: [[X:%[0-9]+]] = sext i32 %a to i64 // CHECK: [[Y:%[0-9]+]] = sext i32 %b to i64 // CHECK: [[RES:%[0-9]+]] = mul nsw i64 [[Y]], [[X]] @@ -51,7 +51,7 @@ __int64 test__emul(int a, int b) { unsigned __int64 test__emulu(unsigned int a, unsigned int b) { return __emulu(a, b); } -// CHECK-LABEL: define dso_local i64 @test__emulu(i32 %a, i32 %b) +// CHECK-LABEL: define i64 @test__emulu(i32 %a, i32 %b) // CHECK: [[X:%[0-9]+]] = zext i32 %a to i64 // CHECK: [[Y:%[0-9]+]] = zext i32 %b to i64 // CHECK: [[RES:%[0-9]+]] = mul nuw i64 [[Y]], [[X]] @@ -62,7 +62,7 @@ unsigned __int64 test__emulu(unsigned int a, unsigned int b) { char test__readgsbyte(unsigned long Offset) { return __readgsbyte(Offset); } -// CHECK-X64-LABEL: define dso_local i8 @test__readgsbyte(i32 %Offset) +// CHECK-X64-LABEL: define i8 @test__readgsbyte(i32 %Offset) // CHECK-X64: [[ZEXT:%[0-9]+]] = zext i32 %Offset to i64 // CHECK-X64: [[PTR:%[0-9]+]] = inttoptr i64 [[ZEXT]] to i8 addrspace(256)* // CHECK-X64: [[VALUE:%[0-9]+]] = load volatile i8, i8 addrspace(256)* [[PTR]], align 1 @@ -71,7 +71,7 @@ char test__readgsbyte(unsigned long Offset) { short test__readgsword(unsigned long Offset) { return __readgsword(Offset); } -// CHECK-X64-LABEL: define dso_local i16 @test__readgsword(i32 %Offset) +// CHECK-X64-LABEL: define i16 @test__readgsword(i32 %Offset) // CHECK-X64: [[ZEXT:%[0-9]+]] = zext i32 %Offset to i64 // CHECK-X64: [[PTR:%[0-9]+]] = inttoptr i64 [[ZEXT]] to i16 addrspace(256)* // CHECK-X64: [[VALUE:%[0-9]+]] = load volatile i16, i16 addrspace(256)* [[PTR]], align 2 @@ -80,7 +80,7 @@ short test__readgsword(unsigned long Offset) { long test__readgsdword(unsigned long Offset) { return __readgsdword(Offset); } -// CHECK-X64-LABEL: define dso_local i32 @test__readgsdword(i32 %Offset) +// CHECK-X64-LABEL: define i32 @test__readgsdword(i32 %Offset) // CHECK-X64: [[ZEXT:%[0-9]+]] = zext i32 %Offset to i64 // CHECK-X64: [[PTR:%[0-9]+]] = inttoptr i64 [[ZEXT]] to i32 addrspace(256)* // CHECK-X64: [[VALUE:%[0-9]+]] = load volatile i32, i32 addrspace(256)* [[PTR]], align 4 @@ -89,7 +89,7 @@ long test__readgsdword(unsigned long Offset) { long long test__readgsqword(unsigned long Offset) { return __readgsqword(Offset); } -// CHECK-X64-LABEL: define dso_local i64 @test__readgsqword(i32 %Offset) +// CHECK-X64-LABEL: define i64 @test__readgsqword(i32 %Offset) // CHECK-X64: [[ZEXT:%[0-9]+]] = zext i32 %Offset to i64 // CHECK-X64: [[PTR:%[0-9]+]] = inttoptr i64 [[ZEXT]] to i64 addrspace(256)* // CHECK-X64: [[VALUE:%[0-9]+]] = load volatile i64, i64 addrspace(256)* [[PTR]], align 8 @@ -98,13 +98,13 @@ long long test__readgsqword(unsigned long Offset) { __int64 test__mulh(__int64 a, __int64 b) { return __mulh(a, b); } -// CHECK-X64-LABEL: define dso_local i64 @test__mulh(i64 %a, i64 %b) +// CHECK-X64-LABEL: define i64 @test__mulh(i64 %a, i64 %b) // CHECK-X64: = mul nsw i128 % unsigned __int64 test__umulh(unsigned __int64 a, unsigned __int64 b) { return __umulh(a, b); } -// CHECK-X64-LABEL: define dso_local i64 @test__umulh(i64 %a, i64 %b) +// CHECK-X64-LABEL: define i64 @test__umulh(i64 %a, i64 %b) // CHECK-X64: = mul nuw i128 % __int64 test_mul128(__int64 Multiplier, @@ -112,7 +112,7 @@ __int64 test_mul128(__int64 Multiplier, __int64 *HighProduct) { return _mul128(Multiplier, Multiplicand, HighProduct); } -// CHECK-X64-LABEL: define dso_local i64 @test_mul128(i64 %Multiplier, i64 %Multiplicand, i64*{{[a-z_ ]*}}%HighProduct) +// CHECK-X64-LABEL: define i64 @test_mul128(i64 %Multiplier, i64 %Multiplicand, i64*{{[a-z_ ]*}}%HighProduct) // CHECK-X64: = sext i64 %Multiplier to i128 // CHECK-X64: = sext i64 %Multiplicand to i128 // CHECK-X64: = mul nsw i128 % @@ -124,7 +124,7 @@ unsigned __int64 test_umul128(unsigned __int64 Multiplier, unsigned __int64 *HighProduct) { return _umul128(Multiplier, Multiplicand, HighProduct); } -// CHECK-X64-LABEL: define dso_local i64 @test_umul128(i64 %Multiplier, i64 %Multiplicand, i64*{{[a-z_ ]*}}%HighProduct) +// CHECK-X64-LABEL: define i64 @test_umul128(i64 %Multiplier, i64 %Multiplicand, i64*{{[a-z_ ]*}}%HighProduct) // CHECK-X64: = zext i64 %Multiplier to i128 // CHECK-X64: = zext i64 %Multiplicand to i128 // CHECK-X64: = mul nuw i128 % diff --git a/clang/test/CodeGen/ms_abi.c b/clang/test/CodeGen/ms_abi.c index 75e1caf922d..7486166c78d 100644 --- a/clang/test/CodeGen/ms_abi.c +++ b/clang/test/CodeGen/ms_abi.c @@ -13,7 +13,7 @@ void __attribute__((ms_abi)) f1(void); void __attribute__((sysv_abi)) f2(void); void f3(void) { // FREEBSD-LABEL: define void @f3() - // WIN64-LABEL: define dso_local void @f3() + // WIN64-LABEL: define void @f3() f1(); // FREEBSD: call win64cc void @f1() // WIN64: call void @f1() @@ -23,13 +23,13 @@ void f3(void) { } // FREEBSD: declare win64cc void @f1() // FREEBSD: declare void @f2() -// WIN64: declare dso_local void @f1() -// WIN64: declare dso_local x86_64_sysvcc void @f2() +// WIN64: declare void @f1() +// WIN64: declare x86_64_sysvcc void @f2() // Win64 ABI varargs void __attribute__((ms_abi)) f4(int a, ...) { // FREEBSD-LABEL: define win64cc void @f4 - // WIN64-LABEL: define dso_local void @f4 + // WIN64-LABEL: define void @f4 __builtin_ms_va_list ap; __builtin_ms_va_start(ap, a); // FREEBSD: %[[AP:.*]] = alloca i8* @@ -79,7 +79,7 @@ void __attribute__((ms_abi)) f4(int a, ...) { // Let's verify that normal va_lists work right on Win64, too. void f5(int a, ...) { - // WIN64-LABEL: define dso_local void @f5 + // WIN64-LABEL: define void @f5 __builtin_va_list ap; __builtin_va_start(ap, a); // WIN64: %[[AP:.*]] = alloca i8* @@ -110,7 +110,7 @@ void f5(int a, ...) { void __attribute__((sysv_abi)) f6(__builtin_ms_va_list ap) { // FREEBSD-LABEL: define void @f6 // FREEBSD: store i8* %ap, i8** %[[AP:.*]] - // WIN64-LABEL: define dso_local x86_64_sysvcc void @f6 + // WIN64-LABEL: define x86_64_sysvcc void @f6 // WIN64: store i8* %ap, i8** %[[AP:.*]] int b = __builtin_va_arg(ap, int); // FREEBSD: %[[AP_CUR:.*]] = load i8*, i8** %[[AP]] @@ -155,7 +155,7 @@ 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) + // WIN64: define 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) return a; } diff --git a/clang/test/CodeGen/ms_abi_aarch64.c b/clang/test/CodeGen/ms_abi_aarch64.c index 5b6cd6a208b..4aa93f00859 100644 --- a/clang/test/CodeGen/ms_abi_aarch64.c +++ b/clang/test/CodeGen/ms_abi_aarch64.c @@ -5,7 +5,7 @@ void __attribute__((ms_abi)) f1(void); void f2(void); void f3(void) { // LINUX-LABEL: define void @f3() - // WIN64-LABEL: define dso_local void @f3() + // WIN64-LABEL: define void @f3() f1(); // LINUX: call win64cc void @f1() // WIN64: call void @f1() @@ -15,13 +15,13 @@ void f3(void) { } // LINUX: declare win64cc void @f1() // LINUX: declare void @f2() -// WIN64: declare dso_local void @f1() -// WIN64: declare dso_local void @f2() +// WIN64: declare void @f1() +// WIN64: declare void @f2() // Win64 ABI varargs void __attribute__((ms_abi)) f4(int a, ...) { // LINUX-LABEL: define win64cc void @f4 - // WIN64-LABEL: define dso_local void @f4 + // WIN64-LABEL: define void @f4 __builtin_ms_va_list ap; __builtin_ms_va_start(ap, a); // LINUX: %[[AP:.*]] = alloca i8* @@ -50,7 +50,7 @@ void __attribute__((ms_abi)) f4(int a, ...) { // Let's verify that normal va_lists work right on Win64, too. void f5(int a, ...) { - // WIN64-LABEL: define dso_local void @f5 + // WIN64-LABEL: define void @f5 __builtin_va_list ap; __builtin_va_start(ap, a); // WIN64: %[[AP:.*]] = alloca i8* diff --git a/clang/test/CodeGen/ms_this.cpp b/clang/test/CodeGen/ms_this.cpp index 3776a6ebd9f..8647a5bc8b8 100644 --- a/clang/test/CodeGen/ms_this.cpp +++ b/clang/test/CodeGen/ms_this.cpp @@ -13,7 +13,7 @@ public: void runc(); }; -// CHECK: define dso_local void @"\01?runc@t2@@ +// CHECK: define void @"\01?runc@t2@@ void t2::runc() { double num = 0; __asm { @@ -26,7 +26,7 @@ void t2::runc() { }; } -// CHECK: define dso_local void @"\01?runc@t1@@ +// CHECK: define void @"\01?runc@t1@@ void t1::runc() { double num = 0; __asm { @@ -41,7 +41,7 @@ void t1::runc() { struct s { int a; - // CHECK: define linkonce_odr dso_local void @"\01?func@s@@ + // CHECK: define linkonce_odr void @"\01?func@s@@ void func() { __asm mov rax, [this] // CHECK: [[THIS_ADDR_S:%.+]] = alloca %struct.s* diff --git a/clang/test/CodeGen/preserve-call-conv.c b/clang/test/CodeGen/preserve-call-conv.c index 2dff34e62dd..b67e29f392a 100644 --- a/clang/test/CodeGen/preserve-call-conv.c +++ b/clang/test/CodeGen/preserve-call-conv.c @@ -8,13 +8,13 @@ // is lowered to the corresponding calling convention attrribute at the LLVM IR // level. void foo() __attribute__((preserve_most)) { - // CHECK-LABEL: define {{(dso_local )?}}preserve_mostcc void @foo() + // CHECK-LABEL: define preserve_mostcc void @foo() } // Check that the preserve_most calling convention attribute at the source level // is lowered to the corresponding calling convention attrribute at the LLVM IR // level. void boo() __attribute__((preserve_all)) { - // CHECK-LABEL: define {{(dso_local )?}}preserve_allcc void @boo() + // CHECK-LABEL: define preserve_allcc void @boo() } diff --git a/clang/test/CodeGen/regcall.c b/clang/test/CodeGen/regcall.c index b7389904844..350a82d3396 100644 --- a/clang/test/CodeGen/regcall.c +++ b/clang/test/CodeGen/regcall.c @@ -6,34 +6,34 @@ #include <xmmintrin.h> 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) +// Win32: define x86_regcallcc void @__regcall3__v1(i32 inreg %a, i32 inreg %b) +// Win64: define 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) 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) +// Win32: define x86_regcallcc void @__regcall3__v1b(i32 inreg %a, i32 inreg %b) +// Win64: define 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) 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) +// Win32: define x86_regcallcc void @__regcall3__v2(i8 inreg signext %a, i8 inreg signext %b) +// Win64: define 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) 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) +// Win32: define x86_regcallcc void @__regcall3__v3(i32 inreg %a, i32 %b.0, i32 inreg %c) +// Win64: define x86_regcallcc void @__regcall3__v3(i32 %a, i32 %b.coerce, i32 %c) // Lin32: define x86_regcallcc void @__regcall3__v3(i32 inreg %a, i32 inreg, i32 %b.0, i32 inreg %c) // Lin64: define 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 align 4 %b, i32 inreg %c) -// Win64: define dso_local x86_regcallcc void @__regcall3__v4(i32 %a, %struct.Large* %b, i32 %c) +// Win32: define x86_regcallcc void @__regcall3__v4(i32 inreg %a, %struct.Large* byval align 4 %b, i32 inreg %c) +// Win64: define 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 align 4 %b, i32 %c) // Lin64: define x86_regcallcc void @__regcall3__v4(i32 %a, [5 x i32] %b.coerce, i32 %c) @@ -42,8 +42,8 @@ struct HFA4 { double w, x, y, z; }; 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) +// Win32: define 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 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) @@ -51,16 +51,16 @@ void __regcall hfa1(int a, struct HFA4 b, int c) {} // indirectly. Additional vector arguments can consume the rest of the SSE // registers. 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) -// 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) +// Win32: 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) +// Win64: 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 %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) // 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) // 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) +// Win32: define x86_regcallcc void @__regcall3__hfa3(double %a, double %b, double %c, double %d, double %e, double %f.0, double %f.1) +// Win64: define 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) @@ -68,16 +68,16 @@ void __regcall hfa3(double a, double b, double c, double d, double e, struct HFA // Because they are not classified as homogeneous, they don't get special // handling to ensure alignment. void __regcall hfa4(struct HFA5 a) {} -// Win32: define dso_local x86_regcallcc void @__regcall3__hfa4(%struct.HFA5* byval align 4) -// Win64: define dso_local x86_regcallcc void @__regcall3__hfa4(%struct.HFA5* %a) +// Win32: define x86_regcallcc void @__regcall3__hfa4(%struct.HFA5* byval align 4) +// Win64: define x86_regcallcc void @__regcall3__hfa4(%struct.HFA5* %a) // Lin32: define x86_regcallcc void @__regcall3__hfa4(%struct.HFA5* byval 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) // 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() +// Win32: define x86_regcallcc %struct.HFA2 @__regcall3__hfa5() +// Win64: define x86_regcallcc %struct.HFA2 @__regcall3__hfa5() // Lin32: define x86_regcallcc %struct.HFA2 @__regcall3__hfa5() // Lin64: define x86_regcallcc %struct.HFA2 @__regcall3__hfa5() @@ -86,20 +86,20 @@ struct HVA2 { v4f32 x, y; }; 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) +// Win32: 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) +// Win64: define 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) 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) -// 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) +// Win32: 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) +// Win64: 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> %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) // 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) 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) +// Win32: 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) +// Win64: 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) // 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) @@ -107,14 +107,14 @@ typedef float __attribute__((ext_vector_type(3))) v3f32; 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) +// Win32: define x86_regcallcc void @__regcall3__odd_size_hva(<3 x float> %a.0, <3 x float> %a.1) +// Win64: define 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) 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) +// Win32: 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) +// Win64: 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, <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) diff --git a/clang/test/CodeGen/variadic-null-win64.c b/clang/test/CodeGen/variadic-null-win64.c index a52fb896dda..23c85b83575 100644 --- a/clang/test/CodeGen/variadic-null-win64.c +++ b/clang/test/CodeGen/variadic-null-win64.c @@ -15,7 +15,7 @@ void f(const char *f) { v(f, 1, 2, 3, NULL); kr(f, 1, 2, 3, 0); } -// WINDOWS: define dso_local void @f(i8* %f) +// WINDOWS: define 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) diff --git a/clang/test/CodeGen/vectorcall.c b/clang/test/CodeGen/vectorcall.c index 564b41e1f54..fa244fb908e 100644 --- a/clang/test/CodeGen/vectorcall.c +++ b/clang/test/CodeGen/vectorcall.c @@ -2,56 +2,56 @@ // RUN: %clang_cc1 -emit-llvm %s -o - -ffreestanding -triple=x86_64-pc-win32 | FileCheck %s --check-prefix=X64 void __vectorcall v1(int a, int b) {} -// X32: define dso_local x86_vectorcallcc void @"\01v1@@8"(i32 inreg %a, i32 inreg %b) -// X64: define dso_local x86_vectorcallcc void @"\01v1@@16"(i32 %a, i32 %b) +// X32: define x86_vectorcallcc void @"\01v1@@8"(i32 inreg %a, i32 inreg %b) +// X64: define x86_vectorcallcc void @"\01v1@@16"(i32 %a, i32 %b) void __vectorcall v2(char a, char b) {} -// X32: define dso_local x86_vectorcallcc void @"\01v2@@8"(i8 inreg signext %a, i8 inreg signext %b) -// X64: define dso_local x86_vectorcallcc void @"\01v2@@16"(i8 %a, i8 %b) +// X32: define x86_vectorcallcc void @"\01v2@@8"(i8 inreg signext %a, i8 inreg signext %b) +// X64: define x86_vectorcallcc void @"\01v2@@16"(i8 %a, i8 %b) struct Small { int x; }; void __vectorcall v3(int a, struct Small b, int c) {} -// X32: define dso_local x86_vectorcallcc void @"\01v3@@12"(i32 inreg %a, i32 %b.0, i32 inreg %c) -// X64: define dso_local x86_vectorcallcc void @"\01v3@@24"(i32 %a, i32 %b.coerce, i32 %c) +// X32: define x86_vectorcallcc void @"\01v3@@12"(i32 inreg %a, i32 %b.0, i32 inreg %c) +// X64: define x86_vectorcallcc void @"\01v3@@24"(i32 %a, i32 %b.coerce, i32 %c) struct Large { int a[5]; }; void __vectorcall v4(int a, struct Large b, int c) {} -// X32: define dso_local x86_vectorcallcc void @"\01v4@@28"(i32 inreg %a, %struct.Large* byval align 4 %b, i32 inreg %c) -// X64: define dso_local x86_vectorcallcc void @"\01v4@@40"(i32 %a, %struct.Large* %b, i32 %c) +// X32: define x86_vectorcallcc void @"\01v4@@28"(i32 inreg %a, %struct.Large* byval align 4 %b, i32 inreg %c) +// X64: define x86_vectorcallcc void @"\01v4@@40"(i32 %a, %struct.Large* %b, i32 %c) struct HFA2 { double x, y; }; struct HFA4 { double w, x, y, z; }; struct HFA5 { double v, w, x, y, z; }; void __vectorcall hfa1(int a, struct HFA4 b, int c) {} -// X32: define dso_local x86_vectorcallcc void @"\01hfa1@@40"(i32 inreg %a, %struct.HFA4 inreg %b.coerce, i32 inreg %c) -// X64: define dso_local x86_vectorcallcc void @"\01hfa1@@48"(i32 %a, %struct.HFA4 inreg %b.coerce, i32 %c) +// X32: define x86_vectorcallcc void @"\01hfa1@@40"(i32 inreg %a, %struct.HFA4 inreg %b.coerce, i32 inreg %c) +// X64: define x86_vectorcallcc void @"\01hfa1@@48"(i32 %a, %struct.HFA4 inreg %b.coerce, 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 // registers. void __vectorcall hfa2(struct HFA4 a, struct HFA4 b, double c) {} -// X32: define dso_local x86_vectorcallcc void @"\01hfa2@@72"(%struct.HFA4 inreg %a.coerce, %struct.HFA4* inreg %b, double %c) -// X64: define dso_local x86_vectorcallcc void @"\01hfa2@@72"(%struct.HFA4 inreg %a.coerce, %struct.HFA4* %b, double %c) +// X32: define x86_vectorcallcc void @"\01hfa2@@72"(%struct.HFA4 inreg %a.coerce, %struct.HFA4* inreg %b, double %c) +// X64: define x86_vectorcallcc void @"\01hfa2@@72"(%struct.HFA4 inreg %a.coerce, %struct.HFA4* %b, double %c) // Ensure that we pass builtin types directly while counting them against the // SSE register usage. void __vectorcall hfa3(double a, double b, double c, double d, double e, struct HFA2 f) {} -// X32: define dso_local x86_vectorcallcc void @"\01hfa3@@56"(double %a, double %b, double %c, double %d, double %e, %struct.HFA2* inreg %f) -// X64: define dso_local x86_vectorcallcc void @"\01hfa3@@56"(double %a, double %b, double %c, double %d, double %e, %struct.HFA2* %f) +// X32: define x86_vectorcallcc void @"\01hfa3@@56"(double %a, double %b, double %c, double %d, double %e, %struct.HFA2* inreg %f) +// X64: define x86_vectorcallcc void @"\01hfa3@@56"(double %a, double %b, double %c, double %d, double %e, %struct.HFA2* %f) // Aggregates with more than four elements are not HFAs and are passed byval. // Because they are not classified as homogeneous, they don't get special // handling to ensure alignment. void __vectorcall hfa4(struct HFA5 a) {} -// X32: define dso_local x86_vectorcallcc void @"\01hfa4@@40"(%struct.HFA5* byval align 4) -// X64: define dso_local x86_vectorcallcc void @"\01hfa4@@40"(%struct.HFA5* %a) +// X32: define x86_vectorcallcc void @"\01hfa4@@40"(%struct.HFA5* byval align 4) +// X64: define x86_vectorcallcc void @"\01hfa4@@40"(%struct.HFA5* %a) // Return HFAs of 4 or fewer elements in registers. static struct HFA2 g_hfa2; struct HFA2 __vectorcall hfa5(void) { return g_hfa2; } -// X32: define dso_local x86_vectorcallcc %struct.HFA2 @"\01hfa5@@0"() -// X64: define dso_local x86_vectorcallcc %struct.HFA2 @"\01hfa5@@0"() +// X32: define x86_vectorcallcc %struct.HFA2 @"\01hfa5@@0"() +// X64: define x86_vectorcallcc %struct.HFA2 @"\01hfa5@@0"() typedef float __attribute__((vector_size(16))) v4f32; struct HVA2 { v4f32 x, y; }; @@ -60,52 +60,52 @@ struct HVA4 { v4f32 w, x, y, z; }; struct HVA5 { v4f32 w, x, y, z, p; }; v4f32 __vectorcall hva1(int a, struct HVA4 b, int c) {return b.w;} -// X32: define dso_local x86_vectorcallcc <4 x float> @"\01hva1@@72"(i32 inreg %a, %struct.HVA4 inreg %b.coerce, i32 inreg %c) -// X64: define dso_local x86_vectorcallcc <4 x float> @"\01hva1@@80"(i32 %a, %struct.HVA4 inreg %b.coerce, i32 %c) +// X32: define x86_vectorcallcc <4 x float> @"\01hva1@@72"(i32 inreg %a, %struct.HVA4 inreg %b.coerce, i32 inreg %c) +// X64: define x86_vectorcallcc <4 x float> @"\01hva1@@80"(i32 %a, %struct.HVA4 inreg %b.coerce, i32 %c) v4f32 __vectorcall hva2(struct HVA4 a, struct HVA4 b, v4f32 c) {return c;} -// X32: define dso_local x86_vectorcallcc <4 x float> @"\01hva2@@144"(%struct.HVA4 inreg %a.coerce, %struct.HVA4* inreg %b, <4 x float> %c) -// X64: define dso_local x86_vectorcallcc <4 x float> @"\01hva2@@144"(%struct.HVA4 inreg %a.coerce, %struct.HVA4* %b, <4 x float> %c) +// X32: define x86_vectorcallcc <4 x float> @"\01hva2@@144"(%struct.HVA4 inreg %a.coerce, %struct.HVA4* inreg %b, <4 x float> %c) +// X64: define x86_vectorcallcc <4 x float> @"\01hva2@@144"(%struct.HVA4 inreg %a.coerce, %struct.HVA4* %b, <4 x float> %c) v4f32 __vectorcall hva3(v4f32 a, v4f32 b, v4f32 c, v4f32 d, v4f32 e, struct HVA2 f) {return f.x;} -// X32: define dso_local x86_vectorcallcc <4 x float> @"\01hva3@@112"(<4 x float> %a, <4 x float> %b, <4 x float> %c, <4 x float> %d, <4 x float> %e, %struct.HVA2* inreg %f) -// X64: define dso_local x86_vectorcallcc <4 x float> @"\01hva3@@112"(<4 x float> %a, <4 x float> %b, <4 x float> %c, <4 x float> %d, <4 x float> %e, %struct.HVA2* %f) +// X32: define x86_vectorcallcc <4 x float> @"\01hva3@@112"(<4 x float> %a, <4 x float> %b, <4 x float> %c, <4 x float> %d, <4 x float> %e, %struct.HVA2* inreg %f) +// X64: define x86_vectorcallcc <4 x float> @"\01hva3@@112"(<4 x float> %a, <4 x float> %b, <4 x float> %c, <4 x float> %d, <4 x float> %e, %struct.HVA2* %f) // vector types have higher priority then HVA structures, So vector types are allocated first // and HVAs are allocated if enough registers are available v4f32 __vectorcall hva4(struct HVA4 a, struct HVA2 b, v4f32 c) {return b.y;} -// X32: define dso_local x86_vectorcallcc <4 x float> @"\01hva4@@112"(%struct.HVA4 inreg %a.coerce, %struct.HVA2* inreg %b, <4 x float> %c) -// X64: define dso_local x86_vectorcallcc <4 x float> @"\01hva4@@112"(%struct.HVA4 inreg %a.coerce, %struct.HVA2* %b, <4 x float> %c) +// X32: define x86_vectorcallcc <4 x float> @"\01hva4@@112"(%struct.HVA4 inreg %a.coerce, %struct.HVA2* inreg %b, <4 x float> %c) +// X64: define x86_vectorcallcc <4 x float> @"\01hva4@@112"(%struct.HVA4 inreg %a.coerce, %struct.HVA2* %b, <4 x float> %c) v4f32 __vectorcall hva5(struct HVA3 a, struct HVA3 b, v4f32 c, struct HVA2 d) {return d.y;} -// X32: define dso_local x86_vectorcallcc <4 x float> @"\01hva5@@144"(%struct.HVA3 inreg %a.coerce, %struct.HVA3* inreg %b, <4 x float> %c, %struct.HVA2 inreg %d.coerce) -// X64: define dso_local x86_vectorcallcc <4 x float> @"\01hva5@@144"(%struct.HVA3 inreg %a.coerce, %struct.HVA3* %b, <4 x float> %c, %struct.HVA2 inreg %d.coerce) +// X32: define x86_vectorcallcc <4 x float> @"\01hva5@@144"(%struct.HVA3 inreg %a.coerce, %struct.HVA3* inreg %b, <4 x float> %c, %struct.HVA2 inreg %d.coerce) +// X64: define x86_vectorcallcc <4 x float> @"\01hva5@@144"(%struct.HVA3 inreg %a.coerce, %struct.HVA3* %b, <4 x float> %c, %struct.HVA2 inreg %d.coerce) struct HVA4 __vectorcall hva6(struct HVA4 a, struct HVA4 b) { return b;} -// X32: define dso_local x86_vectorcallcc %struct.HVA4 @"\01hva6@@128"(%struct.HVA4 inreg %a.coerce, %struct.HVA4* inreg %b) -// X64: define dso_local x86_vectorcallcc %struct.HVA4 @"\01hva6@@128"(%struct.HVA4 inreg %a.coerce, %struct.HVA4* %b) +// X32: define x86_vectorcallcc %struct.HVA4 @"\01hva6@@128"(%struct.HVA4 inreg %a.coerce, %struct.HVA4* inreg %b) +// X64: define x86_vectorcallcc %struct.HVA4 @"\01hva6@@128"(%struct.HVA4 inreg %a.coerce, %struct.HVA4* %b) struct HVA5 __vectorcall hva7() {struct HVA5 a = {}; return a;} -// X32: define dso_local x86_vectorcallcc void @"\01hva7@@0"(%struct.HVA5* inreg noalias sret %agg.result) -// X64: define dso_local x86_vectorcallcc void @"\01hva7@@0"(%struct.HVA5* noalias sret %agg.result) +// X32: define x86_vectorcallcc void @"\01hva7@@0"(%struct.HVA5* inreg noalias sret %agg.result) +// X64: define x86_vectorcallcc void @"\01hva7@@0"(%struct.HVA5* noalias sret %agg.result) v4f32 __vectorcall hva8(v4f32 a, v4f32 b, v4f32 c, v4f32 d, int e, v4f32 f) {return f;} -// X32: define dso_local x86_vectorcallcc <4 x float> @"\01hva8@@84"(<4 x float> %a, <4 x float> %b, <4 x float> %c, <4 x float> %d, i32 inreg %e, <4 x float> %f) -// X64: define dso_local x86_vectorcallcc <4 x float> @"\01hva8@@88"(<4 x float> %a, <4 x float> %b, <4 x float> %c, <4 x float> %d, i32 %e, <4 x float> %f) +// X32: define x86_vectorcallcc <4 x float> @"\01hva8@@84"(<4 x float> %a, <4 x float> %b, <4 x float> %c, <4 x float> %d, i32 inreg %e, <4 x float> %f) +// X64: define x86_vectorcallcc <4 x float> @"\01hva8@@88"(<4 x float> %a, <4 x float> %b, <4 x float> %c, <4 x float> %d, i32 %e, <4 x float> %f) typedef float __attribute__((ext_vector_type(3))) v3f32; struct OddSizeHVA { v3f32 x, y; }; void __vectorcall odd_size_hva(struct OddSizeHVA a) {} -// X32: define dso_local x86_vectorcallcc void @"\01odd_size_hva@@32"(%struct.OddSizeHVA inreg %a.coerce) -// X64: define dso_local x86_vectorcallcc void @"\01odd_size_hva@@32"(%struct.OddSizeHVA inreg %a.coerce) +// X32: define x86_vectorcallcc void @"\01odd_size_hva@@32"(%struct.OddSizeHVA inreg %a.coerce) +// X64: define x86_vectorcallcc void @"\01odd_size_hva@@32"(%struct.OddSizeHVA inreg %a.coerce) // The Vectorcall ABI only allows passing the first 6 items in registers in x64, so this shouldn't // consider 'p7' as a register. Instead p5 gets put into the register on the second pass. // x86 should pass p2, p6 and p7 in registers, then p1 in the second pass. struct HFA2 __vectorcall AddParticles(struct HFA2 p1, float p2, struct HFA4 p3, int p4, struct HFA2 p5, float p6, float p7, int p8){ return p1;} -// X32: define dso_local x86_vectorcallcc %struct.HFA2 @"\01AddParticles@@84"(%struct.HFA2 inreg %p1.coerce, float %p2, %struct.HFA4* inreg %p3, i32 inreg %p4, %struct.HFA2* %p5, float %p6, float %p7, i32 %p8) -// X64: define dso_local x86_vectorcallcc %struct.HFA2 @"\01AddParticles@@104"(%struct.HFA2 inreg %p1.coerce, float %p2, %struct.HFA4* %p3, i32 %p4, %struct.HFA2 inreg %p5.coerce, float %p6, float %p7, i32 %p8) +// X32: define x86_vectorcallcc %struct.HFA2 @"\01AddParticles@@84"(%struct.HFA2 inreg %p1.coerce, float %p2, %struct.HFA4* inreg %p3, i32 inreg %p4, %struct.HFA2* %p5, float %p6, float %p7, i32 %p8) +// X64: define x86_vectorcallcc %struct.HFA2 @"\01AddParticles@@104"(%struct.HFA2 inreg %p1.coerce, float %p2, %struct.HFA4* %p3, i32 %p4, %struct.HFA2 inreg %p5.coerce, float %p6, float %p7, i32 %p8) // Vectorcall in both architectures allows passing of an HVA as long as there is room, // even if it is not one of the first 6 arguments. First pass puts p4 into a @@ -113,6 +113,6 @@ struct HFA2 __vectorcall AddParticles(struct HFA2 p1, float p2, struct HFA4 p3, // in a register, does NOT put p7 in a register (since theres no room), then puts // p8 in a register. void __vectorcall HVAAnywhere(struct HFA2 p1, int p2, int p3, float p4, int p5, int p6, struct HFA4 p7, struct HFA2 p8, float p9){} -// X32: define dso_local x86_vectorcallcc void @"\01HVAAnywhere@@88"(%struct.HFA2 inreg %p1.coerce, i32 inreg %p2, i32 inreg %p3, float %p4, i32 %p5, i32 %p6, %struct.HFA4* %p7, %struct.HFA2 inreg %p8.coerce, float %p9) -// X64: define dso_local x86_vectorcallcc void @"\01HVAAnywhere@@112"(%struct.HFA2 inreg %p1.coerce, i32 %p2, i32 %p3, float %p4, i32 %p5, i32 %p6, %struct.HFA4* %p7, %struct.HFA2 inreg %p8.coerce, float %p9) +// X32: define x86_vectorcallcc void @"\01HVAAnywhere@@88"(%struct.HFA2 inreg %p1.coerce, i32 inreg %p2, i32 inreg %p3, float %p4, i32 %p5, i32 %p6, %struct.HFA4* %p7, %struct.HFA2 inreg %p8.coerce, float %p9) +// X64: define x86_vectorcallcc void @"\01HVAAnywhere@@112"(%struct.HFA2 inreg %p1.coerce, i32 %p2, i32 %p3, float %p4, i32 %p5, i32 %p6, %struct.HFA4* %p7, %struct.HFA2 inreg %p8.coerce, float %p9) diff --git a/clang/test/CodeGen/windows-itanium.c b/clang/test/CodeGen/windows-itanium.c index 5bcd6dc710c..7f0e7b135d2 100644 --- a/clang/test/CodeGen/windows-itanium.c +++ b/clang/test/CodeGen/windows-itanium.c @@ -8,8 +8,8 @@ int function() { return 32; } -// CHECK-C: define dso_local i32 @function() {{.*}} { -// CHECK-CXX: define dso_local i32 @_Z8functionv() {{.*}} { +// CHECK-C: define i32 @function() {{.*}} { +// CHECK-CXX: define i32 @_Z8functionv() {{.*}} { // CHECK: ret i32 32 // CHECK: } diff --git a/clang/test/CodeGen/windows-on-arm-dllimport-dllexport.c b/clang/test/CodeGen/windows-on-arm-dllimport-dllexport.c index a2ebbf195f7..4b2e29e430c 100644 --- a/clang/test/CodeGen/windows-on-arm-dllimport-dllexport.c +++ b/clang/test/CodeGen/windows-on-arm-dllimport-dllexport.c @@ -17,9 +17,9 @@ void call_imported_function() { } // CHECK: @import_int = external dllimport global i32 -// CHECK: @export_int = common dso_local dllexport global i32 0, align 4 +// CHECK: @export_int = common dllexport global i32 0, align 4 -// CHECK: define dso_local dllexport arm_aapcs_vfpcc void @export_implemented_function() +// CHECK: define dllexport arm_aapcs_vfpcc void @export_implemented_function() // CHECK: declare dllimport arm_aapcs_vfpcc void @import_function(i32) diff --git a/clang/test/CodeGen/windows-struct-abi.c b/clang/test/CodeGen/windows-struct-abi.c index 5ffc4fad647..1631f61db90 100644 --- a/clang/test/CodeGen/windows-struct-abi.c +++ b/clang/test/CodeGen/windows-struct-abi.c @@ -6,11 +6,11 @@ struct f1 { struct f1 return_f1(void) { while (1); } -// CHECK: define dso_local i32 @return_f1() +// CHECK: define i32 @return_f1() void receive_f1(struct f1 a0) { } -// CHECK: define dso_local void @receive_f1(float %a0.0) +// CHECK: define void @receive_f1(float %a0.0) struct f2 { float f; @@ -19,11 +19,11 @@ struct f2 { struct f2 return_f2(void) { while (1); } -// CHECK: define dso_local i64 @return_f2() +// CHECK: define i64 @return_f2() void receive_f2(struct f2 a0) { } -// CHECK: define dso_local void @receive_f2(float %a0.0, float %a0.1) +// CHECK: define void @receive_f2(float %a0.0, float %a0.1) struct f4 { float f; @@ -34,9 +34,9 @@ struct f4 { struct f4 return_f4(void) { while (1); } -// CHECK: define dso_local void @return_f4(%struct.f4* noalias sret %agg.result) +// CHECK: define void @return_f4(%struct.f4* noalias sret %agg.result) void receive_f4(struct f4 a0) { } -// CHECK: define dso_local void @receive_f4(float %a0.0, float %a0.1, float %a0.2, float %a0.3) +// CHECK: define void @receive_f4(float %a0.0, float %a0.1, float %a0.2, float %a0.3) diff --git a/clang/test/CodeGen/windows-swiftcall.c b/clang/test/CodeGen/windows-swiftcall.c index a7cfb4dd75a..21cf2f7fddc 100644 --- a/clang/test/CodeGen/windows-swiftcall.c +++ b/clang/test/CodeGen/windows-swiftcall.c @@ -40,7 +40,7 @@ void test_context_error_1() { float *error; context_error_1(&x, &error); } -// CHECK-LABEL: define dso_local void @test_context_error_1() +// CHECK-LABEL: define void @test_context_error_1() // CHECK: [[X:%.*]] = alloca i32, align 4 // CHECK: [[ERROR:%.*]] = alloca float*, align 8 // CHECK: [[TEMP:%.*]] = alloca swifterror float*, align 8 @@ -97,7 +97,7 @@ typedef struct { float f1; } struct_1; TEST(struct_1); -// CHECK-LABEL: define dso_local swiftcc { i64, i64 } @return_struct_1() {{.*}}{ +// CHECK-LABEL: define swiftcc { i64, i64 } @return_struct_1() {{.*}}{ // CHECK: [[RET:%.*]] = alloca [[STRUCT1:%.*]], align 4 // CHECK: [[VAR:%.*]] = alloca [[STRUCT1]], align 4 // CHECK: call void @llvm.memset @@ -111,7 +111,7 @@ TEST(struct_1); // CHECK: [[R1:%.*]] = insertvalue { i64, i64 } [[R0]], i64 [[T1]], 1 // CHECK: ret { i64, i64 } [[R1]] // CHECK: } -// CHECK-LABEL: define dso_local swiftcc void @take_struct_1(i64, i64) {{.*}}{ +// CHECK-LABEL: define swiftcc void @take_struct_1(i64, i64) {{.*}}{ // CHECK: [[V:%.*]] = alloca [[STRUCT1:%.*]], align 4 // CHECK: [[CAST:%.*]] = bitcast [[STRUCT1]]* [[V]] to { i64, i64 }* // CHECK: [[GEP0:%.*]] = getelementptr inbounds { i64, i64 }, { i64, i64 }* [[CAST]], i32 0, i32 0 @@ -120,7 +120,7 @@ TEST(struct_1); // CHECK: store i64 %1, i64* [[GEP1]], align 4 // CHECK: ret void // CHECK: } -// CHECK-LABEL: define dso_local void @test_struct_1() {{.*}}{ +// CHECK-LABEL: define void @test_struct_1() {{.*}}{ // CHECK: [[AGG:%.*]] = alloca [[STRUCT1:%.*]], align 4 // CHECK: [[RET:%.*]] = call swiftcc { i64, i64 } @return_struct_1() // CHECK: [[CAST:%.*]] = bitcast [[STRUCT1]]* [[AGG]] to { i64, i64 }* @@ -147,7 +147,7 @@ typedef struct { float f1; } struct_2; TEST(struct_2); -// CHECK-LABEL: define dso_local swiftcc { i64, i64 } @return_struct_2() {{.*}}{ +// CHECK-LABEL: define swiftcc { i64, i64 } @return_struct_2() {{.*}}{ // CHECK: [[RET:%.*]] = alloca [[STRUCT2_TYPE]], align 4 // CHECK: [[VAR:%.*]] = alloca [[STRUCT2_TYPE]], align 4 // CHECK: [[CASTVAR:%.*]] = bitcast {{.*}} [[VAR]] @@ -164,7 +164,7 @@ TEST(struct_2); // CHECK: [[R1:%.*]] = insertvalue { i64, i64 } [[R0]], i64 [[T1]], 1 // CHECK: ret { i64, i64 } [[R1]] // CHECK: } -// CHECK-LABEL: define dso_local swiftcc void @take_struct_2(i64, i64) {{.*}}{ +// CHECK-LABEL: define swiftcc void @take_struct_2(i64, i64) {{.*}}{ // CHECK: [[V:%.*]] = alloca [[STRUCT:%.*]], align 4 // CHECK: [[CAST:%.*]] = bitcast [[STRUCT]]* [[V]] to { i64, i64 }* // CHECK: [[GEP0:%.*]] = getelementptr inbounds { i64, i64 }, { i64, i64 }* [[CAST]], i32 0, i32 0 @@ -173,7 +173,7 @@ TEST(struct_2); // CHECK: store i64 %1, i64* [[GEP1]], align 4 // CHECK: ret void // CHECK: } -// CHECK-LABEL: define dso_local void @test_struct_2() {{.*}} { +// CHECK-LABEL: define void @test_struct_2() {{.*}} { // CHECK: [[TMP:%.*]] = alloca [[STRUCT2_TYPE]], align 4 // CHECK: [[CALL:%.*]] = call swiftcc { i64, i64 } @return_struct_2() // CHECK: [[CAST_TMP:%.*]] = bitcast [[STRUCT2_TYPE]]* [[TMP]] to { i64, i64 }* @@ -203,7 +203,7 @@ typedef struct { __attribute__((packed)) float f; } struct_misaligned_1; TEST(struct_misaligned_1) -// CHECK-LABEL: define dso_local swiftcc i64 @return_struct_misaligned_1() +// CHECK-LABEL: define swiftcc i64 @return_struct_misaligned_1() // CHECK: [[RET:%.*]] = alloca [[STRUCT:%.*]], align 1 // CHECK: [[RES:%.*]] = alloca [[STRUCT]], align 1 // CHECK: [[CAST:%.*]] = bitcast [[STRUCT]]* [[RES]] to i8* @@ -216,14 +216,14 @@ TEST(struct_misaligned_1) // CHECK: [[R0:%.*]] = load i64, i64* [[GEP]], align 1 // CHECK: ret i64 [[R0]] // CHECK:} -// CHECK-LABEL: define dso_local swiftcc void @take_struct_misaligned_1(i64) {{.*}}{ +// CHECK-LABEL: define swiftcc void @take_struct_misaligned_1(i64) {{.*}}{ // CHECK: [[V:%.*]] = alloca [[STRUCT:%.*]], align 1 // CHECK: [[CAST:%.*]] = bitcast [[STRUCT]]* [[V]] to { i64 }* // CHECK: [[GEP:%.*]] = getelementptr inbounds { i64 }, { i64 }* [[CAST]], i32 0, i32 0 // CHECK: store i64 %0, i64* [[GEP]], align 1 // CHECK: ret void // CHECK: } -// CHECK: define dso_local void @test_struct_misaligned_1() {{.*}}{ +// CHECK: define void @test_struct_misaligned_1() {{.*}}{ // CHECK: [[AGG:%.*]] = alloca [[STRUCT:%.*]], align 1 // CHECK: [[CALL:%.*]] = call swiftcc i64 @return_struct_misaligned_1() // CHECK: [[T0:%.*]] = bitcast [[STRUCT]]* [[AGG]] to { i64 }* @@ -256,7 +256,7 @@ typedef union { double d; } union_het_fp; TEST(union_het_fp) -// CHECK-LABEL: define dso_local swiftcc i64 @return_union_het_fp() +// CHECK-LABEL: define swiftcc i64 @return_union_het_fp() // CHECK: [[RET:%.*]] = alloca [[UNION:%.*]], align 8 // CHECK: [[RES:%.*]] = alloca [[UNION]], align 8 // CHECK: [[CAST:%.*]] = bitcast [[UNION]]* [[RES]] to i8* @@ -268,14 +268,14 @@ TEST(union_het_fp) // CHECK: [[GEP:%.*]] = getelementptr inbounds { i64 }, { i64 }* [[CAST]], i32 0, i32 0 // CHECK: [[R0:%.*]] = load i64, i64* [[GEP]], align 8 // CHECK: ret i64 [[R0]] -// CHECK-LABEL: define dso_local swiftcc void @take_union_het_fp(i64) {{.*}}{ +// CHECK-LABEL: define swiftcc void @take_union_het_fp(i64) {{.*}}{ // CHECK: [[V:%.*]] = alloca [[UNION:%.*]], align 8 // CHECK: [[CAST:%.*]] = bitcast [[UNION]]* [[V]] to { i64 }* // CHECK: [[GEP:%.*]] = getelementptr inbounds { i64 }, { i64 }* [[CAST]], i32 0, i32 0 // CHECK: store i64 %0, i64* [[GEP]], align 8 // CHECK: ret void // CHECK: } -// CHECK-LABEL: define dso_local void @test_union_het_fp() {{.*}}{ +// CHECK-LABEL: define void @test_union_het_fp() {{.*}}{ // CHECK: [[AGG:%.*]] = alloca [[UNION:%.*]], align 8 // CHECK: [[CALL:%.*]] = call swiftcc i64 @return_union_het_fp() // CHECK: [[T0:%.*]] = bitcast [[UNION]]* [[AGG]] to { i64 }* @@ -294,7 +294,7 @@ typedef union { float f2; } union_hom_fp; TEST(union_hom_fp) -// CHECK-LABEL: define dso_local void @test_union_hom_fp() +// CHECK-LABEL: define void @test_union_hom_fp() // CHECK: [[TMP:%.*]] = alloca [[REC:%.*]], align 4 // CHECK: [[CALL:%.*]] = call [[SWIFTCC]] float @return_union_hom_fp() // CHECK: [[CAST_TMP:%.*]] = bitcast [[REC]]* [[TMP]] to [[AGG:{ float }]]* @@ -311,7 +311,7 @@ typedef union { float4 fv2; } union_hom_fp_partial; TEST(union_hom_fp_partial) -// CHECK: define dso_local void @test_union_hom_fp_partial() +// CHECK: define void @test_union_hom_fp_partial() // CHECK: [[AGG:%.*]] = alloca [[UNION:%.*]], align 16 // CHECK: [[CALL:%.*]] = call swiftcc { i64, i64 } @return_union_hom_fp_partial() // CHECK: [[CAST:%.*]] = bitcast [[UNION]]* [[AGG]] to { i64, i64 }* @@ -335,7 +335,7 @@ typedef union { float4 fv2; } union_het_fpv_partial; TEST(union_het_fpv_partial) -// CHECK-LABEL: define dso_local void @test_union_het_fpv_partial() +// CHECK-LABEL: define void @test_union_het_fpv_partial() // CHECK: [[AGG:%.*]] = alloca [[UNION:%.*]], align 16 // CHECK: [[CALL:%.*]] = call swiftcc { i64, i64 } @return_union_het_fpv_partial() // CHECK: [[CAST:%.*]] = bitcast [[UNION]]* [[AGG]] to { i64, i64 }* @@ -385,7 +385,7 @@ TEST(int8) // CHECK: [[T0:%.*]] = getelementptr inbounds [[AGG]], [[AGG]]* [[CAST_TMP]], i32 0, i32 1 // CHECK: store <4 x i32> %1, <4 x i32>* [[T0]], align // CHECK: ret void -// CHECK-LABEL: define dso_local void @test_int8() +// CHECK-LABEL: define void @test_int8() // CHECK: [[TMP1:%.*]] = alloca [[REC]], align // CHECK: [[TMP2:%.*]] = alloca [[REC]], align // CHECK: [[CALL:%.*]] = call [[SWIFTCC]] [[UAGG]] @return_int8() @@ -429,7 +429,7 @@ TEST(int5) // CHECK: [[T0:%.*]] = getelementptr inbounds [[AGG]], [[AGG]]* [[CAST_TMP]], i32 0, i32 1 // CHECK: store i32 %1, i32* [[T0]], align // CHECK: ret void -// CHECK-LABEL: define dso_local void @test_int5() +// CHECK-LABEL: define void @test_int5() // CHECK: [[TMP1:%.*]] = alloca [[REC]], align // CHECK: [[TMP2:%.*]] = alloca [[REC]], align // CHECK: [[CALL:%.*]] = call [[SWIFTCC]] [[UAGG]] @return_int5() @@ -455,4 +455,4 @@ typedef struct { int3 v __attribute__((packed)); } misaligned_int3; TEST(misaligned_int3) -// CHECK-LABEL: define dso_local swiftcc void @take_misaligned_int3(i64, i64) +// CHECK-LABEL: define swiftcc void @take_misaligned_int3(i64, i64) diff --git a/clang/test/CodeGen/x86_32-arguments-win32.c b/clang/test/CodeGen/x86_32-arguments-win32.c index 65e25f32c25..7b27fc74647 100644 --- a/clang/test/CodeGen/x86_32-arguments-win32.c +++ b/clang/test/CodeGen/x86_32-arguments-win32.c @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -w -triple i386-pc-win32 -emit-llvm -o - %s | FileCheck %s -// CHECK-LABEL: define dso_local i64 @f1_1() -// CHECK-LABEL: define dso_local void @f1_2(i32 %a0.0, i32 %a0.1) +// CHECK-LABEL: define i64 @f1_1() +// CHECK-LABEL: define void @f1_2(i32 %a0.0, i32 %a0.1) struct s1 { int a; int b; @@ -9,37 +9,37 @@ struct s1 { struct s1 f1_1(void) { while (1) {} } void f1_2(struct s1 a0) {} -// CHECK-LABEL: define dso_local i32 @f2_1() +// CHECK-LABEL: define i32 @f2_1() struct s2 { short a; short b; }; struct s2 f2_1(void) { while (1) {} } -// CHECK-LABEL: define dso_local i16 @f3_1() +// CHECK-LABEL: define i16 @f3_1() struct s3 { char a; char b; }; struct s3 f3_1(void) { while (1) {} } -// CHECK-LABEL: define dso_local i8 @f4_1() +// CHECK-LABEL: define i8 @f4_1() struct s4 { char a:4; char b:4; }; struct s4 f4_1(void) { while (1) {} } -// CHECK-LABEL: define dso_local i64 @f5_1() -// CHECK-LABEL: define dso_local void @f5_2(double %a0.0) +// CHECK-LABEL: define i64 @f5_1() +// CHECK-LABEL: define void @f5_2(double %a0.0) struct s5 { double a; }; struct s5 f5_1(void) { while (1) {} } void f5_2(struct s5 a0) {} -// CHECK-LABEL: define dso_local i32 @f6_1() -// CHECK-LABEL: define dso_local void @f6_2(float %a0.0) +// CHECK-LABEL: define i32 @f6_1() +// CHECK-LABEL: define void @f6_2(float %a0.0) struct s6 { float a; }; diff --git a/clang/test/CodeGen/x86_32-fpcc-struct-return.c b/clang/test/CodeGen/x86_32-fpcc-struct-return.c index 2cfd4378c34..9f61599fc69 100644 --- a/clang/test/CodeGen/x86_32-fpcc-struct-return.c +++ b/clang/test/CodeGen/x86_32-fpcc-struct-return.c @@ -17,15 +17,15 @@ typedef struct { } ZeroSized; // CHECK: ret void Big returnBig(Big x) { return x; } -// CHECK-PCC-LABEL: define {{(dso_local )?}}void @returnSmall +// CHECK-PCC-LABEL: define void @returnSmall // CHECK-PCC: ret void -// CHECK-REG-LABEL: define {{(dso_local )?}}i32 @returnSmall +// CHECK-REG-LABEL: define i32 @returnSmall // CHECK-REG: ret i32 Small returnSmall(Small x) { return x; } -// CHECK-PCC-LABEL: define {{(dso_local )?}}void @returnShort +// CHECK-PCC-LABEL: define void @returnShort // CHECK-PCC: ret void -// CHECK-REG-LABEL: define {{(dso_local )?}}i16 @returnShort +// CHECK-REG-LABEL: define i16 @returnShort // CHECK-REG: ret i16 Short returnShort(Short x) { return x; } diff --git a/clang/test/CodeGen/x86_64-arguments-win32.c b/clang/test/CodeGen/x86_64-arguments-win32.c index b43107c65ef..7731eadd01e 100644 --- a/clang/test/CodeGen/x86_64-arguments-win32.c +++ b/clang/test/CodeGen/x86_64-arguments-win32.c @@ -3,29 +3,29 @@ // To be ABI compatible with code generated by MSVC, there shouldn't be any // sign/zero extensions on types smaller than 64bit. -// CHECK-LABEL: define dso_local void @f1(i8 %a) +// CHECK-LABEL: define void @f1(i8 %a) void f1(char a) {} -// CHECK-LABEL: define dso_local void @f2(i8 %a) +// CHECK-LABEL: define void @f2(i8 %a) void f2(unsigned char a) {} -// CHECK-LABEL: define dso_local void @f3(i16 %a) +// CHECK-LABEL: define void @f3(i16 %a) void f3(short a) {} -// CHECK-LABEL: define dso_local void @f4(i16 %a) +// CHECK-LABEL: define void @f4(i16 %a) void f4(unsigned short a) {} // For ABI compatibility with ICC, _Complex should be passed/returned // as if it were a struct with two elements. -// CHECK-LABEL: define dso_local void @f5(i64 %a.coerce) +// CHECK-LABEL: define void @f5(i64 %a.coerce) void f5(_Complex float a) {} -// CHECK-LABEL: define dso_local void @f6({ double, double }* %a) +// CHECK-LABEL: define void @f6({ double, double }* %a) void f6(_Complex double a) {} -// CHECK-LABEL: define dso_local i64 @f7() +// CHECK-LABEL: define i64 @f7() _Complex float f7() { return 1.0; } -// CHECK-LABEL: define dso_local void @f8({ double, double }* noalias sret %agg.result) +// CHECK-LABEL: define void @f8({ double, double }* noalias sret %agg.result) _Complex double f8() { return 1.0; } |