Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1900931pxb; Mon, 18 Jan 2021 03:01:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJzepH9/fqNX3b4dTbnZvhKX2Si+HKkTWCia+DrUxvZMBmI8FpngUxVNoydoQm2xQL5F2IfG X-Received: by 2002:a17:906:36d4:: with SMTP id b20mr6518229ejc.144.1610967693064; Mon, 18 Jan 2021 03:01:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610967693; cv=none; d=google.com; s=arc-20160816; b=aNXm0ZUgOTafrchErKQ46L4eLfUA9pZI3Uh/3CyXlqvEP+hEFMcXwTJLJsIYBkfX9o Vcfpisn7Mr0GL2W5ac56nGj2509YMDXc2mKHzoM+TfZm2tulMZemF93djTlIeQj7peD5 IULGTtMmiqM9x7EKBfLnwqdTWpPP+2RmBmF60k/uM5quwreRrCIQt+23huDvEo797VBd IcYWqPW8nLCr29oJa3jPXCdBxv4cQygkiB9JmX78k1VVBTxnvV6oQfZ0+mVYMPBOeoYJ GmYTLZ97+0CgwyUN0jdF3yc6zaOt+xuvRyq3J5agmZjKuSS7RQGe3J0zA8+Fgmku8ecD CJMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=VMgzS1uU+KlQUrGtbOxLGSxScvivqu+7civ/T5/J/lY=; b=dfqbS3Ad5ApnXk3C+xMwkw7sfoxSafhghsaFHeVaeRFTRztBcrDWgotrqJCf0nt9gp CUXpHrDZie92IW/DTMGQ5F0LP8MpmHRtv8S//q6RwjwJV3Pq0HU62WQIO4fbxlPK9E99 OzaDXxaCSxAXWx1v1G7vzPOZ21abqJBYAnCEghK8iq2EJEGvztECUG+t3qn6s1KFRqFh iDqi8kYvs0eT2oOSQjHQgdP0+Nk9TWVA0pr98zR7Vo7WB2O3OZnFJG7wKGQP+TDzQHKQ VlkdWRsgGudkX0gnpodtm6zXljK9TOu+5V6KhDcAXc2sPDTrfzNgSlnn3TzHy91FRZGd I7XA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g9si6764386edn.361.2021.01.18.03.01.07; Mon, 18 Jan 2021 03:01:33 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389659AbhARK5j (ORCPT + 99 others); Mon, 18 Jan 2021 05:57:39 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:42278 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388523AbhARK5O (ORCPT ); Mon, 18 Jan 2021 05:57:14 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: aratiu) with ESMTPSA id D3DFA1F44C3A From: Adrian Ratiu To: linux-arm-kernel@lists.infradead.org Cc: Nathan Chancellor , Nick Desaulniers , Arnd Bergmann , Russell King , Ard Biesheuvel , Arvind Sankar , clang-built-linux , kernel@collabora.com, Linux Kernel Mailing List Subject: [PATCH v3 RESEND 1/2] arm: lib: xor-neon: remove unnecessary GCC < 4.6 warning Date: Mon, 18 Jan 2021 12:55:56 +0200 Message-Id: <20210118105557.186614-2-adrian.ratiu@collabora.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210118105557.186614-1-adrian.ratiu@collabora.com> References: <20210118105557.186614-1-adrian.ratiu@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor Drop warning because kernel now requires GCC >= v4.9 after commit 6ec4476ac825 ("Raise gcc version requirement to 4.9") and clarify that -ftree-vectorize now always needs enabling for GCC by directly testing the presence of CONFIG_CC_IS_GCC. Another reason to remove the warning is that Clang exposes itself as GCC < 4.6 so it triggers the warning about GCC which doesn't make much sense and risks misleading users. As a side-note remark, -fttree-vectorize is on by default in Clang, but it currently does not work (see linked issues). Link: https://github.com/ClangBuiltLinux/linux/issues/496 Link: https://github.com/ClangBuiltLinux/linux/issues/503 Reported-by: Nick Desaulniers Reviewed-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: Adrian Ratiu --- arch/arm/lib/xor-neon.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/arch/arm/lib/xor-neon.c b/arch/arm/lib/xor-neon.c index b99dd8e1c93f..e1e76186ec23 100644 --- a/arch/arm/lib/xor-neon.c +++ b/arch/arm/lib/xor-neon.c @@ -19,15 +19,8 @@ MODULE_LICENSE("GPL"); * -ftree-vectorize) to attempt to exploit implicit parallelism and emit * NEON instructions. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) +#ifdef CONFIG_CC_IS_GCC #pragma GCC optimize "tree-vectorize" -#else -/* - * While older versions of GCC do not generate incorrect code, they fail to - * recognize the parallel nature of these functions, and emit plain ARM code, - * which is known to be slower than the optimized ARM code in asm-arm/xor.h. - */ -#warning This code requires at least version 4.6 of GCC #endif #pragma GCC diagnostic ignored "-Wunused-variable" -- 2.30.0