[llvm] r311227 - [SLP] Fix an unused variable warning in non-asserts builds.

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 10 17:57:40 PDT 2017


Sorry I never saw this David.

Generally, I wouldn't expect this to be expensive, so I suspect this is
fine. That said, I'm happy if others prefer hiding the variable entirely.

On Mon, Aug 28, 2017 at 6:10 PM David Blaikie <dblaikie at gmail.com> wrote:

> Is getting the alt opcode expensive enough that it's worth avoiding
> rolling this into the assert? (& is it worth wrapping it then in a #ifndef
> NDEBUG?)
>
> On Fri, Aug 18, 2017 at 10:07 PM Chandler Carruth via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> Author: chandlerc
>> Date: Fri Aug 18 22:06:23 2017
>> New Revision: 311227
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=311227&view=rev
>> Log:
>> [SLP] Fix an unused variable warning in non-asserts builds.
>>
>> Modified:
>>     llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
>>
>> Modified: llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp?rev=311227&r1=311226&r2=311227&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp (original)
>> +++ llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp Fri Aug 18
>> 22:06:23 2017
>> @@ -2349,6 +2349,7 @@ void BoUpSLP::reorderAltShuffleOperands(
>>                                          SmallVectorImpl<Value *> &Right)
>> {
>>    // Push left and right operands of binary operation into Left and Right
>>    unsigned AltOpcode = getAltOpcode(Opcode);
>> +  (void)AltOpcode;
>>    for (Value *V : VL) {
>>      auto *I = cast<Instruction>(V);
>>      assert(sameOpcodeOrAlt(Opcode, AltOpcode, I->getOpcode()) &&
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171011/cb415ab1/attachment.html>


More information about the llvm-commits mailing list