From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id 7F50B3858D3C for ; Mon, 14 Feb 2022 21:10:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7F50B3858D3C Received: by mail-pf1-x433.google.com with SMTP id c10so5773762pfv.8 for ; Mon, 14 Feb 2022 13:10:51 -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=aKdL89ilFdRSvO6en5Hc5u9QH8SIgVUoYVhibXwCNlM=; b=tp+zKCKP9ZNCLoF6JafF2SeLnQ4PDgfcfCRdBmYgO2tDJEGhju4eJLd//J/+iVQo3p qr9IATF4bb38BFKPMjG6lLo5DOKFAUHQMO3GLg2V+5YtgWcXG3WqgbsiQn0dPj05cJxl gcDltBFafcerJeyHffb65s5O2jzlooDxQisIzNwo+79LAD1ZFwRRqqAT5WbnBcNQnXVp OvMOhUQZopPGhufMxaTkPUL4dw0l8qunA6pLaqVtoGwLFYM2SOh9uLpSxa8c6fc5DxCK OWHWQ+fGn0zsgvzTZYAnAI4bU7Ii+GHoQw7ChN1Y/AZeNt19hL432TOjurzgp0FIAVPL 5XkA== X-Gm-Message-State: AOAM5316BAPhe6GMRBr8xoZ5qrD3HR+nJQlT1fZhZIY1mfBtED5qMad5 igTUcm8zh7jnp+7pB1DOWYzfdG5tZd+8tlRr2VVLfOWFPSo= X-Google-Smtp-Source: ABdhPJxey+S5dvEYQgeSZB1XKtLvEnq9OCJOLwcqDTHzH2lalCX+T9gcuYZBV2dYUSf/m1Z02ZXJBQ/V6JxRLKui4qg= X-Received: by 2002:a65:414a:: with SMTP id x10mr749028pgp.125.1644873050641; Mon, 14 Feb 2022 13:10:50 -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> In-Reply-To: From: "H.J. Lu" Date: Mon, 14 Feb 2022 13:10:14 -0800 Message-ID: Subject: Re: [PATCH v3 5/7] x86: Optimize strcmp-avx2.S To: Andreas Schwab , Sunil K Pandey Cc: Noah Goldstein via Libc-alpha , Noah Goldstein Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3020.9 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: Mon, 14 Feb 2022 21:10:54 -0000 On Mon, Feb 14, 2022 at 12:59 PM H.J. Lu wrote: > > On Mon, Feb 14, 2022 at 11:35 AM Andreas Schwab wrote: > > > > On Feb 14 2022, H.J. Lu wrote: > > > > > On Mon, Feb 14, 2022 at 11:16 AM Andreas Schwab wrote: > > >> > > >> On Feb 14 2022, H.J. Lu wrote: > > >> > > >> > On Mon, Feb 14, 2022 at 6:10 AM Andreas Schwab wrote: > > >> >> > > >> >> I'm seeing erroneous behaviour with this. There are random cases of > > >> >> misbehaviour on build workers with AVX2, for example: > > >> >> > > >> >> https://build.opensuse.org/package/live_build_log/home:Andreas_Schwab:glibc/glibc:cross-riscv64/f/x86_64 > > >> >> > > >> >> riscv64-suse-linux-gcc: error: unrecognized command-line option '-frounding-math' > > >> >> make[2]: *** [../o-iterator.mk:9: /home/abuild/rpmbuild/BUILD/glibc-2.35.9000.58.g7912236f4a/cc-base/time/tzset.o] Error 1 > > >> >> make[2]: *** Waiting for unfinished jobs.... > > >> > > > >> > How reproducible is it? > > >> > > >> 100%. > > >> > > > > > > Can I reproduce it with scripts/build-many-glibcs.py on > > > any machine which uses strcmp-avx2.S? > > > > Maybe. > > > > I can't reproduce it. It sounds very similar to > > https://sourceware.org/bugzilla/show_bug.cgi?id=28646 > > The failure can only be triggered by a specific setup. Andreas, I need your help to create a testcase. You can build a special glibc and use it to build riscv64 glibc. In the special glibc, you compare AVX2 strcmp result against SSE2 strcmp. If they don't match, do asm ("hlt") with a core dump. Then use gdb to get 2 pointers with their contents and addresses. I can extract a testcase from this info. > Noah, can you figure out what went wrong? > Thanks. -- H.J.