Commit 98117f1a authored by Craig Topper's avatar Craig Topper
Browse files

[RISCV] MC relaxation for out-of-range conditional branch.

If .L1 is not within +-4KiB range,

convert

```
bge a0, a1, .L1
```

to

```
blt a0, a1, 8
j   .L1
```

In this patch, if the symbol is unresolved at assembly time, do not do
this relaxation.

Fix the bug reported in https://bugs.llvm.org/show_bug.cgi?id=47910

Co-authored-by: Hsiangkai Wang

Reviewed By: asb

Differential Revision: https://reviews.llvm.org/D108961
parent c1928033
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment