Date: Tue, 07 May 2013 16:45:30 +0200 From: Dimitry Andric <dim@FreeBSD.org> To: =?UTF-8?B?UmFmYWVsIEVzcMOtbmRvbGE=?= <rafael.espindola@gmail.com> Cc: kit <ktsin@acm.org>, Ehsan Akhgari <ehsan.akhgari@gmail.com>, Brandon Gooch <jamesbrandongooch@gmail.com>, Benjamin Kramer <benny.kra@gmail.com>, "freebsd-ports@freebsd.org ports" <freebsd-ports@freebsd.org>, Jan Beich <jbeich@tormail.org> Subject: Re: firefox build broken under clang 3.3 Message-ID: <5189138A.5060005@FreeBSD.org> In-Reply-To: <CAG3jRe%2BAuV6hmY-4Tnro0cQepN=y7A_6--JDUO7E2M8_7TVx6g@mail.gmail.com> References: <20130419020021.GA16918@test.yahoo.com> <51716917.90101@smeets.im> <F82EAEBA-C47D-4AC6-8FAE-AC3541B131C7@FreeBSD.org> <517187B9.40106@smeets.im> <CALBk6yLOV8fzdAY9y0_7SZvR9N8J-19FrwZjFv4t14ub8wmGiA@mail.gmail.com> <1UXDVA-0001b7-7U@internal.tormail.org> <ED3C5033-F932-4F56-895F-906873667C64@freebsd.org> <CAG3jReLD=B9Xd22nvcaUstN3D9EdkEmB--q8imzife2ZRO9qEA@mail.gmail.com> <CAG3jReJ75qo=uf%2BD1drm6y0QkHfpG0CZZrvLPEOBzzWn_fXx%2BA@mail.gmail.com> <CAG3jRe%2BAuV6hmY-4Tnro0cQepN=y7A_6--JDUO7E2M8_7TVx6g@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <rafael.espindola@gmail.com>= 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5189138A.5060005>