From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 62E943858D38; Mon, 20 Nov 2023 06:49:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 62E943858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700462956; bh=U2OTfFfwDiQ8kaHkUp2Vo47XIe7R2+SdhxrVLEGiV9Q=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RLLuvaE4TdxDNsVkALoRt0licdmEJsGTZl3sJ1JzXGTsopV7E4D+H1HsN9Elood43 4zdqd2fgxtCeEhBnzRw4nv+oRROBRKhIR5mj3zGQs2gFsyOh6Lcdrm0eQFPnSqjxIK EkIIBeSvMWrAVQJOhaffzCgkiBOsNvvC/QFR50/s= From: "juzhe.zhong at rivai dot ai" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111970] [14 regression] SLP for non-IFN gathers result in RISC-V test failure on gather since r14-4745-gbeab5b95c58145 Date: Mon, 20 Nov 2023 06:49:14 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: juzhe.zhong at rivai dot ai X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 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=3D111970 --- Comment #11 from JuzheZhong --- Hi, Richard. I come back to revisit this bug. I found if I do this: diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc index 4a09b3c2aca..2fd128672b9 100644 --- a/gcc/tree-vect-slp.cc +++ b/gcc/tree-vect-slp.cc @@ -1434,7 +1434,6 @@ vect_build_slp_tree_1 (vec_info *vinfo, unsigned char *swap, && rhs_code !=3D CFN_GATHER_LOAD && rhs_code !=3D CFN_MASK_GATHER_LOAD && rhs_code !=3D CFN_MASK_LEN_GATHER_LOAD - && !STMT_VINFO_GATHER_SCATTER_P (stmt_info) /* Not grouped loads are handled as externals for BB vectorization. For loop vectorization we can handle splats the same we handle single element interleaving. */ The bug is fixed. But I am not sure whether it is the correct fix. Reproduce bug compile option on RISC-V: -O3 --param=3Driscv-autovec-preference=3Dfixed-vlmax --param riscv-autovec-= lmul=3Dm4 -fno-vect-cost-model -ffast-math=