<html>
    <head>
      <base href="https://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 --- - [amdgcn--amdhsa] AMDGPUAsmPrinter::EmitGlobalVariable unknown linkage type"
   href="https://llvm.org/bugs/show_bug.cgi?id=26898">26898</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[amdgcn--amdhsa] AMDGPUAsmPrinter::EmitGlobalVariable unknown linkage type
          </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>zhenlinospirit@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=16017" name="attach_16017" title="reduced case for the bug">attachment 16017</a> <a href="attachment.cgi?id=16017&action=edit" title="reduced case for the bug">[details]</a></span>
reduced case for the bug

Dear developer,

I compiled the OpenCL kernel with the libclc(Commit d2b49f)+llvm trunk. There
is something like a lookup table in addrspace(2) used by exp. 

The llc will crash when handling this case. The command I issue is 
llc -mtriple=amdgcn--amdhsa -filetype=asm test.ll -o test.s.

The message I got is

unknown linkage type
UNREACHABLE executed at
/home/phi/compiler/llvm-trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:142!
#0 0x0000000000fa9535 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/local/bin/llc+0xfa9535)
#1 0x0000000000fa72e6 llvm::sys::RunSignalHandlers()
(/usr/local/bin/llc+0xfa72e6)
#2 0x0000000000fa7511 SignalHandler(int) (/usr/local/bin/llc+0xfa7511)
#3 0x00007f076de90340 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10340)
#4 0x00007f076d2becc9 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x36cc9)
#5 0x00007f076d2c20d8 abort (/lib/x86_64-linux-gnu/libc.so.6+0x3a0d8)
#6 0x0000000000f64a6c (/usr/local/bin/llc+0xf64a6c)
#7 0x000000000074e313
llvm::AMDGPUAsmPrinter::EmitGlobalVariable(llvm::GlobalVariable const*)
(/usr/local/bin/llc+0x74e313)
#8 0x000000000091558f llvm::AsmPrinter::doFinalization(llvm::Module&)
(/usr/local/bin/llc+0x91558f)
#9 0x0000000000c6d60b llvm::FPPassManager::doFinalization(llvm::Module&)
(/usr/local/bin/llc+0xc6d60b)
#10 0x0000000000c77927 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/usr/local/bin/llc+0xc77927)
#11 0x00000000005b212b compileModule(char**, llvm::LLVMContext&)
(/usr/local/bin/llc+0x5b212b)
#12 0x0000000000593358 main (/usr/local/bin/llc+0x593358)
#13 0x00007f076d2a9ec5 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21ec5)
#14 0x00000000005aa1ba _start (/usr/local/bin/llc+0x5aa1ba)
Stack dump:
0.      Program arguments: llc -mtriple=amdgcn--amdhsa -mcpu=kaveri
-filetype=asm bugpoint-reduced-simplified.bc -o x.s 

The bugpoint-reduced case is attached.

Thanks.

Best regards,
Li, Hong-Yu</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>