https://gcc.gnu.org/g:4898147482f4496db9fd00a0200636e9efa60bc6
commit r16-7907-g4898147482f4496db9fd00a0200636e9efa60bc6 Author: Xi Ruoyao <[email protected]> Date: Thu Feb 26 22:54:18 2026 +0800 Partially revert "LoongArch: Fix bug123807." This reverts the loongarch.cc change of the commit 4df77a254263e96af1ab4d1288a35cff10c515a4. PR 123807 turns out to be a special case of the middle-end PR 124250. The previous ad-hoc fix is unneeded now since the underlying middle-end issue is fixed, so revert it but keep the test case. gcc/ PR target/123807 PR middle-end/124250 * config/loongarch/loongarch.cc (loongarch_expand_vector_init_same): Revert r16-7163 change. Diff: --- gcc/config/loongarch/loongarch.cc | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc index 2c13a86176d0..998cfb9a26a2 100644 --- a/gcc/config/loongarch/loongarch.cc +++ b/gcc/config/loongarch/loongarch.cc @@ -10378,16 +10378,7 @@ loongarch_expand_vector_init_same (rtx target, rtx vals, unsigned nvar) } } - if (GET_CODE (same) == MEM && GET_MODE (same) != imode) - { - rtx reg_tmp = gen_reg_rtx (GET_MODE (same)); - loongarch_emit_move (reg_tmp, same); - temp = lowpart_subreg (imode, reg_tmp, GET_MODE (reg_tmp)); - } - else - temp = same; - - temp = force_reg (imode, temp); + temp = force_reg (imode, same); switch (vmode) {
