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=-6.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no 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 39216C2D0A3 for ; Fri, 6 Nov 2020 05:14:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D81982078B for ; Fri, 6 Nov 2020 05:14:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726190AbgKFFOs (ORCPT ); Fri, 6 Nov 2020 00:14:48 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:56518 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725837AbgKFFOs (ORCPT ); Fri, 6 Nov 2020 00:14:48 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: aratiu) with ESMTPSA id BD5F01F46653 From: Adrian Ratiu To: linux-arm-kernel@lists.infradead.org Cc: Nathan Chancellor , Nick Desaulniers , Arnd Bergmann , clang-built-linux@googlegroups.com, Russell King , linux-kernel@vger.kernel.org, kernel@collabora.com Subject: [PATCH 0/2] arm: lib: xor-neon: Remove warn & disble neon vect Date: Fri, 6 Nov 2020 07:14:34 +0200 Message-Id: <20201106051436.2384842-1-adrian.ratiu@collabora.com> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear all, This is my attempt to close the loop on a relatively old discussion [1] caused by a compiler bug [2]. In a nutshell, the Clang build issues a bogus warning about GCC while it silently botches the neon auto-loop vectorization. :) Many thanks to all who have investigated this issue before me. Arnd posted a workaround for xor.h [3], but I very much like his first suggestion of disabling the broken feature until the compiler is fixed. Tested on latest linux next-20201105 using bcm2835 & versatile configs and Clang 10.0.1 P.S: While testing aarch64/imx8m I also noticed vectorization is broke there as well, but that deserves its own patch because it's a separate xor-neon implementation (if this approach is deemed sensible). [1] https://patchwork.kernel.org/project/linux-arm-kernel/patch/20190528235742.105510-1-natechancellor@gmail.com/ [2] https://bugs.llvm.org/show_bug.cgi?id=40976 [3] https://bugs.llvm.org/show_bug.cgi?id=40976#c6 Kind regards, Adrian Adrian Ratiu (1): arm: lib: xor-neon: disable clang vectorization Nathan Chancellor (1): arm: lib: xor-neon: remove unnecessary GCC < 4.6 warning arch/arm/include/asm/xor.h | 3 ++- arch/arm/lib/Makefile | 3 +++ arch/arm/lib/xor-neon.c | 13 +++++-------- 3 files changed, 10 insertions(+), 9 deletions(-) -- 2.29.0 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=-6.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no 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 99AD1C2D0A3 for ; Fri, 6 Nov 2020 05:16:01 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 11EF420756 for ; Fri, 6 Nov 2020 05:16:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sHmGlkVy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 11EF420756 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=j3c5Vy+uYbrnE1NZBt081mm1EmUOIO295Snu4gMn0bs=; b=sHmGlkVyx0PeQ8uDe7RKsyAzyW chu5WEmN/7QCs/CfAyt4Pweu5d6P0eaYiJWDUFoYvCvetlMZeK8iyB0q6wvhC4dcfdO0tcudTK5Ob ScpfKSAztnbjbKdJeJDMbtmGezc3yGemTnFAh4p3ihGzCzTu1a4PrI6HKJeZHoGBZPmXShZTFS9AJ 89+g53EAPs9sSJUBjezp0LOVJtWCYef0G54i33p3epjR/esqI5SsooSabDEdQkpoCNocTg2kFfMnu IDnqctBXaknn5XYkMNJLi3pJETLJl4dcvjBKbJSsfNNiWH9vo13EL9JBPEgO+q3saph/LlC365qv6 HDSk4Qgw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kau5O-0006KS-0d; Fri, 06 Nov 2020 05:14:54 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kau5J-0006Ih-F0 for linux-arm-kernel@lists.infradead.org; Fri, 06 Nov 2020 05:14:50 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: aratiu) with ESMTPSA id BD5F01F46653 From: Adrian Ratiu To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 0/2] arm: lib: xor-neon: Remove warn & disble neon vect Date: Fri, 6 Nov 2020 07:14:34 +0200 Message-Id: <20201106051436.2384842-1-adrian.ratiu@collabora.com> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201106_001449_605639_DCDD5655 X-CRM114-Status: GOOD ( 12.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Nick Desaulniers , Russell King , linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nathan Chancellor , kernel@collabora.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Dear all, This is my attempt to close the loop on a relatively old discussion [1] caused by a compiler bug [2]. In a nutshell, the Clang build issues a bogus warning about GCC while it silently botches the neon auto-loop vectorization. :) Many thanks to all who have investigated this issue before me. Arnd posted a workaround for xor.h [3], but I very much like his first suggestion of disabling the broken feature until the compiler is fixed. Tested on latest linux next-20201105 using bcm2835 & versatile configs and Clang 10.0.1 P.S: While testing aarch64/imx8m I also noticed vectorization is broke there as well, but that deserves its own patch because it's a separate xor-neon implementation (if this approach is deemed sensible). [1] https://patchwork.kernel.org/project/linux-arm-kernel/patch/20190528235742.105510-1-natechancellor@gmail.com/ [2] https://bugs.llvm.org/show_bug.cgi?id=40976 [3] https://bugs.llvm.org/show_bug.cgi?id=40976#c6 Kind regards, Adrian Adrian Ratiu (1): arm: lib: xor-neon: disable clang vectorization Nathan Chancellor (1): arm: lib: xor-neon: remove unnecessary GCC < 4.6 warning arch/arm/include/asm/xor.h | 3 ++- arch/arm/lib/Makefile | 3 +++ arch/arm/lib/xor-neon.c | 13 +++++-------- 3 files changed, 10 insertions(+), 9 deletions(-) -- 2.29.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel