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

    <tr>
        <th>Summary</th>
        <td>
            [AArch64] Copy and paste error in tryCombineMULLWithUZP1() fold
        </td>
    </tr>

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

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

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

<pre>
    This line: https://github.com/llvm/llvm-project/blob/fc95645e37f244c2fc155f1ee51047f90329e8c1/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp#L24580 Should be checking whether `RHS` is a bitcast, not `LHS`.

Despite a good bit of trying, I haven't managed to create a test case for this issue. The test coverage for this transform seems to be very bad -- if I delete the BITCAST checks in both branches entirely, all tests still pass.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUUkGP2ywU_DX48rQWYGzHBx-yiaIvUj6parKq1BvgZ0OXgAUkq_z7yt5ud6-9ANIwAzNvZEp28og9qZ9JvS_kLZsQe29frS5UGB79xdgEznok1RZMznMi1ZbwA-GHyWZzU6UOV8IPzt0_tqc5hl-oM-EH5YIi_DDqrm5EjVU7ciE0HzWr65Eh1oyKduxoxTvcaPZFxy68i4wTLjrbbdSmEZ-n4xndKbxhtH4q9TwTXp24qDcUzibc3AAKQRvUr9ZP8GYwG4xAGvr9vzNpKNgEEpTNWqZM-A58yAt6WtGS0D2h2_d1j2m2GUHCFMKwcCCMkOPD-mlhHsHIO3rC2wxX6eWEA-QAOqJcWRlTBi0Twhgi5CVNm9INS7gY_IOGO0Y5fbmRo_RpDPEKCfGaFkGFcMf4ACUHeHoCO8IRBnSYEbJBeD5edtvz5d1zAutBhWxARem1wQTos43oHsuXpXPrwwlSts7BLFMqi6Gvhq7qZIE9a1nbtpxtaGF6OcpGUakZp03HWhS80R3TXd0J1EywwvacckEb2jJRN5yWTDGh6ga7plEd5RURFK_SunKZbRniVKwJ9J1oG1Y4qdCltYCcK6lf0Q-k2v6dOF96Gfu1WOo2JSKosymnT7Vss1sb_MGp97AL8wOkHxZzGQFjDHFJJcfHLlyV9fj_y-n0w2bz8vMbI3xDeAdjcENxi67_556vhhLhh3dP957_DgAA__9NtRKI">