From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1666) id B9269385781F; Fri, 6 Oct 2023 07:07:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B9269385781F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696576037; bh=T/2xo92AFYKUw3Y3VRiS3cGV2ys7wLXCy1JAq0Azd6E=; h=From:To:Subject:Date:From; b=b1np5ELbpN4oknAzFb41uvTlsMbo4XoKbMmxoz7toRnJewzoJm5kkCJz0vgAPYJOo kFoGn3w8EaDhWtfO1YGO3bSCb48RflJbOA2JJFX4TgsJioxH1tkQ6AMTQk8Qsz/vyh cx05uVw+oxFzaujGi09gYQJ7cnQeoXMhkRVkjBJk= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Richard Biener To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/rguenth/heads/vect-force-slp)] Allow single-lane SLP of not pattern detected gather/scatter X-Act-Checkin: gcc X-Git-Author: Richard Biener X-Git-Refname: refs/users/rguenth/heads/vect-force-slp X-Git-Oldrev: d2799c4ffdb8b99ce8dd1502b2a5dfd2d7f33933 X-Git-Newrev: 2caa6562a18d0af2d953261d5d0dc3ea428c4959 Message-Id: <20231006070717.B9269385781F@sourceware.org> Date: Fri, 6 Oct 2023 07:07:17 +0000 (GMT) List-Id: https://gcc.gnu.org/g:2caa6562a18d0af2d953261d5d0dc3ea428c4959 commit 2caa6562a18d0af2d953261d5d0dc3ea428c4959 Author: Richard Biener Date: Fri Sep 29 13:02:23 2023 +0200 Allow single-lane SLP of not pattern detected gather/scatter The following allows to form single-lane SLP graphs from gathers and scatters that were not turned into the internal function representation by pattern matching. That should help both x86 and emulated gather/scatter to survive single-lane SLP build. * tree-vect-slp.cc (vect_build_slp_tree_1): Allow single-lane gather/scatter. Diff: --- gcc/tree-vect-slp.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc index 41b5626cbe5..281938c6aa1 100644 --- a/gcc/tree-vect-slp.cc +++ b/gcc/tree-vect-slp.cc @@ -1342,7 +1342,7 @@ vect_build_slp_tree_1 (vec_info *vinfo, unsigned char *swap, splats the same we handle single element interleaving. */ && (is_a (vinfo) || stmt_info != first_stmt_info - || STMT_VINFO_GATHER_SCATTER_P (stmt_info))) + || (STMT_VINFO_GATHER_SCATTER_P (stmt_info) && i != 0))) { /* Not grouped load. */ if (dump_enabled_p ()) @@ -1843,6 +1843,8 @@ vect_build_slp_tree_2 (vec_info *vinfo, slp_tree node, gcc_assert (gimple_call_internal_p (stmt, IFN_MASK_LOAD) || gimple_call_internal_p (stmt, IFN_GATHER_LOAD) || gimple_call_internal_p (stmt, IFN_MASK_GATHER_LOAD)); + else if (STMT_VINFO_GATHER_SCATTER_P (stmt_info)) + ; else { *max_nunits = this_max_nunits;