Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3092827pxb; Tue, 19 Jan 2021 13:39:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJzLX015Ucx4+EPTKAkgztC0vZ5SH9anp/xX6fsWK/88GP0h50s1QhhBWZ0Zm8j2Lou2iuab X-Received: by 2002:a17:906:e107:: with SMTP id gj7mr3963643ejb.298.1611092356198; Tue, 19 Jan 2021 13:39:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611092356; cv=none; d=google.com; s=arc-20160816; b=DLBxfymmVP7mn1ZelOQrqgxVU3baTZTrR7/HO/xZBBx2G+cNwDkKny1gbtqtjL+5Py VHX7Gfg31EJcMWvnVNoD3qbsGUNHDF3JXJBkl3wIJx5qNVWEjwLwc8SkIpzirOzU8vnW PP2SxlLPHj6mMjYu9K33NRWZRpSdpClIRNrCyoqZcfR0LJHtkygZou24+9zODoLye8pl t2ybx/3VsCPN0NrxtxcY2ybVCobGBl3wGePuFts6a63Zp56DKXJp1RISO9htj4dasyrO gAl2uzfSfZ4k5BtxbFWNVtL1IEuPfMjx/QKK9RcwvIbTm03z51atA5pzL1DHumANTmgw YUtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=BgtHsM62mMwQBefFtyt3j/GeAQFSKqmwBzrO9+rgpDs=; b=C6ViVcFIWiE8AJU02F31zJdxZiOGcbEu849vjQqzduAibqwY9gGeWGhFm4f4WbwbtO M6z18PkmgD1JrAbaoOQs4IpD8GjtO7UUv6WtCHz8VtKU2MknZHBDS7tmjFchhXXpYYK9 jOQxwEU9+//Jm94dUUzbNTfw7g4SVVf/u1xOtkkAxqVTd/tylwagYrOaRA99L/M32/T/ 907VZRsZqjHrKxGp1qorCkx2oxzLTfHfg2ogGP+R9WfAWQOdCbX49pFDhIaolDCskjLQ k2QPM/jKsbMSAQ43H5HAZfsy/9L2iIh77NG2moNu7e+dTvVLDXsQkUqFI4VCWvaanWBd +Zcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lvGlPC0J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v20si7934ejh.685.2021.01.19.13.38.39; Tue, 19 Jan 2021 13:39:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lvGlPC0J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727684AbhASVgb (ORCPT + 99 others); Tue, 19 Jan 2021 16:36:31 -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-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