1 ; LoongArch does not support emulated tls.
2 ; UNSUPPORTED: target=loongarch{{.*}}
4 ; RUN: not lli -no-process-syms -lljit-platform=Inactive -emulated-tls \
5 ; RUN: -jit-kind=orc-lazy %s 2>&1 | FileCheck %s
7 ; Test that emulated-tls does not generate any unexpected errors.
9 ; Unfortunately we cannot test successful execution of JIT'd code with
10 ; emulated-tls as this would require the JIT itself, in this case lli, to be
11 ; built with emulated-tls, which is not a common configuration. Instead we test
12 ; that the only error produced by the JIT for a thread-local with emulated-tls
13 ; enabled is a missing symbol error for __emutls_get_address. An unresolved
14 ; reference to this symbol (and only this symbol) implies (1) that the emulated
15 ; tls lowering was applied, and (2) that thread locals defined in the JIT'd code
16 ; were otherwise handled correctly.
18 ; CHECK: JIT session error: Symbols not found: [ {{[^,]*}}__emutls_get_address ]
20 @x = thread_local global i32 42, align 4
22 define i32 @main(i32 %argc, ptr %argv) {
24 %0 = load i32, ptr @x, align 4