<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/58640>58640</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [AMDGPU] can't select pointer dereference
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            backend:AMDGPU
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          DataCorrupted
      </td>
    </tr>
</table>

<pre>
    https://godbolt.org/z/7fe68Ev8P

When compiling the following code with `llc -mtriple=amdgcn`, the compiler complains "Cannot select: 0x55b665b71a90: i32,ch = load<(load (s32) from %ir.0)> # D:1 0x55b665adab28, 0x55b665b71940, undef:i64"

```
define i32 @f(i32* %0) {
BB:
  %R = load i32, i32* %0
  ret i32 %R
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxdUsFu3CAQ_Rp8QVnZYGP74MPuOumpUlSp6hnD2KZlYQU4afv1HbybNIoE9gwzvHnzhsnrP8Oa0jUSfiTsCdfi9eRtOviwoPcXdzuD6B5fumdSjqQ83r4_VnBU-cvVWOMWmlags7fWv2ZPeQ301aSVElFaq-jDJQVztUD4KC96UQ7PCTvv124gEHbDSuMiJYydpXM-0QgWVEJytPzdNJMQzdRWsi_zieEMMRQW4SO1XmrCz4R12UKELuZwT-fgL-g2JhywZE_4I3qcjohQvYNKLSfWZUYfyvT1znFzGmbMNqJGXh81yE3c1u5imnGQaVFSlzNS2Bkec_VcmpL2dMs8nbLcu0lz9Nt7C_em6Meb97wA6YaN-ff67fiJSAFDJYToWF_VbaEHrnveyyKZZGEgzen4dfzy_J00I1XSEda-CUyv3riEM9AQYMbtFBRbsJ_fBo50mw44KHSsfXn7PVyD_5nnxJ5MjBtENJpO1GWxDmyuajE3sueCg5oq1reyVRw00uxEpQorJ7Axs0N5J6l-gcNJHu9UUfFmLMzASsaqkrVlWTa1OHA2d5wzrmTDO5g1Cg4Xaewh08lvtwjDzmzalohBa2KK_4MyRrM42DXJ-HJLqw_DKJM8-xC2awJd7K0Mex__APFp6Dw">