]> git.ipfire.org Git - thirdparty/gcc.git/commit
CRIS: For HI, QI, make sure move patterns don't have two memory operands
authorHans-Peter Nilsson <hp@axis.com>
Mon, 9 Feb 2026 20:30:46 +0000 (21:30 +0100)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Thu, 12 Feb 2026 18:33:18 +0000 (19:33 +0100)
commit6fdd184731aadb2d6cf5afa866ec9eb63126516a
tree4a7d58f2687035465be2f510f1d467d703729cc4
parent5bae3e8edcce9d53350c52ba5bcab6b7749fd1f5
CRIS: For HI, QI, make sure move patterns don't have two memory operands

Further testing showed that the two-memory-operands case that could
happen for movsf happened for the HI and QI modes as well, for example
in gcc.dg/Wrestrict-5.c.  So, for improved performance they'd better
get guards as well.  The movstrict<m> case is just tagging along for
summetry; I don't know of test-cases that expose that.

* config/cris/cris.md (BWDSF): New mode_iterator replacing SISF.
All callers changed.
("*movhi_internal<setcc><setnz><setnzvc>"): Anonymized from
"<acc><anz><anzvc>movhi<setcc><setnz><setnzvc>" to make it a
match-only pattern.  Add conditions to guard from source and
destination both being memory operands.
("*movstricthi_internal", "*movstrictqi_internal"): Similarly
for "movstricthi" and "movstrictqi".
("movstrict<mode>"): Add common expander for BW, forcing one operand
to be a register or source being zero.
gcc/config/cris/cris.md