<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Crash in Neon (unexpected intrinsic for Neon base update UNREACHABLE executed at /disk/llvm/llvm-project/llvm/lib/Target/ARM/ARMISelLowering.cpp:13844!)"
   href="https://bugs.llvm.org/show_bug.cgi?id=46615">46615</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Crash in Neon (unexpected intrinsic for Neon base update UNREACHABLE executed at /disk/llvm/llvm-project/llvm/lib/Target/ARM/ARMISelLowering.cpp:13844!)
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: ARM
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>srhines@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, smithp352@googlemail.com, Ties.Stuij@arm.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I reduced down the following crash from an NDK bug report
(<a href="https://github.com/android/ndk/issues/1303">https://github.com/android/ndk/issues/1303</a>). <a href="https://godbolt.org/z/MXuui4">https://godbolt.org/z/MXuui4</a>
shows the crash as well. This isn't specifically a regression, but is a crash
on what appears to be valid code.

```
$ clang++ --target=armv7-none-linux-androideabi -c -Oz reduced.cpp
srhines@ringworld:__:llvm_neon_crash$ /disk/llvm/build/bin/clang++
--target=armv7-none-linux-androideabi -c -Oz ~/reduced.cpp 
unexpected intrinsic for Neon base update                                       
UNREACHABLE executed at
/disk/llvm/llvm-project/llvm/lib/Target/ARM/ARMISelLowering.cpp:13844!          
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace, preprocessed source, and associated run script.                      
Stack dump:                                                                     
0.      Program arguments: /disk/llvm/build/bin/clang++
--target=armv7-none-linux-androideabi -c -Oz
/usr/local/google/home/srhines/reduced.cpp 
1.      <eof> parser at end of file                                             
2.      Code generation                                                         
3.      Running pass 'Function Pass Manager' on module
'/usr/local/google/home/srhines/reduced.cpp'.    
4.      Running pass 'ARM Instruction Selection' on function
'@_GLOBAL__sub_I_reduced.cpp'
 #0 0x0000000004297677 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/disk/llvm/build/bin/clang+++0x4297677)
 #1 0x0000000004297819 PrintStackTraceSignalHandler(void*)
(/disk/llvm/build/bin/clang+++0x4297819)
 #2 0x000000000429601b llvm::sys::RunSignalHandlers()
(/disk/llvm/build/bin/clang+++0x429601b)
 #3 0x0000000004296f6e llvm::sys::CleanupOnSignal(unsigned long)
(/disk/llvm/build/bin/clang+++0x4296f6e)
 #4 0x00000000041907b8 (anonymous
namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long)
(/disk/llvm/build/bin/clang+++0x41907b8)
 #5 0x0000000004190a3e CrashRecoverySignalHandler(int)
(/disk/llvm/build/bin/clang+++0x4190a3e)
 #6 0x00007f07b6a56110 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x14110)
 #7 0x00007f07b6530761 raise
/build/glibc-M65Gwz/glibc-2.30/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #8 0x00007f07b651a55b abort /build/glibc-M65Gwz/glibc-2.30/stdlib/abort.c:81:7
 #9 0x0000000004198b34 (/disk/llvm/build/bin/clang+++0x4198b34)
#10 0x0000000001c51eed CombineBaseUpdate(llvm::SDNode*,
llvm::TargetLowering::DAGCombinerInfo&)
(/disk/llvm/build/bin/clang+++0x1c51eed)
#11 0x0000000001c2d11c PerformVLDCombine(llvm::SDNode*,
llvm::TargetLowering::DAGCombinerInfo&)
(/disk/llvm/build/bin/clang+++0x1c2d11c)
#12 0x0000000001c2137a
llvm::ARMTargetLowering::PerformDAGCombine(llvm::SDNode*,
llvm::TargetLowering::DAGCombinerInfo&) const
(/disk/llvm/build/bin/clang+++0x1c2137a)
#13 0x00000000056c3741 (anonymous
namespace)::DAGCombiner::combine(llvm::SDNode*)
(/disk/llvm/build/bin/clang+++0x56c3741)
#14 0x00000000056c2bc0 (anonymous
namespace)::DAGCombiner::Run(llvm::CombineLevel)
(/disk/llvm/build/bin/clang+++0x56c2bc0)
#15 0x00000000056c248f llvm::SelectionDAG::Combine(llvm::CombineLevel,
llvm::AAResults*, llvm::CodeGenOpt::Level)
(/disk/llvm/build/bin/clang+++0x56c248f)
#16 0x00000000058c1710 llvm::SelectionDAGISel::CodeGenAndEmitDAG()
(/disk/llvm/build/bin/clang+++0x58c1710)
#17 0x00000000058c029f
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction,
true, false, void>, false, true>,
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::
Instruction, true, false, void>, false, true>, bool&)
(/disk/llvm/build/bin/clang+++0x58c029f)
#18 0x00000000058bfcfa
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(/disk/llvm/build/bin/clang+++0x58bfcfa)
#19 0x00000000058bce1f
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(/disk/llvm/build/bin/clang+++0x58bce1f)
#20 0x0000000001b8cf68 (anonymous
namespace)::ARMDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(/disk/llvm/build/bin/clang+++0x1b8cf68)
#21 0x00000000032183e7
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/disk/llvm/build/bin/clang+++0x32183e7)
#22 0x00000000037bee6c llvm::FPPassManager::runOnFunction(llvm::Function&)
(/disk/llvm/build/bin/clang+++0x37bee6c)
#23 0x00000000037bf295 llvm::FPPassManager::runOnModule(llvm::Module&)
(/disk/llvm/build/bin/clang+++0x37bf295)
#24 0x00000000037bfa14 (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
(/disk/llvm/build/bin/clang+++0x37bfa14)
#25 0x00000000037bf538 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/disk/llvm/build/bin/clang+++0x37bf538)
#26 0x00000000037bffb1 llvm::legacy::PassManager::run(llvm::Module&)
(/disk/llvm/build/bin/clang+++0x37bffb1)
#27 0x000000000467001c (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/disk/llvm/build/bin/clang+++0x467001c)
#28 0x000000000466c0b5 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Modu
le*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/disk/llvm/build/bin/clang+++0x466c0b5)
#29 0x0000000005a0fddc
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/disk/llvm/build/bin/clang+++0x5a0fddc)
#30 0x00000000075d8c5e clang::ParseAST(clang::Sema&, bool, bool)
(/disk/llvm/build/bin/clang+++0x75d8c5e)
#31 0x0000000004facb02 clang::ASTFrontendAction::ExecuteAction()
(/disk/llvm/build/bin/clang+++0x4facb02)
#32 0x0000000005a0c148 clang::CodeGenAction::ExecuteAction()
(/disk/llvm/build/bin/clang+++0x5a0c148)
#33 0x0000000004fac4c8 clang::FrontendAction::Execute()
(/disk/llvm/build/bin/clang+++0x4fac4c8)
#34 0x0000000004f3c5ad
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/disk/llvm/build/bin/clang+++0x4f3c5ad)
#35 0x0000000005166a6f
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/disk/llvm/build/bin/clang+++0x5166a6f)
#36 0x0000000001235f42 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/disk/llvm/build/bin/clang+++0x1235f42)
#37 0x0000000001229ab2 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/disk/llvm/build/bin/clang+++0x1229ab2) 
#38 0x0000000004e302c8
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
<span class="quote">>, std::__cxx11::basic_string<char, std::char_traits<char>,</span >
std::allocator<char> >*, bool*) const::$_1::operator()() const (/d
isk/llvm/build/bin/clang+++0x4e302c8)
#39 0x0000000004e30295 void llvm::function_ref<void
()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
<span class="quote">>, std::__cxx11::basic_string<char, std::char_traits<char>,</span >
std::allocator<char>
 >*, bool*) const::$_1>(long) (/disk/llvm/build/bin/clang+++0x4e30295)
#40 0x0000000004185619 llvm::function_ref<void ()>::operator()() const
(/disk/llvm/build/bin/clang+++0x4185619)
#41 0x00000000041905a4
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/disk/llvm/build/bin/clang+++0x41905a4)
#42 0x0000000004e2f6d6
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
<span class="quote">>, std::__cxx11::basic_string<char, std::char_traits<char>,</span >
std::allocator<char> >*, bool*) const (/disk/llvm/build/bin/clang+
++0x4e2f6d6)
#43 0x0000000004ddfa92
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const (/disk/llvm/build/bin/clang+++0x4ddfa92)
#44 0x0000000004ddfc7b
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/disk/llvm/build/bin/clang+++0x4ddfc7b)
#45 0x0000000004df5a8e
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/disk/llvm/build/bin/clang+++0x4df5a8e)
#46 0x0000000001229442 main (/disk/llvm/build/bin/clang+++0x1229442)
#47 0x00007f07b651be0b __libc_start_main
/build/glibc-M65Gwz/glibc-2.30/csu/../csu/libc-start.c:342:3
#48 0x000000000122846a _start (/disk/llvm/build/bin/clang+++0x122846a)
clang-11: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 11.0.0 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
c359c5d534429c96f1cebdf8d845b8120e9c2ef0)
Target: armv7-none-linux-android
Thread model: posix
InstalledDir: /disk/llvm/build/bin
clang-11: note: diagnostic msg: 
********************
```</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>