]> git.ipfire.org Git - thirdparty/gcc.git/commit
LoongArch: Prevent subreg of subreg in CRC
authorXi Ruoyao <xry111@xry111.site>
Wed, 2 Jul 2025 07:28:33 +0000 (15:28 +0800)
committerXi Ruoyao <xry111@xry111.site>
Fri, 4 Jul 2025 03:19:33 +0000 (11:19 +0800)
commit113ed3adc03f79f09ffe00d429d18f89f335b188
treeab8c6983adc0326ef44edde4dfedd1939a0557f4
parent053a678cc59a0c8adbdbb78802ff33a619b57b41
LoongArch: Prevent subreg of subreg in CRC

The register_operand predicate can match subreg, then we'd have a subreg
of subreg and it's invalid.  Use lowpart_subreg to avoid the nested
 subreg.

gcc/ChangeLog:

* config/loongarch/loongarch.md (crc_combine): Avoid nested
subreg.

gcc/testsuite/ChangeLog:

* gcc.c-torture/compile/pr120708.c: New test.
gcc/config/loongarch/loongarch.md
gcc/testsuite/gcc.c-torture/compile/pr120708.c [new file with mode: 0644]