diff options
author | Craig Blackmore <craig.blackmore@embecosm.com> | 2024-10-18 09:06:58 -0600 |
---|---|---|
committer | Jeff Law <jlaw@ventanamicro.com> | 2024-10-18 09:06:58 -0600 |
commit | 212d8685e4590c9f1168f503a383e3ea2639b418 (patch) | |
tree | 8f59a3eab0d62e2324522c803ed144814958eadc /gcc | |
parent | f244492ec258d84ab253bd58ad57f31c65a2312d (diff) | |
download | gcc-212d8685e4590c9f1168f503a383e3ea2639b418.zip gcc-212d8685e4590c9f1168f503a383e3ea2639b418.tar.gz gcc-212d8685e4590c9f1168f503a383e3ea2639b418.tar.bz2 |
[PATCH 2/7] RISC-V: Fix uninitialized reg in memcpy
gcc/ChangeLog:
* config/riscv/riscv-string.cc (expand_block_move): Replace
`end` with `length_rtx` in gen_rtx_NE.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/riscv/riscv-string.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/config/riscv/riscv-string.cc b/gcc/config/riscv/riscv-string.cc index 0c5ffd7..0f1353b 100644 --- a/gcc/config/riscv/riscv-string.cc +++ b/gcc/config/riscv/riscv-string.cc @@ -1078,7 +1078,6 @@ expand_block_move (rtx dst_in, rtx src_in, rtx length_in) bool need_loop = true; bool size_p = optimize_function_for_size_p (cfun); rtx src, dst; - rtx end = gen_reg_rtx (Pmode); rtx vec; rtx length_rtx = length_in; @@ -1245,7 +1244,7 @@ expand_block_move (rtx dst_in, rtx src_in, rtx length_in) emit_insn (gen_rtx_SET (length_rtx, gen_rtx_MINUS (Pmode, length_rtx, cnt))); /* Emit the loop condition. */ - rtx test = gen_rtx_NE (VOIDmode, end, const0_rtx); + rtx test = gen_rtx_NE (VOIDmode, length_rtx, const0_rtx); emit_jump_insn (gen_cbranch4 (Pmode, test, length_rtx, const0_rtx, label)); emit_insn (gen_nop ()); } |