1 ; This file tests 64 bit TLS variable generation
3 ; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=-altivec -mtriple \
4 ; RUN: powerpc64-ibm-aix-xcoff < %s | FileCheck %s
5 ; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=-altivec -mtriple \
6 ; RUN: powerpc64-ibm-aix-xcoff -data-sections=false < %s | FileCheck %s \
7 ; RUN: --check-prefix=NODATASEC
9 ; When data-sections is true (default), we emit data into separate sections.
10 ; When data-sections is false, we emit data into the .data / .tdata sections.
12 ; Long long global variable, TLS/Non-TLS, local/weak linkage
14 ; CHECK: .csect global_long_long_internal_val_initialized[RW],3
15 ; CHECK-NEXT: .lglobl global_long_long_internal_val_initialized[RW]
16 ; CHECK-NEXT: .align 3
17 ; CHECK-NEXT: .vbyte 8, 1
18 ; NODATASEC: .csect .data[RW],3
19 ; NODATASEC-NEXT: .lglobl global_long_long_internal_val_initialized
20 ; NODATASEC-NEXT: .align 3
21 ; NODATASEC-NEXT:global_long_long_internal_val_initialized:
22 ; NODATASEC-NEXT: .vbyte 8, 1
23 @global_long_long_internal_val_initialized = internal global i64 1, align 8
25 ; CHECK-NEXT: .csect tls_global_long_long_internal_val_initialized[TL],3
26 ; CHECK-NEXT: .lglobl tls_global_long_long_internal_val_initialized[TL]
27 ; CHECK-NEXT: .align 3
28 ; CHECK-NEXT: .vbyte 8, 1
29 ; NODATASEC-NEXT: .csect .tdata[TL],3
30 ; NODATASEC-NEXT: .lglobl tls_global_long_long_internal_val_initialized
31 ; NODATASEC-NEXT: .align 3
32 ; NODATASEC-NEXT:tls_global_long_long_internal_val_initialized:
33 ; NODATASEC-NEXT: .vbyte 8, 1
34 @tls_global_long_long_internal_val_initialized = internal thread_local global i64 1, align 8
36 ; CHECK-NEXT: .lcomm global_long_long_internal_zero_initialized,8,global_long_long_internal_zero_initialized[BS],3
37 ; NODATASEC-NEXT: .lcomm global_long_long_internal_zero_initialized,8,global_long_long_internal_zero_initialized[BS],3
38 @global_long_long_internal_zero_initialized = internal global i64 0, align 8
40 ; CHECK-NEXT: .lcomm tls_global_long_long_internal_zero_initialized,8,tls_global_long_long_internal_zero_initialized[UL],3
41 ; NODATASEC-NEXT: .lcomm tls_global_long_long_internal_zero_initialized,8,tls_global_long_long_internal_zero_initialized[UL],3
42 @tls_global_long_long_internal_zero_initialized = internal thread_local global i64 0, align 8
44 ; CHECK-NEXT: .csect global_long_long_weak_val_initialized[RW],3
45 ; CHECK-NEXT: .weak global_long_long_weak_val_initialized[RW]
46 ; CHECK-NEXT: .align 3
47 ; CHECK-NEXT: .vbyte 8, 1
48 ; NODATASEC-NEXT: .csect .data[RW],3
49 ; NODATASEC-NEXT: .weak global_long_long_weak_val_initialized
50 ; NODATASEC-NEXT: .align 3
51 ; NODATASEC-NEXT:global_long_long_weak_val_initialized:
52 ; NODATASEC-NEXT: .vbyte 8, 1
53 @global_long_long_weak_val_initialized = weak global i64 1, align 8
55 ; CHECK-NEXT: .csect tls_global_long_long_weak_val_initialized[TL],3
56 ; CHECK-NEXT: .weak tls_global_long_long_weak_val_initialized[TL]
57 ; CHECK-NEXT: .align 3
58 ; CHECK-NEXT: .vbyte 8, 1
59 ; NODATASEC-NEXT: .csect .tdata[TL],3
60 ; NODATASEC-NEXT: .weak tls_global_long_long_weak_val_initialized
61 ; NODATASEC-NEXT: .align 3
62 ; NODATASEC-NEXT:tls_global_long_long_weak_val_initialized:
63 ; NODATASEC-NEXT: .vbyte 8, 1
64 @tls_global_long_long_weak_val_initialized = weak thread_local global i64 1, align 8
66 ; CHECK-NEXT: .csect global_long_long_weak_zero_initialized[RW],3
67 ; CHECK-NEXT: .weak global_long_long_weak_zero_initialized[RW]
68 ; CHECK-NEXT: .align 3
69 ; CHECK-NEXT: .vbyte 8, 0
70 ; NODATASEC-NEXT: .csect .data[RW],3
71 ; NODATASEC-NEXT: .weak global_long_long_weak_zero_initialized
72 ; NODATASEC-NEXT: .align 3
73 ; NODATASEC-NEXT:global_long_long_weak_zero_initialized:
74 ; NODATASEC-NEXT: .vbyte 8, 0
75 @global_long_long_weak_zero_initialized = weak global i64 0, align 8
77 ; CHECK-NEXT: .csect tls_global_long_long_weak_zero_initialized[TL],3
78 ; CHECK-NEXT: .weak tls_global_long_long_weak_zero_initialized[TL]
79 ; CHECK-NEXT: .align 3
80 ; CHECK-NEXT: .vbyte 8, 0
81 ; NODATASEC-NEXT: .csect .tdata[TL],3
82 ; NODATASEC-NEXT: .weak tls_global_long_long_weak_zero_initialized
83 ; NODATASEC-NEXT: .align 3
84 ; NODATASEC-NEXT:tls_global_long_long_weak_zero_initialized:
85 ; NODATASEC-NEXT: .vbyte 8, 0
86 @tls_global_long_long_weak_zero_initialized = weak thread_local global i64 0, align 8