brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · a70bc5f Raw
27 lines · plain
1; LoongArch does not support emulated tls.2; UNSUPPORTED: target=loongarch{{.*}}3 4; RUN: not lli -no-process-syms -lljit-platform=Inactive -emulated-tls \5; RUN:   -jit-kind=orc-lazy %s 2>&1 | FileCheck %s6;7; Test that emulated-tls does not generate any unexpected errors.8;9; Unfortunately we cannot test successful execution of JIT'd code with10; emulated-tls as this would require the JIT itself, in this case lli, to be11; built with emulated-tls, which is not a common configuration. Instead we test12; that the only error produced by the JIT for a thread-local with emulated-tls13; enabled is a missing symbol error for __emutls_get_address. An unresolved14; reference to this symbol (and only this symbol) implies (1) that the emulated15; tls lowering was applied, and (2) that thread locals defined in the JIT'd code16; were otherwise handled correctly.17 18; CHECK: JIT session error: Symbols not found: [ {{[^,]*}}__emutls_get_address ]19 20@x = thread_local global i32 42, align 421 22define i32 @main(i32 %argc, ptr %argv) {23entry:24  %0 = load i32, ptr @x, align 425  ret i32 %026}27