From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id 6221B3858425 for ; Tue, 15 Feb 2022 16:33:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6221B3858425 Received: by mail-pf1-x431.google.com with SMTP id m22so16519098pfk.6 for ; Tue, 15 Feb 2022 08:33:38 -0800 (PST) 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:cc; bh=HVZPvHJhSqkMH4+NTiNlMoPK/sbYCmCBuUTnDGeufbA=; b=GwuvvEXkF5j74fT7R8hEil12LVlDFVY/Gze9Sc4+9VVEZ92gaLz1N1fF6YCfWQM/Co KlZnss8KuJwz4Mxc8c77suIodlap+sS5M7Re4sU+S1zHR6weeoiWSseTGoBLNRwFsHh6 796XFbZV4L5X5FdXFBi7EdHrUn7qlcNG6Rxl57AhAoPtMVf0yEf/d8r6pgBM9Zr7Y2um GSPJgaYi03WcmE9HJlIQ65zehtpvUSsscdUqXJi6jPqk7bqBskoSahitJiMUzuMG/kJH bzKzN4KMu+6XbxGLLJCXWcTMmQO7TKZJKKrdwQONlIbTBpd+ApNzRz87LZlnAv3oyMNu J98A== X-Gm-Message-State: AOAM532ZCgi2KGM9O49vwFUjpVWrCGxXi0y4UJ+4ZrlQ43vOm0XGXHpc 29DL0ZW5akcLtV0Jb3McllgPGFDgyRa1O/KsrF8wTrP3Z78= X-Google-Smtp-Source: ABdhPJwqJlAXTujawK6JRKrL1jjeQCp0ZXSbJsXV29t+ANt+ZShWTu7Iv3dED2EaOfCeOdvv7ORjxJBEGEYgWTwqHyY= X-Received: by 2002:a62:b40e:: with SMTP id h14mr5088323pfn.79.1644942817523; Tue, 15 Feb 2022 08:33:37 -0800 (PST) MIME-Version: 1.0 References: <20220109122946.2754917-1-goldstein.w.n@gmail.com> <20220110213540.1258344-1-goldstein.w.n@gmail.com> <20220110213540.1258344-5-goldstein.w.n@gmail.com> <87ilthv8s9.fsf@igel.home> <87y22dtg19.fsf@igel.home> <87tud1tf5d.fsf@igel.home> <87czjomgqn.fsf@igel.home> In-Reply-To: From: Noah Goldstein Date: Tue, 15 Feb 2022 10:33:26 -0600 Message-ID: Subject: Re: [PATCH v3 5/7] x86: Optimize strcmp-avx2.S To: Andreas Schwab Cc: "H.J. Lu" , Sunil K Pandey , Noah Goldstein via Libc-alpha Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.3 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Feb 2022 16:33:40 -0000 On Tue, Feb 15, 2022 at 7:37 AM Noah Goldstein wrote: > > On Tue, Feb 15, 2022 at 7:32 AM Noah Goldstein wrote: > > > > On Tue, Feb 15, 2022 at 7:09 AM Noah Goldstein wrote: > > > > > > On Tue, Feb 15, 2022 at 6:58 AM Noah Goldstein wrote: > > > > > > > > On Tue, Feb 15, 2022 at 6:55 AM Andreas Schwab wrote: > > > > > > > > > > #0 0x00007f4fd4a61df3 in __strncmp_avx2_w (a=0x55aaa1906ffa "tst-tlsmod%", > > > > > b=0x55aaa1940fed "tst-tls-manydynamic73mod", c=10) > > > > > at ../sysdeps/x86_64/multiarch/strncmp-avx2_w.c:11 > > > > > 11 if (n1 != n2) asm("hlt"); > > > > > > > > I'll check that input thanks! > > > > > > > > One thing, your check has some false positives as all that matters is > > > > n1 / n2 have > > > > same zero/non-zero status or same sign. > > > > > > Confirmed. Sorry for the bug, will ping back when fix is up. > > > > Found a bug (hopefully the bug) in strncmp. Did you see this at all > > in strcmp-avx2 or was it just the commit you were referencing? > > Made bugzilla for the one I found at least: > https://sourceware.org/bugzilla/show_bug.cgi?id=28895 Hopefully fix: https://patchwork.sourceware.org/project/glibc/patch/20220215162829.282223-1-goldstein.w.n@gmail.com/ > > > > > > > > > > -- > > > > > Andreas Schwab, schwab@linux-m68k.org > > > > > GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 > > > > > "And now for something completely different."