[llvm-dev] Most efficient way to check if a <n x i1> vector only contains 1s

zhi chen via llvm-dev llvm-dev at lists.llvm.org
Wed Jan 20 17:18:58 PST 2016


Hi all,

What's is the most efficient way to check if a vectorType Value a <n x i1>
only contains 1s in LLVM, where n is even? I tried to extract each element
and then insert an ICmpInst with low efficiency because I didn't see a
reduction operation. Is there any better way?

Best,
Zhi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160120/1aa380d7/attachment.html>


More information about the llvm-dev mailing list