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 [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id E09A83844013 for ; Thu, 21 Jan 2021 13:48:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E09A83844013 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-503--I3YCKQfNoCOL5gAn9G8aw-1; Thu, 21 Jan 2021 08:48:02 -0500 X-MC-Unique: -I3YCKQfNoCOL5gAn9G8aw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1778F15723; Thu, 21 Jan 2021 13:48:01 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-112-64.ams2.redhat.com [10.36.112.64]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9672F60BF3; Thu, 21 Jan 2021 13:48:00 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.16.1/8.16.1) with ESMTPS id 10LDlvoQ2913680 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 21 Jan 2021 14:47:57 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 10LDluoP2913679; Thu, 21 Jan 2021 14:47:56 +0100 Date: Thu, 21 Jan 2021 14:47:56 +0100 From: Jakub Jelinek To: Hongtao Liu Cc: Jeff Law , GCC Patches Subject: Re: [PATCH][AVX512]Lower AVX512 vector compare to AVX version when dest is vector Message-ID: <20210121134756.GB4020736@tucnak> Reply-To: Jakub Jelinek References: <43d01dc3-4d2e-2b94-d83b-aa6e9225b00f@redhat.com> <15b623ef-bed1-0f00-c8e6-eb976d5f20a8@redhat.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2021 13:48:06 -0000 On Wed, Jan 06, 2021 at 11:34:32AM +0800, Hongtao Liu via Gcc-patches wrote: > > >> > > >> Note there's a data dependency between them. insn 7 feeds insn 9. When > > >> there's a data dependency, combiner patterns are usually the better > > >> choice than peepholes. I think you'd be looking to match something > > >> likethis (from the . combine dump): > > >> > > Using combiner patterns, details is discussed in PR98348 > > Boottrapped and regtested on x86_64-linux-gnu{-m32,} for both GCC10 and trunk. > gcc/ChangeLog: > > PR target/96891 > PR target/98348 > * config/i386/sse.md (VI_128_256): New mode iterator. > (*avx_cmp3_1, *avx_cmp3_2, *avx_cmp3_3, > *avx_cmp3_4, *avx2_eq3, *avx2_pcmp3_1, > *avx2_pcmp3_2, *avx2_gt3): New > define_insn_and_split to lower avx512 vector comparison to avx > version when dest is vector. > (*_cmp3,*_cmp3,*_ucmp3): > define_insn_and_split for negating the comparison result. > * config/i386/predicates.md (float_vector_all_ones_operand): > New predicate. > * config/i386/i386-expand.c (ix86_expand_sse_movcc): Use > general NOT operator without UNSPEC_MASKOP. > > gcc/testsuite/ChangeLog: > > PR target/96891 > PR target/98348 > * gcc.target/i386/avx512bw-pr96891-1.c: New test. > * gcc.target/i386/avx512f-pr96891-1.c: New test. > * gcc.target/i386/avx512f-pr96891-2.c: New test. > * gcc.target/i386/avx512f-pr96891-3.c: New test. > * g++.target/i386/avx512f-pr96891-1.C: New test. > * gcc.target/i386/bitwise_mask_op-3.c: Adjust testcase. Ok for trunk. I'd prefer not to backport it to GCC 10. Jakub