https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99314
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Kito Cheng <k...@gcc.gnu.org>: https://gcc.gnu.org/g:becb26eb6ef42481014dc6fb24e8bfe7ec6f51d1 commit r9-9294-gbecb26eb6ef42481014dc6fb24e8bfe7ec6f51d1 Author: Sinan Lin <si...@isrc.iscas.ac.cn> Date: Thu Mar 4 18:02:39 2021 +0800 PR target/99314: Fix integer signedness issue for cpymem pattern expansion. Third operand of cpymem pattern is unsigned HOST_WIDE_INT, however we are interpret that as signed HOST_WIDE_INT, that not a problem in most case, but when the value is large than signed HOST_WIDE_INT, it might screw up since we have using that value to calculate the buffer size. 2021-03-05 Sinan Lin <si...@isrc.iscas.ac.cn> Kito Cheng <kito.ch...@sifive.com> gcc/ChangeLog: * config/riscv/riscv.c (riscv_block_move_straight): Change type to unsigned HOST_WIDE_INT for parameter and local variable with HOST_WIDE_INT type. (riscv_adjust_block_mem): Ditto. (riscv_block_move_loop): Ditto. (riscv_expand_block_move): Ditto. (cherry picked from commit d9f0ade001533c9544bf2153b6baa8844ec0bee4)