From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by sourceware.org (Postfix) with ESMTPS id 90389385702F for ; Tue, 30 May 2023 06:28:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 90389385702F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2af2e908163so43333531fa.2 for ; Mon, 29 May 2023 23:28:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685428137; x=1688020137; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=XjT0rxV9pwhym6n6qcWBBpKAvWXNzxmkLfVfeYcRECA=; b=bqwn+CakZIHPeTFJYdfrGuDl89Gez8ewfi2NEG0fEfhm8yOviCrZ9Otu9Je7Y4t2qm FVMjwsD7KC0z73YEe+xkuexVuhm0wWbYvNrOa0BxAAjUtHmCVXQmps6FlwtSkV4QELAo xqHmytP2b+hXdwIgAFi6VrEU3A53g9+r7qD+NWXMXoJwZzXoTpdo2R5PyuRuqErLYK+E w3Kcj5Q5F99PYdm3ppos4oj42n77nSgGE0PXHNwM7OW4UrI6rzN0jZiiu3df8lQZuQRP 5RlG8t1gh1bjeDzjmi7Swd+E5o7E/rqMqtF7O3bQL5/YeVKRCcNi1zyAvzzECCU8u6EZ e/Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685428137; x=1688020137; h=content-transfer-encoding:cc: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=XjT0rxV9pwhym6n6qcWBBpKAvWXNzxmkLfVfeYcRECA=; b=O/w/UOiRSShQnXzJ4wqtxPmFo7s5UhwKnnhOFr91Gqyo73G8bP01RMFigv6eVudZyn T6NSHIiq++B1b1jI6fuTe+aGyhsq8+7eDhcdCk28HVT+mJ6iaVHQlO6j2sZCWM1h9Jxr RBmET7q1RLmCsaNc4lCxZ4yZfxd9pBQ3RAA6lh0rrc+bqmZoWoD06zxYFUXl1t0eGBfD 5y5nUpoQPyszHuF/Sw6a7fXfdtCgBIae6w+8sjPA4Y8YHrcc3bO1Oegzr+lo57/U8dD2 EGkOsGUD/vyx8OnRe8zkHDD5Vw5Xp5C3Qe/k3agRauTsm8Xn8GL/CYqJD8xyIBx8DFuO 3aTQ== X-Gm-Message-State: AC+VfDz7SAcfPBiOBH0gcIeBF5pO77Re4k91vHIzpFsqSi3F3nEWrTyY lqzsLLQYxuV2YRv5PfO9zwTjSMkv2BTaVsEtu/zYC3Sp X-Google-Smtp-Source: ACHHUZ7lAJVl+Dt87GEYJ5myuh3X0s4O8rfROTTub6dHfmQSfF6gd2eLfwUEsxDou6C/Kb30p+LAfnNjeG9R5BwfPF8= X-Received: by 2002:a2e:80d8:0:b0:2a9:f584:659a with SMTP id r24-20020a2e80d8000000b002a9f584659amr305762ljg.23.1685428136525; Mon, 29 May 2023 23:28:56 -0700 (PDT) MIME-Version: 1.0 References: <77479c6f-5ce4-12fa-f429-c49ffbff3542@codesourcery.com> In-Reply-To: <77479c6f-5ce4-12fa-f429-c49ffbff3542@codesourcery.com> From: Richard Biener Date: Tue, 30 May 2023 08:26:44 +0200 Message-ID: Subject: Re: [PATCH] Add COMPLEX_VECTOR_INT modes To: Andrew Stubbs Cc: "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 Fri, May 26, 2023 at 4:35=E2=80=AFPM Andrew Stubbs wrote: > > Hi all, > > I want to implement a vector DIVMOD libfunc for amdgcn, but I can't just > do it because the GCC middle-end models DIVMOD's return value as > "complex int" type, and there are no vector equivalents of that type. > > Therefore, this patch adds minimal support for "complex vector int" > modes. I have not attempted to provide any means to use these modes > from C, so they're really only useful for DIVMOD. The actual libfunc > implementation will pack the data into wider vector modes manually. > > A knock-on effect of this is that I needed to increase the range of > "mode_unit_size" (several of the vector modes supported by amdgcn exceed > the previous 255-byte limit). > > Since this change would add a large number of new, unused modes to many > architectures, I have elected to *not* enable them, by default, in > machmode.def (where the other complex modes are created). The new modes > are therefore inactive on all architectures but amdgcn, for now. > > OK for mainline? (I've not done a full test yet, but I will.) I think it makes more sense to map vector CSImode to vector SImode with the double number of lanes. In fact since divmod is a libgcc function I wonder where your vector variant would reside and how GCC decides to emit calls to it? That is, there's no way to OMP simd declare this functio= n? Richard. > Thanks > > Andrew