From owner-svn-src-all@FreeBSD.ORG Sun Feb 22 15:56:17 2015 Return-Path: Delivered-To: svn-src-all@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 86C8C7F8; Sun, 22 Feb 2015 15:56:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58BD6199; Sun, 22 Feb 2015 15:56:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1MFuHuc010008; Sun, 22 Feb 2015 15:56:17 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1MFuHfY010007; Sun, 22 Feb 2015 15:56:17 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502221556.t1MFuHfY010007@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 22 Feb 2015 15:56:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279162 - head/contrib/llvm/patches 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.18-1 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: Sun, 22 Feb 2015 15:56:17 -0000 Author: dim Date: Sun Feb 22 15:56:16 2015 New Revision: 279162 URL: https://svnweb.freebsd.org/changeset/base/279162 Log: Add llvm patch corresponding to r279161. Added: head/contrib/llvm/patches/patch-32-llvm-r230058-indirectbrs-assert.diff Added: head/contrib/llvm/patches/patch-32-llvm-r230058-indirectbrs-assert.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-32-llvm-r230058-indirectbrs-assert.diff Sun Feb 22 15:56:16 2015 (r279162) @@ -0,0 +1,55 @@ +Pull in r230058 from upstream llvm trunk (by Benjamin Kramer): + + LoopRotate: When reconstructing loop simplify form don't split edges + from indirectbrs. + + Yet another chapter in the endless story. While this looks like we + leave the loop in a non-canonical state this replicates the logic in + LoopSimplify so it doesn't diverge from the canonical form in any way. + + PR21968 + +This fixes a "Cannot split critical edge from IndirectBrInst" assertion +failure when building the devel/radare2 port. + +Introduced here: https://svnweb.freebsd.org/changeset/base/279161 + +Index: lib/Transforms/Scalar/LoopRotation.cpp +=================================================================== +--- lib/Transforms/Scalar/LoopRotation.cpp ++++ lib/Transforms/Scalar/LoopRotation.cpp +@@ -498,6 +498,8 @@ bool LoopRotate::rotateLoop(Loop *L, bool Simplifi + Loop *PredLoop = LI->getLoopFor(*PI); + if (!PredLoop || PredLoop->contains(Exit)) + continue; ++ if (isa((*PI)->getTerminator())) ++ continue; + SplitLatchEdge |= L->getLoopLatch() == *PI; + BasicBlock *ExitSplit = SplitCriticalEdge(*PI, Exit, this); + ExitSplit->moveBefore(Exit); +Index: test/Transforms/LoopRotate/crash.ll +=================================================================== +--- test/Transforms/LoopRotate/crash.ll ++++ test/Transforms/LoopRotate/crash.ll +@@ -153,3 +153,21 @@ entry: + "5": ; preds = %"3", %entry + ret void + } ++ ++; PR21968 ++define void @test8(i1 %C, i8* %P) #0 { ++entry: ++ br label %for.cond ++ ++for.cond: ; preds = %for.inc, %entry ++ br i1 %C, label %l_bad, label %for.body ++ ++for.body: ; preds = %for.cond ++ indirectbr i8* %P, [label %for.inc, label %l_bad] ++ ++for.inc: ; preds = %for.body ++ br label %for.cond ++ ++l_bad: ; preds = %for.body, %for.cond ++ ret void ++}