[PATCH] Extending Vector GetElementPtr - please review

David Blaikie dblaikie at gmail.com
Wed Jun 17 08:41:06 PDT 2015


On Wed, Jun 17, 2015 at 2:26 AM, Elena Demikhovsky <
elena.demikhovsky at intel.com> wrote:

> Hi hfinkel, nadav, aschwaighofer,
>
> Changing syntax of vector GEP.
>
> Please see the start of discussion:
> http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-March/082921.html
> And the end agreement:
> http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-March/082989.html
>
> According to the current GEP syntax, vector GEP requires that each index
> must be a vector with the same number of elements.
>
> %A = getelementptr <4 x i8*> %ptrs, <4 x i64> %offsets
>

(as an aside, this is the old GEP syntax, the new syntax has an explicit
type before the first parameter, FWIW - I don't think the opaque pointer
work I'm doing is in conflict with what you're proposing, but it's
something to keep in mind)


>
> In this implementation I let each index be or vector or scalar. All vector
> indices must have the same number of elements. The scalar value will mean
> the splat vector value.
>
> %A = getelementptr i8* %ptr, <4 x i64> %offsets
>

^ what's the type of the result of this operation/what's it do?


> or
> %A = getelementptr <4 x i8*> %ptrs, i64 %offset
>

(this one seems more obvious to me - I assume the result is anotehr <4 x
i8*> with the offset applied to each vector element)


>
> REPOSITORY
>   rL LLVM
>
> http://reviews.llvm.org/D10496
>
> Files:
>   include/llvm/IR/Instructions.h
>   lib/AsmParser/LLParser.cpp
>   lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
>   lib/IR/Verifier.cpp
>   test/Assembler/getelementptr_vec_idx1.ll
>   test/Assembler/getelementptr_vec_idx2.ll
>   test/Assembler/getelementptr_vec_idx3.ll
>   test/CodeGen/X86/masked_gather_scatter.ll
>   test/CodeGen/X86/vector-gep.ll
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150617/30d54728/attachment.html>


More information about the llvm-commits mailing list