From owner-svn-src-stable-10@FreeBSD.ORG Sun Dec 14 14:56:32 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13FE32FA for ; Sun, 14 Dec 2014 14:56:32 +0000 (UTC) Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com [74.125.82.48]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9CA93302 for ; Sun, 14 Dec 2014 14:56:31 +0000 (UTC) Received: by mail-wg0-f48.google.com with SMTP id y19so12610615wgg.21 for ; Sun, 14 Dec 2014 06:56:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=UgkyLLGs09GDlFU0MJHgjAsSpvcWhlaeeFWhSwvwp4Q=; b=TOvNhXGl0TBKGRCV9ZwLCGOl/kZsQmokdY34mr3Fw36T48AqsERTPKG+ryO2OMhsln CkJ0/J1SvZokWGEFEPQcyeqA5FY1r/FI7/l2KdhhvhRc1r4Ebga+GU07TjcqvNJlAZDC YxBKF3gwSvJkWiufXDCFtFQFOpu+i8tQTSke/qLbxc9Z2CGLhEDSCjqJzjAZgchCEBpe H2Gs5tBj6Am8Bfk7M3IrQJ/PzUIThmkKs4FG2nvMbuqmSiPVY0qgEWNUhrnDocG4fWFu 9VlHJwLeBUUIqnYIY9CT1RHbzdullAOsAsZo5vzQaaaoO2O4tycBH3/EJi54/uuBfh0x 8d+w== X-Gm-Message-State: ALoCoQkI6KciKwY40TUaLD48DaitHJ7SgQH0tvjs0mbmL/3Z135AJ7gYkgD27C0Vzf5ca5bbXR5y X-Received: by 10.180.108.205 with SMTP id hm13mr24538897wib.5.1418568983926; Sun, 14 Dec 2014 06:56:23 -0800 (PST) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by mx.google.com with ESMTPSA id d2sm9416411wjs.32.2014.12.14.06.56.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Dec 2014 06:56:23 -0800 (PST) From: Steven Hartland X-Google-Original-From: Steven Hartland Message-ID: <548DA4A3.8020000@freebsd.org> Date: Sun, 14 Dec 2014 14:54:27 +0000 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Dimitry Andric , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r275742 - in stable: 10/contrib/llvm/lib/Transforms/Vectorize 10/sys/sys 9/contrib/llvm/lib/Transforms/Vectorize 9/sys/sys References: <201412131214.sBDCESwJ033037@svn.freebsd.org> In-Reply-To: <201412131214.sBDCESwJ033037@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2014 14:56:32 -0000 Sounds nasty, is this something that only effects stable/10 or does it also effects 10.1-RELEASE? On 13/12/2014 12:14, Dimitry Andric wrote: > Author: dim > Date: Sat Dec 13 12:14:26 2014 > New Revision: 275742 > URL: https://svnweb.freebsd.org/changeset/base/275742 > > Log: > MFC r275633: > > Pull in r223171 from upstream llvm trunk (by Michael Zolotukhin): > > PR21302. Vectorize only bottom-tested loops. > > rdar://problem/18886083 > > This fixes a bug in the llvm vectorizer, which could sometimes cause > vectorized loops to perform an additional iteration, leading to possible > buffer overruns. Symptoms of this, which are usually segfaults, were > first noticed when building gcc ports, here: > > https://lists.freebsd.org/pipermail/freebsd-ports/2014-September/095466.html > https://lists.freebsd.org/pipermail/freebsd-toolchain/2014-September/001211.html > > Since this fix is very important for ports, bump __FreeBSD_version to > make it easier for port maintainers to test whether the fix has been > applied. > > Upstream PR: http://llvm.org/PR21302 > > Modified: > stable/10/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp > stable/10/sys/sys/param.h > Directory Properties: > stable/10/ (props changed) > > Changes in other areas also in this revision: > Modified: > stable/9/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp > stable/9/sys/sys/param.h > Directory Properties: > stable/9/contrib/llvm/ (props changed) > stable/9/sys/ (props changed) > > Modified: stable/10/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp > ============================================================================== > --- stable/10/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp Sat Dec 13 04:50:14 2014 (r275741) > +++ stable/10/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp Sat Dec 13 12:14:26 2014 (r275742) > @@ -2864,6 +2864,14 @@ bool LoopVectorizationLegality::canVecto > if (!TheLoop->getExitingBlock()) > return false; > > + // We only handle bottom-tested loops, i.e. loop in which the condition is > + // checked at the end of each iteration. With that we can assume that all > + // instructions in the loop are executed the same number of times. > + if (TheLoop->getExitingBlock() != TheLoop->getLoopLatch()) { > + DEBUG(dbgs() << "LV: loop control flow is not understood by vectorizer\n"); > + return false; > + } > + > // We need to have a loop header. > DEBUG(dbgs() << "LV: Found a loop: " << > TheLoop->getHeader()->getName() << '\n'); > > Modified: stable/10/sys/sys/param.h > ============================================================================== > --- stable/10/sys/sys/param.h Sat Dec 13 04:50:14 2014 (r275741) > +++ stable/10/sys/sys/param.h Sat Dec 13 12:14:26 2014 (r275742) > @@ -58,7 +58,7 @@ > * in the range 5 to 9. > */ > #undef __FreeBSD_version > -#define __FreeBSD_version 1001503 /* Master, propagated to newvers */ > +#define __FreeBSD_version 1001504 /* Master, propagated to newvers */ > > /* > * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, >