From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf2b.google.com (mail-qv1-xf2b.google.com [IPv6:2607:f8b0:4864:20::f2b]) by sourceware.org (Postfix) with ESMTPS id 57EF93858C5E for ; Wed, 12 Apr 2023 15:11:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 57EF93858C5E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-qv1-xf2b.google.com with SMTP id ld14so9660548qvb.13 for ; Wed, 12 Apr 2023 08:11:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; t=1681312279; x=1683904279; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=/tr9RFX7nTAcybbtzXJkh3di5iKeLUgeWKdQ1brJjtI=; b=30J0BvXpDZsPvnPNaYl39kiZ+82sF2Q4cymtFtKOBSTKVsKMeXyw9sgNik0KqZnS6i 3dCbJUKUS+6dbvEagDeOYDfBXcKfWqeZyMzBXaSwnmp7aYNdjsPo2CXZ0nvYNyj1w7T6 OOxrvJZU1ctubM7Kn9+Xt4zp1Yo5vl8s+zcBPrxE92Cbycb9JbRa3Z2X4hS8JVaQ7QCY UmQsgOcHe1C7Ivm+M/zntctelCdPZf34Y7ichMHdpF0kxWSHgZDoLKze+vQ5bnLVKVMy X6sNqyS0im4ET7vkzYD/pNXBjYnbPxfaML0Z0AFlmpk8D6rPkcs2eMnPF7wKebXngQSv aErg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681312279; x=1683904279; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/tr9RFX7nTAcybbtzXJkh3di5iKeLUgeWKdQ1brJjtI=; b=OUuBa8qOIEi8VF8p9pT9/VsqzylyOfJ3RLmB/spkKBiiM79WcZkMbLvBirIGkuO5Dh JQZS92EEeJykk7UfTsSo23mWt2XBLr+HpS9qKwDLzaql1sMkyoaba3wv4rjpW64WJyox X4Qb7TU8jQnWd/2Rqm1tsvVbN+KIyg0tVQ525Ha7xRhkHgBhCm1u+QKel/X1G0ZdfH4Y 5mmwKSw1SAJyO/i7n/2R5bbXcvrF34XDzn9wTAXqfrd3R8tfHqnmL9pvTNvAbQQdGGeF RkmikviS/RJ9K19Wpxh10PR+dB7BlfiwFjYy78Z1UjikfPQNZrni1OQA0A9SsvthviSm PQQw== X-Gm-Message-State: AAQBX9dKm28dfpnS/M+gK3+WR4ETYn2Vmn9+O2QXR6UZutLuN1/+vAuT WDyHpBMq1tbvC92Jkt8/qWmsmxuAPhPqepcbllc5gxl5hN1tgpS7De4= X-Google-Smtp-Source: AKy350ZEI++hBJjXfwiLGgolXJkfzJEWYoCF8AWqOJBHehGlqhHxr3NLY7KvqFNuoWoRUrsXPS+O/LpRjlK8PFgUpB0= X-Received: by 2002:a05:6214:a08:b0:5ee:e59c:4de0 with SMTP id dw8-20020a0562140a0800b005eee59c4de0mr654916qvb.4.1681312279130; Wed, 12 Apr 2023 08:11:19 -0700 (PDT) MIME-Version: 1.0 References: <20230327160157.4111747-1-kevinl@rivosinc.com> In-Reply-To: From: Kevin Lee Date: Wed, 12 Apr 2023 08:11:08 -0700 Message-ID: Subject: Re: [PATCH v2][RFC] vect: Verify that GET_MODE_NUNITS is greater than one for vect_grouped_store_supported To: Richard Biener via Gcc-patches , Kevin Lee , Richard Biener , collison@rivosinc.com, richard.sandiford@arm.com Content-Type: multipart/alternative; boundary="0000000000002786b805f92505f6" X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: --0000000000002786b805f92505f6 Content-Type: text/plain; charset="UTF-8" Thank you for the feedback Richard and Richard. > Note the calls are guarded with > > && ! known_eq (TYPE_VECTOR_SUBPARTS (vectype), 1U) Yes, I believe nelt.is_constant() wouldn't be necessary. I didn't realize the call was guarded by this condition. > But I think the better check for location above is: > > if (!multiple_p (nelt, 2)) > return false; > > which then guards the assert in the later exact_div (nelt, 2). I believe this check is better than using maybe_lt because it properly guards exact_div(nelt, 2) and vec_perm_builder sel(nelt, 2, 3). I'll modify the patch accordingly, build, test and submit the patch. Thank you!! Sincerely, --0000000000002786b805f92505f6--