<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 - opt -globals-aa -gvn-hoist crashes in GVNHoist::safeToHoistLdSt"
   href="https://bugs.llvm.org/show_bug.cgi?id=45442">45442</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>opt -globals-aa -gvn-hoist crashes in GVNHoist::safeToHoistLdSt
          </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>Scalar Optimizations
          </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=23314" name="attach_23314" title="bbi-41354.ll reproducer">attachment 23314</a> <a href="attachment.cgi?id=23314&action=edit" title="bbi-41354.ll reproducer">[details]</a></span>
bbi-41354.ll reproducer

Reproduce with:
 opt -globals-aa -gvn-hoist -S -o - bbi-41354.ll

Result:

PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace.
Stack dump:
0.      Program arguments: /data/repo/master/llvm/build-all-builtins/bin/opt
-globals-aa -gvn-hoist -S -o - bbi-41354.ll 
1.      Running pass 'Function Pass Manager' on module 'bbi-41354.ll'.
2.      Running pass 'Early GVN Hoisting of Expressions' on function '@main'
 #0 0x00000000042cbad4 PrintStackTraceSignalHandler(void*)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x42cbad4)
 #1 0x00000000042c96ae llvm::sys::RunSignalHandlers()
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x42c96ae)
 #2 0x00000000042cbedc SignalHandler(int)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x42cbedc)
 #3 0x00007fc98435b890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #4 0x00000000040098b7 llvm::GVNHoist::safeToHoistLdSt(llvm::Instruction
const*, llvm::Instruction const*, llvm::MemoryUseOrDef*,
llvm::GVNHoist::InsKind, int&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x40098b7)
 #5 0x0000000004008094
llvm::GVNHoist::checkSafety(llvm::iterator_range<llvm::CHIArg*>,
llvm::BasicBlock*, llvm::GVNHoist::InsKind,
llvm::SmallVectorImpl<llvm::CHIArg>&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x4008094)
 #6 0x00000000040051c1
llvm::GVNHoist::findHoistableCandidates(llvm::DenseMap<llvm::BasicBlock*,
llvm::SmallVector<llvm::CHIArg, 2u>, llvm::DenseMapInfo<llvm::BasicBlock*>,
llvm::detail::DenseMapPair<llvm::BasicBlock*, llvm::SmallVector<llvm::CHIArg,
2u> > >&, llvm::GVNHoist::InsKind,
llvm::SmallVector<std::pair<llvm::BasicBlock*,
llvm::SmallVector<llvm::Instruction*, 4u> >, 4u>&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x40051c1)
 #7 0x00000000040039c6
llvm::GVNHoist::computeInsertionPoints(llvm::DenseMap<std::pair<unsigned int,
unsigned int>, llvm::SmallVector<llvm::Instruction*, 4u>,
llvm::DenseMapInfo<std::pair<unsigned int, unsigned int> >,
llvm::detail::DenseMapPair<std::pair<unsigned int, unsigned int>,
llvm::SmallVector<llvm::Instruction*, 4u> > > const&,
llvm::SmallVector<std::pair<llvm::BasicBlock*,
llvm::SmallVector<llvm::Instruction*, 4u> >, 4u>&, llvm::GVNHoist::InsKind)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x40039c6)
 #8 0x000000000400280d llvm::GVNHoist::hoistExpressions(llvm::Function&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x400280d)
 #9 0x0000000004001cc4 llvm::GVNHoist::run(llvm::Function&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x4001cc4)
#10 0x000000000400c553 llvm::GVNHoistLegacyPass::runOnFunction(llvm::Function&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x400c553)
#11 0x0000000003b37b54 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x3b37b54)
#12 0x0000000003b37e08 llvm::FPPassManager::runOnModule(llvm::Module&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x3b37e08)
#13 0x0000000003b3845d llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x3b3845d)
#14 0x000000000239be69 main
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x239be69)
#15 0x00007fc982de7b97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#16 0x000000000238602a _start
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x238602a)
Segmentation fault (core dumped)

This seems to be old, I've seen it with binaries from May 2017.</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>