[llvm-bugs] [Bug 33094] New: Infinite loop in object file generation related to branching, aggregates and inlining

via llvm-bugs llvm-bugs at lists.llvm.org
Thu May 18 14:09:00 PDT 2017


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

            Bug ID: 33094
           Summary: Infinite loop in object file generation related to
                    branching, aggregates and inlining
           Product: new-bugs
           Version: 4.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: benoit.vey at etu.upmc.fr
                CC: llvm-bugs at lists.llvm.org

Created attachment 18469
  --> https://bugs.llvm.org/attachment.cgi?id=18469&action=edit
Minimal case

Trying to generate an object file for the optimised version of the attached
minimal case (either via llc or the LLVM API) results in an infinite loop.

Here is the deepest debugger backtrace that I've managed to get (from llc):

  #0  0x00007ffff57bd642 in
llvm::SelectionDAG::TransferDbgValues(llvm::SDValue, llvm::SDValue) () from
/usr/bin/../lib/libLLVM-4.0.so
  #1  0x00007ffff57be516 in
llvm::SelectionDAG::ReplaceAllUsesOfValueWith(llvm::SDValue, llvm::SDValue) ()
from /usr/bin/../lib/libLLVM-4.0.so
  #2  0x00007ffff56986c8 in ?? () from /usr/bin/../lib/libLLVM-4.0.so
  #3  0x00007ffff5699a6f in ?? () from /usr/bin/../lib/libLLVM-4.0.so
  #4  0x00007ffff569af2d in llvm::SelectionDAG::Combine(llvm::CombineLevel,
llvm::AAResults&, llvm::CodeGenOpt::Level) () from
/usr/bin/../lib/libLLVM-4.0.so
  #5  0x00007ffff57c85de in llvm::SelectionDAGISel::CodeGenAndEmitDAG() () from
/usr/bin/../lib/libLLVM-4.0.so
  #6  0x00007ffff57d10b7 in
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) () from
/usr/bin/../lib/libLLVM-4.0.so
  #7  0x00007ffff57d2d49 in
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) () from
/usr/bin/../lib/libLLVM-4.0.so
  #8  0x00007ffff6a09e74 in ?? () from /usr/bin/../lib/libLLVM-4.0.so
  #9  0x00007ffff54ae841 in
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) () from
/usr/bin/../lib/libLLVM-4.0.so
  #10 0x00007ffff532eb32 in llvm::FPPassManager::runOnFunction(llvm::Function&)
() from /usr/bin/../lib/libLLVM-4.0.so
  #11 0x00007ffff532ebd3 in llvm::FPPassManager::runOnModule(llvm::Module&) ()
from /usr/bin/../lib/libLLVM-4.0.so
  #12 0x00007ffff532f584 in llvm::legacy::PassManagerImpl::run(llvm::Module&)
() from /usr/bin/../lib/libLLVM-4.0.so
  #13 0x000000000041eb46 in ?? ()
  #14 0x0000000000413870 in main ()

This doesn't seem to happen in the minimal case if either:

- All the code is in `f1`
- The result of the `icmp` in `f2` is true (can be done e.g. by passing
`@B_Inst` to `f2`)
- Both aggregates in the `phi` node in `f2` have the same value
- The `phi` node operands are numbers instead of aggregates
- The `icmp` operands are numbers instead of aggregates

For reference, this bug was originally found in the Pony compiler (additional
details can be found here: https://github.com/ponylang/ponyc/issues/1919). The
attached minimal case wasn't generated by the Pony compiler.

-- 
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/20170518/6c11caea/attachment.html>


More information about the llvm-bugs mailing list