Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Dec 2012 20:16:21 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
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
Message-ID:  <201212222016.qBMKGLnl045023@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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<MemIntrinsic>(I->U->getUser())) {
-      if (MI->isVolatile())
+      if (MI->isVolatile() || !isa<Constant>(MI->getLength()))
         return false;
       if (MemTransferInst *MTI = dyn_cast<MemTransferInst>(I->U->getUser())) {
         const AllocaPartitioning::MemTransferOffsets &MTO



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212222016.qBMKGLnl045023>