From owner-svn-src-head@freebsd.org Wed Apr 15 19:10:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D4F432BEF7D; Wed, 15 Apr 2020 19:10:52 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 492X4q6YGDz4FYH; Wed, 15 Apr 2020 19:10:51 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id OnQsjaKYO7t92OnQujUjo6; Wed, 15 Apr 2020 13:10:49 -0600 X-Authority-Analysis: v=2.3 cv=Os7UNx3t c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=cl8xLZFz6L8A:10 a=6I5d2MoRAAAA:8 a=Twlkf-z8AAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=ecL7gJOssGGFj1JnKDIA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=-74SuR6ZdpOK_LpdRCUo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 88CE21971; Wed, 15 Apr 2020 12:10:45 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id 03FJAin8009232; Wed, 15 Apr 2020 12:10:44 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id 03FJAiZa009229; Wed, 15 Apr 2020 12:10:44 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202004151910.03FJAiZa009229@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Dimitry Andric cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r359981 - head/contrib/llvm-project/llvm/lib/Target/PowerPC In-reply-to: <202004151843.03FIhi1W031973@repo.freebsd.org> References: <202004151843.03FIhi1W031973@repo.freebsd.org> Comments: In-reply-to Dimitry Andric message dated "Wed, 15 Apr 2020 18:43:44 -0000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 15 Apr 2020 12:10:44 -0700 X-CMAE-Envelope: MS4wfIwZ5+xSNYp7wVGHI78unSbZA2JSS7W5I5yamfuHKzeL8GheyuoWsuZ6Rz35YgC9i3q4cV1k7vKdcHSDfUUDN6fZO+dcaJ1lQC49TM1xK/4rL24bL/xv GnA9Gpew4wYqdjmrKyeXmqxOVaGLhghPUBbHo6T4dxvG9WT2Llyo11mtcjLl1bUB1MvJ+bTxjiAVru+/qyyg5x15hAQKpb6U00FOEa5pT0rfNXPZ+AE3mCk9 8t+P4ctWkp1LVg0I1C3DWrSlpWarfRiNRKtzNtocsZw/LkdcY2wDU+VABeT9bMqm X-Rspamd-Queue-Id: 492X4q6YGDz4FYH X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Apr 2020 19:10:52 -0000 In message <202004151843.03FIhi1W031973@repo.freebsd.org>, Dimitry Andric write s: > Author: dim > Date: Wed Apr 15 18:43:44 2020 > New Revision: 359981 > URL: https://svnweb.freebsd.org/changeset/base/359981 > > Log: > Revert commit a9ad65a2b from llvm git (by Nemanja Ivanovic): > > [PowerPC] Change default for unaligned FP access for older subtargets > > This is a fix for https://bugs.llvm.org/show_bug.cgi?id=40554 > > Some CPU's trap to the kernel on unaligned floating point access and > there are kernels that do not handle the interrupt. The program then > fails with a SIGBUS according to the PR. This just switches the > default for unaligned access to only allow it on recent server CPUs > that are known to allow this. > > Differential revision: https://reviews.llvm.org/D71954 > > This upstream commit causes a compiler hang when building certain ports > (e.g. security/nss, multimedia/x264) for powerpc64. The hang has been > reported in https://bugs.llvm.org/show_bug.cgi?id=45186, but in the mean > time it is more convenient to revert the commit. > > Requested by: jhibbits > MFC after: 6 weeks > X-MFC-With: 358851 > > Modified: > head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.td > head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp > head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.h > > Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.td > ============================================================================= > = > --- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.td Wed Apr 15 18:3 > 9:12 2020 (r359980) > +++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.td Wed Apr 15 18:4 > 3:44 2020 (r359981) > @@ -166,9 +166,6 @@ def FeatureHTM : SubtargetFeature<"htm", "HasHTM", "tr > "Enable Hardware Transactional Memory inst > ructions">; > def FeatureMFTB : SubtargetFeature<"", "FeatureMFTB", "true", > "Implement mftb using the mfspr inst > ruction">; > -def FeatureUnalignedFloats : > - SubtargetFeature<"allow-unaligned-fp-access", "AllowsUnalignedFPAccess", > - "true", "CPU does not trap on unaligned FP access">; > def FeaturePPCPreRASched: > SubtargetFeature<"ppc-prera-sched", "UsePPCPreRASchedStrategy", "true", > "Use PowerPC pre-RA scheduling strategy">; > @@ -255,8 +252,7 @@ def ProcessorFeatures { > FeatureExtDiv, > FeatureMFTB, > DeprecatedDST, > - FeatureTwoConstNR, > - FeatureUnalignedFloats]; > + FeatureTwoConstNR]; > list P7SpecificFeatures = []; > list P7Features = > !listconcat(P7InheritableFeatures, P7SpecificFeatures); > > Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.c > pp > ============================================================================= > = > --- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp > Wed Apr 15 18:39:12 2020 (r359980) > +++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp > Wed Apr 15 18:43:44 2020 (r359981) > @@ -15251,9 +15251,6 @@ bool PPCTargetLowering::allowsMisalignedMemoryAccesse > s > if (!VT.isSimple()) > return false; > > - if (VT.isFloatingPoint() && !Subtarget.allowsUnalignedFPAccess()) > - return false; > - > if (VT.getSimpleVT().isVector()) { > if (Subtarget.hasVSX()) { > if (VT != MVT::v2f64 && VT != MVT::v2i64 && > > Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.h > ============================================================================= > = > --- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.h Wed Apr > 15 18:39:12 2020 (r359980) > +++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.h Wed Apr > 15 18:43:44 2020 (r359981) > @@ -124,7 +124,6 @@ class PPCSubtarget : public PPCGenSubtargetInfo { (pro > bool IsPPC4xx; > bool IsPPC6xx; > bool FeatureMFTB; > - bool AllowsUnalignedFPAccess; > bool DeprecatedDST; > bool HasLazyResolverStubs; > bool IsLittleEndian; > @@ -275,7 +274,6 @@ class PPCSubtarget : public PPCGenSubtargetInfo { (pro > bool vectorsUseTwoUnits() const {return VectorsUseTwoUnits; } > bool isE500() const { return IsE500; } > bool isFeatureMFTB() const { return FeatureMFTB; } > - bool allowsUnalignedFPAccess() const { return AllowsUnalignedFPAccess; } > bool isDeprecatedDST() const { return DeprecatedDST; } > bool hasICBT() const { return HasICBT; } > bool hasInvariantFunctionDescriptors() const { > I'm seeing this on amd64: --- Target/PowerPC/PPCSubtarget.o --- /opt/src/svn-current/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarg et.cpp:103:3: error: use of undeclared identifier 'AllowsUnalignedFPAccess' AllowsUnalignedFPAccess = false; ^ AllowsUnalignedFPAccess reference should be removed as well. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few.