From owner-svn-src-all@FreeBSD.ORG Sat Dec 22 20:16:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C668EC8E; Sat, 22 Dec 2012 20:16:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A9E028FC15; Sat, 22 Dec 2012 20:16:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBMKGLX9045024; Sat, 22 Dec 2012 20:16:21 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBMKGLnl045023; Sat, 22 Dec 2012 20:16:21 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201212222016.qBMKGLnl045023@svn.freebsd.org> From: Dimitry Andric Date: Sat, 22 Dec 2012 20:16:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244598 - head/contrib/llvm/lib/Transforms/Scalar X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Dec 2012 20:16:21 -0000 Author: dim Date: Sat Dec 22 20:16:21 2012 New Revision: 244598 URL: http://svnweb.freebsd.org/changeset/base/244598 Log: Pull in r170353 from upstream llvm trunk: Fix another SROA crasher, PR14601. This was a silly oversight, we weren't pruning allocas which were used by variable-length memory intrinsics from the set that could be widened and promoted as integers. Fix that. This should fix the following assertion failure: Assertion failed: (CanSROA), function visitUsers, file /usr/src/lib/clang/libllvmscalaropts/../../../contrib/llvm/lib/Transforms/Scalar/SROA.cpp, line 2395. Reported by: gerald Modified: head/contrib/llvm/lib/Transforms/Scalar/SROA.cpp Modified: head/contrib/llvm/lib/Transforms/Scalar/SROA.cpp ============================================================================== --- head/contrib/llvm/lib/Transforms/Scalar/SROA.cpp Sat Dec 22 20:05:42 2012 (r244597) +++ head/contrib/llvm/lib/Transforms/Scalar/SROA.cpp Sat Dec 22 20:16:21 2012 (r244598) @@ -2224,7 +2224,7 @@ static bool isIntegerWideningViable(cons !canConvertValue(TD, ValueTy, AllocaTy)) return false; } else if (MemIntrinsic *MI = dyn_cast(I->U->getUser())) { - if (MI->isVolatile()) + if (MI->isVolatile() || !isa(MI->getLength())) return false; if (MemTransferInst *MTI = dyn_cast(I->U->getUser())) { const AllocaPartitioning::MemTransferOffsets &MTO