[ARM] error: out of range pc-relative fixup value
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
The attached IR file triggers this error message in the assembler backend when compiled for AArch32. The original version of this was compiled from C++ source code which doesn't use inline assembly, or do anything else which could legitimately trigger this error.
https://godbolt.org/z/ceqTzKxW3
```
$ /work/llvm/build/bin/llc -filetype=obj < reduced.ll
:0: error: out of range pc-relative fixup value
```
Compiling and assembling separately gives a slightly clearer error message, it looks like a constant pool has been places out of range from a floating-point load:
```
$ /work/llvm/build/bin/llc -filetype=asm < reduced.ll > test.s
$ /work/llvm/build/bin/llvm-mc --triple=armv8a -filetype=obj < test.s
:61:11: error: out of range pc-relative fixup value
vldr s2, .LCPI0_1
^
```
[reduced.ll.txt](https://github.com/user-attachments/files/26605166/reduced.ll.txt)
[test.s.txt](https://github.com/user-attachments/files/26605225/test.s.txt)
Contributor guide
Research direction
Start by reproducing the AArch32 case with reduced.ll using llc, then compare the assembly in test.s and the separate llvm-mc step. Inspect the vldr constant-pool reference at test.s line 61 and determine why it is out of range. Done means the reduced input assembles successfully without the pc-relative fixup error.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100