<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Crash when compiling weirdly ordered stacksave/restore pair"
   href="http://llvm.org/bugs/show_bug.cgi?id=22333">22333</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Crash when compiling weirdly ordered stacksave/restore pair
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jaak.randmets@cyber.ee
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=13735" name="attach_13735" title="File t.ll that crashes llc">attachment 13735</a> <a href="attachment.cgi?id=13735&action=edit" title="File t.ll that crashes llc">[details]</a></span>
File t.ll that crashes llc

I'm not quite sure if this code is even well-formed LLVM code. It was produced
by linking custom generated LLVM with some Clang generated LLVM code and
running "opt -O3" on it. Unfortunately I'm not able to post the full source
code but only the bugpoint simplified code (if needed I might be able to figure
something out).

Note that when the blocks foo and bar are swapped the crash does not happen. If
instead of the given intrinsics regular functions are called the crash also
does not happen.

The code is attached and "llc t.ll" will produce the following stack trace:
#0 0x1438ccc llvm::sys::PrintStackTrace(_IO_FILE*)
llvm.svn/lib/Support/Unix/Signals.inc:423:0
#1 0x1438f76 PrintStackTraceSignalHandler(void*)
llvm.svn/lib/Support/Unix/Signals.inc:481:0
#2 0x1437a69 SignalHandler(int) llvm.svn/lib/Support/Unix/Signals.inc:198:0
#3 0x7f0e7930aca0 (/lib64/libpthread.so.0+0xfca0)
#4 0x999c4a llvm::MachineInstr::getNumOperands() const
llvm.svn/include/llvm/CodeGen/MachineInstr.h:284:0
#5 0xda5829 llvm::MachineInstr::findRegisterUseOperandIdx(unsigned int, bool,
llvm::TargetRegisterInfo const*) const
llvm.svn/lib/CodeGen/MachineInstr.cpp:1140:0
#6 0x9f5d9a llvm::MachineInstr::readsRegister(unsigned int,
llvm::TargetRegisterInfo const*) const
llvm.svn/include/llvm/CodeGen/MachineInstr.h:842:0
#7 0xe8ac0c (anonymous
namespace)::RegisterCoalescer::joinReservedPhysReg(llvm::CoalescerPair&)
llvm.svn/lib/CodeGen/RegisterCoalescer.cpp:1444:0
#8 0xe8f147 (anonymous
namespace)::RegisterCoalescer::joinIntervals(llvm::CoalescerPair&)
llvm.svn/lib/CodeGen/RegisterCoalescer.cpp:2551:0
#9 0xe8a00a (anonymous
namespace)::RegisterCoalescer::joinCopy(llvm::MachineInstr*, bool&)
llvm.svn/lib/CodeGen/RegisterCoalescer.cpp:1307:0
#10 0xe8f4b3 (anonymous
namespace)::RegisterCoalescer::copyCoalesceWorkList(llvm::MutableArrayRef<llvm::MachineInstr*>)
llvm.svn/lib/CodeGen/RegisterCoalescer.cpp:2622:0
#11 0xe8f7a5 (anonymous
namespace)::RegisterCoalescer::copyCoalesceInMBB(llvm::MachineBasicBlock*)
llvm.svn/lib/CodeGen/RegisterCoalescer.cpp:2663:0
#12 0xe8fbba (anonymous namespace)::RegisterCoalescer::joinAllIntervals()
llvm.svn/lib/CodeGen/RegisterCoalescer.cpp:2692:0
#13 0xe8ff65 (anonymous
namespace)::RegisterCoalescer::runOnMachineFunction(llvm::MachineFunction&)
llvm.svn/lib/CodeGen/RegisterCoalescer.cpp:2751:0
#14 0xd9f3b3 llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
llvm.svn/lib/CodeGen/MachineFunctionPass.cpp:34:0
#15 0x10d0ea7 llvm::FPPassManager::runOnFunction(llvm::Function&)
llvm.svn/lib/IR/LegacyPassManager.cpp:1530:0
#16 0x10d1039 llvm::FPPassManager::runOnModule(llvm::Module&)
llvm.svn/lib/IR/LegacyPassManager.cpp:1550:0
#17 0x10d137b (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&)
llvm.svn/lib/IR/LegacyPassManager.cpp:1608:0
#18 0x10d1a3a llvm::legacy::PassManagerImpl::run(llvm::Module&)
llvm.svn/lib/IR/LegacyPassManager.cpp:1715:0
#19 0x10d1c5b llvm::legacy::PassManager::run(llvm::Module&)
llvm.svn/lib/IR/LegacyPassManager.cpp:1749:0
#20 0x982c3e compileModule(char**, llvm::LLVMContext&)
llvm.svn/tools/llc/llc.cpp:350:0
#21 0x981d73 main llvm.svn/tools/llc/llc.cpp:199:0
#22 0x7f0e78539f60 __libc_start_main (/lib64/libc.so.6+0x1ff60)
#23 0x97ee59 _start (/home/jaak/usr/bin/llc+0x97ee59)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>