[llvm-bugs] [Bug 36557] New: Regression: MergeICmps triggering asserts

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 1 00:35:34 PST 2018


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

            Bug ID: 36557
           Summary: Regression: MergeICmps triggering asserts
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: martin at martin.st
                CC: llvm-bugs at lists.llvm.org

Created attachment 19977
  --> https://bugs.llvm.org/attachment.cgi?id=19977&action=edit
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>
>::erase(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction,
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'

-- 
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/20180301/d99a068a/attachment.html>


More information about the llvm-bugs mailing list