On Sat, Sep 10, 2022 at 2:44 AM Takayuki 'January June' Suwa <jjsuwa_sys3...@yahoo.co.jp> wrote: > > This patch adds a new 3-instructions constant synthesis pattern: > > - A value that can fit into a signed 12-bit after a number of either bitwise > left or right rotations: > => "MOVI(.N) Ax, simm12" + "SSAI (1 ... 11) or (21 ... 31)" > + "SRC Ax, Ax, Ax" > > gcc/ChangeLog: > > * config/xtensa/xtensa.cc (xtensa_constantsynth): > Add new pattern for the abovementioned case. > > gcc/testsuite/ChangeLog: > > * gcc.target/xtensa/constsynth_3insns.c (test_4): > Add new test function. > --- > gcc/config/xtensa/xtensa.cc | 31 +++++++++++++++++++ > .../gcc.target/xtensa/constsynth_3insns.c | 11 +++++++ > 2 files changed, 42 insertions(+)
Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max