Displaying 2 results from an estimated 2 matches for "_ztw3tls".
2017 Feb 07
3
[cfe-dev] lli: LLVM ERROR: Cannot select: X86ISD::WrapperRIP TargetGlobalTLSAddress:i64
> I’ve seen the same problem, but didn’t find solution back then.
> I can give a hint that it is related to a thread local storage (notice
TLS in the name).
>
> The same result can be reproduced by this simple program:
>
> thread_local int x = 0;
> int main() {
> return 0;
> }
>
>When compiled into IR it produces similar error:
>
>LLVM ERROR:
2017 Feb 08
2
[cfe-dev] lli: LLVM ERROR: Cannot select: X86ISD::WrapperRIP TargetGlobalTLSAddress:i64
...> target triple = "x86_64-pc-linux-gnu"
>
> @tls = thread_local global i32 0, align 4
>
> ; Function Attrs: norecurse uwtable
> define i32 @main() #0 {
> %1 = alloca i32, align 4
> store i32 0, i32* %1, align 4
> %2 = call i32* @_ZTW3tls()
> store i32 37, i32* %2, align 4
> ret i32 0
> }
>
> define weak_odr hidden i32* @_ZTW3tls() {
> ret i32* @tls
> }
>
> attributes #0 = { norecurse uwtable "disable-tail-calls"="false"
> "less-precise-fpmad&qu...