<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 LoadCombine/AliasSetTracker, take 2"
   href="https://bugs.llvm.org/show_bug.cgi?id=33544">33544</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Crash in LoadCombine/AliasSetTracker, take 2
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>mikael.holmen@ericsson.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=18682" name="attach_18682" title="Reproducer">attachment 18682</a> <a href="attachment.cgi?id=18682&action=edit" title="Reproducer">[details]</a></span>
Reproducer

opt -S -disable-basicaa -load-combine -o - reduced2.ll

gives

opt: ../lib/Analysis/AliasSetTracker.cpp:144: void
llvm::AliasSet::addPointer(llvm::AliasSetTracker &, llvm::AliasSet::PointerRec
&, uint64_t, const llvm::AAMDNodes &, bool): Assertion `*PtrListEnd == nullptr
&& "End of list is not null?"' failed.
#0 0x0000000001d2ae64 PrintStackTraceSignalHandler(void*)
(build-all/bin/opt+0x1d2ae64)
#1 0x0000000001d2b5d6 SignalHandler(int) (build-all/bin/opt+0x1d2b5d6)
#2 0x00007f9f12641330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#3 0x00007f9f11230c37 gsignal
/build/eglibc-SvCtMH/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#4 0x00007f9f11234028 abort
/build/eglibc-SvCtMH/eglibc-2.19/stdlib/abort.c:91:0
#5 0x00007f9f11229bf6 __assert_fail_base
/build/eglibc-SvCtMH/eglibc-2.19/assert/assert.c:92:0
#6 0x00007f9f11229ca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#7 0x00000000012ba00b llvm::AliasSet::addPointer(llvm::AliasSetTracker&,
llvm::AliasSet::PointerRec&, unsigned long, llvm::AAMDNodes const&, bool)
(build-all/bin/opt+0x12ba00b)
#8 0x00000000012bafa5
llvm::AliasSetTracker::getAliasSetForPointer(llvm::Value*, unsigned long,
llvm::AAMDNodes const&) (build-all/bin/opt+0x12bafa5)
#9 0x00000000012bba61 llvm::AliasSetTracker::add(llvm::MemTransferInst*)
(build-all/bin/opt+0x12bba61)
#10 0x0000000001b795bd (anonymous
namespace)::LoadCombine::runOnBasicBlock(llvm::BasicBlock&)
(build-all/bin/opt+0x1b795bd)
#11 0x0000000001851c2a (anonymous
namespace)::BBPassManager::runOnFunction(llvm::Function&)
(build-all/bin/opt+0x1851c2a)
#12 0x000000000184c268 llvm::FPPassManager::runOnFunction(llvm::Function&)
(build-all/bin/opt+0x184c268)
#13 0x000000000184c4a8 llvm::FPPassManager::runOnModule(llvm::Module&)
(build-all/bin/opt+0x184c4a8)
#14 0x000000000184c985 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(build-all/bin/opt+0x184c985)
#15 0x00000000006da3a5 main (build-all/bin/opt+0x6da3a5)
#16 0x00007f9f1121bf45 __libc_start_main
/build/eglibc-SvCtMH/eglibc-2.19/csu/libc-start.c:321:0
#17 0x00000000006cba7b _start (build-all/bin/opt+0x6cba7b)
Stack dump:
0.      Program arguments: build-all/bin/opt -S -disable-basicaa -load-combine
-o - reduced2.ll 
1.      Running pass 'Function Pass Manager' on module 'reduced2.ll'.
2.      Running pass 'BasicBlock Pass Manager' on function '@test_spill_mixed'
3.      Running pass 'Combine Adjacent Loads' on basic block '%0'
Abort

This looks very similar to <a href="https://bugs.llvm.org//show_bug.cgi?id=31493">https://bugs.llvm.org//show_bug.cgi?id=31493</a> which
stopped happening with r294632:

    [LoadCombine] Fix combining of loads which span an aliasing store.

    Fixes PR31517

    Differential Revision: <a href="https://reviews.llvm.org/D28922">https://reviews.llvm.org/D28922</a>


Interestingly enough, if reverting r294632 the new crash goes away.

It also goes away if reverting r299876:

    Add address space mangling to lifetime intrinsics

    In preparation for allowing allocas to have non-0 addrspace.

    git-svn-id: <a href="https://llvm.org/svn/llvm-project/llvm/trunk@299876">https://llvm.org/svn/llvm-project/llvm/trunk@299876</a>
91177308-0d34-0410-b5e6-96231b3b80d8</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>