[llvm-commits] [llvm] r149810 - /llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp

NAKAMURA Takumi geek4civic at gmail.com
Sat Feb 4 22:28:24 PST 2012


2012/2/5 David Blaikie <dblaikie at gmail.com>:
>> BBVectorize.cpp: Get rid of comparision to bool to fix a warning.
>>
>> Modified:
>>    llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp
>
>> -        if (CurrentPairs.count(C->second) > 0 &&
>> +        if (CurrentPairs.count(C->second) != 0 &&
>
> Could you explain this? if count returns bool - perhaps dropping the "
> != 0" entirely would be better? It seems like "!= 0" is equally
> misleading (& still a comparison to bool, really) as "> 0" was.

I thought then, the clause already had the expression
"Visited.count(C->second) == 0", and I followed it. ;)
Feel free to paint our bikeshed!

...Takumi




More information about the llvm-commits mailing list