- We can not leave it to TARGET_SECONDARY_RELOAD since it happens
before spilling. The clobber scratch is used by spilling fractional
registers in IRA/LRA so it's too early. */
- if (TARGET_XTHEADVECTOR)
+ if (TARGET_XTHEADVECTOR && reg_or_mem_operand (operands[1], <MODE>mode))
{
emit_insn (gen_pred_th_whole_mov (<MODE>mode, operands[0], operands[1],
RVV_VLMAX, GEN_INT(riscv_vector::VLMAX)));
(match_operand:VB 1 "general_operand"))]
"TARGET_VECTOR"
{
- if (TARGET_XTHEADVECTOR)
+ if (TARGET_XTHEADVECTOR && reg_or_mem_operand (operands[1], <MODE>mode))
{
emit_insn (gen_pred_th_whole_mov (<MODE>mode, operands[0], operands[1],
RVV_VLMAX, GEN_INT(riscv_vector::VLMAX)));
--- /dev/null
+/* { dg-do assemble } */
+/* { dg-options "-march=rv32gc_xtheadvector -mabi=ilp32d -O2 -save-temps" { target { rv32 } } } */
+/* { dg-options "-march=rv64gc_xtheadvector -mabi=lp64d -O2 -save-temps" { target { rv64 } } } */
+
+#include <riscv_vector.h>
+
+void
+foo (float *a, int b)
+{
+ vfloat32m1x4_t c;
+ __riscv_vsseg4e32_v_f32m1x4(a, c, b);
+}
+
+/* { dg-final { scan-assembler-times {th\.vmv\.v\.i\tv[0-9]+,0} 4 } } */