From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1666) id 5CC0D3853D60; Mon, 28 Nov 2022 18:41:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5CC0D3853D60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669660894; bh=k/w0eCsmS/yZPdpkxSa4/Gkhkts/bXUVCPAJbq+m2dY=; h=From:To:Subject:Date:From; b=Xi+v57W4umn21JZ1CJybmF/QCLzhVQqRyViEQLb9h7Ui7RNG4pUCUuLT7K9SFPALw BTNELWf4zjaaymGpCZRFVUWQk2FDoKkKY7gSeO4V1nNiUXtx2Zc5onQeEtpzwJ/pUt d6xrYo5zBySjboi7LcEFB/I/p40G/GI8IWR7RejE= 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 r13-4374] tree-optimization/107896 - allow v2si to dimode unpacks X-Act-Checkin: gcc X-Git-Author: Richard Biener X-Git-Refname: refs/heads/master X-Git-Oldrev: 26aff453bf91921607015a0fd9f09822326beb71 X-Git-Newrev: 2200b7054638bbf157192a4dca23886dd420becb Message-Id: <20221128184134.5CC0D3853D60@sourceware.org> Date: Mon, 28 Nov 2022 18:41:34 +0000 (GMT) List-Id: https://gcc.gnu.org/g:2200b7054638bbf157192a4dca23886dd420becb commit r13-4374-g2200b7054638bbf157192a4dca23886dd420becb Author: Richard Biener Date: Mon Nov 28 17:26:15 2022 +0100 tree-optimization/107896 - allow v2si to dimode unpacks The following avoids ICEing for V2SI -> DImode vec_unpacks_lo. PR tree-optimization/107896 * tree-vect-stmts.cc (supportable_widening_operation): Handle non-vector mode intermediate mode. Diff: --- gcc/tree-vect-stmts.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index b35b986889d..5485da58b38 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -12194,9 +12194,8 @@ supportable_widening_operation (vec_info *vinfo, if (VECTOR_BOOLEAN_TYPE_P (prev_type)) intermediate_type = vect_halve_mask_nunits (prev_type, intermediate_mode); - else + else if (VECTOR_MODE_P (intermediate_mode)) { - gcc_assert (VECTOR_MODE_P (intermediate_mode)); tree intermediate_element_type = lang_hooks.types.type_for_mode (GET_MODE_INNER (intermediate_mode), TYPE_UNSIGNED (prev_type)); @@ -12204,6 +12203,10 @@ supportable_widening_operation (vec_info *vinfo, = build_vector_type_for_mode (intermediate_element_type, intermediate_mode); } + else + intermediate_type + = lang_hooks.types.type_for_mode (intermediate_mode, + TYPE_UNSIGNED (prev_type)); if (VECTOR_BOOLEAN_TYPE_P (intermediate_type) && VECTOR_BOOLEAN_TYPE_P (prev_type)