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

    <tr>
        <th>Summary</th>
        <td>
            AArch64: there seems to be a bug in DAGCombiner. 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

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

<pre>
    
I'm working on this issue https://github.com/llvm/llvm-project/issues/34101
while proceeding, I found bug when we doing shifting  array index by right 1.

here is example: 

```
int test(unsigned long long a, unsigned long long b, int *table) {    
  return table[(a * b) >> 1]; 
}
```

```
test(unsigned long long, unsigned long long, int*):                            // @test(unsigned long long, unsigned long long, int*)
        mul     x8, x1, x0
        lsl     x8, x8, #1
 and     x8, x8, #0xfffffffffffffffc
        ldr     w0, [x2, x8]
 ret
```

as you can see, we doing shifting array index by left 3.
I think this bug causes by we do not considering how shift amount to array index.  

how do you think?

ps. I wish take this issue to solve also :)

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykVM2yqygQfhrcdI0FqDFZuDA3NzPZzSugdJQJQgrwJHn7KdBTk5zJnMVcymqU_vtsvm7hvRoMYkOqPakOmZjDaF3zp3CXP4Tp5inrrHw0hB4IbU-E1xPcrLsoM4A1EEblQXk_I4whXD0pWsKPhB8HFca5y3s7EX7U-uNz--3q7F_YB8KPyc0TfixKRtmS4DYqjXB1tkeUygyE_4ATnO1sJHTzALcRDdwQpI0A_KjOIb6AcE48QBmJd-ge4NQwBmD5EnSRIzoE5QHvYrpqJEULz2qyoeuTPpUJENAHwrezSRWSoK0ZFiEirjfnXTyProS3QXQaCd8BqfcAsCYDcBhmZ2BRV3vCtyKaR98dkOInKX4CI9WBFPtPgPXhLca3h_8J-j3kFTDhLeG7WJNv1nKzQEr6S0nWOixrmnXa79todGdJ0lcb7V9skiS8WCkDwsh3ano_v67-S1Tp0n6jyaHa3_nqX63ljlf1TeGFh4edoRcGPGL0_Tcxv_BS4zlAsdLyFLvHXJYeiuTuxezRR7sUCIwN0FvjlUQXg432tkQGMdk5EtQ-J8jhhdDRWtoEMeUhxfFZffU5nOCm_AhBXPC5k4MFb_UHgtDeQmrp9dYy2RRyV-xEhg2rWVFUVbXdZmPDK8kqhkyKsuZVT0tkVV_21aaQsitFnamGU17SktWM0w2v8w1jOyGF6ATW203ZkZLiJJTO45TIrRuyBKbZ7uiGZVp0qP3njHJNGiXdPHhSUq188P-4BRU0Nm3r-nFTRkaH1PkecfLx1zoEkcqtDBza33_YqVMGXQ7Z7HTz_6dYAvp3AAAA__9j45PN">