From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1666) id 3ABDE3856972; Wed, 18 Oct 2023 08:18:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3ABDE3856972 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697617097; bh=dWoxe/26qq+l6aXfMEvJPYDO1rEFQArC/L3QyX1svXU=; h=From:To:Subject:Date:From; b=vPOPzxHKUOzMoeop3dwyz+7OFEOCVFwunzzOGPHHx4ehruqcg8v9aiGH5PNFF0y8P u7O/TMlLxedDV0a/RsNjApi/fnyllETLKotEcpK7WRbs/LNd2wkX2c1ZV8l/1pzNtj UzSTWaaVGnv49XCgVoowXu+SORkf0HJyJOW6Tao8= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Richard Biener To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-4711] Re-instantiate integer mask to traditional vector mask support X-Act-Checkin: gcc X-Git-Author: Richard Biener X-Git-Refname: refs/heads/master X-Git-Oldrev: 60c231cb65807fb963624acc4f82d2935e305f93 X-Git-Newrev: b0372ef12f6f7f863606b0d2858d049b18a4cfda Message-Id: <20231018081817.3ABDE3856972@sourceware.org> Date: Wed, 18 Oct 2023 08:18:17 +0000 (GMT) List-Id: https://gcc.gnu.org/g:b0372ef12f6f7f863606b0d2858d049b18a4cfda commit r14-4711-gb0372ef12f6f7f863606b0d2858d049b18a4cfda Author: Richard Biener Date: Wed Oct 18 09:13:23 2023 +0200 Re-instantiate integer mask to traditional vector mask support The following allows to pass integer mask data as traditional vector mask for OMP SIMD clone calls which is required due to the limited set of OMP SIMD clones in the x86 ABI when using AVX512 but a prefered vector size of 256 bits. * tree-vect-stmts.cc (vectorizable_simd_clone_call): Relax check to again allow passing integer mode masks as traditional vectors. Diff: --- gcc/tree-vect-stmts.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index 2974eb6a981b..e5ff44c25f10 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -4384,9 +4384,16 @@ vectorizable_simd_clone_call (vec_info *vinfo, stmt_vec_info stmt_info, i = -1; break; case SIMD_CLONE_ARG_TYPE_MASK: + /* While we can create a traditional data vector from + an incoming integer mode mask we have no good way to + force generate an integer mode mask from a traditional + boolean vector input. */ if (SCALAR_INT_MODE_P (n->simdclone->mask_mode) - != SCALAR_INT_MODE_P (TYPE_MODE (arginfo[i].vectype))) + && !SCALAR_INT_MODE_P (TYPE_MODE (arginfo[i].vectype))) i = -1; + else if (!SCALAR_INT_MODE_P (n->simdclone->mask_mode) + && SCALAR_INT_MODE_P (TYPE_MODE (arginfo[i].vectype))) + this_badness += 2048; break; } if (i == (size_t) -1)