[llvm-bugs] [Bug 32108] New: Assertion in X86 DAGCombiner "DELETED_NODE in CSEMap!"' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 1 10:39:23 PST 2017


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

            Bug ID: 32108
           Summary: Assertion in X86 DAGCombiner  "DELETED_NODE in
                    CSEMap!"' failed.
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: niravd at google.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 18038
  --> http://bugs.llvm.org/attachment.cgi?id=18038&action=edit
testcase

r296476 exposed an assertion in DAGCombiner where simplification of a store's
operand causes the node to become redundant with another node deleting the
original store who's pointer is added to the worklist without checking causing
an assertion. 

llc: ../lib/CodeGen/SelectionDAG/SelectionDAG.cpp:746: bool
llvm::SelectionDAG::RemoveNodeFromCSEMaps(llvm::SDNode *): Assertion
`N->getOpcode() != ISD::DELETED_NODE && "DELETED_NODE in CSEMap!"' failed.
#0 0x0b161bcc llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/data/repo/llvm-patch/build-all-Debug/../lib/Support/Unix/Signals.inc:402:5
#1 0x0b161dfe PrintStackTraceSignalHandler(void*)
/data/repo/llvm-patch/build-all-Debug/../lib/Support/Unix/Signals.inc:466:1
#2 0x0b15fdff llvm::sys::RunSignalHandlers()
/data/repo/llvm-patch/build-all-Debug/../lib/Support/Signals.cpp:45:5
#3 0x0b1625b1 SignalHandler(int)
/data/repo/llvm-patch/build-all-Debug/../lib/Support/Unix/Signals.inc:256:1
#4 0xf77c6410  0xffffe410 llvm::SelectionDAG::DeleteNode(llvm::SDNode*)
#5 0xf77c6410
/data/repo/llvm-patch/build-all-Debug/../lib/CodeGen/SelectionDAG/SelectionDAG.cpp:615:26 
#6 0xf77c6410 (anonymous
namespace)::DAGCombiner::recursivelyDeleteUnusedNodes(llvm::SDNode*)
/data/repo/llvm-patch/build-all-Debug/../lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1260:5
#7 0x0aecc079 (anonymous namespace)::DAGCombiner::Run(llvm::CombineLevel)
/data/repo/llvm-patch/build-all-Debug/../lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1302:9
#8 0x0ad0cb1f llvm::SelectionDAG::Combine(llvm::CombineLevel, llvm::AAResults&,
llvm::CodeGenOpt::Level)
/data/repo/llvm-patch/build-all-Debug/../lib/CodeGen/SelectionDAG/DAGCombiner.cpp:16066:3
#9 0x0ad0c044 llvm::SelectionDAGISel::CodeGenAndEmitDAG()
/data/repo/llvm-patch/build-all-Debug/../lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:871:7
#10 0x0ad0bcd6
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction,
true, false, void>, false, true>,
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, true,
false, void>, false, true>, bool&)
/data/repo/llvm-patch/build-all-Debug/../lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:726:1
#11 0x0af36f98 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function
const&)
/data/repo/llvm-patch/build-all-Debug/../lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1689:5
#12 0x0af357a7
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
/data/repo/llvm-patch/build-all-Debug/../lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:543:7
#13 0x0af3558a (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
/data/repo/llvm-patch/build-all-Debug/../lib/Target/X86/X86ISelDAGToDAG.cpp:176:25
#14 0x0af32754 llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
/data/repo/llvm-patch/build-all-Debug/../lib/CodeGen/MachineFunctionPass.cpp:62:8
#15 0x09936a8d llvm::FPPassManager::runOnFunction(llvm::Function&)
/data/repo/llvm-patch/build-all-Debug/../lib/IR/LegacyPassManager.cpp:1513:23
#16 0x0a2c0401 llvm::FPPassManager::runOnModule(llvm::Module&)
/data/repo/llvm-patch/build-all-Debug/../lib/IR/LegacyPassManager.cpp:1534:16
#17 0x0a7f6c23 (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&)
/data/repo/llvm-patch/build-all-Debug/../lib/IR/LegacyPassManager.cpp:1590:23
#18 0x0a7f6fca llvm::legacy::PassManagerImpl::run(llvm::Module&)
/data/repo/llvm-patch/build-all-Debug/../lib/IR/LegacyPassManager.cpp:1693:16
#19 0x0a7f788c llvm::legacy::PassManager::run(llvm::Module&)
/data/repo/llvm-patch/build-all-Debug/../lib/IR/LegacyPassManager.cpp:1724:3
#20 0x0a7f72dc compileModule(char**, llvm::LLVMContext&)
/data/repo/llvm-patch/build-all-Debug/../tools/llc/llc.cpp:579:42
#21 0x0a7f7ee6 main
/data/repo/llvm-patch/build-all-Debug/../tools/llc/llc.cpp:331:13
#22 0x0860a90b __libc_start_main
/build/eglibc-X4bnBz/eglibc-2.19/csu/libc-start.c:321:0
build-all-Debug/bin/llc(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x5c)[0xb161bcc]
build-all-Debug/bin/llc[0xb161dfe]
build-all-Debug/bin/llc(_ZN4llvm3sys17RunSignalHandlersEv+0xbf)[0xb15fdff]
build-all-Debug/bin/llc[0xb1625b1]
[0xf77c6410]
build-all-Debug/bin/llc(_ZN4llvm12SelectionDAG10DeleteNodeEPNS_6SDNodeE+0x39)[0xaecc079]
build-all-Debug/bin/llc[0xad0cb1f]
build-all-Debug/bin/llc[0xad0c044]
build-all-Debug/bin/llc(_ZN4llvm12SelectionDAG7CombineENS_12CombineLevelERNS_9AAResultsENS_10CodeGenOpt5LevelE+0x76)[0xad0bcd6]
build-all-Debug/bin/llc(_ZN4llvm16SelectionDAGISel17CodeGenAndEmitDAGEv+0x17e8)[0xaf36f98]
build-all-Debug/bin/llc(_ZN4llvm16SelectionDAGISel16SelectBasicBlockENS_14ilist_iteratorINS_12ilist_detail12node_optionsINS_11InstructionELb1ELb0EvEELb0ELb1EEES6_Rb+0x137)[0xaf357a7]
build-all-Debug/bin/llc(_ZN4llvm16SelectionDAGISel20SelectAllBasicBlocksERKNS_8FunctionE+0x144a)[0xaf3558a]
build-all-Debug/bin/llc(_ZN4llvm16SelectionDAGISel20runOnMachineFunctionERNS_15MachineFunctionE+0x734)[0xaf32754]
build-all-Debug/bin/llc[0x9936a8d]
build-all-Debug/bin/llc(_ZN4llvm19MachineFunctionPass13runOnFunctionERNS_8FunctionE+0x251)[0xa2c0401]
build-all-Debug/bin/llc(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x1b3)[0xa7f6c23]
build-all-Debug/bin/llc(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0xaa)[0xa7f6fca]
build-all-Debug/bin/llc[0xa7f788c]
build-all-Debug/bin/llc(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x14c)[0xa7f72dc]
build-all-Debug/bin/llc(_ZN4llvm6legacy11PassManager3runERNS_6ModuleE+0x36)[0xa7f7ee6]
build-all-Debug/bin/llc[0x860a90b]
build-all-Debug/bin/llc(main+0x5b0)[0x86084e0]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0xf7493af3]
Stack dump:
0.      Program arguments: build-all-Debug/bin/llc -march=x86-64
stress_reduced.ll
1.      Running pass 'Function Pass Manager' on module 'stress_reduced.ll'.
2.      Running pass 'X86 DAG->DAG Instruction Selection' on function
'@autogen_SD1794'
Abort

Reproduce with:

llc -march=x86-64 stress_reduced.ll

-- 
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/20170301/3bd9e505/attachment.html>


More information about the llvm-bugs mailing list