From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA0E4C43381 for ; Tue, 19 Jan 2021 21:37:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9ECA023108 for ; Tue, 19 Jan 2021 21:37:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729374AbhASVhX (ORCPT ); Tue, 19 Jan 2021 16:37:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:44848 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728534AbhASVfn (ORCPT ); Tue, 19 Jan 2021 16:35:43 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4C1EB23108 for ; Tue, 19 Jan 2021 21:35:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611092102; bh=keqlKtOQD4XedOyHnagcNlojhAjx8I81gQvxO1o/NBs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=lvGlPC0JWcNJCPwvWTZ4IBXuN3ILNAun90WbALBbkbgjUQCJUD8kiILj3Vw60iKMT xeAg4f4kMox2t/yp0okEnSfLCyWqO1CURvgRWypZY7j7UuvDDOYVcuEQWlPJyKmy4Y Pz7ihHKwLTdULmcazSNbJUP/I3SIr7ZJQkBNEWreuIF7wry4dXD6IDKw04nl7qfPf1 RQ4cKrOlGX/NtPZxUWgOC7QWylnG5BQloCQd3K0Eq1bFLHszjz9yEaaV7I5jvggl7q NrX9cA/I0ArPasWsYWYqK5SxCFsbveHYNA1pPIJRlAklkqrQohxLAsoFx7+IyyvKx3 0IGYS+vbX3sfQ== Received: by mail-ot1-f44.google.com with SMTP id b24so21340846otj.0 for ; Tue, 19 Jan 2021 13:35:02 -0800 (PST) X-Gm-Message-State: AOAM530H2uWScJNFYSgFuVJU4s1/guVXG8M91QV4ORAM6A1//tZayLKB yjxE/Z1tNj8WIyRspBJxHYRE4WuoE3AEAUJufnE= X-Google-Smtp-Source: ABdhPJw0ENVDjB/znaas4uhePniF7Y+ibmCXWojYKtwjd3FZdbeHG5Sxq+Qvg44w5EvXekS6S+t98cpXgn8NExbJuTg= X-Received: by 2002:a9d:3bb7:: with SMTP id k52mr5017892otc.251.1611092101555; Tue, 19 Jan 2021 13:35:01 -0800 (PST) MIME-Version: 1.0 References: <20210119131724.308884-1-adrian.ratiu@collabora.com> <20210119131724.308884-2-adrian.ratiu@collabora.com> In-Reply-To: From: Arnd Bergmann Date: Tue, 19 Jan 2021 22:34:45 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 1/2] arm: lib: xor-neon: remove unnecessary GCC < 4.6 warning To: Nick Desaulniers Cc: Adrian Ratiu , Arnd Bergmann , Linux ARM , Nathan Chancellor , Russell King , Ard Biesheuvel , Arvind Sankar , clang-built-linux , Collabora Kernel ML , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 19, 2021 at 10:18 PM 'Nick Desaulniers' via Clang Built Linux wrote: > > On Tue, Jan 19, 2021 at 5:17 AM Adrian Ratiu wrote: > > diff --git a/arch/arm/lib/xor-neon.c b/arch/arm/lib/xor-neon.c > > index b99dd8e1c93f..f9f3601cc2d1 100644 > > --- a/arch/arm/lib/xor-neon.c > > +++ b/arch/arm/lib/xor-neon.c > > @@ -14,20 +14,22 @@ MODULE_LICENSE("GPL"); > > #error You should compile this file with '-march=armv7-a -mfloat-abi=softfp -mfpu=neon' > > #endif > > > > +/* > > + * TODO: Even though -ftree-vectorize is enabled by default in Clang, the > > + * compiler does not produce vectorized code due to its cost model. > > + * See: https://github.com/ClangBuiltLinux/linux/issues/503 > > + */ > > +#ifdef CONFIG_CC_IS_CLANG > > +#warning Clang does not vectorize code in this file. > > +#endif > > Arnd, remind me again why it's a bug that the compiler's cost model > says it's faster to not produce a vectorized version of these loops? > I stand by my previous comment: https://bugs.llvm.org/show_bug.cgi?id=40976#c8 The point is that without vectorizing the code, there is no point in building both the default xor code and a "neon" version that has to save/restore the neon registers but doesn't actually use them. Arnd