From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1666) id 1BC9E3857709; Mon, 16 Oct 2023 12:49:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1BC9E3857709 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697460591; bh=mzR+2gCEN9fL1GURNiKiFw7DXw7+g8ukY4HGmur0Bvc=; h=From:To:Subject:Date:From; b=hunwlWjb6wz3t6vz39FPbuY2i1zFB3jeKc/DjYsx37wh7VRIzf0YmZpHBusEmMI9b c9DUdbGsvSOs+8p1kck3utRzoVzZ/9Y+elPj3TDUO/RrHK/XauspSzijglMHKq1kZF PGW6xh0NwUKO7uWbRz687yRrFDT1h5QYs/D3chH4= 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: 5515521aa666f94a430974be7b0f8dcb5c5dc583 X-Git-Newrev: a01f778e3e051f4b87f167a71abcc1fef878c7ef Message-Id: <20231016124951.1BC9E3857709@sourceware.org> Date: Mon, 16 Oct 2023 12:49:51 +0000 (GMT) List-Id: https://gcc.gnu.org/g:a01f778e3e051f4b87f167a71abcc1fef878c7ef commit a01f778e3e051f4b87f167a71abcc1fef878c7ef 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 ef3a105cfaf4..97bd2f3feea2 100644 --- a/gcc/tree-vect-slp.cc +++ b/gcc/tree-vect-slp.cc @@ -1360,7 +1360,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 ()) @@ -1861,6 +1861,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;