[lld] [lld][LoongArch] Relax R_LARCH_PCALA_HI20 and R_LARCH_PCALA_LO12 (PR #112696)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 17 21:15:49 PDT 2024
================
@@ -744,6 +784,70 @@ void LoongArch::relocate(uint8_t *loc, const Relocation &rel,
}
}
+static bool relaxable(ArrayRef<Relocation> relocs, size_t i) {
+ return i + 1 != relocs.size() && relocs[i + 1].type == R_LARCH_RELAX;
----------------
ywgrit wrote:
> i + 1 ('<=' vs '!=' ?) relocs.size()
In the scenario here, it seems that i+1 < relocs.size() and i+1 ! = relocs.size() are equivalent?
https://github.com/llvm/llvm-project/pull/112696
More information about the llvm-commits
mailing list