On Sun, Feb 4, 2024 at 2:20 AM Takayuki 'January June' Suwa <jjsuwa_sys3...@yahoo.co.jp> wrote: > > After LRA transition, HImode constants that don't fit into signed 12 bits > are no longer subject to constant synthesis: > > /* example */ > void test(void) { > short foo = 32767; > __asm__ ("" :: "r"(foo)); > } > > ;; before > .literal_position > .literal .LC0, 32767 > test: > l32r a9, .LC0 > ret.n > > This patch fixes that: > > ;; after > test: > movi.n a9, -1 > extui a9, a9, 17, 15 > ret.n > > gcc/ChangeLog: > > * config/xtensa/xtensa.md (SHI): New mode iterator. > (2 split patterns related to constsynth): > Change to also accept HImode operands. > --- > gcc/config/xtensa/xtensa.md | 22 ++++++++++++++-------- > 1 file changed, 14 insertions(+), 8 deletions(-)
Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max