File tree 1 file changed +24
-0
lines changed
llvm/test/CodeGen/LoongArch
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ ; RUN: llc --mtriple=loongarch32 --filetype=obj %s -o %t-la32
2
+ ; RUN: llvm-readelf -s %t-la32 | FileCheck %s --check-prefix=LA32
3
+
4
+ ; RUN: llc --mtriple=loongarch64 --filetype=obj %s -o %t-la64
5
+ ; RUN: llvm-readelf -s %t-la64 | FileCheck %s --check-prefix=LA64
6
+
7
+ ; LA32: Symbol table '.symtab' contains [[#]] entries:
8
+ ; LA32-NEXT: Num: Value Size Type Bind Vis Ndx Name
9
+ ; LA32: 00000000 0 NOTYPE GLOBAL DEFAULT UND tls_sym
10
+
11
+ ; LA64: Symbol table '.symtab' contains [[#]] entries:
12
+ ; LA64-NEXT: Num: Value Size Type Bind Vis Ndx Name
13
+ ; LA64: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND tls_sym
14
+
15
+ @tls_sym = external thread_local (localexec) global i32
16
+
17
+ define dso_local signext i32 @test_tlsle () nounwind {
18
+ entry:
19
+ %0 = call ptr @llvm.threadlocal.address.p0 (ptr @tls_sym )
20
+ %1 = load i32 , ptr %0
21
+ ret i32 %1
22
+ }
23
+
24
+ declare nonnull ptr @llvm.threadlocal.address.p0 (ptr nonnull )
You can’t perform that action at this time.
0 commit comments