public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/2] LoongArch: Fix PR113033 and clean up code
@ 2023-12-19  6:59 Xi Ruoyao
  2023-12-19  6:59 ` [PATCH 1/2] LoongArch: Use force_reg instead of gen_reg_rtx + emit_move_insn in vec_init expander [PR113033] Xi Ruoyao
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Xi Ruoyao @ 2023-12-19  6:59 UTC (permalink / raw)
  To: gcc-patches; +Cc: chenglulu, i, xuchenghua, c, Xi Ruoyao

Superseds
https://gcc.gnu.org/pipermail/gcc-patches/2023-December/640871.html.

Per Jakub's response, vec_init patterns do not have a predicate on the
input operand so the operand can be *anything*.  It's not safe to simply
move it into an reg, and we have to use force_reg instead.

The code clean up is separated into the 2nd patch to make reviewing
easier.

Bootstrapped and regtested on loongarch64-linux-gnu.  Ok for trunk?

Xi Ruoyao (2):
  LoongArch: Use force_reg instead of gen_reg_rtx + emit_move_insn in
    vec_init expander [PR113033]
  LoongArch: Clean up vec_init expander

 gcc/config/loongarch/loongarch.cc             | 54 +++++++------------
 gcc/testsuite/gcc.target/loongarch/pr113033.c | 23 ++++++++
 2 files changed, 43 insertions(+), 34 deletions(-)
 create mode 100644 gcc/testsuite/gcc.target/loongarch/pr113033.c

-- 
2.43.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-12-20  3:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-19  6:59 [PATCH 0/2] LoongArch: Fix PR113033 and clean up code Xi Ruoyao
2023-12-19  6:59 ` [PATCH 1/2] LoongArch: Use force_reg instead of gen_reg_rtx + emit_move_insn in vec_init expander [PR113033] Xi Ruoyao
2023-12-19  6:59 ` [PATCH 2/2] LoongArch: Clean up vec_init expander Xi Ruoyao
2023-12-19  7:26 ` [PATCH 0/2] LoongArch: Fix PR113033 and clean up code chenglulu
2023-12-20  3:52   ` Chenghui Pan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).