]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
All cores which add a cpu_addrcost_table use a non-zero value for HI and TI...
authorWilco Dijkstra <wdijkstr@arm.com>
Thu, 4 May 2017 17:05:28 +0000 (17:05 +0000)
committerWilco Dijkstra <wilco@gcc.gnu.org>
Thu, 4 May 2017 17:05:28 +0000 (17:05 +0000)
All cores which add a cpu_addrcost_table use a non-zero value for
HI and TI mode shifts (a non-zero value for general indexing also
applies to all shifts).  Given this, it makes no sense to use a
different setting in generic_addrcost_table.  So change it so that
all supported cores, including -mcpu=generic, now generate the same:

int f(short *p, short *q, long x) { return p[x] + q[x]; }

        lsl     x2, x2, 1
        ldrsh   w3, [x0, x2]
        ldrsh   w0, [x1, x2]
        add     w0, w3, w0
        ret

    gcc/
* config/aarch64/aarch64.c (generic_addrcost_table):
Change HI/TI mode setting.

From-SVN: r247606

gcc/ChangeLog
gcc/config/aarch64/aarch64.c

index a59b8227ee31a31ffc9ca12833f02f3ecf5874b8..b344a90a484fb73c70337af7123b53d5294964a9 100644 (file)
@@ -1,3 +1,8 @@
+2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
+
+       * config/aarch64/aarch64.c (generic_addrcost_table):
+       Change HI/TI mode setting.
+
 2017-05-04  Martin Jambor  <mjambor@suse.cz>
 
        PR tree-optimization/80622
index 43fc928b4602d9181bfedf99ca2edd3e241f007d..ee056c6fe6802ee978c67ed7877f0d4c18b75752 100644 (file)
@@ -193,10 +193,10 @@ static const struct aarch64_flag_desc aarch64_tuning_flags[] =
 static const struct cpu_addrcost_table generic_addrcost_table =
 {
     {
-      0, /* hi  */
+      1, /* hi  */
       0, /* si  */
       0, /* di  */
-      0, /* ti  */
+      1, /* ti  */
     },
   0, /* pre_modify  */
   0, /* post_modify  */