[llvm] [bolt][aarch64] test to reproduce the issue with ldr reg, literal (PR #165723)

Maksim Panchenko via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 30 16:05:25 PDT 2025


maksfb wrote:

@yavtuk, great idea! If this is integrated into `SimplifyRODataLoads` pass then it makes sense to run it by default when it's strictly beneficial to do so. I.e., I consider replacing `LDR` with one or two `MOVK` to be a performance benefit. For more instructions in case of 64-bit load it's more complicated. #137413 is relevant to immediate generation on AArch64.

Extra step on top will be elimination of the constant island that is no longer referenced.

Running `LDR`-relaxation pass afterwords will catch cases where the simplification is not possible or is not the best option. We will make use of both passes.

https://github.com/llvm/llvm-project/pull/165723


More information about the llvm-commits mailing list