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

David Blaikie dblaikie at gmail.com
Sat Feb 4 22:00:03 PST 2012


> 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.

- David




More information about the llvm-commits mailing list