]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: Fix zero-scratch-regs-3.c fail
authorJuzhe-Zhong <juzhe.zhong@rivai.ai>
Fri, 26 May 2023 00:59:29 +0000 (08:59 +0800)
committerPan Li <pan2.li@intel.com>
Fri, 26 May 2023 00:59:29 +0000 (08:59 +0800)
gcc/ChangeLog:

* config/riscv/riscv.cc (vector_zero_call_used_regs): Add
explict VL and drop VL in ops.

Signed-off-by: Juzhe-Zhong <juzhe.zhong@rivai.ai>
gcc/config/riscv/riscv.cc

index 09fc9e5d95e611f94bc05b4851fef6f50a651c28..b16c60df6a7565828b7fc6ef10b122bfccccc5d3 100644 (file)
@@ -7396,9 +7396,9 @@ vector_zero_call_used_regs (HARD_REG_SET need_zeroed_hardregs)
              emitted_vlmax_vsetvl = true;
            }
 
-         rtx ops[] = {target, CONST0_RTX (mode), vl};
+         rtx ops[] = {target, CONST0_RTX (mode)};
          riscv_vector::emit_vlmax_insn (code_for_pred_mov (mode),
-                                        riscv_vector::RVV_UNOP, ops);
+                                        riscv_vector::RVV_UNOP, ops, vl);
 
          SET_HARD_REG_BIT (zeroed_hardregs, regno);
        }