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 481133858C1F for ; Wed, 22 Mar 2023 10:10:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 481133858C1F 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 t14so18309205ljd.5 for ; Wed, 22 Mar 2023 03:10:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679479830; 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=2F6iLamgmbuf/5rVTmqWQlw2VlOgssGNrLfKmBt0V8g=; b=DegzhcxqaqycDPitFsHBL/KIwr91QKaXHgCF5IA4gxO2LTIveaRgSjixTryQkyvcDP CyFbqif7krWpIhqr5/PlDS4pL0MsPlSqgOdqg1hAXTXk/55L4KKWJOJaRjqemqfAbLsX pwZo1IWLl8LqjwepCi+VZp6MaL6RfV6GDHlzBpw2HaoxISwJ533tf0L+tEoM3gVMmt6D kINd01vi72yluLiHgSHck0rrGNlvlQ/IdyjRDLZQafC/OU2IHLLFCAJE1yo63SGtjerC DiSiQvlHouAIGOUI2UTIkfc56esmEdkORiq9LoRUFDecEeUVUVlu68d5TNJhcSx2Q4In LV2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679479830; 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=2F6iLamgmbuf/5rVTmqWQlw2VlOgssGNrLfKmBt0V8g=; b=tfqwYvbLTKCSBJjSi72N0TUkdjBejo5T+pfjOt982vyC9cBv4XHbzh7T/ndm26/ilN HR/ZJEX+QVY6neYnvafChmOPRnRwDuw2vEm+0DFswrvFu0LrfquJf8oXXP+spI7l0cqi +W651NzzKEJqoCB6ZmchMZD4u6oXhpSGgy/DWN1G611uQaMvT3F+qliU/1nqPQbTul8J 2olqTPG3DA7B2HDqq51lQ8scR1sJxog1VXdqntKZyhdW3N6F/CeFWcgjJQwzs111UPc5 DQ+M10ZRFV/hXld3JjdV3JXRpY6CmGnf5trvAiZrP6V+PcZlvyvlSC8GNCLBIzLElQiQ aDhA== X-Gm-Message-State: AO0yUKXgke8CkDvS+nJlgb+3TxXXqrQAFC6v1BLdsiAYLGV/BlnnynYm e3VFlDFlJU7fk6CkfDIYUSABelJLMHeRdkBl4pI= X-Google-Smtp-Source: AK7set9h2GiT/kayHn2k+EsgvsD6RkPSr/Jw8bGcQNAUbZpvnq8zDc6RBc1eqZUgNiOJQ7T5oR1x4pZmyF8xt0qYa50= X-Received: by 2002:a2e:8558:0:b0:295:d632:ba20 with SMTP id u24-20020a2e8558000000b00295d632ba20mr1858583ljj.10.1679479830144; Wed, 22 Mar 2023 03:10:30 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Richard Biener Date: Wed, 22 Mar 2023 11:09:57 +0100 Message-ID: Subject: Re: Libgcc divide vectorization question To: Andrew Stubbs Cc: GCC Development Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.0 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 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 Tue, Mar 21, 2023 at 6:00=E2=80=AFPM Andrew Stubbs wrote: > > Hi all, > > I want to be able to vectorize divide operators (softfp and integer), > but amdgcn only has hardware instructions suitable for -ffast-math. > > We have recently implemented vector versions of all the libm functions, > but the libgcc functions aren't builtins and therefore don't use those > hooks. > > What's the best way to achieve this? Add a new __builtin_div (and > __builtin_mod) that tree-vectorize can find, perhaps? Or something else? What do you want to do? Vectorize the out-of-line libgcc copy? Or emit inline vectorized code for int/softfp operations? In the latter case just emit the code from the pattern expanders? > Thanks > > Andrew