[PATCH] D35320: [X86][SSE] Add support for extending bool vectors bitcasted from scalars.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 15 13:38:25 PDT 2017
RKSimon added a comment.
In https://reviews.llvm.org/D35320#810639, @delena wrote:
> I'm thinking about another algorithm:
> let's assume that we have sext (bitcast i8 to 8 x i1) to <8 x i16>
>
> I can do the following:
>
> 1. broadcast i8 over the xmm
> 2. "pand" with vector-mask (1, 2, 4, 8, 16 ..)
> 3. compare with zeroinitializer
>
> If we have "zext" instead of "sext", we can put an additional shift-right at the end.
That makes sense, there may have to be special cases for older CPUs with weaker shift instructions but I'll see what I can do.
Repository:
rL LLVM
https://reviews.llvm.org/D35320
More information about the llvm-commits
mailing list