Mehdi Amini via llvm-dev
2017-Feb-07 15:13 UTC
[llvm-dev] [cfe-dev] lli: LLVM ERROR: Cannot select: X86ISD::WrapperRIP TargetGlobalTLSAddress:i64
+ LLVM-dev (clang is mostly about the frontend and this is a backend failure), you may have more change to get an answer.> On Feb 6, 2017, at 5:49 AM, Gaetano Checinski via cfe-dev <cfe-dev at lists.llvm.org> wrote: > > Running the following code with clang++ -S -emit-llvm main.cpp && lli main.ll on Linux(Debian) > > #include <future> > > int main () { > return std::async([]{return 1;}).get(); > } > fails to run on lli due to the following error: > > LLVM ERROR: Cannot select: 0xd012e0: > i64 = X86ISD::WrapperRIP TargetGlobalTLSAddress:i64<i8** @_ZSt15__once_callable> 0 [TF=10] > > 0xd020c0: i64 = TargetGlobalTLSAddress<i8** @_ZSt15__once_callable> 0 [TF=10] > In function: _ZSt9call_onceIMNSt13__future_base13_State_baseV2EFvPSt8functionIFSt10unique_ptrINS0_12_Result_baseENS4_8_DeleterEEvEEPbEJPS1_S9_SA_EEvRSt9once_flagOT_DpOT0_ > Questions: > > What does it mean? > > Are there any compiler-flags that fix this problem? > > what specific features is libstdc++ using that cause this issue ? > > How does my problem relate to Bug 21431 <https://mailtrack.io/trace/link/1fe0cd7f00b549701dad0d242b8ac56ba6ac935d?url=https%3A%2F%2Fllvm.org%2Fbugs%2Fshow_bug.cgi%3Fid%3D21431&signature=b9bd79ba0fa3ea59> ? > > The motivation behind this questions is to understand the differences between libc++ and libstdc++ that leads to this specific error message (on Linux) in llvm's orcjit. > > > > ps.: i've also asked this question in stackoverflow <https://mailtrack.io/trace/link/5ef1b8085238498016553e10c4722adcdedf5114?url=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F42022864%2Flli-llvm-error-cannot-select-x86isdwrapperrip-targetglobaltlsaddressi64&signature=c79ed05ad376b570> > > > > <https://mailtrack.io/trace/link/4ee627efe1b4ec418e1a4460b533a6dc7f6f6799?url=https%3A%2F%2Fmailtrack.io%2F&signature=cce36b1562f1942b>Sent with Mailtrack <https://mailtrack.io/install?source=signature&lang=en&referral=gaetano.checinski at gmail.com&idSignature=22>_______________________________________________ > cfe-dev mailing list > cfe-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170207/1adcc0cb/attachment-0001.html>
Alex Denisov via llvm-dev
2017-Feb-07 15:31 UTC
[llvm-dev] [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: Cannot select: t19: i64 = X86ISD::WrapperRIP TargetGlobalTLSAddress:i64<i32* @x> 0 [TF=19] t18: i64 = TargetGlobalTLSAddress<i32* @x> 0 [TF=19] In function: _ZTW1x> On 7 Feb 2017, at 16:13, Mehdi Amini via cfe-dev <cfe-dev at lists.llvm.org> wrote: > > + LLVM-dev (clang is mostly about the frontend and this is a backend failure), you may have more change to get an answer. > >> On Feb 6, 2017, at 5:49 AM, Gaetano Checinski via cfe-dev <cfe-dev at lists.llvm.org> wrote: >> >> Running the following code with clang++ -S -emit-llvm main.cpp && lli main.ll on Linux(Debian) >> >> #include <future> >> >> >> >> int main () { >> >> >> return std::async([]{return 1;}).get(); >> } >> fails to run on lli due to the following error: >> >> LLVM ERROR: Cannot select: 0xd012e0: >> >> i64 >> = X86ISD::WrapperRIP TargetGlobalTLSAddress:i64<i8** @_ZSt15__once_callable> 0 [TF=10] >> >> >> >> 0xd020c0: i64 = TargetGlobalTLSAddress<i8** @_ZSt15__once_callable> 0 [TF=10] >> In function: _ZSt9call_onceIMNSt13__future_base13_State_baseV2EFvPSt8functionIFSt10unique_ptrINS0_12_Result_baseENS4_8_DeleterEEvEEPbEJPS1_S9_SA_EEvRSt9once_flagOT_DpOT0_ >> Questions: >> >> What does it mean? >> >> Are there any compiler-flags that fix this problem? >> >> what specific features is libstdc++ using that cause this issue ? >> >> How does my problem relate to Bug 21431 ? >> >> The motivation behind this questions is to understand the differences between libc++ and libstdc++ that leads to this specific error message (on Linux) in llvm's orcjit. >> >> >> >> ps.: i've also asked this question in stackoverflow >> >> >> >> >> Sent with Mailtrack >> >> _______________________________________________ >> cfe-dev mailing list >> cfe-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev > > _______________________________________________ > cfe-dev mailing list > cfe-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Gaetano Checinski via llvm-dev
2017-Feb-07 16:19 UTC
[llvm-dev] [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 (noticeTLS 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: Cannot select: t19: i64 = X86ISD::WrapperRIPTargetGlobalTLSAddress:i64<i32* @x> 0 [TF=19]> t18: i64 = TargetGlobalTLSAddress<i32* @x> 0 [TF=19] >In function: _ZTW1xinterestingly this works on my machine. llvm-ir attached 2017-02-07 15:31 GMT+00:00 Alex Denisov <1101.debian at gmail.com>:> 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: Cannot select: t19: i64 = X86ISD::WrapperRIP > TargetGlobalTLSAddress:i64<i32* @x> 0 [TF=19] > t18: i64 = TargetGlobalTLSAddress<i32* @x> 0 [TF=19] > In function: _ZTW1x > > > On 7 Feb 2017, at 16:13, Mehdi Amini via cfe-dev <cfe-dev at lists.llvm.org> > wrote: > > > > + LLVM-dev (clang is mostly about the frontend and this is a backend > failure), you may have more change to get an answer. > > > >> On Feb 6, 2017, at 5:49 AM, Gaetano Checinski via cfe-dev < > cfe-dev at lists.llvm.org> wrote: > >> > >> Running the following code with clang++ -S -emit-llvm main.cpp && lli > main.ll on Linux(Debian) > >> > >> #include <future> > >> > >> > >> > >> int main () { > >> > >> > >> return std::async([]{return 1;}).get(); > >> } > >> fails to run on lli due to the following error: > >> > >> LLVM ERROR: Cannot select: 0xd012e0: > >> > >> i64 > >> = X86ISD::WrapperRIP TargetGlobalTLSAddress:i64<i8** > @_ZSt15__once_callable> 0 [TF=10] > >> > >> > >> > >> 0xd020c0: i64 = TargetGlobalTLSAddress<i8** @_ZSt15__once_callable> 0 > [TF=10] > >> In function: _ZSt9call_onceIMNSt13__future_base13_State_ > baseV2EFvPSt8functionIFSt10unique_ptrINS0_12_Result_baseENS4_8_ > DeleterEEvEEPbEJPS1_S9_SA_EEvRSt9once_flagOT_DpOT0_ > >> Questions: > >> > >> What does it mean? > >> > >> Are there any compiler-flags that fix this problem? > >> > >> what specific features is libstdc++ using that cause this issue ? > >> > >> How does my problem relate to Bug 21431 ? > >> > >> The motivation behind this questions is to understand the differences > between libc++ and libstdc++ that leads to this specific error message (on > Linux) in llvm's orcjit. > >> > >> > >> > >> ps.: i've also asked this question in stackoverflow > >> > >> > >> > >> > >> Sent with Mailtrack > >> > >> _______________________________________________ > >> cfe-dev mailing list > >> cfe-dev at lists.llvm.org > >> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev > > > > _______________________________________________ > > cfe-dev mailing list > > cfe-dev at lists.llvm.org > > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170207/01d77559/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: main.ll Type: application/octet-stream Size: 814 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170207/01d77559/attachment.obj>
Seemingly Similar Threads
- [cfe-dev] lli: LLVM ERROR: Cannot select: X86ISD::WrapperRIP TargetGlobalTLSAddress:i64
- [cfe-dev] lli: LLVM ERROR: Cannot select: X86ISD::WrapperRIP TargetGlobalTLSAddress:i64
- [cfe-dev] lli: LLVM ERROR: Cannot select: X86ISD::WrapperRIP TargetGlobalTLSAddress:i64
- [cfe-dev] lli: LLVM ERROR: Cannot select: X86ISD::WrapperRIP TargetGlobalTLSAddress:i64
- [cfe-dev] lli: LLVM ERROR: Cannot select: X86ISD::WrapperRIP TargetGlobalTLSAddress:i64