1 ; RUN: llc -mtriple=mipsel-- -relocation-model=pic < %s | FileCheck -check-prefix=CHECK-PIC %s
2 ; RUN: llc -mtriple=mipsel-- -relocation-model=static < %s | FileCheck -check-prefix=CHECK-NONPIC %s
4 @external_gd = external thread_local global i32
5 @internal_gd = internal thread_local global i32 42
7 @external_ld = external thread_local(localdynamic) global i32
8 @internal_ld = internal thread_local(localdynamic) global i32 42
10 @external_ie = external thread_local(initialexec) global i32
11 @internal_ie = internal thread_local(initialexec) global i32 42
13 @external_le = external thread_local(localexec) global i32
14 @internal_le = internal thread_local(localexec) global i32 42
16 ; ----- no model specified -----
22 ; Non-PIC code can use initial-exec, PIC code has to use general dynamic.
23 ; CHECK-NONPIC-LABEL: f1:
24 ; CHECK-NONPIC: %gottprel
25 ; CHECK-PIC-LABEL: f1:
33 ; Non-PIC code can use local exec, PIC code can use local dynamic.
34 ; CHECK-NONPIC-LABEL: f2:
35 ; CHECK-NONPIC: %tprel_hi
36 ; CHECK-PIC-LABEL: f2:
41 ; ----- localdynamic specified -----
47 ; Non-PIC code can use initial exec, PIC should use local dynamic.
48 ; CHECK-NONPIC-LABEL: f3:
49 ; CHECK-NONPIC: %gottprel
50 ; CHECK-PIC-LABEL: f3:
58 ; Non-PIC code can use local exec, PIC code can use local dynamic.
59 ; CHECK-NONPIC-LABEL: f4:
60 ; CHECK-NONPIC: %tprel_hi
61 ; CHECK-PIC-LABEL: f4:
66 ; ----- initialexec specified -----
72 ; Non-PIC and PIC code will use initial exec as specified.
73 ; CHECK-NONPIC-LABEL: f5:
74 ; CHECK-NONPIC: %gottprel
75 ; CHECK-PIC-LABEL: f5:
76 ; CHECK-PIC: %gottprel
83 ; Non-PIC code can use local exec, PIC code use initial exec as specified.
84 ; CHECK-NONPIC-LABEL: f6:
85 ; CHECK-NONPIC: %tprel_hi
86 ; CHECK-PIC-LABEL: f6:
87 ; CHECK-PIC: %gottprel
91 ; ----- localexec specified -----
97 ; Non-PIC and PIC code will use local exec as specified.
98 ; CHECK-NONPIC-LABEL: f7:
99 ; CHECK-NONPIC: %tprel_hi
100 ; CHECK-PIC-LABEL: f7:
101 ; CHECK-PIC: %tprel_hi
106 ret i32* @internal_le
108 ; Non-PIC and PIC code will use local exec as specified.
109 ; CHECK-NONPIC-LABEL: f8:
110 ; CHECK-NONPIC: %tprel_hi
111 ; CHECK-PIC-LABEL: f8:
112 ; CHECK-PIC: %tprel_hi