[LLVMdev] Misunderstanding vector

Jonathan S. Shapiro shap at eros-os.com
Sun Sep 21 11:45:37 PDT 2008


I was re-reading the specification for extractelement and friends, and I
notice that the index is restricted to i32. Since vectors might clearly
have a larger number of elements on 64-bit platforms, I wonder if I am
misunderstanding the intended use of these instructions.

Is this indeed intended for vector and structure access in general, or
is intended to support (only) more specialized SIMD usage?

My real reason for asking is that we would like to remove the "Word"
type (basically: uintptr_t) from the BitC language core, but we
currently specify arrays and vectors as indexed by Word. If we can get
away with specifying the same core type for indices (probably int64) on
all targets without a bad efficiency compromise, I would like to do
that, so I'm trying to understand how LLVM handles this issue.

Thanks


shap




More information about the llvm-dev mailing list