From owner-freebsd-ports@FreeBSD.ORG Tue May 7 14:45:33 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AF3E09C4 for ; Tue, 7 May 2013 14:45:33 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) by mx1.freebsd.org (Postfix) with ESMTP id 59EC3CFE for ; Tue, 7 May 2013 14:45:33 +0000 (UTC) Received: from spaceball.andric.com (spaceball.andric.com [IPv6:2001:7b8:3a7:0:204:4bff:fe01:de8a]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 992F75C46; Tue, 7 May 2013 16:45:31 +0200 (CEST) Message-ID: <5189138A.5060005@FreeBSD.org> Date: Tue, 07 May 2013 16:45:30 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Thunderbird/21.0 MIME-Version: 1.0 To: =?UTF-8?B?UmFmYWVsIEVzcMOtbmRvbGE=?= Subject: Re: firefox build broken under clang 3.3 References: <20130419020021.GA16918@test.yahoo.com> <51716917.90101@smeets.im> <517187B9.40106@smeets.im> <1UXDVA-0001b7-7U@internal.tormail.org> In-Reply-To: Content-Type: multipart/mixed; boundary="------------060506060008080900060000" Cc: kit , Ehsan Akhgari , Brandon Gooch , Benjamin Kramer , "freebsd-ports@freebsd.org ports" , Jan Beich X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 May 2013 14:45:33 -0000 This is a multi-part message in MIME format. --------------060506060008080900060000 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 2013-05-07 14:59, Rafael Esp=C3=ADndola wrote: > On 1 May 2013 00:26, Rafael Esp=C3=ADndola = wrote: >> This is now >> >> http://llvm.org/bugs/show_bug.cgi?id=3D15882 > > And it got fixed! :-) > > It just missed 3.3 branching, but I will make sure it gets ported. Okay, can the original posters that suffered from the crash, please try the attached patch on their -current source, then try to rebuild the Firefox port, and check if the crash has disappeared? If you just want to incrementally build clang, you can do: cd /usr/src/lib/clang/libllvmvectorize make cd /usr/src/usr.bin/clang/clang make sudo make install -Dimitry --------------060506060008080900060000 Content-Type: text/x-diff; name="fix-llvm-pr15882-1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fix-llvm-pr15882-1.diff" Index: contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp =================================================================== --- contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp (revision 250331) +++ contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp (working copy) @@ -214,7 +214,7 @@ class InnerLoopVectorizer { /// This function adds 0, 1, 2 ... to each vector element, starting at zero. /// If Negate is set then negative numbers are added e.g. (0, -1, -2, ...). /// The sequence starts at StartIndex. - Value *getConsecutiveVector(Value* Val, unsigned StartIdx, bool Negate); + Value *getConsecutiveVector(Value* Val, int StartIdx, bool Negate); /// When we go over instructions in the basic block we rely on previous /// values within the current basic block or on loop invariant values. @@ -771,7 +771,7 @@ Value *InnerLoopVectorizer::getBroadcastInstrs(Val return Shuf; } -Value *InnerLoopVectorizer::getConsecutiveVector(Value* Val, unsigned StartIdx, +Value *InnerLoopVectorizer::getConsecutiveVector(Value* Val, int StartIdx, bool Negate) { assert(Val->getType()->isVectorTy() && "Must be a vector"); assert(Val->getType()->getScalarType()->isIntegerTy() && @@ -784,8 +784,8 @@ Value *InnerLoopVectorizer::getBroadcastInstrs(Val // Create a vector of consecutive numbers from zero to VF. for (int i = 0; i < VLen; ++i) { - int Idx = Negate ? (-i): i; - Indices.push_back(ConstantInt::get(ITy, StartIdx + Idx)); + int64_t Idx = Negate ? (-i) : i; + Indices.push_back(ConstantInt::get(ITy, StartIdx + Idx, Negate)); } // Add the consecutive indices to the vector value. @@ -1928,7 +1928,8 @@ InnerLoopVectorizer::vectorizeBlockInLoop(LoopVect // After broadcasting the induction variable we need to make the // vector consecutive by adding ... -3, -2, -1, 0. for (unsigned part = 0; part < UF; ++part) - Entry[part] = getConsecutiveVector(Broadcasted, -VF * part, true); + Entry[part] = getConsecutiveVector(Broadcasted, -(int)VF * part, + true); continue; } --------------060506060008080900060000--