[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:25:56 PST 2016
BTW, I also used bitcast to cast <nxi1> to i_n and then compare it with a
n-bit data with all 1s to check equivalence. But it seemed that it was
still slow.
Best,
Zhi
On Wed, Jan 20, 2016 at 5:18 PM, zhi chen <zchenhn at gmail.com> wrote:
> 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/0f18cca6/attachment.html>
More information about the llvm-dev
mailing list