From: Wilco Dijkstra Date: Tue, 30 Jul 2019 15:27:04 +0000 (+0000) Subject: Adjust literal pool offset in Thumb-2 movsi patterns X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cefbac6ec744761110e337c4b51b96a236916ba1;p=gcc.git Adjust literal pool offset in Thumb-2 movsi patterns My previous change to the Thumb-2 movsi patterns caused a codesize regression with -Os in large functions. Fix this by using the literal pool offset of the 16-bit literal load so that the literal pool is dumped earlier, reducing the number of 32-bit literal loads. Bootstrap & regress OK on arm-none-linux-gnueabihf --with-cpu=cortex-a57 gcc/ * config/arm/thumb2.md (thumb2_movsi_insn): Adjust literal offset. * config/arm/vfp.md (thumb2_movsi_vfp): Likewise. From-SVN: r273911 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 41cfa85f13c..427c2573a1a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-07-30 Wilco Dijkstra + + * config/arm/thumb2.md (thumb2_movsi_insn): Adjust literal offset. + * config/arm/vfp.md (thumb2_movsi_vfp): Likewise. + 2019-07-30 Martin Liska PR ipa/89330 diff --git a/gcc/config/arm/thumb2.md b/gcc/config/arm/thumb2.md index a4e094f67c6..608ea70a5d0 100644 --- a/gcc/config/arm/thumb2.md +++ b/gcc/config/arm/thumb2.md @@ -274,7 +274,7 @@ (set_attr "length" "2,4,2,4,4,4,4") (set_attr "predicable" "yes") (set_attr "predicable_short_it" "yes,no,yes,no,no,no,no") - (set_attr "pool_range" "*,*,*,*,*,4094,*") + (set_attr "pool_range" "*,*,*,*,*,1018,*") (set_attr "neg_pool_range" "*,*,*,*,*,0,*")] ) diff --git a/gcc/config/arm/vfp.md b/gcc/config/arm/vfp.md index 9cc5946c79e..661919e2357 100644 --- a/gcc/config/arm/vfp.md +++ b/gcc/config/arm/vfp.md @@ -297,7 +297,7 @@ (set_attr "predicable_short_it" "yes,no,yes,no,no,no,no,no,no,no,no,no") (set_attr "type" "mov_reg,mov_reg,mov_reg,mvn_reg,mov_imm,load_4,store_4,f_mcr,f_mrc,fmov,f_loads,f_stores") (set_attr "length" "2,4,2,4,4,4,4,4,4,4,4,4") - (set_attr "pool_range" "*,*,*,*,*,4094,*,*,*,*,1018,*") + (set_attr "pool_range" "*,*,*,*,*,1018,*,*,*,*,1018,*") (set_attr "neg_pool_range" "*,*,*,*,*, 0,*,*,*,*,1008,*")] )