aboutsummaryrefslogtreecommitdiff
path: root/gcc/final.cc
diff options
context:
space:
mode:
authorTakayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>2022-06-26 22:28:30 +0900
committerMax Filippov <jcmvbkbc@gmail.com>2022-06-26 20:40:42 -0700
commit773dffc50fbc768e3282455bd4238a67b1481176 (patch)
tree489e0309a96021900b7465c71b6a1bd619298d0c /gcc/final.cc
parentb2b72757b229fe97cc5320a14a6e61008bc56882 (diff)
downloadgcc-773dffc50fbc768e3282455bd4238a67b1481176.zip
gcc-773dffc50fbc768e3282455bd4238a67b1481176.tar.gz
gcc-773dffc50fbc768e3282455bd4238a67b1481176.tar.bz2
xtensa: Optimize integer constant addition that is between -32896 and 32639
Such constants are often subject to the constant synthesis: int test(int a) { return a - 31999; } test: movi a3, 1 addmi a3, a3, -0x7d00 add a2, a2, a3 ret This patch optimizes such case as follows: test: addi a2, a2, 1 addmi a2, a2, -0x7d00 ret gcc/ChangeLog: * config/xtensa/xtensa.md: Suppress unnecessary emitting nop insn in the split patterns for integer/FP constant synthesis, and add new peephole2 pattern that folds such synthesized additions.
Diffstat (limited to 'gcc/final.cc')
0 files changed, 0 insertions, 0 deletions