On Thu, Apr 2, 2026 at 4:09 PM Takayuki 'January June' Suwa
<[email protected]> wrote:
>
> If the memory constraint definition includes (match_code "MEM"), then
> the subsequent 'op' is undoubtedly MEM rtx, and all that remains is to
> determine if 'XEXP (op, 0)' is the address corresponding to that
> definition using (match_test "...").
>
> This patch eliminates the need to call MEM_P() again in the predicate
> function called from (match_test "...") in the memory constraint
> definitions.
>
> gcc/ChangeLog:
>
>         * config/xtensa/xtensa.cc (smalloffset_mem_p):
>         Rename it to smalloffset_address_p and remove the result check
>         of MEM_P().
>         (constantpool_address_p): Change from static scope to global.
>         * config/xtensa/xtensa-protos.h (smalloffset_mem_p):
>         Rename it to smalloffset_address_p.
>         (constantpool_address_p): New function prototype.
>         * config/xtensa/constraints.md (R):
>         Change the call in (match_test "...") from smalloffset_mem_p()
>         to smalloffset_address_p().
>         (T, U): Change the call in (match_test "...") from
>         constantpool_mem_p() to constantpool_address_p().
> ---
>   gcc/config/xtensa/constraints.md  |  6 ++---
>   gcc/config/xtensa/xtensa-protos.h |  3 ++-
>   gcc/config/xtensa/xtensa.cc       | 40 +++++++++++++++----------------
>   3 files changed, 24 insertions(+), 25 deletions(-)

Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed the whole series to master.

-- 
Thanks.
-- Max

Reply via email to