aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.cc
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2024-03-14 04:20:36 -0700
committerMax Filippov <jcmvbkbc@gmail.com>2024-03-14 10:27:08 -0700
commitbc5a9dab55d13f888a3cdd150c8cf5c2244f35e0 (patch)
treed842ce601776c19c1f10ec60f7dda288c63fe806 /gcc/expr.cc
parentf89cfdb2f2e9b4fe517b1e00511c4d70a7014cbc (diff)
downloadgcc-bc5a9dab55d13f888a3cdd150c8cf5c2244f35e0.zip
gcc-bc5a9dab55d13f888a3cdd150c8cf5c2244f35e0.tar.gz
gcc-bc5a9dab55d13f888a3cdd150c8cf5c2244f35e0.tar.bz2
gcc: xtensa: reorder movsi_internal patterns for better code generation during LRA
After switching to LRA xtensa backend generates the following code for saving/loading registers: movi a9, 0x190 add a9, a9, sp s32i.n a3, a9, 0 instead of the shorter and more efficient s32i a3, a9, 0x190 E.g. the following code can be used to reproduce it: int f1(int a, int b, int c, int d, int e, int f, int *p); int f2(int a, int b, int c, int d, int e, int f, int *p); int f3(int a, int b, int c, int d, int e, int f, int *p); int foo(int a, int b, int c, int d, int e, int f) { int g[100]; return f1(a, b, c, d, e, f, g) + f2(a, b, c, d, e, f, g) + f3(a, b, c, d, e, f, g); } This happens in the LRA pass because s32i.n and l32i.n are listed before the s32i and l32i in the movsi_internal pattern and alternative consideration loop stops early. gcc/ * config/xtensa/xtensa.md (movsi_internal): Move l32i and s32i patterns ahead of the l32i.n and s32i.n.
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions