<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - NVPTX crash on i128"
   href="https://bugs.llvm.org/show_bug.cgi?id=51789">51789</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>NVPTX crash on i128
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>12.0
          </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>release blocker
          </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>lightborn@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=25239" name="attach_25239" title="bitcode with CUDA code">attachment 25239</a> <a href="attachment.cgi?id=25239&action=edit" title="bitcode with CUDA code">[details]</a></span>
bitcode with CUDA code

Run llc on attached bitcode. 

The i128 type is unsupported in the NVPTX printer. I was unable to create a
smaller test case, but at least the error seems very straightfoward. i128 works
in other contexts, but not this one.


unsupported integer const type
UNREACHABLE executed at
/home/sean/projects/circle4/llvm-project/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp:1845!
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace.
Stack dump:
0.      Program arguments: ../llvm-build-debug/bin/llc fmt.bc
1.      Running pass 'Function Pass Manager' on module 'fmt.bc'.
2.      Running pass 'NVPTX Assembly Printer' on function '@_Z7kernelsnn'
 #0 0x000000000481ee7c llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
/home/sean/projects/circle4/llvm-project/llvm/lib/Support/Unix/Signals.inc:565:11
 #1 0x000000000481f04b PrintStackTraceSignalHandler(void*)
/home/sean/projects/circle4/llvm-project/llvm/lib/Support/Unix/Signals.inc:632:1
 #2 0x000000000481ce76 llvm::sys::RunSignalHandlers()
/home/sean/projects/circle4/llvm-project/llvm/lib/Support/Signals.cpp:70:5
 #3 0x000000000481f847 SignalHandler(int)
/home/sean/projects/circle4/llvm-project/llvm/lib/Support/Unix/Signals.inc:407:1
 #4 0x00007f620c9d43c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
 #5 0x00007f620c49918b raise
/build/glibc-ZN95T4/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #6 0x00007f620c478859 abort /build/glibc-ZN95T4/glibc-2.31/stdlib/abort.c:81:7
 #7 0x00000000047465e0 llvm::install_out_of_memory_new_handler()
/home/sean/projects/circle4/llvm-project/llvm/lib/Support/ErrorHandling.cpp:183:0
 #8 0x00000000020cfd20 llvm::NVPTXAsmPrinter::bufferLEByte(llvm::Constant
const*, int, llvm::NVPTXAsmPrinter::AggBuffer*)
/home/sean/projects/circle4/llvm-project/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp:0:7
 #9 0x00000000020cf35f
llvm::NVPTXAsmPrinter::bufferAggregateConstant(llvm::Constant const*,
llvm::NVPTXAsmPrinter::AggBuffer*)
/home/sean/projects/circle4/llvm-project/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp:1939:63
#10 0x00000000020d0122 llvm::NVPTXAsmPrinter::bufferLEByte(llvm::Constant
const*, int, llvm::NVPTXAsmPrinter::AggBuffer*)
/home/sean/projects/circle4/llvm-project/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp:1889:11
#11 0x00000000020cf0f5
llvm::NVPTXAsmPrinter::bufferAggregateConstant(llvm::Constant const*,
llvm::NVPTXAsmPrinter::AggBuffer*)
/home/sean/projects/circle4/llvm-project/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp:1922:63
#12 0x00000000020cda1d
llvm::NVPTXAsmPrinter::printModuleLevelGV(llvm::GlobalVariable const*,
llvm::raw_ostream&, bool)
/home/sean/projects/circle4/llvm-project/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp:1188:11
#13 0x00000000020c8df9 llvm::NVPTXAsmPrinter::emitGlobals(llvm::Module const&)
/home/sean/projects/circle4/llvm-project/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp:828:5
#14 0x00000000020c8646 llvm::NVPTXAsmPrinter::emitFunctionEntryLabel()
/home/sean/projects/circle4/llvm-project/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp:448:5
#15 0x000000000316a94c llvm::AsmPrinter::emitFunctionHeader()
/home/sean/projects/circle4/llvm-project/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:787:3
#16 0x000000000316bcd3 llvm::AsmPrinter::emitFunctionBody()
/home/sean/projects/circle4/llvm-project/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1160:3
#17 0x0000000001c0e74c
llvm::AsmPrinter::runOnMachineFunction(llvm::MachineFunction&)
/home/sean/projects/circle4/llvm-project/llvm/include/llvm/CodeGen/AsmPrinter.h:345:5
#18 0x00000000020c9d27
llvm::NVPTXAsmPrinter::runOnMachineFunction(llvm::MachineFunction&)
/home/sean/projects/circle4/llvm-project/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp:482:8
#19 0x000000000355009f
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
/home/sean/projects/circle4/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:72:8
#20 0x0000000003c3ebe4 llvm::FPPassManager::runOnFunction(llvm::Function&)
/home/sean/projects/circle4/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1435:27
#21 0x0000000003c44fb5 llvm::FPPassManager::runOnModule(llvm::Module&)
/home/sean/projects/circle4/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1481:16
#22 0x0000000003c3f7bf (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
/home/sean/projects/circle4/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1550:27
#23 0x0000000003c3f1c5 llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/sean/projects/circle4/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:541:16
#24 0x0000000003c452f1 llvm::legacy::PassManager::run(llvm::Module&)
/home/sean/projects/circle4/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1677:3
#25 0x0000000000e2d481 compileModule(char**, llvm::LLVMContext&)
/home/sean/projects/circle4/llvm-project/llvm/tools/llc/llc.cpp:684:8
#26 0x0000000000e2abff main
/home/sean/projects/circle4/llvm-project/llvm/tools/llc/llc.cpp:385:22
#27 0x00007f620c47a0b3 __libc_start_main
/build/glibc-ZN95T4/glibc-2.31/csu/../csu/libc-start.c:342:3
#28 0x0000000000e2a1be _start (../llvm-build-debug/bin/llc+0xe2a1be)</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>