[llvm-dev] vector instruction

Sam Elliott via llvm-dev llvm-dev at lists.llvm.org
Tue Aug 29 10:28:59 PDT 2017


This depends on what you mean by "instruction". More context would have been useful.

LLVM IR is typed, and therefore you will see the operation applied to vector-typed arguments. For example `%3 = add i32 %1, %2` is the scalar version, `%3 = add <4 x i32> %1, %2` is the vectorised version (for a given IR vector type). The language reference [] has specifics on which instructions can operate on both vectors and scalars. 

I don't know anything about MIR.

If you're looking at target-specific instructions (such as x86), you should look up the instruction documentation as provided by the manufacturer/ISA)

Sam

[] https://llvm.org/docs/LangRef.html


> On 29 Aug 2017, at 2:44 am, Anastasiya Ruzhanskaya via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> Hello,
> is there a good way to determine that the instruction is a vector instruction? Or the only way like it's size is multiple of the operands size?
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

--
Archibald Sam Elliott
ashe2 at cs.washington.edu
PhD Student, PLSE Group

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170829/f0bb8cad/attachment.html>


More information about the llvm-dev mailing list