From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D10CA3858D35; Wed, 15 Nov 2023 07:12:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D10CA3858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700032366; bh=acA60F78LO8YDFy0EkK/ceBYAvhTk4PEExq5sSMB/cE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=r8s1vlcaGpki1zUSpdVO3fLVHXkHF+IkpaouvEOl0R9vPR7Lqxn9tSSszM9U7rT/s 0lmrt0uEAIQSEaaQd3JlmLP82o9nJ+uTc8CzJ2DNiM8FR/28Ny/6JOqGVUskWP9FMg IQAuonu7l8UHXvJ8A0wLocLOLXEMGMBd1Y7QHwzA= From: "juzhe.zhong at rivai dot ai" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/112537] Is there a way to disable cpymem pass for rvv Date: Wed, 15 Nov 2023 07:12:46 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: juzhe.zhong at rivai dot ai X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112537 --- Comment #10 from JuzheZhong --- This following patch: diff --git a/gcc/config/riscv/riscv-string.cc b/gcc/config/riscv/riscv-string.cc index 57e8ad698d7..c135d4efdb2 100644 --- a/gcc/config/riscv/riscv-string.cc +++ b/gcc/config/riscv/riscv-string.cc @@ -773,7 +773,7 @@ expand_block_move (rtx dst_in, rtx src_in, rtx length_i= n) bnez a2, loop # Any more? ret # Return */ - if (!TARGET_VECTOR) + if (!TARGET_VECTOR || riscv_autovec_preference =3D=3D NO_AUTOVEC || !flag_tree_vectorize) return false; HOST_WIDE_INT potential_ew =3D (MIN (MIN (MEM_ALIGN (src_in), MEM_ALIGN (dst_in)), BITS_PER_WORD) Can fix this issue. Is it OK ?=