[LLVMbugs] [Bug 22524] New: r226781 exposes: N->use_empty() && "Cannot delete a node that is not dead!"

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Feb 9 12:01:57 PST 2015


http://llvm.org/bugs/show_bug.cgi?id=22524

            Bug ID: 22524
           Summary: r226781 exposes: N->use_empty() && "Cannot delete a
                    node that is not dead!"
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: dexonsmith at apple.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 13832
  --> http://llvm.org/bugs/attachment.cgi?id=13832&action=edit
opt+llc.ll

Bisection of a testcase reveals that r226781 (canonicalization change to
-instcombine) exposes a bug in DAGCombiner where it's trying to delete a
non-dead node.

The attached testcases repro in r228581.

$ head -n 1 opt+llc.ll 
; RUN: opt -basicaa -inline -sroa -instcombine -gvn -dse < %s | llc -o
/dev/null
$ head -n 1 llc.ll 
; RUN: llc < %s -o /dev/null

Here's the assertion failure:

Assertion failed: (N->use_empty() && "Cannot delete a node that is not dead!"),
function DeleteNodeNotInCSEMaps, file
/Users/dexonsmith/data/llvm/staging/lib/CodeGen/SelectionDAG/SelectionDAG.cpp,
line 682.
0  llc                      0x000000010dd754ee
llvm::sys::PrintStackTrace(__sFILE*) + 46
1  llc                      0x000000010dd76bbb
PrintStackTraceSignalHandler(void*) + 27
2  llc                      0x000000010dd7700f SignalHandler(int) + 559
3  libsystem_platform.dylib 0x00007fff8fd80f1a _sigtramp + 26
4  llc                      0x000000010e6d6ce9 ErrorCategory + 80889
5  llc                      0x000000010dd76beb raise + 27
6  llc                      0x000000010dd76ca2 abort + 18
7  llc                      0x000000010dd76c81 __assert_rtn + 129
8  llc                      0x000000010db459ec
llvm::SelectionDAG::DeleteNodeNotInCSEMaps(llvm::SDNode*) + 252
9  llc                      0x000000010db458df
llvm::SelectionDAG::DeleteNode(llvm::SDNode*) + 63
10 llc                      0x000000010d9ad68f (anonymous
namespace)::DAGCombiner::deleteAndRecombine(llvm::SDNode*) + 239
11 llc                      0x000000010d9d7dc1 (anonymous
namespace)::DAGCombiner::visitBITCAST(llvm::SDNode*) + 769
12 llc                      0x000000010d9ab587 (anonymous
namespace)::DAGCombiner::visit(llvm::SDNode*) + 1143
13 llc                      0x000000010d9aaa58 (anonymous
namespace)::DAGCombiner::combine(llvm::SDNode*) + 56
14 llc                      0x000000010d9aa23e (anonymous
namespace)::DAGCombiner::Run(llvm::CombineLevel) + 1278
15 llc                      0x000000010d9a9cc8
llvm::SelectionDAG::Combine(llvm::CombineLevel, llvm::AliasAnalysis&,
llvm::CodeGenOpt::Level) + 104
16 llc                      0x000000010dc28081
llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 7249
17 llc                      0x000000010dc2641f
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::Instruction
const>, llvm::ilist_iterator<llvm::Instruction const>, bool&) + 255
18 llc                      0x000000010dc260f9
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 5225
19 llc                      0x000000010dc2397e
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 1134
20 llc                      0x000000010ccea83b (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 59
21 llc                      0x000000010d30633e
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 110
22 llc                      0x000000010d7573cd
llvm::FPPassManager::runOnFunction(llvm::Function&) + 413
23 llc                      0x000000010d7576d8
llvm::FPPassManager::runOnModule(llvm::Module&) + 104
24 llc                      0x000000010d7580d3 (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&) + 1395
25 llc                      0x000000010d75798e
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 302
26 llc                      0x000000010d758851
llvm::legacy::PassManager::run(llvm::Module&) + 33
27 llc                      0x000000010c2600aa compileModule(char**,
llvm::LLVMContext&) + 7802
28 llc                      0x000000010c25e1c2 main + 226
29 libdyld.dylib            0x00007fff92ea35c9 start + 1

-- 
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/20150209/47284055/attachment.html>


More information about the llvm-bugs mailing list