<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 - TargetLoweringBase::getRegClassFor Assertion "This value type is not natively supported!""
   href="https://bugs.llvm.org/show_bug.cgi?id=50941">50941</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>TargetLoweringBase::getRegClassFor Assertion "This value type is not natively supported!"
          </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>Common Code Generator Code
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>gcc.j.kelling@hzdr.de
          </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=24989" name="attach_24989" title="object file triggering linker error">attachment 24989</a> <a href="attachment.cgi?id=24989&action=edit" title="object file triggering linker error">[details]</a></span>
object file triggering linker error

When linking a code (single unit) compiled OpenMP target=amdgcn-amd-amdhsa with
trunk got the following ICE:

```
llc:
/home/kelling/checkout/llvm/trunk/llvm-project/llvm/include/llvm/CodeGen/TargetLowering.h:855:
virtual const llvm::TargetRegisterClass*
llvm::TargetLoweringBase::getRegClassFor(llvm::MVT, bool) const: Assertion `RC
&& "This value type is not natively supported!"' failed.
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:
/home/kelling/checkout/llvm/trunk/llvm-project/install/bin/llc
monteCarloIntegration.cpp-openmp-amdgcn-amd-amdhsa-gfx906-linked.bc
-mtriple=amdgcn-amd-amdhsa -mcpu=gfx906 -filetype=asm -o
monteCarloIntegration.cpp-openmp-amdgcn-amd-amdhsa-gfx906.s
1.      Running pass 'CallGraph Pass Manager' on module
'monteCarloIntegration.cpp-openmp-amdgcn-amd-amdhsa-gfx906-linked.bc'.
2.      Running pass 'AMDGPU DAG->DAG Pattern Instruction Selection' on
function '@_ZSt3loge'
 #0 0x0000560e8af24e3f PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
 #1 0x0000560e8af2268d SignalHandler(int) Signals.cpp:0:0
 #2 0x00007f06fc586980 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
 #3 0x00007f06fb22afb7 raise
/build/glibc-S9d2JN/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
 #4 0x00007f06fb22c921 abort /build/glibc-S9d2JN/glibc-2.27/stdlib/abort.c:81:0
 #5 0x00007f06fb21c48a __assert_fail_base
/build/glibc-S9d2JN/glibc-2.27/assert/assert.c:89:0
 #6 0x00007f06fb21c502 (/lib/x86_64-linux-gnu/libc.so.6+0x30502)
 #7 0x0000560e89c2a3db
(/home/kelling/checkout/llvm/trunk/llvm-project/install/bin/llc+0xac43db)
 #8 0x0000560e8ac52b4e llvm::FunctionLoweringInfo::CreateRegs(llvm::Type*,
bool)
(/home/kelling/checkout/llvm/trunk/llvm-project/install/bin/llc+0x1aecb4e)
 #9 0x0000560e8ac47cf6
llvm::FunctionLoweringInfo::InitializeRegForValue(llvm::Value const*)
(/home/kelling/checkout/llvm/trunk/llvm-project/install/bin/llc+0x1ae1cf6)
#10 0x0000560e8acce849 llvm::SelectionDAGISel::LowerArguments(llvm::Function
const&)
(/home/kelling/checkout/llvm/trunk/llvm-project/install/bin/llc+0x1b68849)
#11 0x0000560e8ad5553a
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(/home/kelling/checkout/llvm/trunk/llvm-project/install/bin/llc+0x1bef53a)
#12 0x0000560e8ad564eb
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(.part.958) SelectionDAGISel.cpp:0:0
#13 0x0000560e89d3f76a (anonymous
namespace)::AMDGPUDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
AMDGPUISelDAGToDAG.cpp:0:0
#14 0x0000560e8a307f26
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/home/kelling/checkout/llvm/trunk/llvm-project/install/bin/llc+0x11a1f26)
#15 0x0000560e8a785bf6 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/kelling/checkout/llvm/trunk/llvm-project/install/bin/llc+0x161fbf6)
#16 0x0000560e89ec6ae4 (anonymous
namespace)::CGPassManager::runOnModule(llvm::Module&) CallGraphSCCPass.cpp:0:0
#17 0x0000560e8a786d60 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/kelling/checkout/llvm/trunk/llvm-project/install/bin/llc+0x1620d60)
#18 0x0000560e897ff104 compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
#19 0x0000560e8977dc26 main
(/home/kelling/checkout/llvm/trunk/llvm-project/install/bin/llc+0x617c26)
#20 0x00007f06fb20dbf7 __libc_start_main
/build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:344:0
#21 0x0000560e897f661a _start
(/home/kelling/checkout/llvm/trunk/llvm-project/install/bin/llc+0x69061a)
clang-13: error: unable to execute command: Aborted (core dumped)
clang-13: error: amdgcn-link command failed due to signal (use -v to see
invocation)
clang version 13.0.0 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
b062fff87adcfa2e252cbce43d92b61b76614bd5)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/kelling/checkout/llvm/trunk/llvm-project/install/bin
clang-13: note: diagnostic msg: Error generating preprocessed source(s).
```

This can be reproduced using the attached object file with the command:
```
clang++  -fopenmp -fopenmp=libomp -fopenmp-targets=amdgcn-amd-amdhsa
-Xopenmp-target=amdgcn-amd-amdhsa -march=gfx906 --save-temps  -fopenmp
-fopenmp-version=40 monteCarloIntegration.cpp.o  -o monteCarloIntegration 
/usr/lib/x86_64-linux-gnu/librt.so
```</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>