aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorWilco Dijkstra <wdijkstr@arm.com>2017-10-30 18:46:02 +0000
committerWilco Dijkstra <wilco@gcc.gnu.org>2017-10-30 18:46:02 +0000
commitb832b29f6578d3171e41d084b7a8432a24c5bf62 (patch)
treebc8021aa242ff8a5c91571f998c0664543be9467 /gcc/gcc.c
parent0d1cf53834bdcbe23c20c872036754c028caaa06 (diff)
downloadgcc-b832b29f6578d3171e41d084b7a8432a24c5bf62.zip
gcc-b832b29f6578d3171e41d084b7a8432a24c5bf62.tar.gz
gcc-b832b29f6578d3171e41d084b7a8432a24c5bf62.tar.bz2
Remove DImode expansions for 1-bit shifts
A left shift of 1 can always be done using an add, so slightly adjust rtx cost for DImode left shift by 1 so that adddi3 is preferred in all cases, and the arm_ashldi3_1bit is redundant. DImode right shifts of 1 are rarely used (6 in total in the GCC binary), so there is little benefit of the arm_ashrdi3_1bit and arm_lshrdi3_1bit patterns. The generated code is better and faster without these shifts as it allows early expansion, optimization and better register allocation. gcc/ * config/arm/arm.md (ashldi3): Remove shift by 1 expansion. (arm_ashldi3_1bit): Remove pattern. (ashrdi3): Remove shift by 1 expansion. (arm_ashrdi3_1bit): Remove pattern. (lshrdi3): Remove shift by 1 expansion. (arm_lshrdi3_1bit): Remove pattern. * config/arm/arm.c (arm_rtx_costs_internal): Slightly increase cost of ashldi3 by 1. * config/arm/neon.md (ashldi3_neon): Remove shift by 1 expansion. (<shift>di3_neon): Likewise. From-SVN: r254237
Diffstat (limited to 'gcc/gcc.c')
0 files changed, 0 insertions, 0 deletions