[llvm-bugs] [Bug 39098] New: DAGCombiner hang in a infinite loop

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 27 05:45:43 PDT 2018


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

            Bug ID: 39098
           Summary: DAGCombiner hang in a infinite loop
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: karl-johan.karlsson at ericsson.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 20932
  --> https://bugs.llvm.org/attachment.cgi?id=20932&action=edit
llc -O0 bugpoint-reduced-simplified.ll

The following minimal reproducer hang in a infine loop in the DAGCombiner. It
seems to ping-pong between two different states but never make any progress.

Reproduce with:

llc -O0 bugpoint-reduced-simplified.ll -debug-pass=Executions

llvm assembler code (also attached):

target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

define dso_local void @test_cancel2() {
entry:
  %0 = load i40, i40* undef, align 8
  %shl414 = shl i40 %0, 19
  %unsclear415 = and i40 %shl414, 549755813887
  %shr416 = lshr i40 %unsclear415, 20
  %unsclear417 = and i40 %shr416, 549755813887
  store i40 %unsclear417, i40* undef, align 8
  ret void
}

backtrace:

#0  0x00007ffff7bcb330 in __write_nocancel ()
    at ../sysdeps/unix/syscall-template.S:81
#1  0x000000000208899a in llvm::raw_fd_ostream::write_impl(char const*,
unsigned long) ()
#2  0x00000000020878fc in llvm::raw_ostream::write(char const*, unsigned long)
    ()
#3  0x00000000020876f0 in llvm::raw_ostream::write(unsigned char) ()
#4  0x0000000001f17fa6 in llvm::SelectionDAG::getNode(unsigned int, llvm::SDLoc
const&, llvm::EVT, llvm::SDValue, llvm::SDValue, llvm::SDNodeFlags) ()
#5  0x0000000001e180ed in (anonymous
namespace)::DAGCombiner::visitZERO_EXTEND(llvm::SDNode*) ()
#6  0x0000000001de01d1 in (anonymous
namespace)::DAGCombiner::visit(llvm::SDNode*) ()
#7  0x0000000001ddbc0c in (anonymous
namespace)::DAGCombiner::combine(llvm::SDNode*) ()
#8  0x0000000001ddb3e8 in llvm::SelectionDAG::Combine(llvm::CombineLevel,
llvm::AAResults*, llvm::CodeGenOpt::Level) ()
#9  0x0000000001f5f96c in llvm::SelectionDAGISel::CodeGenAndEmitDAG() ()
#10 0x0000000001f5d8bb in
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) ()
#11 0x0000000001f599ec in
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) ()
#12 0x000000000123c391 in (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) ()
#13 0x0000000001795a9d in
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) ()
#14 0x0000000001acb24d in llvm::FPPassManager::runOnFunction(llvm::Function&)
    ()
#15 0x0000000001acb508 in llvm::FPPassManager::runOnModule(llvm::Module&) ()
#16 0x0000000001acb96a in llvm::legacy::PassManagerImpl::run(llvm::Module&) ()
#17 0x00000000007183e9 in compileModule(char**, llvm::LLVMContext&) ()
#18 0x0000000000715bd0 in main ()

-- 
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/20180927/5a558182/attachment.html>


More information about the llvm-bugs mailing list