[llvm-bugs] [Bug 49717] New: LLVM ERROR: Cannot select: intrinsic %llvm.objc.clang.arc.use

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 24 14:45:48 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=49717

            Bug ID: 49717
           Summary: LLVM ERROR: Cannot select: intrinsic
                    %llvm.objc.clang.arc.use
           Product: libraries
           Version: 11.0
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: luis15gomez at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 24691
  --> https://bugs.llvm.org/attachment.cgi?id=24691&action=edit
ObjectiveC and IR

I'm facing the next error:

LLVM ERROR: Cannot select: intrinsic %llvm.objc.clang.arc.use
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0.      Program arguments:
/Users/luis.gomez/Documents/llvm-project-11.0.1/BASELINE/bin/llc
GTMSessionFetcher.ll -enable-objc-arc-opts -o
/Users/luis.gomez/Documents/issue/GTMSessionFetcher.o 
1.      Running pass 'Function Pass Manager' on module 'GTMSessionFetcher.ll'.
2.      Running pass 'AArch64 Instruction Selection' on function
'@"\01-[GTMSessionFetcher completionHandlerWithTarget:didFinishSelector:]"'
0  llc                      0x000000010c807275
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1  llc                      0x000000010c806118 llvm::sys::RunSignalHandlers() +
248
2  llc                      0x000000010c807876 SignalHandler(int) + 262
3  libsystem_platform.dylib 0x00007fff6d4aa5fd _sigtramp + 29
4  llc                      0x000000010e5a8210 _dyld_private + 0
5  libsystem_c.dylib        0x00007fff6d380808 abort + 120
6  llc                      0x000000010c76748b
llvm::report_fatal_error(llvm::Twine const&, bool) + 427
7  llc                      0x000000010c7674ab
llvm::report_fatal_error(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) + 27
8  llc                      0x000000010c6c5d1b
llvm::SelectionDAGISel::CannotYetSelect(llvm::SDNode*) + 923
9  llc                      0x000000010c6c4d32
llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode*, unsigned char const*,
unsigned int) + 15682
10 llc                      0x000000010ad96208 (anonymous
namespace)::AArch64DAGToDAGISel::Select(llvm::SDNode*) + 22680
11 llc                      0x000000010c6bc9af
llvm::SelectionDAGISel::DoInstructionSelection() + 399
12 llc                      0x000000010c6bc03a
llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 1434
13 llc                      0x000000010c6bb687
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 6855
14 llc                      0x000000010c6b8ea8
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 2120
15 llc                      0x000000010be9387d
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 285
16 llc                      0x000000010c1b5418
llvm::FPPassManager::runOnFunction(llvm::Function&) + 1064
17 llc                      0x000000010c1bb243
llvm::FPPassManager::runOnModule(llvm::Module&) + 67
18 llc                      0x000000010c1b5a29
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 937
19 llc                      0x000000010abea12a compileModule(char**,
llvm::LLVMContext&) + 9466
20 llc                      0x000000010abe771c main + 1308
21 libdyld.dylib            0x00007fff6d2b1cc9 start + 1
22 libdyld.dylib            0x0000000000000005 start + 18446603338684621629

Initially I got the error in a large project with mixed swift, objective-c,
c++, but I was able to get the minimum scope to reproduce it:

Language:
Objective-C

Reproducible in:
LLVM: 10.0.1
LLVM: 11.0.1

Steps to reproduce it:

.../llvm-project-11.0.1/BASELINE/bin/clang -x objective-c \
-target arm64-apple-ios12.0 \
-fobjc-arc -S -Os -flto=thin \
-isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.1.sdk
\
-fembed-bitcode \
-c GTMSessionFetcher.m \
-o GTMSessionFetcher.ll

.../llvm-project-11.0.1/BASELINE/bin/llc \
GTMSessionFetcher.ll \
-enable-objc-arc-opts \
-o GTMSessionFetcher.o

Notes:

This doesn't happen with O0 optimizer flag (llvm.objc.clang.arc.use is not
present in .ll file)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210324/915c57c3/attachment.html>


More information about the llvm-bugs mailing list