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.133.124]) by sourceware.org (Postfix) with ESMTPS id 9567D3858434 for ; Mon, 7 Mar 2022 08:51:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9567D3858434 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-456-s0vEFTg0MLO4AZkEfjLVIQ-1; Mon, 07 Mar 2022 03:51:31 -0500 X-MC-Unique: s0vEFTg0MLO4AZkEfjLVIQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1F33E1091DA3; Mon, 7 Mar 2022 08:51:30 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.81]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A985B1F46F; Mon, 7 Mar 2022 08:51:29 +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 2278pQeB2780258 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 7 Mar 2022 09:51:27 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 2278pQhY2780257; Mon, 7 Mar 2022 09:51:26 +0100 Date: Mon, 7 Mar 2022 09:51:26 +0100 From: Jakub Jelinek To: Hongtao Liu Cc: Uros Bizjak , GCC Patches Subject: Re: [PATCH] i386: Fix up cond_{and,ior,xor,mul}* [PR104779] Message-ID: Reply-To: Jakub Jelinek References: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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=-5.0 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_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Mon, 07 Mar 2022 08:51:36 -0000 On Mon, Mar 07, 2022 at 10:15:48AM +0800, Hongtao Liu wrote: > > Note, the predicates on cond_fma* and other FMA variants look all wrong to > > me, usually the fma instructions require nonimmediate_operand operands, > > but the cond_* patterns use vector_operand. Besides what this patch > --------cut from predicate.md--------- > 1142; Return true when OP is operand acceptable for vector memory operand. > 1143; Only AVX can have misaligned memory operand. > 1144(define_predicate "vector_memory_operand" > 1145 (and (match_operand 0 "memory_operand") > 1146 (ior (match_test "TARGET_AVX") > 1147 (match_test "MEM_ALIGN (op) >= GET_MODE_ALIGNMENT (mode)")))) > 1148 > 1149; Return true when OP is register_operand or vector_memory_operand. > 1150(define_predicate "vector_operand" > 1151 (ior (match_operand 0 "register_operand") > 1152 (match_operand 0 "vector_memory_operand"))) > --------cut end------------------------ > > vector_operand is a subset of nonimmediate_operands, so it's more like > a potential optimization issue rather than a correctness one? You're right. And fma apparently doesn't use something like ix86_fixup_binary_operands*, allows all 3 inputs as MEMs and only deals with it at RA time. Jakub