<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/154056>154056</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Store to null buffer fat pointers asserts in SelectionDAG
</td>
</tr>
<tr>
<th>Labels</th>
<td>
backend:AMDGPU,
crash-on-valid
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
krzysz00
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
arsenm
</td>
</tr>
</table>
<pre>
Both of these functions fail in different places:
```
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 < %s
define void @store_null_null_use_buffer_fat_ptr() {
store i32 0, ptr addrspace(7) null, align 4
ret void
}
define void @store_null_buffer_resource() {
store i32 0, ptr addrspace(8) null, align 4
ret void
}
```
The first one fails trying to use a non-integer type in getConstant, the second fails in the legalizer
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyMU8GOmzAU_BpzeSJybFiSAweSKHtqVXW758jYD3DX2Mh-RM1-fQWL1L1tJQMS4Jl5M2OVku09Ys3KExPiLb4_0jvnTAhWXjI10xBirWJCP2ZtMI_6FGiA0AENmBC62WuywSfolHVgPRjbdRjRE0xOaUxMNoyv64lvizdMnuDn63cmG3BOQz5StJNDJi9qNL32uRrNcg1JQT7qaWby0nd_jpwDk2dgokwfoAY76xHuwRpgBU8UIt787NzHbU54a-dF0K1TdJsoMnFg4gisOjHeAKwbwEoBnIkzTBRBGRPTpDQycaiWfxek5aNytvdQrPsi0kq6qKguX2nZJERMYY4r8CcNX0g4_L-Ezwbz5teA0NmYCILHNZ4EFB_W90AB5oSgwAefW0_YYwR6TLgE2COdg0-kPC2UNCAk1MGbDcP69Z3DXjn7jjEztTRHeVQZ1vuqLIvDUe5FNtSt4kVXSCO7TihZtKWssBUHoQulDO4xs7XgouSH_YHLstyLHS-KypSdrrTm6lgdWcFxVNbtnLuPuxD7zKY0Y70vC14-ZU616NLW3FbpN_SGyab5dnn-8bo0WJyZEDqqNOTB53flrNmKHesFMm_nPrGCO5so_SMhSw7rlzUXCqv58BEhdIpgCotlMYFKCSOtjrygw_UgXJrnbI6uHoimtfviysS1tzTM7U6HkYnrwrM98imG36iJies6WWLiug13r8XfAAAA___EhSbf">