On 7/9/2026 3:35 PM, Andreas Schwab wrote:
When operating on memory the bset and bclr insns use only the low 3 bits
of the bit number.
PR target/126121
gcc/
* config/m68k/m68k.md (bsetmemqi, *bsetmemqi_ext, bclrmemqi)
(*bclrmemqi_ext): Add AND with 7 around bit number.
gcc/testsuite/
* gcc.dg/torture/pr126121.c: New test.
Yea. Quite surprised this hasn't been reported before, but absolutely
correct it's %7 for MEM and %32 for REG.
OK if you haven't pushed it already. Jeff
