Files
hev d54ecc1aec [lld][LoongArch] Prevent relaxation oscillation for LA.PCRel and CALL (#226713)
Relaxation of pcalau12i+addi (relaxPCHi20Lo12, isInt<22>) and
call36/call30 (relaxMediumCall, isInt<28>) can oscillate: shrinking one
section moves a symbol, which flips isInt<N> for other sites and changes
bytesDropped again.

Follow the same approach as RISCV::relaxCall: after a few passes, do not
allow remove to increase beyond the previous pass's value (cur - delta).
Pass that cap as prevRemove into the two helpers; range checks may still
clear remove (0) when the target goes out of range.

Fixes #226712

(cherry picked from commit 32757891963d7a544dbcf6a52e8f7a7c67e273aa)
2026-10-05 17:28:10 +02:00
..
…