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=-3.8 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,URIBL_BLOCKED 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 8A5B6C388F7 for ; Tue, 10 Nov 2020 22:31:49 +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 12CE12068D for ; Tue, 10 Nov 2020 22:31:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SUIrNXfH"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="K/LL2lfA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 12CE12068D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alum.mit.edu 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:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=EF/bsb1z6m2SjGSrqx/bf4H+jyfBUt6bJQoVw9OxEjk=; b=SUIrNXfHXfpKBPdCbeUNng0ve TiMR4X48hq54cIZBbM4nososf+lAxZLIwIestSHdfTr5T+dBVr056cRek1mWS8wVDINU+Ok1LjsgG loV6HCBMO+S/+33LZZLkKLJpuZ80dvYtvfm880PhbbtPjWxXTq2b/RfQ6H5XowRzWpRrt2dWA8LlT dGHnTvTbeycseTKhXHB8ygwlW0u4EQFmBSpJLJnR5MaV7IwPaXRxbNU2Js7DL0r6YdZzmVy7Rauyk PlR+nwEamhYE92Mm6gHfhi4KCAAyMGoy+qBQaINVcJ6A8g+9toiK1/sawoQ81UjpL17yjkDuYeaEL O7TJwR72Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcc9I-0004Tj-7J; Tue, 10 Nov 2020 22:30:00 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcbv4-00062W-6V for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 22:15:28 +0000 Received: by mail-qk1-x741.google.com with SMTP id h15so13146981qkl.13 for ; Tue, 10 Nov 2020 14:15:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=uIOzI8x2X1SZGvfM2NfEeGZjOdYhmoI7amgUKQgpunY=; b=K/LL2lfALMmOHYaFluLeF7ajWtNG/IZxN6cpjSQUl3oKYuF63EVb6hnPmRksiKpikc zDvm4gP8LZe6+aH1RbfsNB6+sxlL+B0R+KvW5rfZKSYa98ZYNCzi0sbUfyQAWvSrMu2t Q9H9n35b1vXgQvF1teMaaJLsdL1hOytCQujaFVLB+jZGuBaKBipBV9OtcFmzp6reMSHv U/le7QaCI6uxNFLwbK4l2INR/SQriinbei2NJXAyNLba8+eiI/zIzU5MFUfGonx1QLyL hkS6uhZxrnn3xzXvuYIdCMwqyj4vYDeg/ozt+G+2MKMR8lNcwYD6fVo7ZxUxwTN0Vo+1 1ujw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:date:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=uIOzI8x2X1SZGvfM2NfEeGZjOdYhmoI7amgUKQgpunY=; b=sI1PhOJe7gq0xC49PPRzb83yRkPoW5nvfGvx9wf+dIfDFdMmZVp4l8s7DGb+aFl2Z6 ljajTqhRNZ9pELHfeyRZyQjfmLuWfPaT7Gk+LtopNzsFCspRf4ZkD9iuCLUdRrTu3XmD 5+NJcBXSIc/DkIf70TSuF/rebStsUSMbyOYaEyQUjWNjDfWw7mN6DYWmyMIpSzYhjF8R H7jxsH3SRVI5LlEEC9Wumkk14oW8bgl/bus/Vh1Ku49FZLCHH6ruavZ23Re+EtO8Dh4v IWDJmw0OFjXpqGbQsONjeMlKrbS66X4LqWJRMRt/8xyCA+eqQuR3nnWnIOhsXLLKULUR D3TQ== X-Gm-Message-State: AOAM531tqXh55bRw5IZOvK51ZvX0JLtYr/J1JzLF+VOKY27kmiSloh9r QdtLXhyKb2KSobF92kZ5mVI= X-Google-Smtp-Source: ABdhPJxJVjhLD6VaxM0tXb7NyppHqncBfJwFgOko/fVzM69cKPtOKyHEp8DOvei2rH9hArmCIjlM5g== X-Received: by 2002:a37:7ac3:: with SMTP id v186mr21828124qkc.451.1605046514064; Tue, 10 Nov 2020 14:15:14 -0800 (PST) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id c76sm189612qkb.20.2020.11.10.14.15.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 14:15:13 -0800 (PST) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Tue, 10 Nov 2020 17:15:11 -0500 To: Nick Desaulniers Subject: Re: [PATCH 2/2] arm: lib: xor-neon: disable clang vectorization Message-ID: <20201110221511.GA1373528@rani.riverdale.lan> References: <20201106051436.2384842-1-adrian.ratiu@collabora.com> <20201106051436.2384842-3-adrian.ratiu@collabora.com> <20201106101419.GB3811063@ubuntu-m3-large-x86> <87wnyyvh56.fsf@collabora.com> <871rh2i9xg.fsf@iwork.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201110_171518_381794_B7D14581 X-CRM114-Status: GOOD ( 18.74 ) 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 , Adrian Ratiu , Russell King , LKML , clang-built-linux , Nathan Chancellor , Collabora Kernel ML , Ard Biesheuvel , Linux ARM 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 On Tue, Nov 10, 2020 at 01:41:17PM -0800, Nick Desaulniers wrote: > On Mon, Nov 9, 2020 at 11:51 AM Adrian Ratiu wrote: > > > > On Fri, 06 Nov 2020, Nick Desaulniers > > wrote: > > > +#pragma clang loop vectorize(enable) > > > do { > > > p1[0] ^= p2[0] ^ p3[0] ^ p4[0] ^ p5[0]; p1[1] ^= > > > p2[1] ^ p3[1] ^ p4[1] ^ p5[1]; > > > ``` seems to generate the vectorized code. > > > > > > Why don't we find a way to make those pragma's more toolchain > > > portable, rather than open coding them like I have above rather > > > than this series? > > > > Hi again Nick, > > > > How did you verify the above pragmas generate correct vectorized > > code? Have you tested this specific use case? > > I read the disassembly before and after my suggested use of pragmas; > look for vld/vstr. You can also add -Rpass-missed=loop-vectorize to > CFLAGS_xor-neon.o in arch/arm/lib/Makefile and rebuild > arch/arm/lib/xor-neon.o with CONFIG_BTRFS enabled. > https://godbolt.org/z/1oo9M6 With the __restrict__ keywords added, clang seems to vectorize the loop, but still reports that vectorization wasn't beneficial -- any idea what's going on? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel