Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1324573pxb; Fri, 13 Nov 2020 09:39:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJwR9rRwWMla2DJ9Z90xfxMMBsRbDRd9qDhTgqtLd5PnHk6oQZyhi1l7fzU3yK0W/S1aUqZW X-Received: by 2002:a17:906:3b81:: with SMTP id u1mr2918465ejf.542.1605289188330; Fri, 13 Nov 2020 09:39:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605289188; cv=none; d=google.com; s=arc-20160816; b=RJqM4wqe3QtkzKEz/58+STXYGcbAJePDJu3hhRfPPeOqdDYlnb/KgXtAJyAgGg21jb CMAXT+KR1EqfG/SFK3Dy+19J493ZnFL703Se0PFen0l4Jrqby9XyCoaG22PKfMVwC4mC SMH9WqsSZOwTlhg9goDXIGFa+Og8ExosWuDVL/iFT6jzCxabso//gu1nBdJpuje7lqUK 6cYul61uGuGhjhbvhH1lGzVxfkzqLTERh7WRfvR5qszYZT4G9HdAwJ12HdXUXypeTRx4 mfGtisPPycNCQHFlefxHcG5/tRaP1TvTdVauWwLaCtKmXRMV7Llfn6PYz8PtENE5hRjM 6Eww== 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=e2i4E8Z0lT/iHz5vnqTIuv5SmOXDmLu7araDGVZmh/c=; b=iRVMXYbnv42ewoquZUbjnUR+w8K9X6HErJxIV0tavb+ciuuR9c0HDiQa3vYoKiMsGS ECw/ttOtMEW/faUSds8JpMqacEa0DKwNF0pW4JN1FwB+5yTKwm3VMm88+F+B1VQGWqBt gnoCTLuSeegVJzeXOkvoONo68i9tdUuGBYq9McipUzDkP4/Gt2mDUJhlRjCsXShIh6/7 ss7BJR59ide4MpVkhKzUrdA5pccHL2Yh1VPawgH6bqjo8TI7uVyAa2uK4p9E8t/QiM/y w0IBuGpjSmAufSH4z7zXzC8Rx158rIMXbTtSYMgxqHIRSxvDywCeVclyYcwp3i+g3UU9 tr3Q== 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 df14si6372427edb.73.2020.11.13.09.39.25; Fri, 13 Nov 2020 09:39:48 -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 S1726739AbgKMRfw (ORCPT + 99 others); Fri, 13 Nov 2020 12:35:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726437AbgKMRfu (ORCPT ); Fri, 13 Nov 2020 12:35:50 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A218C0617A6 for ; Fri, 13 Nov 2020 09:35:50 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: aratiu) with ESMTPSA id CB0F81F46B63 From: Adrian Ratiu To: linux-arm-kernel@lists.infradead.org Cc: Nathan Chancellor , Nick Desaulniers , Arnd Bergmann , Russell King , Ard Biesheuvel , Arvind Sankar , kernel@collabora.com, clang-built-linux , Linux Kernel Mailing List Subject: [PATCH v3 1/2] arm: lib: xor-neon: remove unnecessary GCC < 4.6 warning Date: Fri, 13 Nov 2020 19:37:22 +0200 Message-Id: <20201113173723.2078845-2-adrian.ratiu@collabora.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201113173723.2078845-1-adrian.ratiu@collabora.com> References: <20201113173723.2078845-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.29.2