From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 604FC3858D32 for ; Fri, 3 Nov 2023 09:11:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 604FC3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 604FC3858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699002687; cv=none; b=snY0IIC8ReZsv83XKNhmHki5Pr2+ipJGoQ7B+wCObXpP2ODCvssDOXf8y/17L+LSmObN08baqdYKV3DKDGxJNd0yG2vE1F1R/R+Byph/hGhWRoPsKcnz8LzH6Ex6k4STEioOB881U13xUN8szRXqLTXYNI6SYgErjW62wYjU258= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699002687; c=relaxed/simple; bh=NdG8Lp+ZOGZLGoywoJDSxugR+78jvp8VVcFbZ8NqiS0=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=OA2FoMIaSHfSrXxCrE9sCwOLw+VdFPke3D/7EMrDutUdbNPWwb48MisetaewcyMH9aZ/dGzDxV4Y4cWholgU8QX+t/6IDEZ43x/5hXdaMB2F9Rbsk8uU1o7eWTwnTROgZrRB+40jE20vnUwhQ1JhCGakWgyHhSxMDs1TB0IJ2kI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9A3E82F4; Fri, 3 Nov 2023 02:12:06 -0700 (PDT) Received: from localhost (e121540-lin.manchester.arm.com [10.32.110.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 494FD3F64C; Fri, 3 Nov 2023 02:11:23 -0700 (PDT) From: Richard Sandiford To: Robin Dapp Mail-Followup-To: Robin Dapp ,Richard Biener , gcc-patches , "juzhe.zhong\@rivai.ai" , richard.sandiford@arm.com Cc: Richard Biener , gcc-patches , "juzhe.zhong\@rivai.ai" Subject: Re: [PATCH] internal-fn: Add VCOND_MASK_LEN. References: <818fe7b8-cb55-49d1-94fa-f929b8cbc5d8@gmail.com> <430d3b7e-acc3-43bb-9d3e-7897aa7d2e83@gmail.com> <4e5d9e2f-2ae2-493b-9ff9-6af4a895d893@gmail.com> Date: Fri, 03 Nov 2023 09:11:22 +0000 In-Reply-To: <4e5d9e2f-2ae2-493b-9ff9-6af4a895d893@gmail.com> (Robin Dapp's message of "Fri, 3 Nov 2023 10:03:48 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-17.4 required=5.0 tests=BAYES_00,KAM_DMARC_NONE,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Robin Dapp writes: >> Could you explain why a special expansion is needed? (Sorry if you already >> have and I missed it, bit overloaded ATM.) What does it do that is >> different from what expand_fn_using_insn would do? > > All it does (in excess) is shuffle the arguments - vcond_mask_len has the > mask as third operand similar to vcond_mask while vec_cond has the mask > first. I can swap them in the IFN already but when not swapping we will > either be inconsistent with vec_cond or with vcond_mask. Ah, OK. IMO it's better to keep the optab operands the same as the IFN operands, even if that makes things inconsistent with vcond_mask. vcond_mask isn't really a good example to follow, since the operand order is not only inconsistent with the IFN, it's also inconsistent with the natural if_then_else order. Thanks, Richard