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

    <tr>
        <th>Summary</th>
        <td>
            [RISCV] Remove setting the Value of the MemOperand to null in RISCVTargetLowering::LowerFormalArguments
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            backend:RISC-V,
            llvm:globalisel
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
            asb,
            topperc
      </td>
    </tr>

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

<pre>
    It is unclear why the following code exists in `RISCVTargetLowering::LowerFormalArguments`:

```
cast<StoreSDNode>(Store.getNode())
->getMemOperand()
->setValue((Value *)nullptr);
```

It is being introduced into GISel in https://github.com/llvm/llvm-project/pull/73064/ for parity reasons.

@asb could you provide some context on why it was originally needed? Can it be removed in both SDAG and GISel? 

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUk01v4ywQgH8NvowaYXDi5OBDmtRVpfdDala98zG12cVgAW6af7-CpK1W2kslhBkGhOfhQcRoBofYkfU9YUxESRgj7EAYS36eMagcr4-VWNLoQzcZNQq0kzDJCqcr6fWle0pgIixOWRQBzuMF0ojw6q31Z-MGUF4j4LuJKYJxQDb0-el0ePkhwoDpH3_GYNxA-J7wfYl6HyZh92FYJnQpkg3NSXok9KPf0FsroRIxEX44JR_wdPzPayT8gbBtmVgNmMoU2xK2y63suSP8YcD0L07_zxiE07f8ZzJiehF2ue7bliEQtids5xZr5xTyan7_1x-69lcsEjMC41LwelGo89DD49MJbYYxpjTHXB7rCesHk8ZFrpSfCOutffv43M3B_0SVCOvnxVrC-pbTTUNYD68-wCyCSRcIKKJ3cfUHqoaKKEH5xWq4-AXm4N-MRoh-QlDeJXxP4F25NpPgLCL4YAbjhLUXcIgaNeE9HITLeYkQcPJvpRCQPo1wOu4fQTh9LSqvvR5d6Y7rHd-JCru6pTVjvGnrauw2jKpWqZaKdsekbni9U1q2mm2bLWvVpjIdo4zXNdtRRhter-paUoVq3QpFUbCaNBQnYewqw1n5MFQmxgW7lrd8XVkh0cab0lKoX-g04fss3d3Lp98FL98P1kthTUR7Mz10hbhchkgaarO1X8ckk2x5LMVgsj7Cc6EBEVPKF53Nv8riX0vwZRgkD9mdDO5bD6Bagu2-LUohEosqLV__DgAA__-VMTxv">