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

    <tr>
        <th>Summary</th>
        <td>
            [RISC-V] Assertion when using li with a symbol difference
        </td>
    </tr>

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

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

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

<pre>
    `Assertion `FixupKind != RISCV::fixup_riscv_invalid && "Unhandled expression!"'`

```asm
li t1, .Ltrap_vector_end - .Ltrap_vector

.global trap_vector
trap_vector:
.Ltrap_vector:
nop
nop
.global trap_vector_end
trap_vector_end:
.Ltrap_vector_end:
```
It appears this resulted in `error: operand must be a constant 64-bit integer` until recently: See https://godbolt.org/z/WKPEMsGTe
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsUt1u2zwMfRr5hkhgy7bSXPgiX_N5KNoBw7p1l4F-GFubLBminLZ7-sFOt_4ChiUdkofkwZFEtvOIDav_Y_U-k1PqQ2xktLqX0VDwmQrmsWEi3xFhTDZ4YCJv7cM0XltvgPGClXv4enV7ecfKHSt3xzl2iJb06WD9STo7ZwnGBTDOv_teeuPQAD6MEYls8DMH54xvmMhZvmf57ukv8vMnaTgjzkIqGL-E9U2KcjycUKcQD-gNrF5jL3nWnQtKOngXfgmUf5NvPkJ9GN9cPiCd53hHvIAfkr-K_Nv1_LxKIMcRZSRIvSWISJNLaMAu-mOMy3AQRozSGxgmSqAQJOjgKUmfQFQrZRNYn7DDyEQOk0_WQUSNPrnHufwWEfqURprn4C3jbReMCi6tQ-wYb38z3v64_vL_Z_r0DTPTlGZbbmWGTSG2xUZciKrK-kYcS5SVMWpzPF5slSm0khK326LQG13qIrMNz3mZXxRFUVdVXq1NoYRUJWqjTC11zaocB2nd2rnTMPfOLNGEjagELzMnFTpaPMq5kvrXWbjZc6u72Tn1PovNXLpSU0esyp2lRM9kySa3ePyppN7Ds53ve_QwkfUdOAv3NvUggR4HFRwYezxiRK8xm6Jr3khlUz-ptQ4D4-3c6-lYjTH8RJ0Yb5ctiPF2WeRPAAAA__9Zwxds">