<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [RISCV] Handle long conditional branch"
   href="https://bugs.llvm.org/show_bug.cgi?id=47910">47910</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[RISCV] Handle long conditional branch
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>Hsiangkai@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=24079" name="attach_24079" title="Test file for long conditional branch.">attachment 24079</a> <a href="attachment.cgi?id=24079&action=edit" title="Test file for long conditional branch.">[details]</a></span>
Test file for long conditional branch.

For RISC-V conditional branch, the branch targets should be within +-4K off pc.
If the branch target is out of range, one possible solution is to relax it
using other instructions. In current RISC-V implementation, we only issue error
messages for users. It looks like

$ llvm-mc -arch=riscv64 -filetype=obj test.s
test-2.s:4:9: error: fixup value out of range
        bne     a0, a1, .L1
        ^
test-2.s:10:9: error: fixup value out of range
        beqz    a0, .L2
        ^

We should help users to relax conditional branches if possible.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>