Partially revert "LoongArch: Fix bug123807."

This reverts the loongarch.cc change of the commit
4df77a2542.

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.
This commit is contained in:
Xi Ruoyao
2026-02-26 22:54:18 +08:00
parent ed29af4100
commit 4898147482

View File

@@ -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)
{