diff options
Diffstat (limited to 'test/CodeGenCXX/float16-declarations.cpp')
-rw-r--r-- | test/CodeGenCXX/float16-declarations.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/test/CodeGenCXX/float16-declarations.cpp b/test/CodeGenCXX/float16-declarations.cpp index 87ef139f8634b..1d6999fef073b 100644 --- a/test/CodeGenCXX/float16-declarations.cpp +++ b/test/CodeGenCXX/float16-declarations.cpp @@ -29,18 +29,18 @@ namespace { /* File */ _Float16 f1f; -// CHECK-AARCH64-DAG: @f1f = global half 0xH0000, align 2 -// CHECK-X86-DAG: @f1f = global half 0xH0000, align 2 +// CHECK-AARCH64-DAG: @f1f = dso_local global half 0xH0000, align 2 +// CHECK-X86-DAG: @f1f = dso_local global half 0xH0000, align 2 _Float16 f2f = 32.4; -// CHECK-DAG: @f2f = global half 0xH500D, align 2 +// CHECK-DAG: @f2f = dso_local global half 0xH500D, align 2 _Float16 arr1f[10]; -// CHECK-AARCH64-DAG: @arr1f = global [10 x half] zeroinitializer, align 2 -// CHECK-X86-DAG: @arr1f = global [10 x half] zeroinitializer, align 16 +// CHECK-AARCH64-DAG: @arr1f = dso_local global [10 x half] zeroinitializer, align 2 +// CHECK-X86-DAG: @arr1f = dso_local global [10 x half] zeroinitializer, align 16 _Float16 arr2f[] = { -1.2, -3.0, -3.e4 }; -// CHECK-DAG: @arr2f = global [3 x half] [half 0xHBCCD, half 0xHC200, half 0xHF753], align 2 +// CHECK-DAG: @arr2f = dso_local global [3 x half] [half 0xHBCCD, half 0xHC200, half 0xHF753], align 2 _Float16 func1f(_Float16 arg); @@ -51,24 +51,24 @@ class C1 { _Float16 f1c; static const _Float16 f2c; -// CHECK-DAG: @_ZN2C13f2cE = external constant half, align 2 +// CHECK-DAG: @_ZN2C13f2cE = external dso_local constant half, align 2 volatile _Float16 f3c; public: C1(_Float16 arg) : f1c(arg), f3c(arg) { } // Check that we mangle _Float16 to DF16_ -// CHECK-DAG: define linkonce_odr void @_ZN2C1C2EDF16_(%class.C1*{{.*}}, half{{.*}}) +// CHECK-DAG: define linkonce_odr dso_local void @_ZN2C1C2EDF16_(%class.C1*{{.*}}, half{{.*}}) _Float16 func1c(_Float16 arg ) { return f1c + arg; } -// CHECK-DAG: define linkonce_odr half @_ZN2C16func1cEDF16_(%class.C1*{{.*}}, half{{.*}}) +// CHECK-DAG: define linkonce_odr dso_local half @_ZN2C16func1cEDF16_(%class.C1*{{.*}}, half{{.*}}) static _Float16 func2c(_Float16 arg) { return arg * C1::f2c; } -// CHECK-DAG: define linkonce_odr half @_ZN2C16func2cEDF16_(half{{.*}}) +// CHECK-DAG: define linkonce_odr dso_local half @_ZN2C16func2cEDF16_(half{{.*}}) }; /* Template */ @@ -76,7 +76,7 @@ public: template <class C> C func1t(C arg) { return arg * 2.f16; } -// CHECK-DAG: define linkonce_odr half @_Z6func1tIDF16_ET_S0_(half{{.*}}) +// CHECK-DAG: define linkonce_odr dso_local half @_Z6func1tIDF16_ET_S0_(half{{.*}}) template <class C> struct S1 { C mem1; @@ -103,12 +103,12 @@ int main(void) { C1 c1(f1l); // CHECK-DAG: [[F1L:%[a-z0-9]+]] = load half, half* %{{.*}}, align 2 -// CHECK-DAG: call void @_ZN2C1C2EDF16_(%class.C1* %{{.*}}, half %{{.*}}) +// CHECK-DAG: call void @_ZN2C1C1EDF16_(%class.C1* %{{.*}}, half %{{.*}}) S1<_Float16> s1 = { 132.f16 }; // CHECK-DAG: @_ZZ4mainE2s1 = private unnamed_addr constant %struct.S1 { half 0xH5820 }, align 2 // CHECK-DAG: [[S1:%[0-9]+]] = bitcast %struct.S1* %{{.*}} to i8* -// CHECK-DAG: call void @llvm.memcpy.p0i8.p0i8.i64(i8* [[S1]], i8* bitcast (%struct.S1* @_ZZ4mainE2s1 to i8*), i64 2, i32 2, i1 false) +// CHECK-DAG: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 2 [[S1]], i8* align 2 bitcast (%struct.S1* @_ZZ4mainE2s1 to i8*), i64 2, i1 false) _Float16 f4l = func1n(f1l) + func1f(f2l) + c1.func1c(f3l) + c1.func2c(f1l) + func1t(f1l) + s1.mem2 - f1n + f2n; |