From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 0F601395B43F for ; Wed, 16 Nov 2022 15:41:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0F601395B43F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668613271; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SJ4c4WK5pCAUSdVk54XJxoaaqK8kAxMDvOOq07OS5EM=; b=f1tHNXeH21ffoLHiBBSLvUPloZ1mc/M4IklckLm5bflXvrp24SY2u7RcFRfGMeZ7QKEtiv 7GoGQHpto08mVtwVD8ReZs6V/NbS4lGq2SsxXl7cyeJvDqywF9UtLapT1n59KXEFOdHP5t BKHZYMImB7NKEvcsAcYe1OpA7EPwJgM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-543-0E8cCfS8OuSbK4J-V60vAQ-1; Wed, 16 Nov 2022 10:41:09 -0500 X-MC-Unique: 0E8cCfS8OuSbK4J-V60vAQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 43107101A528; Wed, 16 Nov 2022 15:41:09 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.193.99]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 01B372024CC8; Wed, 16 Nov 2022 15:41:08 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 2AGFf3Qa2467456 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 16 Nov 2022 16:41:03 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 2AGFf2nR2467455; Wed, 16 Nov 2022 16:41:02 +0100 Date: Wed, 16 Nov 2022 16:41:01 +0100 From: Jakub Jelinek To: Tamar Christina Cc: Richard Biener , Hongyu Wang , Prathamesh Kulkarni , Richard Sandiford , Hongyu Wang , "hongtao.liu@intel.com" , "gcc-patches@gcc.gnu.org" Subject: Re: [PATCH] Optimize VEC_PERM_EXPR with same permutation index and operation [PR98167] Message-ID: Reply-To: Jakub Jelinek References: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, Nov 16, 2022 at 03:40:02PM +0000, Tamar Christina wrote: > > Even: > > > > --- gcc/match.pd.jj 2022-11-15 07:56:05.240348804 +0100 > > +++ gcc/match.pd 2022-11-16 16:35:34.854080956 +0100 > > @@ -8259,7 +8259,7 @@ and, > > (simplify > > (op (vec_perm @0 @0 @2) (vec_perm @1 @1 @2)) > > (if (VECTOR_INTEGER_TYPE_P (type)) > > - (vec_perm (op @0 @1) (op @0 @1) @2)))) > > + (vec_perm (op@3 @0 @1) @3 @2)))) > > > > /* Similar for float arithmetic when permutation constant covers > > all vector elements. */ > > @@ -8298,4 +8298,4 @@ and, > > } > > } > > (if (full_perm_p) > > - (vec_perm (op @0 @1) (op @0 @1) @2)))))) > > + (vec_perm (op@3 @0 @1) @3 @2)))))) > > > > From quick look at the dumps, it seems to work fine. > > > > Jakub > > Yes that's the patch I'm currently reg-testing 😊 Great ;) Jakub