From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by sourceware.org (Postfix) with ESMTPS id B14C53858D28 for ; Wed, 3 Nov 2021 17:17:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B14C53858D28 Received: by mail-pj1-x1029.google.com with SMTP id o10-20020a17090a3d4a00b001a6555878a8so1904402pjf.1 for ; Wed, 03 Nov 2021 10:17:56 -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:cc; bh=N0vDMd2IbRLxrdGLACphtFi/HOdqE+/vDGewhdbUxjg=; b=0Y8FGi5iPXnk5GGONkuIx+bNV+IJVTTklX9IlLW8XkBtf3qvEC/YQ+tVwTnwMK4t9k K/yqfbm/JwVZa74Izob14U10WQ4sx/F7iCmHYy9U8nnxRkbO+chy5GJtety4xQZ906r/ q5q+jXKfV3AFEx2Jj0ysasggwy+DU3Zn9KoppSpy9FnSjlyLie7Et9ZggS7Do2zUtIOb lDX6sdjJr4C76T3kgSEklig9vflLBU16DHjKvhdtXCtK6uaCndmqKK81aGA/7iBP/Wib 9taga+uLSXJbXyhNjP4RuF3Hj/sLepW+15DPR5Ybn6Q2ujtkSTCcbkrqAIFR/XSTxMA6 clFQ== X-Gm-Message-State: AOAM531SpKhDJ/cktIjTcLAwkcXFnbWJKoUldwMtt2g6+6ef16/+W9lw LEeEM4VKqOW+C2rDppxJZ7FP/+BIBiaMhF/5nnI= X-Google-Smtp-Source: ABdhPJzPyL7qJ/E3KHECuR0fOAgEgQkG6RssRv/y7I7tshXyJ03WhVH8Kltdy6MiRK2sS9n0cYN/ma3GBLwz3iuGo+A= X-Received: by 2002:a17:90a:6b0b:: with SMTP id v11mr16394943pjj.178.1635959875882; Wed, 03 Nov 2021 10:17:55 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Noah Goldstein Date: Wed, 3 Nov 2021 12:17:45 -0500 Message-ID: Subject: Re: [PATCH v2 2/6] Benchtests: Add benchtests for __memcmpeq To: Wilco Dijkstra Cc: GNU C Library Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.8 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.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: Wed, 03 Nov 2021 17:17:59 -0000 On Wed, Nov 3, 2021 at 8:39 AM Wilco Dijkstra wrote: > > Hi Noah, > > > > As committed, it's literally the same benchmark as memcmp, however I > > > expected it to call __memcmpeq... You'll need to change the definition of > > > MEMCMP as well. > > > Not certain why, but it does seem to be getting the right ifuncs. Can update it > > if desirable. > > > Is this also true for 'wmemcmp'? I don't see it defining MEMCMP either. > > Ifuncs use TEST_NAME (which is right) while there is also IMPL (MEMCMP, 1) > which is not correct. It is defined in bench-string - it does support wmemcmp, > but it is missing support for __memcmpeq. That all makes sense. What's confusing is that despite not setting MEMCMP for __memcmpeq, the benchmarks still test the correct implementations. It appears that in FOR_EACH_IMPL: https://sourceware.org/git/?p=glibc.git;a=blob;f=benchtests/bench-string.h;h=12f27473ff5714e50a94f3f1c5b06a56b99bc742;hb=HEAD#l200 The only check if selecting the function from the ifunc list is that its name is not an exact match of whatever MEMCMP is defined as. Will post a patch to fix but is a bit odd. > > Cheers, > Wilco