[PATCH] D130053: [WebAssembly] Use `localexec` as default TLS model for non-Emscripten targets

Andrew Brown via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 22 14:13:26 PDT 2022


abrown added inline comments.


================
Comment at: llvm/test/CodeGen/WebAssembly/tls-local-exec.ll:5
+
+; Also, run the same tests without a specified TLS mode--this should still emit `localexec` code.
+; RUN: sed -e 's/\[\[TLS_MODE\]\]//' %s | llc -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -mattr=+bulk-memory,atomics - | FileCheck --check-prefixes=CHECK,TLS %s
----------------
sbc100 wrote:
> sbc100 wrote:
> > Maybe add something like "...on non-emscripten targets which don't currently support dynamic linking."
> > 
> > Also, should we run this with explicit general dynamic too? 
> How about explicit general dynamic TLS mode here too (since I think that is what clang generates)?
Yeah, here's what I get when I inject `(generaldynamic)`:


```
/.../llvm-project/build/bin/llc: error: /.../llvm-project/build/bin/llc: <stdin>:103:30: error: expected localdynamic, initialexec or localexec
@tls = internal thread_local(generaldynamic) global i32 0
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130053/new/

https://reviews.llvm.org/D130053



More information about the llvm-commits mailing list