Adjust literal pool offset in Thumb-2 movsi patterns
authorWilco Dijkstra <wdijkstr@arm.com>
Tue, 30 Jul 2019 15:27:04 +0000 (15:27 +0000)
committerWilco Dijkstra <wilco@gcc.gnu.org>
Tue, 30 Jul 2019 15:27:04 +0000 (15:27 +0000)
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

gcc/ChangeLog
gcc/config/arm/thumb2.md
gcc/config/arm/vfp.md

index 41cfa85f13c07ef2b1c13b70cee66d2a9a69969f..427c2573a1a36e2e1d572292de6122fc5e09744d 100644 (file)
@@ -1,3 +1,8 @@
+2019-07-30  Wilco Dijkstra  <wdijkstr@arm.com>
+
+       * config/arm/thumb2.md (thumb2_movsi_insn): Adjust literal offset.
+       * config/arm/vfp.md (thumb2_movsi_vfp): Likewise.
+
 2019-07-30  Martin Liska  <mliska@suse.cz>
 
        PR ipa/89330
index a4e094f67c6950d67d09040fdc19d285bbd7475b..608ea70a5d09ba5231f774e974ea7c6cddeb51b3 100644 (file)
    (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,*")]
 )
 
index 9cc5946c79e027c0132d2b5e4fd6b97f13bca72e..661919e2357d352d12ff1020dc061f0c8d052841 100644 (file)
    (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,*")]
 )