Richard Pennington via llvm-dev
2015-Sep-25 20:46 UTC
[llvm-dev] Error compiling libc++ for ARMv6
Hi, I was compiling libc++ with a recent TOT (248571) and when I got to the ARMv6, I got a code generation error in memory.cpp: fatal error: error in backend: Cannot select: intrinsic %llvm.arm.clrex ecc: error: clang frontend command failed with exit code 70 (use -v to see invocation) clang version 3.8.0 (trunk) It looks as if the newly added emitAtomicCmpXchgNoStoreLLBalance() function is the culprit. Does this seem like a resaonable fix, or do I need to do something different for v6 and earlier? void ARMTargetLowering::emitAtomicCmpXchgNoStoreLLBalance( IRBuilder<> &Builder) const { if (Subtarget->hasV7Ops()) { Module *M = Builder.GetInsertBlock()->getParent()->getParent(); Builder.CreateCall(llvm::Intrinsic::getDeclaration(M, Intrinsic::arm_clrex)); } } -Rich
Looks like this was caused by r248294. Author CC'ed. On Fri, Sep 25, 2015 at 1:46 PM, Richard Pennington via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi, > > I was compiling libc++ with a recent TOT (248571) and when I got to the > ARMv6, I got a code generation error in memory.cpp: > > fatal error: error in backend: Cannot select: intrinsic %llvm.arm.clrex > ecc: error: clang frontend command failed with exit code 70 (use -v to see > invocation) > clang version 3.8.0 (trunk) > > It looks as if the newly added emitAtomicCmpXchgNoStoreLLBalance() > function is the culprit. Does this seem like a resaonable fix, or do I > need to do something different for v6 and earlier? > > void ARMTargetLowering::emitAtomicCmpXchgNoStoreLLBalance( > IRBuilder<> &Builder) const { > if (Subtarget->hasV7Ops()) { > Module *M = Builder.GetInsertBlock()->getParent()->getParent(); > Builder.CreateCall(llvm::Intrinsic::getDeclaration(M, > Intrinsic::arm_clrex)); > } > } > > -Rich > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150925/e4904a97/attachment.html>
Ahmed Bougacha via llvm-dev
2015-Sep-26 00:18 UTC
[llvm-dev] Error compiling libc++ for ARMv6
On Fri, Sep 25, 2015 at 2:17 PM, JF Bastien <jfb at google.com> wrote:> Looks like this was caused by r248294. Author CC'ed. > > On Fri, Sep 25, 2015 at 1:46 PM, Richard Pennington via llvm-dev > <llvm-dev at lists.llvm.org> wrote: >> >> Hi, >> >> I was compiling libc++ with a recent TOT (248571) and when I got to the >> ARMv6, I got a code generation error in memory.cpp: >> >> fatal error: error in backend: Cannot select: intrinsic %llvm.arm.clrex >> ecc: error: clang frontend command failed with exit code 70 (use -v to see >> invocation) >> clang version 3.8.0 (trunk) >> >> It looks as if the newly added emitAtomicCmpXchgNoStoreLLBalance() >> function is the culprit. Does this seem like a resaonable fix, or do I need >> to do something different for v6 and earlier? >> >> void ARMTargetLowering::emitAtomicCmpXchgNoStoreLLBalance( >> IRBuilder<> &Builder) const { >> if (Subtarget->hasV7Ops()) { >> Module *M = Builder.GetInsertBlock()->getParent()->getParent(); >> Builder.CreateCall(llvm::Intrinsic::getDeclaration(M, >> Intrinsic::arm_clrex)); >> } >> }For v6, I guess we could do a fake strex to some dummy global? Anyway, r248640, sorry about that! -Ahmed>> -Rich >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >