[PATCH] D57240: [RISCV] Don't incorrectly force relocation for %pcrel_lo
James Clarke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 5 08:25:43 PST 2019
jrtc27 added a comment.
Herald added a project: LLVM.
Could we not have a situation where the pcrel_hi20 is seen *after* the lo12, in which case the lo12 would be forced but the hi20 could still be evaluated? E.g. I think the following would be problematic:
foo:
j 1f
0: addi a0, a0, %pcrel_lo(1f)
ret
1: auipc a0, %pcrel_hi(bar)
j 0b
.align 2
bar:
# ...
Obviously extremely pathological code, but nonetheless valid.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57240/new/
https://reviews.llvm.org/D57240
More information about the llvm-commits
mailing list