From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by sourceware.org (Postfix) with ESMTPS id 20EE23858422 for ; Mon, 18 Oct 2021 10:17:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 20EE23858422 Received: by mail-ed1-x534.google.com with SMTP id a25so68984929edx.8 for ; Mon, 18 Oct 2021 03:17:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=WWK/qbF/L1nME6AhNJ1fyPglElZV9j97SjoXZaH6RBw=; b=mS07RcDvnc5E3awpIGqIlIL3RXlaVIdscZaVGjFan6n4xSQEnfPEyHYdWiGmdymVdf J0ahZ56jVMPDYflVdsKOsDpOBKRmo8ng4VrbStVYbT5ofFaE3ia0I8uuonK+d9fa0L98 qBZn07VTINqUuwAr0O57YUaIV9oqdG00ycX22uwNGNkoRk/k15lAuKxdn6WUUUiF5tu9 jjukQR5SgAm+z/DlKkQCtmojc5cuYNLdeSiVUjehdeiAjzoltUumKhTzrxhxOH/2CLfX Ki+gSiBp3yQIXNnV/hzWUrpiF7UI3Xlpyx24Nni7bKSbbeWdEl7K8YFHNhReGA00cV6o fz+g== X-Gm-Message-State: AOAM531hNgrlaglyECU2LrCAV9xZb1wz6A5FQoHBTkIMZI9tHcthraF/ Zz0lYOtF7P7n4jR4ncZO9xYDe72sP6DB2chjEWM47w== X-Google-Smtp-Source: ABdhPJywYDNGnkMqDsHCBFyqOVV+CHbtU0rtO8beXvE4yqRj3m6kxPlC0Uz7Q3O3kXWZaiAGSkc7lvxBNuhr8xs8kl4= X-Received: by 2002:a50:9e02:: with SMTP id z2mr43456733ede.12.1634552256063; Mon, 18 Oct 2021 03:17:36 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Prathamesh Kulkarni Date: Mon, 18 Oct 2021 15:46:59 +0530 Message-ID: Subject: Re: [SVE] [gimple-isel] PR93183 - SVE does not use neg as conditional To: Prathamesh Kulkarni , gcc Patches , Richard Sandiford Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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, 18 Oct 2021 10:17:38 -0000 On Mon, 18 Oct 2021 at 14:34, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_unary_4.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_unary_4.c > > index 4604365fbef..cedc5b7c549 100644 > > --- a/gcc/testsuite/gcc.target/aarch64/sve/cond_unary_4.c > > +++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_unary_4.c > > @@ -56,7 +56,11 @@ TEST_ALL (DEF_LOOP) > > we're relying on combine to merge a SEL and an arithmetic operation, > > and the SEL doesn't allow the "false" value to be zero when the "true" > > value is a register. */ > > -/* { dg-final { scan-assembler-times {\tmovprfx\tz[0-9]+, z[0-9]+\n} 14 } } */ > > +/* { dg-final { scan-assembler-times {\tmovprfx\tz[0-9]+, z[0-9]+\n} 7 } } */ > > +/* { dg-final { scan-assembler-times {\tmovprfx\tz[0-9]+\.b, p[0-9]/z, z[0-9]+\.b} 1 } } */ > > +/* { dg-final { scan-assembler-times {\tmovprfx\tz[0-9]+\.h, p[0-9]/z, z[0-9]+\.h} 2 } } */ > > +/* { dg-final { scan-assembler-times {\tmovprfx\tz[0-9]+\.s, p[0-9]/z, z[0-9]+\.s} 2 } } */ > > +/* { dg-final { scan-assembler-times {\tmovprfx\tz[0-9]+\.d, p[0-9]/z, z[0-9]+\.d} 2 } } */ > > Very minor, but: p[0-7] is more accurate than p[0-9]. Oops sorry, typo. > > OK with that change, thanks. Thanks, committed as 20dcda98ed376cb61c74b2c71656f99c671ec9ce. Thanks, Prathamesh > > Richard > > > > > /* { dg-final { scan-assembler-not {\tmov\tz[^\n]*z} } } */ > > /* { dg-final { scan-assembler-not {\tsel\t} } } */ > > diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pr93183.c b/gcc/testsuite/gcc.target/aarch64/sve/pr93183.c > > new file mode 100644 > > index 00000000000..2f92224cecb > > --- /dev/null > > +++ b/gcc/testsuite/gcc.target/aarch64/sve/pr93183.c > > @@ -0,0 +1,21 @@ > > +/* { dg-do compile } */ > > +/* { dg-options "-O3 -mcpu=generic+sve" } */ > > + > > +typedef unsigned char uint8_t; > > + > > +static inline uint8_t > > +x264_clip_uint8(uint8_t x) > > +{ > > + uint8_t t = -x; > > + uint8_t t1 = x & ~63; > > + return (t1 != 0) ? t : x; > > +} > > + > > +void > > +mc_weight(uint8_t *restrict dst, uint8_t *restrict src, int n) > > +{ > > + for (int x = 0; x < n*16; x++) > > + dst[x] = x264_clip_uint8(src[x]); > > +} > > + > > +/* { dg-final { scan-assembler-not {\tsel} } } */