<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 - Regression: MergeICmps triggering asserts"
   href="https://bugs.llvm.org/show_bug.cgi?id=36557">36557</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Regression: MergeICmps triggering asserts
          </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>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </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>martin@martin.st
          </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=19977" name="attach_19977" title="LLVM IR that triggers the error">attachment 19977</a> <a href="attachment.cgi?id=19977&action=edit" title="LLVM IR that triggers the error">[details]</a></span>
LLVM IR that triggers the error

Since SVN r324317, compiling Qt for x86 triggers the following assert:

While deleting: i1 %cmp.i
Use still stuck around after Def is destroyed:  br i1 %cmp.i, label
%land.rhs.i, label %_ZNK1BeqERKS_.exit
llc: /home/martin/code/llvm/lib/IR/Value.cpp:92: llvm::Value::~Value():
Assertion `use_empty() && "Uses remain when a value is destroyed!"' failed.
#0 0x00007f970f345d37 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/martin/code/llvm/lib/Support/Unix/Signals.inc:398:0
#1 0x00007f970f345dca PrintStackTraceSignalHandler(void*)
/home/martin/code/llvm/lib/Support/Unix/Signals.inc:462:0
#2 0x00007f970f343fb3 llvm::sys::RunSignalHandlers()
/home/martin/code/llvm/lib/Support/Signals.cpp:49:0
#3 0x00007f970f3455ac SignalHandler(int)
/home/martin/code/llvm/lib/Support/Unix/Signals.inc:252:0
#4 0x00007f970e1474b0 (/lib/x86_64-linux-gnu/libc.so.6+0x354b0)
#5 0x00007f970e147428 gsignal
/build/glibc-Cl5G7W/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#6 0x00007f970e14902a abort /build/glibc-Cl5G7W/glibc-2.23/stdlib/abort.c:91:0
#7 0x00007f970e13fbd7 __assert_fail_base
/build/glibc-Cl5G7W/glibc-2.23/assert/assert.c:92:0
#8 0x00007f970e13fc82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#9 0x00007f9710b6d710 llvm::Value::~Value()
/home/martin/code/llvm/lib/IR/Value.cpp:96:0
#10 0x00007f9710963bf8 llvm::User::~User()
/home/martin/code/llvm/include/llvm/IR/User.h:95:0
#11 0x00007f9710a7c6d4 llvm::Instruction::~Instruction()
/home/martin/code/llvm/lib/IR/Instruction.cpp:48:0
#12 0x00007f9710b7274e llvm::CmpInst::~CmpInst()
/home/martin/code/llvm/include/llvm/IR/InstrTypes.h:875:0
#13 0x00007f9710b72fe2 llvm::ICmpInst::~ICmpInst()
/home/martin/code/llvm/include/llvm/IR/Instructions.h:1108:0
#14 0x00007f9710b6e2f1 llvm::Value::deleteValue()
/home/martin/code/llvm/include/llvm/IR/Instruction.def:187:0
#15 0x00007f97109382c8
llvm::ilist_alloc_traits<llvm::Instruction>::deleteNode(llvm::Instruction*)
/home/martin/code/llvm/include/llvm/IR/Instruction.h:698:0
#16 0x00007f971093a9e7 llvm::iplist_impl<llvm::simple_ilist<llvm::Instruction>,
llvm::SymbolTableListTraits<llvm::Instruction>
<span class="quote">>::erase(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction,</span >
true, false, void>, false, false>)
/home/martin/code/llvm/include/llvm/ADT/ilist.h:282:0
#17 0x00007f9710a7c7e3 llvm::Instruction::eraseFromParent()
/home/martin/code/llvm/lib/IR/Instruction.cpp:69:0
#18 0x00007f970fd94b28 (anonymous
namespace)::BCECmpChain::mergeComparisons(llvm::ArrayRef<(anonymous
namespace)::BCECmpBlock>, llvm::BasicBlock*, llvm::PHINode&,
llvm::TargetLibraryInfo const*)
/home/martin/code/llvm/lib/Transforms/Scalar/MergeICmps.cpp:446:0
#19 0x00007f970fd9491e (anonymous
namespace)::BCECmpChain::simplify(llvm::TargetLibraryInfo const*)
/home/martin/code/llvm/lib/Transforms/Scalar/MergeICmps.cpp:418:0
#20 0x00007f970fd957b2 (anonymous namespace)::processPhi(llvm::PHINode&,
llvm::TargetLibraryInfo const*)
/home/martin/code/llvm/lib/Transforms/Scalar/MergeICmps.cpp:596:0
#21 0x00007f970fd95ad8 (anonymous
namespace)::MergeICmps::runImpl(llvm::Function&, llvm::TargetLibraryInfo
const*, llvm::TargetTransformInfo const*)
/home/martin/code/llvm/lib/Transforms/Scalar/MergeICmps.cpp:638:0
#22 0x00007f970fd958ef (anonymous
namespace)::MergeICmps::runOnFunction(llvm::Function&)
/home/martin/code/llvm/lib/Transforms/Scalar/MergeICmps.cpp:612:0
#23 0x00007f9710ac4326 llvm::FPPassManager::runOnFunction(llvm::Function&)
/home/martin/code/llvm/lib/IR/LegacyPassManager.cpp:1520:0
#24 0x00007f9710ac44bf llvm::FPPassManager::runOnModule(llvm::Module&)
/home/martin/code/llvm/lib/IR/LegacyPassManager.cpp:1541:0
#25 0x00007f9710ac483a (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
/home/martin/code/llvm/lib/IR/LegacyPassManager.cpp:1597:0
#26 0x00007f9710ac4f4f llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/martin/code/llvm/lib/IR/LegacyPassManager.cpp:1700:0
#27 0x00007f9710ac515b llvm::legacy::PassManager::run(llvm::Module&)
/home/martin/code/llvm/lib/IR/LegacyPassManager.cpp:1732:0
#28 0x0000000000431cb1 compileModule(char**, llvm::LLVMContext&)
/home/martin/code/llvm/tools/llc/llc.cpp:577:0
#29 0x00000000004303c3 main /home/martin/code/llvm/tools/llc/llc.cpp:347:0
#30 0x00007f970e132830 __libc_start_main
/build/glibc-Cl5G7W/glibc-2.23/csu/../csu/libc-start.c:325:0
#31 0x000000000042e0e9 _start (bin/llc+0x42e0e9)
Stack dump:
0.      Program arguments: bin/llc qabstractitemmodeltester.ll 
1.      Running pass 'Function Pass Manager' on module
'qabstractitemmodeltester.ll'.
2.      Running pass 'Merge contiguous icmps into a memcmp' on function
'@_ZN1D7compareI1BS1_EEbRKT_RKT0_PKcS9_S9_i'</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>