<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 --- - Backend crash when emitting optimized code with debug info"
   href="http://llvm.org/bugs/show_bug.cgi?id=20416">20416</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Backend crash when emitting optimized code with debug info
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </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>Backend: PTX
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>eliben@gmail.com
          </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=12814" name="attach_12814" title="reproducer">attachment 12814</a> <a href="attachment.cgi?id=12814&action=edit" title="reproducer">[details]</a></span>
reproducer

Sample IR file attached.

--------------

llc -march=nvptx -o z.ptx compute.optimized.ll 
llc: /media/SSD1/llvm/llvm_svn_rw/include/llvm/MC/MCRegisterInfo.h:316: const
llvm::MCRegisterDesc& llvm::MCRegisterInfo::operator[](unsigned int) const:
Assertion `RegNo < NumRegs && "Attempting to access record for invalid register
number!"' failed.
0  llc             0x0000000001c24431 llvm::sys::PrintStackTrace(_IO_FILE*) +
38
1  llc             0x0000000001c246ae
2  llc             0x0000000001c2405d
3  libpthread.so.0 0x00007f53d1faccb0
4  libc.so.6       0x00007f53d0dcc425 gsignal + 53
5  libc.so.6       0x00007f53d0dcfb8b abort + 379
6  libc.so.6       0x00007f53d0dc50ee
7  libc.so.6       0x00007f53d0dc5192
8  llc             0x0000000000b6ed4c
9  llc             0x0000000000b6ed8a
10 llc             0x0000000000bfc8e5
11 llc             0x00000000014806fb
12 llc             0x0000000001480d3d llvm::AsmPrinter::EmitFunctionBody() +
925
13 llc             0x0000000000b6ac79
14 llc             0x00000000015cf517
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 95
15 llc             0x0000000001b1c874
llvm::FPPassManager::runOnFunction(llvm::Function&) + 290
16 llc             0x0000000001b1c9e4
llvm::FPPassManager::runOnModule(llvm::Module&) + 84
17 llc             0x0000000001b1cd38
18 llc             0x0000000001b1d3e2
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 244
19 llc             0x0000000001b1d601
llvm::legacy::PassManager::run(llvm::Module&) + 39
20 llc             0x0000000000a5c14e
21 llc             0x0000000000a5b409 main + 237
22 libc.so.6       0x00007f53d0db776d __libc_start_main + 237
23 llc             0x0000000000a58d79
Stack dump:
0.    Program arguments:
/usr/local/google/home/eliben/llvm/build/svn-make-debug/Debug+Asserts/bin/llc
-march=nvptx -o z.ptx compute.optimized.ll 
1.    Running pass 'Function Pass Manager' on module 'compute.optimized.ll'.
2.    Running pass 'NVPTX Assembly Printer' on function '@foo'
Aborted (core dumped)

--------------


The crash goes away if verbose asm output is disabled.</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>