This backport contains 1 patch from gcc main stream tree. The commit id of these patchs list as following in the order of time. AArch64-Fix-cost-of-plus-.-const_int-C.patch: commit 835d50c66aa5bde2f354a6e63a2afa7d2f76a05a diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 56a4a47db73..71d44de1d0a 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -10753,7 +10753,7 @@ cost_plus: } if (GET_MODE_CLASS (mode) == MODE_INT - && ((CONST_INT_P (op1) && aarch64_uimm12_shift (INTVAL (op1))) + && (aarch64_plus_immediate (op1, mode) || aarch64_sve_addvl_addpl_immediate (op1, mode))) { *cost += rtx_cost (op0, mode, PLUS, 0, speed);